mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-25 05:57:45 +00:00
Alot more cleanups in various areas.
This commit is contained in:
parent
4f7f3edfce
commit
188d80d2ec
19 changed files with 77 additions and 105 deletions
|
@ -32,8 +32,6 @@ public:
|
|||
|
||||
pPlayer->removeCurrency( Common::CurrencyType::Gil, teleportQuery.cost );
|
||||
|
||||
pPlayer->setZoningType( Common::ZoningType::Teleport );
|
||||
|
||||
warpMgr().requestPlayerTeleport( *pPlayer, teleportQuery.targetAetheryte, 1 );
|
||||
|
||||
pPlayer->clearTeleportQuery();
|
||||
|
|
|
@ -217,8 +217,7 @@ private:
|
|||
if( result.getResult( 0 ) == 1 )
|
||||
{
|
||||
quest.setSeq( Seq2 );
|
||||
player.changePosition( 10, 21, 13, -2 );
|
||||
warpMgr().requestMoveTerritoryType( player, Common::WarpType::WARP_TYPE_NORMAL, Territorytype0 );
|
||||
warpMgr().requestMoveTerritoryType( player, Common::WarpType::WARP_TYPE_NORMAL, Territorytype0, { 10, 21, 13 }, -2.f );
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
@ -112,11 +112,6 @@ void EffectBuilder::buildAndSendPackets( const std::vector< Entity::CharaPtr >&
|
|||
Logger::debug( "EffectBuilder result: " );
|
||||
Logger::debug( "Targets afflicted: {}", targetList.size() );
|
||||
|
||||
auto& teriMgr = Common::Service< Sapphire::World::Manager::TerritoryMgr >::ref();
|
||||
auto zone = teriMgr.getTerritoryByTypeId( m_sourceChara->getTerritoryTypeId() );
|
||||
|
||||
auto globalSequence = zone ? zone->getNextEffectResultId() : 0;
|
||||
|
||||
do // we want to send at least one packet even nothing is hit so other players can see
|
||||
{
|
||||
auto packet = buildNextEffectPacket( targetList );
|
||||
|
@ -136,7 +131,8 @@ std::shared_ptr< FFXIVPacketBase > EffectBuilder::buildNextEffectPacket( const s
|
|||
{
|
||||
auto effectPacket = std::make_shared< EffectPacket >( m_sourceChara->getId(), m_actionId );
|
||||
effectPacket->setRotation( Common::Util::floatToUInt16Rot( m_sourceChara->getRot() ) );
|
||||
effectPacket->setSequence( resultId, m_sequence );
|
||||
effectPacket->setRequestId( m_sequence );
|
||||
effectPacket->setResultId( resultId );
|
||||
effectPacket->setTargetActor( targetList[ 0 ]->getId() );
|
||||
|
||||
uint8_t targetIndex = 0;
|
||||
|
@ -184,7 +180,8 @@ std::shared_ptr< FFXIVPacketBase > EffectBuilder::buildNextEffectPacket( const s
|
|||
|
||||
auto effectPacket = std::make_shared< EffectPacket1 >( m_sourceChara->getId(), targetList[ 0 ]->getId(), m_actionId );
|
||||
effectPacket->setRotation( Common::Util::floatToUInt16Rot( m_sourceChara->getRot() ) );
|
||||
effectPacket->setSequence( resultId, m_sequence );
|
||||
effectPacket->setRequestId( m_sequence );
|
||||
effectPacket->setResultId( resultId );
|
||||
|
||||
for( auto it = m_actorEffectsMap.begin(); it != m_actorEffectsMap.end(); )
|
||||
{
|
||||
|
|
|
@ -993,12 +993,10 @@ void Sapphire::Entity::BNpc::autoAttack( CharaPtr pTarget )
|
|||
Common::CalcResultParam effectEntry{};
|
||||
effectEntry.Value = static_cast< int16_t >( damage.first );
|
||||
effectEntry.Type = ActionEffectType::CALC_RESULT_TYPE_DAMAGE_HP;
|
||||
//effectEntry.Flag = 128;
|
||||
effectEntry.Arg0 = 3;
|
||||
effectEntry.Arg1 = 7;
|
||||
//effectEntry.Arg2 = 0x71;
|
||||
auto resultId = pZone->getNextEffectResultId();
|
||||
effectPacket->setSequence( resultId );
|
||||
effectPacket->setResultId( resultId );
|
||||
effectPacket->addTargetEffect( effectEntry );
|
||||
server().queueForPlayers( getInRangePlayerIds(), effectPacket );
|
||||
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
#include <Util/UtilMath.h>
|
||||
#include <Logging/Logger.h>
|
||||
#include <Exd/ExdData.h>
|
||||
#include <datReader/DatCategories/bg/LgbTypes.h>
|
||||
#include <datReader/DatCategories/bg/lgb.h>
|
||||
|
||||
#include <cmath>
|
||||
#include <utility>
|
||||
|
@ -14,7 +12,6 @@
|
|||
#include "Player.h"
|
||||
#include "BNpc.h"
|
||||
|
||||
#include "Manager/HousingMgr.h"
|
||||
#include "Manager/TerritoryMgr.h"
|
||||
#include "Manager/RNGMgr.h"
|
||||
#include "Manager/PlayerMgr.h"
|
||||
|
@ -23,18 +20,15 @@
|
|||
#include "Manager/FreeCompanyMgr.h"
|
||||
#include "Manager/MapMgr.h"
|
||||
#include "Manager/MgrUtil.h"
|
||||
#include "Manager/ActionMgr.h"
|
||||
|
||||
#include "Territory/Territory.h"
|
||||
#include "Territory/InstanceContent.h"
|
||||
#include "Territory/InstanceObjectCache.h"
|
||||
#include "Territory/Land.h"
|
||||
|
||||
#include "Network/GameConnection.h"
|
||||
#include "Network/PacketContainer.h"
|
||||
#include "Network/CommonActorControl.h"
|
||||
#include "Network/PacketWrappers/ActorControlPacket.h"
|
||||
#include "Network/PacketWrappers/ActorControlSelfPacket.h"
|
||||
#include "Network/PacketWrappers/PlayerSetupPacket.h"
|
||||
|
||||
#include "Network/PacketWrappers/PlayerSpawnPacket.h"
|
||||
#include "Network/PacketWrappers/EffectPacket1.h"
|
||||
|
@ -76,7 +70,6 @@ Player::Player() :
|
|||
m_lastActionTick( 0 ),
|
||||
m_bInCombat( false ),
|
||||
m_bLoadingComplete( false ),
|
||||
m_zoningType( Common::ZoningType::None ),
|
||||
m_bAutoattack( false ),
|
||||
m_markedForRemoval( false ),
|
||||
m_mount( 0 ),
|
||||
|
@ -409,18 +402,12 @@ void Player::sendStats()
|
|||
|
||||
bool Player::exitInstance()
|
||||
{
|
||||
auto& teriMgr = Common::Service< TerritoryMgr >::ref();
|
||||
auto& warpMgr = Common::Service< WarpMgr >::ref();
|
||||
|
||||
resetHp();
|
||||
resetMp();
|
||||
|
||||
m_pos = m_prevPos;
|
||||
m_rot = m_prevRot;
|
||||
m_territoryTypeId = m_prevTerritoryTypeId;
|
||||
m_territoryId = m_prevTerritoryId;
|
||||
|
||||
warpMgr.requestMoveTerritory( *this, WarpType::WARP_TYPE_CONTENT_END_RETURN, m_prevTerritoryId, m_prevPos, m_prevRot );
|
||||
warpMgr.requestMoveTerritory( *this, WarpType::WARP_TYPE_CONTENT_END_RETURN, getPrevTerritoryId(), getPrevPos(), getPrevRot() );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -572,13 +559,6 @@ void Player::resetDiscovery()
|
|||
memset( m_discovery.data(), 0, m_discovery.size() );
|
||||
}
|
||||
|
||||
void Player::changePosition( float x, float y, float z, float o )
|
||||
{
|
||||
auto& warpMgr = Common::Service< WarpMgr >::ref();
|
||||
Common::FFXIVARR_POSITION3 pos{ x, y, z };
|
||||
warpMgr.requestWarp( *this, Common::WARP_TYPE_NORMAL, pos, getRot() );
|
||||
}
|
||||
|
||||
void Player::setRewardFlag( Common::UnlockEntry unlockId )
|
||||
{
|
||||
uint16_t index;
|
||||
|
@ -1072,16 +1052,6 @@ void Player::setLoadingComplete( bool bComplete )
|
|||
m_bLoadingComplete = bComplete;
|
||||
}
|
||||
|
||||
ZoningType Player::getZoningType() const
|
||||
{
|
||||
return m_zoningType;
|
||||
}
|
||||
|
||||
void Player::setZoningType( Common::ZoningType zoneingType )
|
||||
{
|
||||
m_zoningType = zoneingType;
|
||||
}
|
||||
|
||||
void Player::setSearchInfo( uint8_t selectRegion, uint8_t selectClass, const char* searchMessage )
|
||||
{
|
||||
m_searchSelectRegion = selectRegion;
|
||||
|
@ -1296,17 +1266,19 @@ uint32_t Player::getPersistentEmote() const
|
|||
void Player::autoAttack( CharaPtr pTarget )
|
||||
{
|
||||
auto& teriMgr = Common::Service< World::Manager::TerritoryMgr >::ref();
|
||||
auto& actionMgr = Common::Service< World::Manager::ActionMgr >::ref();
|
||||
auto& exdData = Common::Service< Data::ExdData >::ref();
|
||||
auto pZone = teriMgr.getTerritoryByGuId( getTerritoryId() );
|
||||
|
||||
auto mainWeap = getItemAt( Common::GearSet0, Common::GearSetSlot::MainHand );
|
||||
|
||||
pTarget->onActionHostile( getAsChara() );
|
||||
//uint64_t tick = Util::getTimeMs();
|
||||
//srand(static_cast< uint32_t >(tick));
|
||||
|
||||
auto& RNGMgr = Common::Service< World::Manager::RNGMgr >::ref();
|
||||
auto variation = static_cast< uint32_t >( RNGMgr.getRandGenerator< float >( 0, 3 ).next() );
|
||||
|
||||
//actionMgr.handleTargetedPlayerAction( *this, 7, exdData.getRow< Excel::Action >( 7 ), pTarget->getId(), 0 );
|
||||
|
||||
auto damage = Math::CalcStats::calcAutoAttackDamage( *this );
|
||||
|
||||
auto effectPacket = std::make_shared< EffectPacket1 >( getId(), pTarget->getId(), 7 );
|
||||
|
@ -1840,7 +1812,7 @@ void Player::setPartyId( uint64_t partyId )
|
|||
m_partyId = partyId;
|
||||
}
|
||||
|
||||
Player::FriendListIDVec& Player::getFriendListID()
|
||||
Player::FriendListIDVec& Player::getFriendListId()
|
||||
{
|
||||
return m_friendList;
|
||||
}
|
||||
|
@ -1850,7 +1822,7 @@ Player::FriendListDataVec& Player::getFriendListData()
|
|||
return m_friendInviteList;
|
||||
}
|
||||
|
||||
Player::FriendListIDVec& Player::getBlacklistID()
|
||||
Player::FriendListIDVec& Player::getBlacklistId()
|
||||
{
|
||||
return m_blacklist;
|
||||
}
|
||||
|
|
|
@ -310,9 +310,6 @@ namespace Sapphire::Entity
|
|||
|
||||
void updatePrevTerritory();
|
||||
|
||||
/*! change position, sends update too */
|
||||
void changePosition( float x, float y, float z, float o );
|
||||
|
||||
/*! return the characterId */
|
||||
uint64_t getCharacterId() const;
|
||||
|
||||
|
@ -598,10 +595,6 @@ namespace Sapphire::Entity
|
|||
/*! set the loading complete bool */
|
||||
void setLoadingComplete( bool bComplete );
|
||||
|
||||
Common::ZoningType getZoningType() const;
|
||||
|
||||
void setZoningType( Common::ZoningType zoneingType );
|
||||
|
||||
void setSearchInfo( uint8_t selectRegion, uint8_t selectClass, const char* searchMessage );
|
||||
|
||||
const char* getSearchMessage() const;
|
||||
|
@ -812,10 +805,10 @@ namespace Sapphire::Entity
|
|||
uint64_t getPartyId() const;
|
||||
void setPartyId( uint64_t partyId );
|
||||
|
||||
FriendListIDVec& getFriendListID();
|
||||
FriendListIDVec& getFriendListId();
|
||||
FriendListDataVec& getFriendListData();
|
||||
|
||||
BlacklistIDVec& getBlacklistID();
|
||||
BlacklistIDVec& getBlacklistId();
|
||||
|
||||
uint64_t m_lastMoveTime{};
|
||||
uint8_t m_lastMoveflag{};
|
||||
|
@ -940,8 +933,6 @@ namespace Sapphire::Entity
|
|||
|
||||
bool m_bIsConnected;
|
||||
|
||||
Common::ZoningType m_zoningType;
|
||||
|
||||
bool m_bNewAdventurer{};
|
||||
uint64_t m_onlineStatus;
|
||||
uint64_t m_onlineStatusCustom;
|
||||
|
|
|
@ -22,16 +22,14 @@ namespace Sapphire::World::Manager
|
|||
|
||||
bool cacheActionLut();
|
||||
|
||||
void handleItemManipulationAction( Entity::Player& player, uint32_t actionId,
|
||||
Excel::ExcelStructPtr< Excel::Action > actionData, uint16_t sequence );
|
||||
void handleItemManipulationAction( Entity::Player& player, uint32_t actionId, Excel::ExcelStructPtr< Excel::Action > actionData, uint16_t sequence );
|
||||
|
||||
void handleTargetedPlayerAction( Entity::Player& player, uint32_t actionId,
|
||||
std::shared_ptr< Excel::ExcelStruct< Excel::Action > > actionData, uint64_t targetId, uint16_t sequence );
|
||||
void handlePlacedPlayerAction( Entity::Player& player, uint32_t actionId,
|
||||
std::shared_ptr< Excel::ExcelStruct< Excel::Action > > actionData, Common::FFXIVARR_POSITION3 pos, uint16_t sequence );
|
||||
|
||||
void handleItemAction( Entity::Player& player, uint32_t itemId,
|
||||
std::shared_ptr< Excel::ExcelStruct< Excel::ItemAction > > itemActionData,
|
||||
void handleItemAction( Entity::Player& player, uint32_t itemId, std::shared_ptr< Excel::ExcelStruct< Excel::ItemAction > > itemActionData,
|
||||
uint16_t itemSourceSlot, uint16_t itemSourceContainer );
|
||||
|
||||
void handleEventItemAction( Entity::Player& player, uint32_t itemId,
|
||||
|
|
|
@ -59,7 +59,7 @@ bool BlacklistMgr::onAddCharacter( Entity::Player& source, const std::string& ta
|
|||
}
|
||||
|
||||
// add target ID to blacklist
|
||||
auto& sourceBL = source.getBlacklistID();
|
||||
auto& sourceBL = source.getBlacklistId();
|
||||
sourceBL[sourceIdx] = target.getCharacterId();
|
||||
|
||||
source.updateDbBlacklist();
|
||||
|
@ -100,7 +100,7 @@ bool BlacklistMgr::onRemoveCharacter( Entity::Player& source, const std::string&
|
|||
}
|
||||
|
||||
// set target slot to 0
|
||||
auto& sourceBL = source.getBlacklistID();
|
||||
auto& sourceBL = source.getBlacklistId();
|
||||
sourceBL[sourceIdx] = 0;
|
||||
source.updateDbBlacklist();
|
||||
|
||||
|
@ -124,7 +124,7 @@ bool BlacklistMgr::onGetBlacklistPage( Entity::Player& source, uint8_t key, uint
|
|||
// get array offset/last page sent from client packet
|
||||
auto offset = nextIdx;
|
||||
|
||||
auto& idVec = source.getBlacklistID();
|
||||
auto& idVec = source.getBlacklistId();
|
||||
|
||||
for( size_t i = offset; i < offset + itemsPerPage; ++i )
|
||||
{
|
||||
|
@ -172,7 +172,7 @@ bool BlacklistMgr::isBlacklisted( Entity::Player& source, const Entity::Player&
|
|||
|
||||
ptrdiff_t BlacklistMgr::getEntryIndex( Entity::Player& source, uint64_t characterId ) const
|
||||
{
|
||||
auto& sourceBL = source.getBlacklistID();
|
||||
auto& sourceBL = source.getBlacklistId();
|
||||
auto sourceBlIt = std::find( std::begin( sourceBL ), std::end( sourceBL ), characterId );
|
||||
|
||||
// not found
|
||||
|
|
|
@ -541,9 +541,7 @@ void DebugCommandMgr::add( char* data, Entity::Player& player, std::shared_ptr<
|
|||
entry.Arg0 = static_cast< uint8_t >( Common::ActionHitSeverityType::NormalDamage );
|
||||
|
||||
effectPacket->addTargetEffect( entry, static_cast< uint64_t >( player.getId() ) );
|
||||
|
||||
auto sequence = pCurrentZone->getNextEffectResultId();
|
||||
effectPacket->setSequence( sequence );
|
||||
effectPacket->setResultId( pCurrentZone->getNextEffectResultId() );
|
||||
|
||||
server().queueForPlayer( player.getCharacterId(), effectPacket );
|
||||
}
|
||||
|
|
|
@ -10,8 +10,8 @@ using namespace Sapphire::World::Manager;
|
|||
|
||||
bool FriendListMgr::onInviteCreate( Entity::Player& source, Entity::Player& target )
|
||||
{
|
||||
auto& sourceFL = source.getFriendListID();
|
||||
auto& targetFL = target.getFriendListID();
|
||||
auto& sourceFL = source.getFriendListId();
|
||||
auto& targetFL = target.getFriendListId();
|
||||
|
||||
// check if player already has been invited or friends
|
||||
if( isFriend( source, target ) )
|
||||
|
@ -96,8 +96,8 @@ bool FriendListMgr::onInviteDecline( Entity::Player& source, Entity::Player& tar
|
|||
return false;
|
||||
}
|
||||
|
||||
auto& sourceFL = source.getFriendListID();
|
||||
auto& targetFL = target.getFriendListID();
|
||||
auto& sourceFL = source.getFriendListId();
|
||||
auto& targetFL = target.getFriendListId();
|
||||
|
||||
auto& sourceFLData = source.getFriendListData();
|
||||
auto& targetFLData = target.getFriendListData();
|
||||
|
@ -149,7 +149,7 @@ bool FriendListMgr::isFriend( Entity::Player& source, Entity::Player& target ) c
|
|||
|
||||
ptrdiff_t FriendListMgr::getEntryIndex( Entity::Player& source, uint64_t characterId ) const
|
||||
{
|
||||
auto& sourceFL = source.getFriendListID();
|
||||
auto& sourceFL = source.getFriendListId();
|
||||
auto sourceInvIt = std::find( std::begin( sourceFL ), std::end( sourceFL ), characterId );
|
||||
|
||||
// not found
|
||||
|
|
|
@ -71,6 +71,21 @@ void WarpMgr::requestMoveTerritoryType( Entity::Player& player, Common::WarpType
|
|||
requestMoveTerritory( player, warpType, pTeri->getGuId() );
|
||||
}
|
||||
|
||||
void WarpMgr::requestMoveTerritoryType( Entity::Player& player, Common::WarpType warpType, uint32_t targetTerritoryTypeId,
|
||||
Common::FFXIVARR_POSITION3 targetPos, float targetRot )
|
||||
{
|
||||
auto& teriMgr = Common::Service< TerritoryMgr >::ref();
|
||||
|
||||
auto pTeri = teriMgr.getTerritoryByTypeId( targetTerritoryTypeId );
|
||||
if( !pTeri )
|
||||
{
|
||||
Logger::error( "Unable to find target territory instance for type {}", targetTerritoryTypeId );
|
||||
return;
|
||||
}
|
||||
|
||||
requestMoveTerritory( player, warpType, pTeri->getGuId(), player.getPos(), player.getRot() );
|
||||
}
|
||||
|
||||
void WarpMgr::requestWarp( Entity::Player& player, Common::WarpType warpType, Common::FFXIVARR_POSITION3 targetPos, float targetRot )
|
||||
{
|
||||
m_entityIdToWarpInfoMap[ player.getId() ] = { 0, warpType, targetPos, targetRot };
|
||||
|
@ -114,7 +129,6 @@ void WarpMgr::finishWarp( Entity::Player& player )
|
|||
|
||||
auto zoneInPacket = makeActorControlSelf( player.getId(), Appear, warpFinishAnim, raiseAnim, 0, 0 );
|
||||
auto setStatusPacket = makeActorControl( player.getId(), SetStatus, static_cast< uint8_t >( Common::ActorStatus::Idle ) );
|
||||
player.setZoningType( Common::ZoningType::None );
|
||||
|
||||
if( !player.getGmInvis() )
|
||||
server().queueForPlayers( player.getInRangePlayerIds(), zoneInPacket );
|
||||
|
@ -173,17 +187,14 @@ void WarpMgr::requestPlayerTeleport( Entity::Player& player, uint16_t aetheryteI
|
|||
if( teleportType == 1 || teleportType == 2 ) // teleport
|
||||
{
|
||||
warpType = WarpType::WARP_TYPE_TELEPO;
|
||||
player.setZoningType( Common::ZoningType::Teleport );
|
||||
}
|
||||
else if( teleportType == 3 ) // return
|
||||
{
|
||||
warpType = WarpType::WARP_TYPE_EXIT_RANGE;
|
||||
player.setZoningType( Common::ZoningType::Return );
|
||||
}
|
||||
else if( teleportType == 4 ) // return dead
|
||||
{
|
||||
warpType = WarpType::WARP_TYPE_EXIT_RANGE;
|
||||
player.setZoningType( Common::ZoningType::ReturnDead );
|
||||
}
|
||||
|
||||
if( sameTerritory )
|
||||
|
|
|
@ -32,6 +32,17 @@ namespace Sapphire::World::Manager
|
|||
/// <param name="targetRot"></param>
|
||||
void requestMoveTerritory( Entity::Player& player, Common::WarpType warpType, uint32_t targetTerritoryId, Common::FFXIVARR_POSITION3 targetPos, float targetRot );
|
||||
|
||||
/// <summary>
|
||||
/// request to move a player to specified territory type and position, with given WarpType
|
||||
/// </summary>
|
||||
/// <param name="player"></param>
|
||||
/// <param name="warpType"></param>
|
||||
/// <param name="targetTerritoryTypeId"></param>
|
||||
/// <param name="targetPos"></param>
|
||||
/// <param name="targetRot"></param>
|
||||
void requestMoveTerritoryType( Entity::Player& player, Common::WarpType warpType, uint32_t targetTerritoryId, Common::FFXIVARR_POSITION3 targetPos, float targetRot );
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// request to move a player to specified territory guid with given WarpType, position will be the same as before
|
||||
|
|
|
@ -195,7 +195,7 @@ void Sapphire::Network::GameConnection::getCommonlistHandler( const Packets::FFX
|
|||
}
|
||||
else if( data.ListType == 0x0b )
|
||||
{ // friend list
|
||||
auto& friendList = player.getFriendListID();
|
||||
auto& friendList = player.getFriendListId();
|
||||
auto& friendListData = player.getFriendListData();
|
||||
|
||||
std::vector< Common::HierarchyData > hierarchyData( friendListData.begin(), friendListData.end() );
|
||||
|
|
|
@ -89,6 +89,7 @@ void Sapphire::Network::GameConnection::gmCommandHandler( const Packets::FFXIVAR
|
|||
|
||||
auto& teriMgr = Common::Service< World::Manager::TerritoryMgr >::ref();
|
||||
auto& exdData = Common::Service< Data::ExdData >::ref();
|
||||
auto& warpMgr = Common::Service< World::Manager::WarpMgr >::ref();
|
||||
|
||||
const auto packet = ZoneChannelPacket< FFXIVIpcGmCommand >( inPacket );
|
||||
const auto commandId = packet.data().Id;
|
||||
|
@ -201,11 +202,11 @@ void Sapphire::Network::GameConnection::gmCommandHandler( const Packets::FFXIVAR
|
|||
{
|
||||
auto& warpMgr = Common::Service< WarpMgr >::ref();
|
||||
warpMgr.requestMoveTerritory( *targetPlayer, WarpType::WARP_TYPE_GM,
|
||||
player.getTerritoryId(), { player.getPos().x, player.getPos().y, player.getPos().z },
|
||||
player.getRot() );
|
||||
player.getTerritoryId(), player.getPos(), player.getRot() );
|
||||
}
|
||||
else
|
||||
targetPlayer->changePosition( player.getPos().x, player.getPos().y, player.getPos().z, player.getRot() );
|
||||
warpMgr.requestMoveTerritory( *targetPlayer, Common::WarpType::WARP_TYPE_NORMAL, player.getTerritoryId(),
|
||||
player.getPos(), player.getRot() );
|
||||
PlayerMgr::sendServerNotice( player, "Calling {0}", targetPlayer->getName() );
|
||||
break;
|
||||
}
|
||||
|
@ -578,12 +579,9 @@ void Sapphire::Network::GameConnection::gmCommandHandler( const Packets::FFXIVAR
|
|||
}
|
||||
case GmCommand::Jump:
|
||||
{
|
||||
|
||||
// todo - what was the intention here?
|
||||
auto inRange = player.getInRangeActors();
|
||||
|
||||
player.changePosition( targetActor->getPos().x, targetActor->getPos().y, targetActor->getPos().z,
|
||||
targetActor->getRot() );
|
||||
|
||||
warpMgr.requestWarp( player, WarpType::WARP_TYPE_GM, targetActor->getPos(), targetActor->getRot() );
|
||||
PlayerMgr::sendServerNotice( player, "Jumping to {0} in range.", targetPlayer->getName() );
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -85,10 +85,14 @@ namespace Sapphire::Network::Packets::WorldPackets::Server
|
|||
FFXIVPacketBase::setTargetActor( targetId );
|
||||
}
|
||||
|
||||
void setSequence( uint32_t sequence, uint16_t sourceSequence = 0 )
|
||||
void setRequestId( uint16_t requestId )
|
||||
{
|
||||
m_data.RequestId = static_cast< uint32_t >( sourceSequence );
|
||||
m_data.ResultId = static_cast< uint32_t>( sequence );
|
||||
m_data.RequestId = static_cast< uint32_t >( requestId );
|
||||
}
|
||||
|
||||
void setResultId( uint32_t resultId )
|
||||
{
|
||||
m_data.ResultId = static_cast< uint32_t >( resultId );
|
||||
}
|
||||
private:
|
||||
uint8_t m_targetEffectCount{ 0 };
|
||||
|
|
|
@ -68,10 +68,9 @@ namespace Sapphire::Network::Packets::WorldPackets::Server
|
|||
FFXIVPacketBase::setTargetActor( targetId );
|
||||
}
|
||||
|
||||
void setSequence( uint32_t sequence, uint16_t sourceSequence = 0 )
|
||||
void setRequestId( uint16_t requestId )
|
||||
{
|
||||
m_data.RequestId = static_cast< uint32_t >( sourceSequence );
|
||||
m_data.ResultId = static_cast< uint32_t>( sequence );
|
||||
m_data.RequestId = static_cast< uint32_t >( requestId );
|
||||
}
|
||||
|
||||
void setResultId( uint32_t resultId )
|
||||
|
|
|
@ -110,7 +110,7 @@ namespace Sapphire::Network::Packets::WorldPackets::Server
|
|||
m_data.ActiveType = player.getStance();
|
||||
m_data.Flag = 0;
|
||||
|
||||
if( player.getZoningType() != Common::ZoningType::None || player.getGmInvis() )
|
||||
if( player.getGmInvis() )
|
||||
{
|
||||
m_data.Flag |= static_cast< uint16_t >( Common::DisplayFlags::Invisible );
|
||||
}
|
||||
|
|
|
@ -156,8 +156,7 @@ bool Sapphire::HousingZone::isPlayerSubInstance( Entity::Player& player )
|
|||
void Sapphire::HousingZone::onPlayerZoneIn( Entity::Player& player )
|
||||
{
|
||||
auto& server = Common::Service< World::WorldServer >::ref();
|
||||
Logger::debug( "HousingZone::onPlayerZoneIn: Territory#{0}|{1}, Entity#{2}",
|
||||
getGuId(), getTerritoryTypeId(), player.getId() );
|
||||
Logger::debug( "HousingZone::onPlayerZoneIn: Territory#{0}|{1}, Entity#{2}", getGuId(), getTerritoryTypeId(), player.getId() );
|
||||
|
||||
auto isInSubdivision = isPlayerSubInstance( player );
|
||||
|
||||
|
@ -185,8 +184,8 @@ void Sapphire::HousingZone::sendLandSet( Entity::Player& player )
|
|||
auto landsetInitializePacket = makeZonePacket< FFXIVIpcHouseList >( player.getId() );
|
||||
|
||||
landsetInitializePacket->data().LandSetId.wardNum = m_wardNum;
|
||||
landsetInitializePacket->data().LandSetId.landId = m_landSetId;
|
||||
landsetInitializePacket->data().LandSetId.territoryTypeId = m_territoryTypeId;
|
||||
landsetInitializePacket->data().LandSetId.landId = static_cast< uint16_t >( m_landSetId );
|
||||
landsetInitializePacket->data().LandSetId.territoryTypeId = static_cast< uint16_t >( m_territoryTypeId );
|
||||
landsetInitializePacket->data().LandSetId.worldId = server.getWorldId();
|
||||
|
||||
auto isInSubdivision = isPlayerSubInstance( player );
|
||||
|
@ -337,7 +336,7 @@ void Sapphire::HousingZone::removeEstateEntranceEObj( uint16_t landId )
|
|||
auto land = getLand( landId );
|
||||
assert( land );
|
||||
|
||||
for( auto entry : m_eventObjects )
|
||||
for( const auto& entry : m_eventObjects )
|
||||
{
|
||||
auto eObj = entry.second;
|
||||
if( eObj->getHousingLink() == static_cast< uint32_t >( landId ) << 8 )
|
||||
|
|
|
@ -882,7 +882,6 @@ void Territory::addEffectResult( World::Action::EffectResultPtr result )
|
|||
}
|
||||
|
||||
void Territory::processEffectResults( uint64_t tickCount )
|
||||
|
||||
{
|
||||
// todo: move this to generic territory/instance delay wrapper cause it might be useful scheduling other things
|
||||
for( auto it = m_effectResults.begin(); it != m_effectResults.end(); )
|
||||
|
|
Loading…
Add table
Reference in a new issue