mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-27 22:57:45 +00:00
Fixed issues with using copies instead of references
This commit is contained in:
parent
4cef7cdab9
commit
f8303be9e8
16 changed files with 49 additions and 48 deletions
|
@ -195,7 +195,7 @@ private:
|
|||
|
||||
void Scene00100Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
auto teriMgr = Common::Service< Sapphire::World::Manager::TerritoryMgr >::ref();
|
||||
auto& teriMgr = Common::Service< Sapphire::World::Manager::TerritoryMgr >::ref();
|
||||
auto instance = teriMgr.getTerritoryByGuId( player.getTerritoryId() );
|
||||
auto enemy = instance->createBNpcFromInstanceId( Enemy0, 1220 /*Find the right value*/, Common::BNpcType::Enemy );
|
||||
enemy->hateListAdd( player.getAsPlayer(), 1 );
|
||||
|
|
|
@ -201,7 +201,7 @@ private:
|
|||
|
||||
void Scene00004Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
auto teriMgr = Common::Service< Sapphire::World::Manager::TerritoryMgr >::ref();
|
||||
auto& teriMgr = Common::Service< Sapphire::World::Manager::TerritoryMgr >::ref();
|
||||
auto instance = teriMgr.getTerritoryByGuId( player.getTerritoryId() );
|
||||
auto enemy = instance->createBNpcFromInstanceId( Enemy0, 1220 /*Find the right value*/, Common::BNpcType::Enemy );
|
||||
enemy->hateListAdd( player.getAsPlayer(), 1 );
|
||||
|
|
|
@ -287,7 +287,7 @@ private:
|
|||
|
||||
void Scene00002Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
auto teriMgr = Common::Service< Sapphire::World::Manager::TerritoryMgr >::ref();
|
||||
auto& teriMgr = Common::Service< Sapphire::World::Manager::TerritoryMgr >::ref();
|
||||
auto instance = teriMgr.getTerritoryByGuId( player.getTerritoryId() );
|
||||
auto enemy = instance->createBNpcFromInstanceId( Enemy0, 319 /*Find the right value*/, Common::BNpcType::Enemy );
|
||||
enemy->hateListAdd( player.getAsPlayer(), 1 );
|
||||
|
|
|
@ -325,7 +325,7 @@ private:
|
|||
|
||||
void Scene00096Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
auto teriMgr = Common::Service< Sapphire::World::Manager::TerritoryMgr >::ref();
|
||||
auto& teriMgr = Common::Service< Sapphire::World::Manager::TerritoryMgr >::ref();
|
||||
auto instance = teriMgr.getTerritoryByGuId( player.getTerritoryId() );
|
||||
auto enemy = instance->createBNpcFromInstanceId( Enemy0, 413 /*TODO: Find the right value*/, Common::BNpcType::Enemy );
|
||||
enemy->hateListAdd( player.getAsPlayer(), 1 );
|
||||
|
@ -351,7 +351,7 @@ private:
|
|||
|
||||
void Scene00098Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
auto teriMgr = Common::Service< Sapphire::World::Manager::TerritoryMgr >::ref();
|
||||
auto& teriMgr = Common::Service< Sapphire::World::Manager::TerritoryMgr >::ref();
|
||||
auto instance = teriMgr.getTerritoryByGuId( player.getTerritoryId() );
|
||||
auto enemy = instance->createBNpcFromInstanceId( Enemy1, 413 /*TODO: Find the right value*/, Common::BNpcType::Enemy );
|
||||
enemy->hateListAdd( player.getAsPlayer(), 1 );
|
||||
|
@ -377,7 +377,7 @@ private:
|
|||
|
||||
void Scene00100Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
auto teriMgr = Common::Service< Sapphire::World::Manager::TerritoryMgr >::ref();
|
||||
auto& teriMgr = Common::Service< Sapphire::World::Manager::TerritoryMgr >::ref();
|
||||
auto instance = teriMgr.getTerritoryByGuId( player.getTerritoryId() );
|
||||
auto enemy = instance->createBNpcFromInstanceId( Enemy2, 413 /*TODO: Find the right value*/, Common::BNpcType::Enemy );
|
||||
enemy->hateListAdd( player.getAsPlayer(), 1 );
|
||||
|
|
|
@ -239,7 +239,7 @@ private:
|
|||
|
||||
void Scene00003Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
auto teriMgr = Common::Service< Sapphire::World::Manager::TerritoryMgr >::ref();
|
||||
auto& teriMgr = Common::Service< Sapphire::World::Manager::TerritoryMgr >::ref();
|
||||
auto instance = teriMgr.getTerritoryByGuId( player.getTerritoryId() );
|
||||
auto enemy = instance->createBNpcFromInstanceId( Enemy0, 413 /*TODO: Find the right value*/, Common::BNpcType::Enemy );
|
||||
enemy->hateListAdd( player.getAsPlayer(), 1 );
|
||||
|
@ -334,7 +334,7 @@ private:
|
|||
|
||||
void Scene00011Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
auto teriMgr = Common::Service< Sapphire::World::Manager::TerritoryMgr >::ref();
|
||||
auto& teriMgr = Common::Service< Sapphire::World::Manager::TerritoryMgr >::ref();
|
||||
auto instance = teriMgr.getTerritoryByGuId( player.getTerritoryId() );
|
||||
auto enemy = instance->createBNpcFromInstanceId( Enemy1, 413 /*TODO: Find the right value*/, Common::BNpcType::Enemy );
|
||||
enemy->hateListAdd( player.getAsPlayer(), 1 );
|
||||
|
@ -429,7 +429,7 @@ private:
|
|||
|
||||
void Scene00019Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
auto teriMgr = Common::Service< Sapphire::World::Manager::TerritoryMgr >::ref();
|
||||
auto& teriMgr = Common::Service< Sapphire::World::Manager::TerritoryMgr >::ref();
|
||||
auto instance = teriMgr.getTerritoryByGuId( player.getTerritoryId() );
|
||||
auto enemy = instance->createBNpcFromInstanceId( Enemy2, 413 /*TODO: Find the right value*/, Common::BNpcType::Enemy );
|
||||
enemy->hateListAdd( player.getAsPlayer(), 1 );
|
||||
|
@ -518,10 +518,10 @@ private:
|
|||
{
|
||||
//TODO: QuestBattle content
|
||||
|
||||
auto pTeriMgr = Common::Service< Sapphire::World::Manager::TerritoryMgr >::ref();
|
||||
auto& teriMgr = Common::Service< Sapphire::World::Manager::TerritoryMgr >::ref();
|
||||
|
||||
eventMgr().eventFinish( player, result.eventId, 0 );
|
||||
pTeriMgr.createAndJoinQuestBattle( player, Questbattle0 );
|
||||
teriMgr.createAndJoinQuestBattle( player, Questbattle0 );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -352,7 +352,7 @@ void Sapphire::Entity::BNpc::setState( BNpcState state )
|
|||
|
||||
bool Sapphire::Entity::BNpc::moveTo( const FFXIVARR_POSITION3& pos )
|
||||
{
|
||||
auto teriMgr = Common::Service< World::Manager::TerritoryMgr >::ref();
|
||||
auto& teriMgr = Common::Service< World::Manager::TerritoryMgr >::ref();
|
||||
auto pZone = teriMgr.getTerritoryByGuId( getTerritoryId() );
|
||||
|
||||
auto pNaviProvider = pZone->getNaviProvider();
|
||||
|
@ -390,7 +390,7 @@ bool Sapphire::Entity::BNpc::moveTo( const FFXIVARR_POSITION3& pos )
|
|||
bool Sapphire::Entity::BNpc::moveTo( const Entity::Chara& targetChara )
|
||||
{
|
||||
|
||||
auto teriMgr = Common::Service< World::Manager::TerritoryMgr >::ref();
|
||||
auto& teriMgr = Common::Service< World::Manager::TerritoryMgr >::ref();
|
||||
auto pZone = teriMgr.getTerritoryByGuId( getTerritoryId() );
|
||||
|
||||
auto pNaviProvider = pZone->getNaviProvider();
|
||||
|
@ -580,7 +580,7 @@ void Sapphire::Entity::BNpc::onTick()
|
|||
|
||||
void Sapphire::Entity::BNpc::update( uint64_t tickCount )
|
||||
{
|
||||
auto teriMgr = Common::Service< World::Manager::TerritoryMgr >::ref();
|
||||
auto& teriMgr = Common::Service< World::Manager::TerritoryMgr >::ref();
|
||||
auto pZone = teriMgr.getTerritoryByGuId( getTerritoryId() );
|
||||
|
||||
const uint8_t maxDistanceToOrigin = 40;
|
||||
|
@ -908,7 +908,7 @@ void Sapphire::Entity::BNpc::setFlag( uint32_t flag )
|
|||
|
||||
void Sapphire::Entity::BNpc::autoAttack( CharaPtr pTarget )
|
||||
{
|
||||
auto teriMgr = Common::Service< World::Manager::TerritoryMgr >::ref();
|
||||
auto& teriMgr = Common::Service< World::Manager::TerritoryMgr >::ref();
|
||||
auto pZone = teriMgr.getTerritoryByGuId( getTerritoryId() );
|
||||
|
||||
uint64_t tick = Util::getTimeMs();
|
||||
|
|
|
@ -510,7 +510,7 @@ void Sapphire::Entity::Chara::autoAttack( CharaPtr pTarget )
|
|||
/*! \param StatusEffectPtr to be applied to the actor */
|
||||
void Sapphire::Entity::Chara::addStatusEffect( StatusEffect::StatusEffectPtr pEffect )
|
||||
{
|
||||
auto teriMgr = Common::Service< World::Manager::TerritoryMgr >::ref();
|
||||
auto& teriMgr = Common::Service< World::Manager::TerritoryMgr >::ref();
|
||||
auto pZone = teriMgr.getTerritoryByGuId( getTerritoryId() );
|
||||
|
||||
int8_t nextSlot = getStatusEffectFreeSlot();
|
||||
|
|
|
@ -68,7 +68,7 @@ void Sapphire::Entity::GameObject::setPos( float x, float y, float z, bool broad
|
|||
|
||||
if( broadcastUpdate )
|
||||
{
|
||||
auto teriMgr = Common::Service< World::Manager::TerritoryMgr >::ref();
|
||||
auto& teriMgr = Common::Service< World::Manager::TerritoryMgr >::ref();
|
||||
auto pZone = teriMgr.getTerritoryByGuId( getTerritoryId() );
|
||||
pZone->updateActorPosition( *this );
|
||||
}
|
||||
|
@ -81,7 +81,7 @@ void Sapphire::Entity::GameObject::setPos( const Sapphire::Common::FFXIVARR_POSI
|
|||
|
||||
if( broadcastUpdate )
|
||||
{
|
||||
auto teriMgr = Common::Service< World::Manager::TerritoryMgr >::ref();
|
||||
auto& teriMgr = Common::Service< World::Manager::TerritoryMgr >::ref();
|
||||
auto pZone = teriMgr.getTerritoryByGuId( getTerritoryId() );
|
||||
pZone->updateActorPosition( *this );
|
||||
}
|
||||
|
|
|
@ -817,7 +817,7 @@ uint32_t Sapphire::Entity::Player::getExp() const
|
|||
|
||||
void Sapphire::Entity::Player::setExp( uint32_t amount )
|
||||
{
|
||||
auto exdData = Common::Service< Data::ExdData >::ref();
|
||||
auto& exdData = Common::Service< Data::ExdData >::ref();
|
||||
uint8_t classJobIndex = exdData.getRow< Component::Excel::ClassJob >( static_cast< uint8_t >( getClass() ) )->data().WorkIndex;
|
||||
m_expArray[ classJobIndex ] = amount;
|
||||
}
|
||||
|
@ -1438,7 +1438,7 @@ uint32_t Sapphire::Entity::Player::getPersistentEmote() const
|
|||
|
||||
void Sapphire::Entity::Player::autoAttack( CharaPtr pTarget )
|
||||
{
|
||||
auto teriMgr = Common::Service< World::Manager::TerritoryMgr >::ref();
|
||||
auto& teriMgr = Common::Service< World::Manager::TerritoryMgr >::ref();
|
||||
auto pZone = teriMgr.getTerritoryByGuId( getTerritoryId() );
|
||||
|
||||
auto mainWeap = getItemAt( Common::GearSet0, Common::GearSetSlot::MainHand );
|
||||
|
@ -1549,7 +1549,7 @@ uint32_t Sapphire::Entity::Player::getPrevTerritoryTypeId() const
|
|||
|
||||
void Sapphire::Entity::Player::sendZonePackets()
|
||||
{
|
||||
auto teriMgr = Common::Service< World::Manager::TerritoryMgr >::ref();
|
||||
auto& teriMgr = Common::Service< World::Manager::TerritoryMgr >::ref();
|
||||
auto pZone = teriMgr.getTerritoryByGuId( getTerritoryId() );
|
||||
|
||||
auto initPacket = makeZonePacket< FFXIVIpcLogin >( getId() );
|
||||
|
|
|
@ -222,7 +222,6 @@ std::string Sapphire::World::Manager::EventMgr::getErrorCodeName( uint8_t errorC
|
|||
|
||||
uint32_t Sapphire::World::Manager::EventMgr::mapEventActorToRealActor( uint32_t eventActorId )
|
||||
{
|
||||
|
||||
auto& instanceObjectCache = Common::Service< InstanceObjectCache >::ref();
|
||||
auto& exdData = Common::Service< Data::ExdData >::ref();
|
||||
auto levelInfo = exdData.getRow< Component::Excel::Level >( eventActorId );
|
||||
|
|
|
@ -300,7 +300,7 @@ Sapphire::LandPtr Sapphire::World::Manager::HousingMgr::getLandByOwnerId( uint64
|
|||
if( !res->next() )
|
||||
return nullptr;
|
||||
|
||||
auto teriMgr = Common::Service< TerritoryMgr >::ref();
|
||||
auto& teriMgr = Common::Service< TerritoryMgr >::ref();
|
||||
auto pTeri = teriMgr.getTerritoryByGuId( res->getUInt( 1 ) );
|
||||
auto hZone = std::dynamic_pointer_cast< HousingZone >( pTeri );
|
||||
if( !hZone )
|
||||
|
@ -317,7 +317,7 @@ void Sapphire::World::Manager::HousingMgr::sendLandSignOwned( Entity::Player& pl
|
|||
|
||||
auto landSetId = toLandSetId( ident.territoryTypeId, ident.wardNum );
|
||||
|
||||
auto teriMgr = Common::Service< TerritoryMgr >::ref();
|
||||
auto& teriMgr = Common::Service< TerritoryMgr >::ref();
|
||||
auto pTeri = teriMgr.getTerritoryByGuId( landSetId );
|
||||
auto hZone = std::dynamic_pointer_cast< HousingZone >( pTeri );
|
||||
|
||||
|
@ -357,7 +357,7 @@ void Sapphire::World::Manager::HousingMgr::sendLandSignFree( Entity::Player& pla
|
|||
player.setActiveLand( static_cast< uint8_t >( ident.landId ), static_cast< uint8_t >( ident.wardNum ) );
|
||||
|
||||
auto landSetId = toLandSetId( ident.territoryTypeId, ident.wardNum );
|
||||
auto teriMgr = Common::Service< TerritoryMgr >::ref();
|
||||
auto& teriMgr = Common::Service< TerritoryMgr >::ref();
|
||||
auto pTeri = teriMgr.getTerritoryByGuId( landSetId );
|
||||
auto hZone = std::dynamic_pointer_cast< HousingZone >( pTeri );
|
||||
|
||||
|
@ -482,7 +482,7 @@ void Sapphire::World::Manager::HousingMgr::sendWardLandInfo( Entity::Player& pla
|
|||
|
||||
auto landSetId = toLandSetId( territoryTypeId, wardId );
|
||||
|
||||
auto teriMgr = Common::Service< TerritoryMgr >::ref();
|
||||
auto& teriMgr = Common::Service< TerritoryMgr >::ref();
|
||||
auto pTeri = teriMgr.getTerritoryByGuId( landSetId );
|
||||
auto hZone = std::dynamic_pointer_cast< HousingZone >( pTeri );
|
||||
|
||||
|
@ -546,7 +546,7 @@ void Sapphire::World::Manager::HousingMgr::sendEstateGreeting( Entity::Player& p
|
|||
{
|
||||
auto& server = Common::Service< World::WorldServer >::ref();
|
||||
auto landSetId = toLandSetId( ident.territoryTypeId, ident.wardNum );
|
||||
auto teriMgr = Common::Service< TerritoryMgr >::ref();
|
||||
auto& teriMgr = Common::Service< TerritoryMgr >::ref();
|
||||
auto pTeri = teriMgr.getTerritoryByGuId( landSetId );
|
||||
auto hZone = std::dynamic_pointer_cast< HousingZone >( pTeri );
|
||||
|
||||
|
@ -738,7 +738,7 @@ void Sapphire::World::Manager::HousingMgr::requestEstateRename( Entity::Player&
|
|||
auto pSession = server.getSession( player.getCharacterId() );
|
||||
|
||||
auto landSetId = toLandSetId( ident.territoryTypeId, ident.wardNum );
|
||||
auto teriMgr = Common::Service< TerritoryMgr >::ref();
|
||||
auto& teriMgr = Common::Service< TerritoryMgr >::ref();
|
||||
auto pTeri = teriMgr.getTerritoryByGuId( landSetId );
|
||||
auto hZone = std::dynamic_pointer_cast< HousingZone >( pTeri );
|
||||
|
||||
|
@ -765,7 +765,7 @@ void Sapphire::World::Manager::HousingMgr::requestEstateEditGreeting( Entity::Pl
|
|||
auto pSession = server.getSession( player.getCharacterId() );
|
||||
|
||||
auto landSetId = toLandSetId( ident.territoryTypeId, ident.wardNum );
|
||||
auto teriMgr = Common::Service< TerritoryMgr >::ref();
|
||||
auto& teriMgr = Common::Service< TerritoryMgr >::ref();
|
||||
auto pTeri = teriMgr.getTerritoryByGuId( landSetId );
|
||||
auto hZone = std::dynamic_pointer_cast< HousingZone >( pTeri );
|
||||
|
||||
|
@ -791,7 +791,7 @@ void Sapphire::World::Manager::HousingMgr::requestEstateEditGreeting( Entity::Pl
|
|||
void Sapphire::World::Manager::HousingMgr::updateEstateGreeting( Entity::Player& player, const Common::LandIdent ident, const std::string& greeting )
|
||||
{
|
||||
auto landSetId = toLandSetId( ident.territoryTypeId, ident.wardNum );
|
||||
auto teriMgr = Common::Service< TerritoryMgr >::ref();
|
||||
auto& teriMgr = Common::Service< TerritoryMgr >::ref();
|
||||
auto pTeri = teriMgr.getTerritoryByGuId( landSetId );
|
||||
auto hZone = std::dynamic_pointer_cast< HousingZone >( pTeri );
|
||||
|
||||
|
@ -821,7 +821,7 @@ void Sapphire::World::Manager::HousingMgr::requestEstateEditGuestAccess( Entity:
|
|||
auto pSession = server.getSession( player.getCharacterId() );
|
||||
|
||||
auto landSetId = toLandSetId( ident.territoryTypeId, ident.wardNum );
|
||||
auto teriMgr = Common::Service< TerritoryMgr >::ref();
|
||||
auto& teriMgr = Common::Service< TerritoryMgr >::ref();
|
||||
auto pTeri = teriMgr.getTerritoryByGuId( landSetId );
|
||||
auto hZone = std::dynamic_pointer_cast< HousingZone >( pTeri );
|
||||
|
||||
|
@ -879,7 +879,7 @@ void Sapphire::World::Manager::HousingMgr::sendEstateInventory( Entity::Player&
|
|||
auto ident = internalZone->getLandIdent();
|
||||
|
||||
auto landSetId = toLandSetId( ident.territoryTypeId, ident.wardNum );
|
||||
auto teriMgr = Common::Service< TerritoryMgr >::ref();
|
||||
auto& teriMgr = Common::Service< TerritoryMgr >::ref();
|
||||
auto pTeri = teriMgr.getTerritoryByGuId( landSetId );
|
||||
auto hZone = std::dynamic_pointer_cast< HousingZone >( pTeri );
|
||||
|
||||
|
@ -1001,7 +1001,7 @@ void Sapphire::World::Manager::HousingMgr::reqPlaceHousingItem( Sapphire::Entity
|
|||
{
|
||||
auto& server = Common::Service< World::WorldServer >::ref();
|
||||
auto pSession = server.getSession( player.getCharacterId() );
|
||||
auto teriMgr = Common::Service< World::Manager::TerritoryMgr >::ref();
|
||||
auto& teriMgr = Common::Service< World::Manager::TerritoryMgr >::ref();
|
||||
auto pZone = teriMgr.getTerritoryByGuId( player.getTerritoryId() );
|
||||
|
||||
// retail process is:
|
||||
|
@ -1029,7 +1029,7 @@ void Sapphire::World::Manager::HousingMgr::reqPlaceHousingItem( Sapphire::Entity
|
|||
auto ident = zone->getLandIdent();
|
||||
auto landSetId = toLandSetId( ident.territoryTypeId, ident.wardNum );
|
||||
|
||||
auto teriMgr = Common::Service< World::Manager::TerritoryMgr >::ref();
|
||||
auto& teriMgr = Common::Service< World::Manager::TerritoryMgr >::ref();
|
||||
auto pTeri = teriMgr.getTerritoryByGuId( landSetId );
|
||||
auto hZone = std::dynamic_pointer_cast< HousingZone >( pTeri );
|
||||
|
||||
|
@ -1090,7 +1090,7 @@ void Sapphire::World::Manager::HousingMgr::reqPlaceItemInStore( Sapphire::Entity
|
|||
LandPtr land;
|
||||
bool isOutside = false;
|
||||
|
||||
auto teriMgr = Common::Service< World::Manager::TerritoryMgr >::ref();
|
||||
auto& teriMgr = Common::Service< World::Manager::TerritoryMgr >::ref();
|
||||
auto pZone = teriMgr.getTerritoryByGuId( player.getTerritoryId() );
|
||||
|
||||
if( auto zone = std::dynamic_pointer_cast< HousingZone >( pZone ) )
|
||||
|
@ -1105,7 +1105,7 @@ void Sapphire::World::Manager::HousingMgr::reqPlaceItemInStore( Sapphire::Entity
|
|||
auto ident = zone->getLandIdent();
|
||||
auto landSetId = toLandSetId( ident.territoryTypeId, ident.wardNum );
|
||||
|
||||
auto teriMgr = Common::Service< World::Manager::TerritoryMgr >::ref();
|
||||
auto& teriMgr = Common::Service< World::Manager::TerritoryMgr >::ref();
|
||||
auto pTeri = teriMgr.getTerritoryByGuId( landSetId );
|
||||
auto hZone = std::dynamic_pointer_cast< HousingZone >( pTeri );
|
||||
|
||||
|
@ -1184,7 +1184,7 @@ bool Sapphire::World::Manager::HousingMgr::placeExternalItem( Entity::Player& pl
|
|||
invMgr.saveHousingContainer( ident, container );
|
||||
invMgr.updateHousingItemPosition( item );
|
||||
|
||||
auto teriMgr = Common::Service< World::Manager::TerritoryMgr >::ref();
|
||||
auto& teriMgr = Common::Service< World::Manager::TerritoryMgr >::ref();
|
||||
auto pZone = teriMgr.getTerritoryByGuId( player.getTerritoryId() );
|
||||
|
||||
// add to zone and spawn
|
||||
|
@ -1200,7 +1200,7 @@ bool Sapphire::World::Manager::HousingMgr::placeInteriorItem( Entity::Player& pl
|
|||
Inventory::HousingItemPtr item )
|
||||
{
|
||||
auto& invMgr = Service< InventoryMgr >::ref();
|
||||
auto teriMgr = Common::Service< World::Manager::TerritoryMgr >::ref();
|
||||
auto& teriMgr = Common::Service< World::Manager::TerritoryMgr >::ref();
|
||||
auto pZone = teriMgr.getTerritoryByGuId( player.getTerritoryId() );
|
||||
|
||||
auto zone = std::dynamic_pointer_cast< Territory::Housing::HousingInteriorTerritory >( pZone );
|
||||
|
@ -1260,7 +1260,7 @@ Sapphire::Common::Furniture Sapphire::World::Manager::HousingMgr::getYardObjectF
|
|||
|
||||
void Sapphire::World::Manager::HousingMgr::sendInternalEstateInventoryBatch( Sapphire::Entity::Player& player, bool storeroom )
|
||||
{
|
||||
auto teriMgr = Common::Service< World::Manager::TerritoryMgr >::ref();
|
||||
auto& teriMgr = Common::Service< World::Manager::TerritoryMgr >::ref();
|
||||
auto pZone = teriMgr.getTerritoryByGuId( player.getTerritoryId() );
|
||||
|
||||
auto zone = std::dynamic_pointer_cast< Territory::Housing::HousingInteriorTerritory >( pZone );
|
||||
|
@ -1294,7 +1294,7 @@ void Sapphire::World::Manager::HousingMgr::reqMoveHousingItem( Entity::Player& p
|
|||
{
|
||||
auto landSetId = toLandSetId( ident.territoryTypeId, ident.wardNum );
|
||||
|
||||
auto teriMgr = Common::Service< World::Manager::TerritoryMgr >::ref();
|
||||
auto& teriMgr = Common::Service< World::Manager::TerritoryMgr >::ref();
|
||||
auto pTeri = teriMgr.getTerritoryByGuId( landSetId );
|
||||
auto hZone = std::dynamic_pointer_cast< HousingZone >( pTeri );
|
||||
auto land = hZone->getLand( static_cast< uint8_t >( ident.landId ) );
|
||||
|
@ -1411,7 +1411,7 @@ void Sapphire::World::Manager::HousingMgr::reqRemoveHousingItem( Sapphire::Entit
|
|||
uint16_t containerId, uint8_t slot,
|
||||
bool sendToStoreroom )
|
||||
{
|
||||
auto teriMgr = Common::Service< World::Manager::TerritoryMgr >::ref();
|
||||
auto& teriMgr = Common::Service< World::Manager::TerritoryMgr >::ref();
|
||||
auto pZone = teriMgr.getTerritoryByGuId( player.getTerritoryId() );
|
||||
|
||||
if( auto terri = std::dynamic_pointer_cast< Territory::Housing::HousingInteriorTerritory >( pZone ) )
|
||||
|
@ -1419,7 +1419,7 @@ void Sapphire::World::Manager::HousingMgr::reqRemoveHousingItem( Sapphire::Entit
|
|||
auto ident = terri->getLandIdent();
|
||||
auto landSetId = toLandSetId( ident.territoryTypeId, ident.wardNum );
|
||||
|
||||
auto teriMgr = Common::Service< World::Manager::TerritoryMgr >::ref();
|
||||
auto& teriMgr = Common::Service< World::Manager::TerritoryMgr >::ref();
|
||||
auto pTeri = teriMgr.getTerritoryByGuId( landSetId );
|
||||
auto hZone = std::dynamic_pointer_cast< HousingZone >( pTeri );
|
||||
|
||||
|
@ -1625,7 +1625,7 @@ void Sapphire::World::Manager::HousingMgr::reqEstateExteriorRemodel( Sapphire::E
|
|||
auto& server = Common::Service< World::WorldServer >::ref();
|
||||
auto pSession = server.getSession( player.getCharacterId() );
|
||||
|
||||
auto teriMgr = Common::Service< World::Manager::TerritoryMgr >::ref();
|
||||
auto& teriMgr = Common::Service< World::Manager::TerritoryMgr >::ref();
|
||||
auto pZone = teriMgr.getTerritoryByGuId( player.getTerritoryId() );
|
||||
|
||||
auto terri = std::dynamic_pointer_cast< HousingZone >( pZone );
|
||||
|
@ -1655,7 +1655,7 @@ void Sapphire::World::Manager::HousingMgr::reqEstateExteriorRemodel( Sapphire::E
|
|||
|
||||
void Sapphire::World::Manager::HousingMgr::reqEstateInteriorRemodel( Sapphire::Entity::Player& player )
|
||||
{
|
||||
auto teriMgr = Common::Service< World::Manager::TerritoryMgr >::ref();
|
||||
auto& teriMgr = Common::Service< World::Manager::TerritoryMgr >::ref();
|
||||
auto pZone = teriMgr.getTerritoryByGuId( player.getTerritoryId() );
|
||||
|
||||
auto& server = Common::Service< World::WorldServer >::ref();
|
||||
|
|
|
@ -53,7 +53,7 @@ void Sapphire::Network::GameConnection::eventHandlerTalk( const Packets::FFXIVAR
|
|||
World::Manager::PlayerMgr::sendDebug( player, "Calling: {0}.{1}", objName, eventName );
|
||||
eventMgr.eventStart( player, actorId, eventId, Event::EventHandler::Talk, 0, 0 );
|
||||
|
||||
auto teriMgr = Common::Service< World::Manager::TerritoryMgr >::ref();
|
||||
auto& teriMgr = Common::Service< World::Manager::TerritoryMgr >::ref();
|
||||
auto pZone = teriMgr.getTerritoryByGuId( player.getTerritoryId() );
|
||||
if( auto instance = pZone->getAsInstanceContent() )
|
||||
{
|
||||
|
|
|
@ -197,6 +197,8 @@ void Sapphire::Network::GameConnection::joinChatChannelHandler( const Packets::F
|
|||
|
||||
void Sapphire::Network::GameConnection::moveHandler( const Packets::FFXIVARR_PACKET_RAW& inPacket, Entity::Player& player )
|
||||
{
|
||||
if( player.hasStateFlag( Common::BetweenAreas ) )
|
||||
return;
|
||||
const auto updatePositionPacket = ZoneChannelPacket< Client::FFXIVIpcUpdatePosition >( inPacket );
|
||||
auto& data = updatePositionPacket.data();
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ void FadeBNpcTask::onQueue()
|
|||
void FadeBNpcTask::execute()
|
||||
{
|
||||
|
||||
auto teriMgr = Common::Service< World::Manager::TerritoryMgr >::ref();
|
||||
auto& teriMgr = Common::Service< World::Manager::TerritoryMgr >::ref();
|
||||
auto pZone = teriMgr.getTerritoryByGuId( m_pBNpc->getTerritoryId() );
|
||||
|
||||
if( !pZone )
|
||||
|
|
|
@ -24,7 +24,7 @@ void RemoveBNpcTask::onQueue()
|
|||
void RemoveBNpcTask::execute()
|
||||
{
|
||||
|
||||
auto teriMgr = Common::Service< World::Manager::TerritoryMgr >::ref();
|
||||
auto& teriMgr = Common::Service< World::Manager::TerritoryMgr >::ref();
|
||||
auto pZone = teriMgr.getTerritoryByGuId( m_pBNpc->getTerritoryId() );
|
||||
|
||||
if( !pZone )
|
||||
|
|
|
@ -63,7 +63,7 @@ void Sapphire::World::Territory::Housing::HousingInteriorTerritory::onPlayerZone
|
|||
|
||||
auto landSetId = housingMgr.toLandSetId( m_landIdent.territoryTypeId, m_landIdent.wardNum );
|
||||
|
||||
auto teriMgr = Common::Service< World::Manager::TerritoryMgr >::ref();
|
||||
auto& teriMgr = Common::Service< World::Manager::TerritoryMgr >::ref();
|
||||
auto pTeri = teriMgr.getTerritoryByGuId( landSetId );
|
||||
auto hZone = std::dynamic_pointer_cast< HousingZone >( pTeri );
|
||||
auto pLand = hZone->getLand( static_cast< uint8_t >( m_landIdent.landId ) );
|
||||
|
|
Loading…
Add table
Reference in a new issue