mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-05-02 08:57:44 +00:00
Merge pull request #783 from Skyliegirl33/feature-impl
[3.x] Use permissionInvisibilty to modify eobjs & fix states in Sastasha
This commit is contained in:
commit
42adb407dc
4 changed files with 53 additions and 54 deletions
|
@ -77,25 +77,25 @@ public:
|
|||
instance.addEObj( "unknown_0", 2000211, 0, 3280858, 4, { 367.827087f, 47.400051f, -226.694305f }, 4.714991f, 0.000432f, 0 );
|
||||
instance.addEObj( "sgvf_w_lvd_b0250", 2001504, 4323996, 4036038, 1, { 94.597588f, 26.865030f, -68.584061f }, 1.000000f, 0.000000f, 7 );
|
||||
// States -> vf_bextwall_on (id: 3) vf_bextwall_of (id: 4)
|
||||
instance.addEObj( "sgvf_w_lvd_b0249", 2001505, 4323997, 4036039, 1, { 95.510597f, 26.620729f, -67.853653f }, 1.000000f, 0.000000f, 7);
|
||||
instance.addEObj( "sgvf_w_lvd_b0249", 2001505, 4323997, 4036039, 4, { 95.510597f, 26.620729f, -67.853653f }, 1.000000f, 0.000000f, 0 );
|
||||
// States -> vf_line_on (id: 10) vf_line_of (id: 11)
|
||||
instance.addEObj( "unknown_1", 2001506, 3653862, 4056797, 4, { -9.239832f, 24.789940f, 35.778252f }, 0.991760f, 0.000048f, 0);
|
||||
instance.addEObj( "unknown_1", 2001506, 3653862, 4056797, 1, { -9.239832f, 24.789940f, 35.778252f }, 0.991760f, 0.000048f, 7 );
|
||||
instance.addEObj( "sgvf_w_lvd_b0094", 2001507, 4035750, 4056798, 4, { -2.841087f, 23.114571f, 38.090420f }, 0.991760f, 0.000048f, 0 );
|
||||
// States -> vf_line_on (id: 12) vf_line_of (id: 13)
|
||||
instance.addEObj( "unknown_2", 2001539, 3653864, 4036041, 4, { -158.560898f, 8.099012f, 214.344803f }, 0.991760f, 0.000048f, 0);
|
||||
instance.addEObj( "unknown_2", 2001539, 3653864, 4036041, 1, { -158.560898f, 8.099012f, 214.344803f }, 0.991760f, 0.000048f, 7 );
|
||||
instance.addEObj( "sgvf_w_lvd_b0094_1", 2001540, 4056793, 4036043, 4, { -163.598602f, 8.026373f, 214.030106f }, 0.991760f, 0.000048f, 0 );
|
||||
// States -> vf_line_on (id: 12) vf_line_of (id: 13)
|
||||
instance.addEObj( "sgpl_s1d1_bosswall", 2001508, 4236989, 4036045, 4, { -303.983612f, 5.576412f, 276.214111f }, 1.000000f, 0.000000f, 0);
|
||||
instance.addEObj( "sgpl_s1d1_bosswall", 2001508, 4236989, 4036045, 1, { -303.983612f, 5.576412f, 276.214111f }, 1.000000f, 0.000000f, 7 );
|
||||
instance.addEObj( "sgpl_s1d1_bossline", 2001509, 4236990, 4036046, 4, { -305.302002f, 5.542851f, 275.750885f }, 1.000000f, 0.000000f, 0 );
|
||||
instance.addEObj( "Entrance", 2000182, 4096706, 4096707, 5, { 361.881714f, 46.092751f, -225.181305f }, 1.000000f, 0.000000f, 0 );
|
||||
// States -> vf_lock_on (id: 11) vf_lock_of (id: 12)
|
||||
instance.addEObj( "Shortcut", 2000700, 0, 4033735, 4, { 344.705688f, 43.781551f, -217.365997f }, 0.991760f, 0.000048f, 0);
|
||||
instance.addEObj( "Shortcut", 2000700, 0, 4033735, 1, { 344.705688f, 43.781551f, -217.365997f }, 0.991760f, 0.000048f, 7 );
|
||||
instance.addEObj( "Exit", 2000139, 0, 3281180, 4, { -314.279114f, 5.630589f, 348.735596f }, 0.900235f, 0.000336f, 0 );
|
||||
instance.addEObj( "Bluecoralformation", 2000213, 3668215, 3280868, 4, { 75.869797f, 35.101421f, -32.537209f }, 0.930753f, 0.000240f, 0 );
|
||||
instance.addEObj( "Redcoralformation", 2000214, 3668214, 3280879, 4, { 88.769371f, 31.135691f, -40.869640f }, 0.930753f, 0.000240f, 0 );
|
||||
instance.addEObj( "Greencoralformation", 2000215, 3668216, 3280932, 4, { 64.988159f, 33.672821f, -56.690559f }, 0.991789f, 0.000048f, 0 );
|
||||
instance.addEObj( "Hiddendoor", 2000217, 3653517, 3280959, 4, { 59.000000f, 32.000000f, -35.000000f }, 1.000000f, -2.007129f, 0);
|
||||
instance.addEObj( "Giantclam", 2000222, 4208408, 3284776, 4, { 181.170303f, 32.104599f, -128.069000f }, 0.991789f, -0.862350f, 0);
|
||||
instance.addEObj( "Hiddendoor", 2000217, 3653517, 3280959, 1, { 59.000000f, 32.000000f, -35.000000f }, 1.000000f, -2.007129f, 0 );
|
||||
instance.addEObj( "Giantclam", 2000222, 4208408, 3284776, 1, { 181.170303f, 32.104599f, -128.069000f }, 0.991789f, -0.862350f, 0 );
|
||||
// States -> vf_kai_off (id: 4) vf_kai_on (id: 5) vf_kai_pop (id: 6) close_open (id: 7) open_close (id: 8)
|
||||
instance.addEObj( "sgbg_s1d1_p1_shel1", 2000260, 4208409, 3424283, 4, { 166.318695f, 30.735420f, -128.312103f }, 0.991789f, 0.481030f, 0 );
|
||||
// States -> vf_kai_off (id: 4) vf_kai_on (id: 5) vf_kai_pop (id: 6) close_open (id: 7) open_close (id: 8)
|
||||
|
@ -107,12 +107,11 @@ public:
|
|||
// States -> vf_kai_off (id: 4) vf_kai_on (id: 5) vf_kai_pop (id: 6) close_open (id: 7) open_close (id: 8)
|
||||
instance.addEObj( "sgbg_s1d1_p1_shel1_4", 2000264, 4208413, 3425474, 4, { 97.055313f, 27.081551f, -70.264381f }, 0.991789f, -0.618915f, 0 );
|
||||
// States -> vf_kai_off (id: 4) vf_kai_on (id: 5) vf_kai_pop (id: 6) close_open (id: 7) open_close (id: 8)
|
||||
|
||||
instance.addEObj( "Rambadedoor", 2000225, 3653865, 3281037, 4, { -35.299999f, 24.000000f, 60.799999f }, 1.000000f, -2.007129f, 0);
|
||||
instance.addEObj( "Rambadedoor", 2000225, 3653865, 3281037, 1, { -35.299999f, 24.000000f, 60.799999f }, 1.000000f, -2.007129f, 0 );
|
||||
instance.addEObj( "Captainsquarters", 2000227, 3687697, 3281045, 4, { -95.044670f, 20.513069f, 172.039597f }, 0.991789f, 0.000048f, 0 );
|
||||
instance.addEObj( "WaveriderGate", 2000231, 3655909, 3281133, 4, { -130.600006f, 16.000000f, 156.800003f }, 1.000000f, -2.007129f, 0 );
|
||||
instance.addEObj( "TheHole", 2000232, 3656260, 3281161, 4, { -36.000000f, 16.500000f, 163.300003f }, 1.000000f, 1.047198f, 0 );
|
||||
instance.addEObj( "Rambadedoor_1", 2000236, 3655908, 3281175, 4, { -190.000000f, 7.000000f, 252.000000f }, 1.000000f, -2.443461f, 0);
|
||||
instance.addEObj( "Rambadedoor_1", 2000236, 3655908, 3281175, 1, { -190.000000f, 7.000000f, 252.000000f }, 1.000000f, -2.443461f, 0 );
|
||||
instance.addEObj( "unknown_3", 2000235, 3656262, 3281178, 4, { -156.500000f, 8.600000f, 252.500000f }, 1.000000f, 1.134464f, 0 );
|
||||
instance.addEObj( "WaveriderGatekey", 2000255, 0, 3332312, 4, { -95.515343f, 20.000000f, 177.197800f }, 1.000000f, 0.000000f, 0 );
|
||||
instance.addEObj( "KeytotheHole", 2000256, 0, 3332313, 4, { -38.076599f, 17.232731f, 158.839401f }, 0.991760f, 1.561760f, 0 );
|
||||
|
@ -130,14 +129,14 @@ public:
|
|||
if( madison && !madison->isAlive() )
|
||||
{
|
||||
instance.setVar( 0, Seq3 );
|
||||
instance.getEObjByName( "Rambadedoor" )->setState( 1 );
|
||||
instance.getEObjByName( "Rambadedoor" )->setPermissionInvisibility( 7 );
|
||||
madison2 = instance.createBNpcFromInstanceId( 4035056, 600, Common::BNpcType::Enemy );
|
||||
madison = nullptr;
|
||||
}
|
||||
|
||||
if( madison2 && !madison2->isAlive() )
|
||||
{
|
||||
instance.getEObjByName( "Rambadedoor_1" )->setState( 1 );
|
||||
instance.getEObjByName( "Rambadedoor_1" )->setPermissionInvisibility( 7 );
|
||||
madison2 = nullptr;
|
||||
}
|
||||
|
||||
|
@ -166,7 +165,7 @@ public:
|
|||
eventMgr().eventActionStart( player, getId(), EventActionTouch,
|
||||
[ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional )
|
||||
{
|
||||
eobj.setState( 1 );
|
||||
eobj.setPermissionInvisibility( 1 );
|
||||
|
||||
if( eobj.getObjectId() == instance.getCustomVar( Coral ) )
|
||||
{
|
||||
|
@ -177,7 +176,6 @@ public:
|
|||
else
|
||||
{
|
||||
// TODO: spawn adds
|
||||
Logger::debug( "wrong coral!" );
|
||||
}
|
||||
},
|
||||
nullptr, getId() );
|
||||
|
@ -195,8 +193,8 @@ public:
|
|||
eventMgr().eventActionStart( player, getId(), EventActionTouch,
|
||||
[ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional )
|
||||
{
|
||||
instance.getEObjByName( "Hiddendoor" )->setState( 1 );
|
||||
eobj.setState( 1 );
|
||||
eobj.setPermissionInvisibility( 1 );
|
||||
instance.getEObjByName( "Hiddendoor" )->setPermissionInvisibility( 7 );
|
||||
instance.setVar( 0, Seq2 );
|
||||
instance.sendEventLogMessage( player, instance, 2064, { 0, 0 } );
|
||||
madison = instance.createBNpcFromInstanceId( 3988325, 600, Common::BNpcType::Enemy );
|
||||
|
@ -211,7 +209,7 @@ public:
|
|||
eventMgr().eventActionStart( player, getId(), EventActionShort,
|
||||
[ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional )
|
||||
{
|
||||
eobj.setState( 1 );
|
||||
eobj.setPermissionInvisibility( 1 );
|
||||
instance.setCustomVar( ObtainedKey, true );
|
||||
instance.sendEventLogMessage( player, instance, 2031, { 2000512 } );
|
||||
},
|
||||
|
@ -224,7 +222,7 @@ public:
|
|||
eventMgr().eventActionStart( player, getId(), EventActionShort,
|
||||
[ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional )
|
||||
{
|
||||
eobj.setState( 1 );
|
||||
eobj.setPermissionInvisibility( 1 );
|
||||
instance.setVar( 0, Seq4 );
|
||||
instance.sendEventLogMessage( player, instance, 2031, { 2000513 } );
|
||||
denn = instance.createBNpcFromInstanceId( 3978771, 1000, Common::BNpcType::Enemy );
|
||||
|
@ -244,7 +242,7 @@ public:
|
|||
eventMgr().eventActionStart( player, getId(), EventActionTouch,
|
||||
[ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional )
|
||||
{
|
||||
eobj.setState( 1 );
|
||||
eobj.setPermissionInvisibility( 1 );
|
||||
if( eobj.getName() == "Captainsquarters" )
|
||||
instance.sendEventLogMessage( player, instance, 2059, { 668 } );
|
||||
else
|
||||
|
|
|
@ -86,8 +86,6 @@ uint8_t Sapphire::Entity::EventObject::getState() const
|
|||
void Sapphire::Entity::EventObject::setState( uint8_t state )
|
||||
{
|
||||
m_state = state;
|
||||
|
||||
sendToInRangeSet( makeActorControl( getId(), DirectorEObjMod, state ) );
|
||||
}
|
||||
|
||||
void Sapphire::Entity::EventObject::setAnimationFlag( uint32_t flag, uint32_t animationFlag )
|
||||
|
@ -144,6 +142,7 @@ void Sapphire::Entity::EventObject::spawn( Sapphire::Entity::PlayerPtr pTarget )
|
|||
eobjStatePacket->data().EntityId = getId();
|
||||
eobjStatePacket->data().Dir = Util::floatToUInt16Rot( getRot() );
|
||||
eobjStatePacket->data().OwnerId = getOwnerId();
|
||||
eobjStatePacket->data().PermissionInvisibility = getPermissionInvisibility();
|
||||
eobjStatePacket->data().Args = 0xE0;
|
||||
eobjStatePacket->data().Args2 = 0; // initial animation state
|
||||
eobjStatePacket->data().Args3 = getHousingLink();
|
||||
|
@ -178,6 +177,8 @@ uint8_t Sapphire::Entity::EventObject::getPermissionInvisibility() const
|
|||
void Sapphire::Entity::EventObject::setPermissionInvisibility( uint8_t permissionInvisibility )
|
||||
{
|
||||
m_permissionInvisibility = permissionInvisibility;
|
||||
|
||||
sendToInRangeSet( makeActorControl( getId(), DirectorEObjMod, permissionInvisibility ) );
|
||||
}
|
||||
|
||||
uint32_t Sapphire::Entity::EventObject::getOwnerId() const
|
||||
|
|
|
@ -993,7 +993,7 @@ void DebugCommandMgr::instance( char* data, Entity::Player& player, std::shared_
|
|||
if( !obj )
|
||||
return;
|
||||
|
||||
obj->setState( state );
|
||||
obj->setPermissionInvisibility( state );
|
||||
}
|
||||
else if( subCommand == "objflag" )
|
||||
{
|
||||
|
|
|
@ -154,7 +154,7 @@ void Sapphire::InstanceContent::onUpdate( uint64_t tickCount )
|
|||
sendDutyCommence();
|
||||
|
||||
if( m_pEntranceEObj )
|
||||
m_pEntranceEObj->setState( 1 );
|
||||
m_pEntranceEObj->setPermissionInvisibility( 1 );
|
||||
m_state = DutyInProgress;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue