1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-05-02 08:57:44 +00:00

WiP fixed code redundancy

This commit is contained in:
Mordred 2023-01-26 22:04:23 +01:00
parent 32d9fdb818
commit 1af0b33807
3 changed files with 11 additions and 5 deletions

View file

@ -6,6 +6,7 @@
#include "Territory/HousingZone.h"
#include "Manager/TerritoryMgr.h"
#include "Manager/PlayerMgr.h"
#include <Manager/WarpMgr.h>
#include "Territory/Land.h"
@ -37,7 +38,7 @@ public:
return;
Common::LandIdent ident;
ident.landId = eobj.getHousingLink() >> 8;
ident.landId = eobj.getHousingLink();
ident.territoryTypeId = zone->getTerritoryTypeId();
ident.wardNum = zone->getWardNum();
ident.worldId = 67;
@ -82,7 +83,8 @@ public:
return;
}
//player.setInstance( internalZone->getGuId(), pos );
warpMgr().requestMoveTerritory( player, Common::WarpType::WARP_TYPE_NORMAL, internalZone->getGuId(), pos, 0.f );
} );
}
};

View file

@ -301,6 +301,11 @@ namespace Sapphire::ScriptAPI
{
return Common::Service< World::Manager::PlayerMgr >::ref();
}
World::Manager::WarpMgr& warpMgr()
{
return Common::Service< World::Manager::WarpMgr >::ref();
}
};
/*!

View file

@ -298,9 +298,8 @@ Sapphire::Entity::EventObjectPtr Sapphire::HousingZone::registerEstateEntranceEO
auto land = getLand( landId );
assert( land );
auto eObj = Entity::make_EventObject( getNextEObjId(), 2002737, 0, 0, 4, FFXIVARR_POSITION3{ 0, 10, 0 }, 0.f, "entrance", 0 );
eObj->setHousingLink( static_cast< uint32_t >( landId ) << 8 );
eObj->setGimmickId( static_cast< uint32_t >( landId ) << 8 );
auto eObj = Entity::make_EventObject( getNextEObjId(), 2002737, 0, 0, 0, FFXIVARR_POSITION3{ 0, 10, 0 }, 0.f, "entrance", 0 );
eObj->setHousingLink( static_cast< uint32_t >( landId ) );
eObj->setScale( 1.f );
addEObj( eObj );