From cc0a7aa70af671aa95ef0abed069685963341c7b Mon Sep 17 00:00:00 2001 From: Mordred Date: Thu, 26 Jan 2023 22:39:50 +0100 Subject: [PATCH] WiP Fixed exiting house --- src/scripts/common/eobj/HousingEstateEntrance.cpp | 9 ++++----- src/world/Actor/Player.cpp | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/scripts/common/eobj/HousingEstateEntrance.cpp b/src/scripts/common/eobj/HousingEstateEntrance.cpp index 09e84a7e..8f1b8298 100644 --- a/src/scripts/common/eobj/HousingEstateEntrance.cpp +++ b/src/scripts/common/eobj/HousingEstateEntrance.cpp @@ -6,7 +6,6 @@ #include "Territory/HousingZone.h" #include "Manager/TerritoryMgr.h" #include "Manager/PlayerMgr.h" -#include #include "Territory/Land.h" @@ -37,9 +36,9 @@ public: if( !zone ) return; - Common::LandIdent ident; - ident.landId = eobj.getHousingLink(); - ident.territoryTypeId = zone->getTerritoryTypeId(); + Common::LandIdent ident{}; + ident.landId = static_cast< int16_t >( eobj.getHousingLink() ); + ident.territoryTypeId = static_cast< int16_t >( zone->getTerritoryTypeId() ); ident.wardNum = zone->getWardNum(); ident.worldId = 67; @@ -55,7 +54,7 @@ public: eventMgr().eventFinish( player, result.eventId, 1 ); - Common::FFXIVARR_POSITION3 pos {}; + Common::FFXIVARR_POSITION3 pos; auto land = zone->getLand( eobj.getHousingLink() >> 8 ); if( !land ) diff --git a/src/world/Actor/Player.cpp b/src/world/Actor/Player.cpp index 7edeca22..6a4a1322 100644 --- a/src/world/Actor/Player.cpp +++ b/src/world/Actor/Player.cpp @@ -2135,7 +2135,7 @@ void Player::updatePrevTerritory() { auto& teriMgr = Common::Service< World::Manager::TerritoryMgr >::ref(); - if( teriMgr.isDefaultTerritory( getTerritoryTypeId() ) ) + if( teriMgr.isDefaultTerritory( getTerritoryTypeId() ) || teriMgr.isHousingTerritory( getTerritoryTypeId() ) ) { m_prevTerritoryTypeId = getTerritoryTypeId(); m_prevTerritoryId = getTerritoryId();