diff --git a/src/common/Network/PacketDef/Ipcs.h b/src/common/Network/PacketDef/Ipcs.h index 0b93fdaf..4f38f3ed 100644 --- a/src/common/Network/PacketDef/Ipcs.h +++ b/src/common/Network/PacketDef/Ipcs.h @@ -66,7 +66,7 @@ namespace Sapphire::Network::Packets Logout = 0x02AD, // updated 5.35 hotfix CFNotify = 0x02C4, // updated 5.35 hotfix CFMemberStatus = 0x0079, - CFDutyInfo = 0x007A, + CFDutyInfo = 0x0193, // updated 5.35 hotfix CFPlayerInNeed = 0xF07F, CFPreferredRole = 0x0196, // updated 5.35 hotfix CFCancel = 0x00EC, // updated 5.35 hotfix @@ -92,7 +92,7 @@ namespace Sapphire::Network::Packets InitSearchInfo = 0x036F, // updated 5.35 hotfix ExamineSearchComment = 0x0102, // updated 4.1 - ServerNoticeShort = 0x0115, // updated 5.0 + ServerNoticeShort = 0x017A, // updated 5.35 hotfix ServerNotice = 0x02F8, // updated 5.35 hotfix SetOnlineStatus = 0x03D7, // updated 5.35 hotfix @@ -131,12 +131,12 @@ namespace Sapphire::Network::Packets BossStatusEffectList = 0x0312, // added 5.1 Effect = 0x0192, // updated 5.35 hotfix AoeEffect8 = 0x012C, // updated 5.35 hotfix - AoeEffect16 = 0x03BF, // updated 5.3 - AoeEffect24 = 0x027E, // updated 5.3 - AoeEffect32 = 0x017E, // updated 5.3 + AoeEffect16 = 0x01B9, // updated 5.35 hotfix + AoeEffect24 = 0x02B4, // updated 5.35 hotfix + AoeEffect32 = 0x00A4, // updated 5.35 hotfix PersistantEffect = 0x0317, // updated 5.35 hotfix - GCAffiliation = 0xF16F, // updated 5.0 + GCAffiliation = 0x0105, // updated 5.35 hotfix PlayerSpawn = 0x0179, // updated 5.35 hotfix NpcSpawn = 0x03A8, // updated 5.35 hotfix @@ -153,7 +153,7 @@ namespace Sapphire::Network::Packets HateRank = 0x02CC, // updated 5.35 hotfix HateList = 0x0198, // updated 5.35 hotfix ObjectSpawn = 0x02B8, // updated 5.35 hotfix - ObjectDespawn = 0xF34B, // updated 5.18 + ObjectDespawn = 0x00C0, // updated 5.35 hotfix UpdateClassInfo = 0x0235, // updated 5.35 hotfix SilentSetClassJob = 0x018E, // updated 5.0 - seems to be the case, not sure if it's actually used for anything PlayerSetup = 0x0290, // updated 5.35 hotfix @@ -213,7 +213,7 @@ namespace Sapphire::Network::Packets Mount = 0x01B5, // updated 5.35 hotfix - DirectorVars = 0x00E6, // updated 5.18 + DirectorVars = 0x011D, // updated 5.35 hotfix SomeDirectorUnk1 = 0x0084, // updated 5.18 SomeDirectorUnk2 = 0xF0C1, // updated 5.18 SomeDirectorUnk4 = 0x0202, // updated 5.35 hotfix @@ -226,10 +226,10 @@ namespace Sapphire::Network::Packets CFAvailableContents = 0xF1FD, // updated 4.2 WeatherChange = 0x027B, // updated 5.35 hotfix - PlayerTitleList = 0x037D, // updated 5.1 + PlayerTitleList = 0x0251, // updated 5.35 hotfix Discovery = 0x031B, // updated 5.35 hotfix - EorzeaTimeOffset = 0xF3B8, // updated 5.1 + EorzeaTimeOffset = 0x01D4, // updated 5.35 hotfix EquipDisplayFlags = 0x00BE, // updated 5.35 hotfix @@ -239,29 +239,29 @@ namespace Sapphire::Network::Packets /// Housing ////////////////////////////////////// - LandSetInitialize = 0x0234, // updated 5.0 - LandUpdate = 0x0235, // updated 5.0 - YardObjectSpawn = 0xF236, // updated 5.0 - HousingIndoorInitialize = 0x0237, // updated 5.0 - LandPriceUpdate = 0x0238, // updated 5.0 + LandSetInitialize = 0x0095, // updated 5.35 hotfix + LandUpdate = 0x00BF, // updated 5.35 hotfix + YardObjectSpawn = 0x01CA, // updated 5.35 hotfix + HousingIndoorInitialize = 0x01FF, // updated 5.35 hotfix + LandPriceUpdate = 0x0380, // updated 5.35 hotfix LandInfoSign = 0x023D, // updated 5.35 hotfix - LandRename = 0x023A, // updated 5.0 - HousingEstateGreeting = 0x023B, // updated 5.0 - HousingUpdateLandFlagsSlot = 0x023C, // updated 5.0 + LandRename = 0x0140, // updated 5.35 hotfix + HousingEstateGreeting = 0x00C7, // updated 5.35 hotfix + HousingUpdateLandFlagsSlot = 0x027E, // updated 5.35 hotfix HousingLandFlags = 0x022F, // updated 5.35 hotfix - HousingShowEstateGuestAccess = 0x023E, // updated 5.0 + HousingShowEstateGuestAccess = 0x03B5, // updated 5.35 hotfix HousingObjectInitialize = 0x01AA, // updated 5.35 hotfix - HousingInternalObjectSpawn = 0xF241, // updated 5.0 + HousingInternalObjectSpawn = 0x0234, // updated 5.35 hotfix HousingWardInfo = 0x02FD, // updated 5.35 hotfix - HousingObjectMove = 0xF244, // updated 5.0 + HousingObjectMove = 0x022C, // updated 5.35 hotfix - SharedEstateSettingsResponse = 0x0245, // updated 4.5 + SharedEstateSettingsResponse = 0x006A, // updated 5.35 hotfix - LandUpdateHouseName = 0x0257, // updated 4.5 + LandUpdateHouseName = 0x00B1, // updated 5.35 hotfix - LandSetMap = 0x025B, // updated 4.5 + LandSetMap = 0x0149, // updated 5.35 hotfix ////////////////////////////////////////////////// @@ -345,7 +345,7 @@ namespace Sapphire::Network::Packets ReqJoinNoviceNetwork = 0x0129, // updated 4.2 - ReqCountdownInitiate = 0x009A, // updated 5.25 + ReqCountdownInitiate = 0x025F, // updated 5.35 hotfix ReqCountdownCancel = 0x0244, // updated 5.25 ZoneLineHandler = 0x0279, // updated 5.35 hotfix @@ -363,17 +363,17 @@ namespace Sapphire::Network::Packets InventoryModifyHandler = 0x0135, // updated 5.35 hotfix - InventoryEquipRecommendedItems = 0x0149, // updated 5.0 + InventoryEquipRecommendedItems = 0x0116, // updated 5.35 hotfix - ReqPlaceHousingItem = 0x014B, // updated 5.0 - BuildPresetHandler = 0x0150, // updated 5.0 + ReqPlaceHousingItem = 0x02AE, // updated 5.35 hotfix + BuildPresetHandler = 0x01C2, // updated 5.35 hotfix TalkEventHandler = 0x02A4, // updated 5.35 hotfix EmoteEventHandler = 0x02C8, // updated 5.35 hotfix WithinRangeEventHandler = 0x0209, // updated 5.35 hotfix OutOfRangeEventHandler = 0x0319, // updated 5.35 hotfix EnterTeriEventHandler = 0x0192, // updated 5.35 hotfix - ShopEventHandler = 0x0156, // updated 5.0 + ShopEventHandler = 0x01F6, // updated 5.35 hotfix ReturnEventHandler = 0x02B4, // updated 5.35 hotfix TradeReturnEventHandler = 0x00A4, // updated 5.35 hotfix @@ -384,9 +384,9 @@ namespace Sapphire::Network::Packets ReqEquipDisplayFlagsChange = 0x02F6, // updated 5.35 hotfix - LandRenameHandler = 0xF177, // updated 5.0 - HousingUpdateHouseGreeting = 0x0178, // updated 5.0 - HousingUpdateObjectPosition = 0x0159, // updated 5.25 + LandRenameHandler = 0x0155, // updated 5.35 hotfix + HousingUpdateHouseGreeting = 0x02EA, // updated 5.35 hotfix + HousingUpdateObjectPosition = 0x00D5, // updated 5.35 hotfix SetSharedEstateSettings = 0x017B, // updated 5.0 @@ -406,6 +406,7 @@ namespace Sapphire::Network::Packets enum ServerChatIpcType : uint16_t { Tell = 0x0064, // updated for sb + PublicContentTell = 0x00FB, // added 4.5, this is used when receiving a /tell in PublicContent instances such as Eureka or Bozja TellErrNotFound = 0x0066, FreeCompanyEvent = 0x012C, // added 5.0 @@ -417,6 +418,7 @@ namespace Sapphire::Network::Packets enum ClientChatIpcType : uint16_t { TellReq = 0x0064, + PublicContentTellReq = 0x0326, // updated 5.35 hotfix, this is used when sending a /tell in PublicContent instances such as Eureka or Bozja }; diff --git a/src/scripts/common/aethernet/HousingAethernet.cpp b/src/scripts/common/aethernet/HousingAethernet.cpp index 1af780ad..be107271 100644 --- a/src/scripts/common/aethernet/HousingAethernet.cpp +++ b/src/scripts/common/aethernet/HousingAethernet.cpp @@ -21,7 +21,8 @@ public: { player.playScene( eventId, 0, HIDE_HOTBAR | NO_DEFAULT_CAMERA, [this, eventId]( Entity::Player& player, const Event::SceneResult& result ) { - auto& exdData = Common::Service< Sapphire::Data::ExdDataGenerated >::ref(); + //auto& exdData = Common::Service< Sapphire::Data::ExdDataGenerated >::ref(); + auto& exdData = *reinterpret_cast< Sapphire::Data::ExdDataGenerated* >( player.getExdData() ); auto housingZone = std::dynamic_pointer_cast< HousingZone >( player.getCurrentTerritory() ); if( !housingZone ) @@ -40,7 +41,8 @@ public: // moving a player inside an event will crash the game so we end it here player.eventFinish( eventId, 1 ); - auto& playerMgr = Common::Service< Sapphire::World::Manager::PlayerMgr >::ref(); + //auto& playerMgr = Common::Service< Sapphire::World::Manager::PlayerMgr >::ref(); + auto& playerMgr = *reinterpret_cast< Sapphire::World::Manager::PlayerMgr* >( player.getPlayerMgr() ); playerMgr.movePlayerToLandDestination( player, pHousingAethernet->level, housingZone->getWardNum() ); } ); } diff --git a/src/scripts/common/eobj/HousingEstateEntrance.cpp b/src/scripts/common/eobj/HousingEstateEntrance.cpp index 2abc371b..d40025cd 100644 --- a/src/scripts/common/eobj/HousingEstateEntrance.cpp +++ b/src/scripts/common/eobj/HousingEstateEntrance.cpp @@ -26,7 +26,8 @@ public: if( result.param2 != 1 ) return; - auto& terriMgr = Common::Service< Sapphire::World::Manager::TerritoryMgr >::ref(); + //auto& terriMgr = Common::Service< Sapphire::World::Manager::TerritoryMgr >::ref(); + auto& terriMgr = *reinterpret_cast< Sapphire::World::Manager::TerritoryMgr* >( player.getTerritoryMgr() ); auto zone = std::dynamic_pointer_cast< HousingZone >( player.getCurrentTerritory() ); if( !zone ) diff --git a/src/world/Manager/HousingMgr.cpp b/src/world/Manager/HousingMgr.cpp index 9cd612bb..4e85c5bd 100644 --- a/src/world/Manager/HousingMgr.cpp +++ b/src/world/Manager/HousingMgr.cpp @@ -636,6 +636,8 @@ bool Sapphire::World::Manager::HousingMgr::initHouseModels( Entity::Player& play auto pItem = invMgr.createItem( player, static_cast< uint32_t >( item.second ) ); + player.sendDebug( "container: {}, slot: {}, uid: {}", destContainer.first, item.first, pItem->getUId() ); + container->setItem( static_cast< uint8_t >( item.first ), pItem ); } diff --git a/src/world/Manager/PlayerMgr.cpp b/src/world/Manager/PlayerMgr.cpp index 79062f2e..d6e1ff5f 100644 --- a/src/world/Manager/PlayerMgr.cpp +++ b/src/world/Manager/PlayerMgr.cpp @@ -16,7 +16,8 @@ using namespace Sapphire::World::Manager; void Sapphire::World::Manager::PlayerMgr::movePlayerToLandDestination( Sapphire::Entity::Player& player, uint32_t landId, uint16_t param ) { // check if we have one in the db first - auto& terriMgr = Common::Service< TerritoryMgr >::ref(); + //auto& terriMgr = Common::Service< TerritoryMgr >::ref(); + auto& terriMgr = *reinterpret_cast< Sapphire::World::Manager::TerritoryMgr* >( player.getTerritoryMgr() ); Sapphire::TerritoryPtr destinationZone; diff --git a/src/world/Manager/TerritoryMgr.cpp b/src/world/Manager/TerritoryMgr.cpp index efaec8c8..12629db2 100644 --- a/src/world/Manager/TerritoryMgr.cpp +++ b/src/world/Manager/TerritoryMgr.cpp @@ -628,14 +628,22 @@ bool Sapphire::World::Manager::TerritoryMgr::movePlayer( TerritoryPtr pZone, Sap // mark character as zoning in progress pPlayer->setLoadingComplete( false ); + bool zoneChanged = true; if( pPlayer->getLastPing() != 0 && pPlayer->getCurrentTerritory() ) - pPlayer->getCurrentTerritory()->removeActor( pPlayer ); + { + zoneChanged = pPlayer->getCurrentTerritory()->getGuId() != pZone->getGuId(); + if( zoneChanged ) + pPlayer->getCurrentTerritory()->removeActor( pPlayer ); + } - pPlayer->setCurrentZone( pZone ); - pZone->pushActor( pPlayer ); + if( zoneChanged ) + { + pPlayer->setCurrentZone( pZone ); + pZone->pushActor( pPlayer ); - // map player to instanceId so it can be tracked. - m_playerIdToInstanceMap[ pPlayer->getId() ] = pZone->getGuId(); + // map player to instanceId so it can be tracked. + m_playerIdToInstanceMap[ pPlayer->getId() ] = pZone->getGuId(); + } pPlayer->sendZonePackets();