mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-27 06:47:45 +00:00
Examine works correctly again / Handles errors for GM's and diff zones
This commit is contained in:
parent
a274230899
commit
ef87b9b36d
4 changed files with 24 additions and 11 deletions
|
@ -200,6 +200,8 @@ enum ActorControlType :
|
|||
SetCharaGearParamUI = 0x260,
|
||||
ToggleWireframeRendering = 0x261,
|
||||
|
||||
ExamineError = 0x2BF,
|
||||
|
||||
GearSetEquipMsg = 0x321,
|
||||
|
||||
SetFestival = 0x386, // param1: festival.exd index
|
||||
|
|
|
@ -52,11 +52,18 @@ void examineHandler( Core::Entity::Player& player, uint32_t targetId )
|
|||
{
|
||||
auto pTarget = pSession->getPlayer();
|
||||
if( pTarget )
|
||||
{
|
||||
if( pTarget->isActingAsGm() || pTarget->getZoneId() != player.getZoneId() )
|
||||
{
|
||||
player.queuePacket( makeActorControl142( player.getId(), ActorControlType::ExamineError ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
player.queuePacket( boost::make_shared< ExaminePacket >( player, pTarget ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Core::Network::GameConnection::clientTriggerHandler( const Packets::FFXIVARR_PACKET_RAW& inPacket,
|
||||
Entity::Player& player )
|
||||
|
|
|
@ -120,6 +120,8 @@ void Core::Network::GameConnection::reqExamineSearchCommentHandler( const Core::
|
|||
|
||||
if( pPlayer )
|
||||
{
|
||||
if( pPlayer->isActingAsGm() || pPlayer->getZoneId() != player.getZoneId() ) return;
|
||||
|
||||
// retail sends the requester's id as both (isForSelf)
|
||||
auto searchInfoPacket = makeZonePacket< FFXIVIpcExamineSearchComment >( player.getId() );
|
||||
searchInfoPacket->data().charId = targetId;
|
||||
|
@ -144,6 +146,8 @@ void Core::Network::GameConnection::reqExamineFcInfo( const Core::Network::Packe
|
|||
|
||||
if( pPlayer )
|
||||
{
|
||||
if( pPlayer->isActingAsGm() || pPlayer->getZoneId() != player.getZoneId() ) return;
|
||||
|
||||
// retail sends the requester's id as both (isForSelf)
|
||||
auto examineFcInfoPacket = makeZonePacket< FFXIVIpcExamineFreeCompanyInfo >( player.getId() );
|
||||
examineFcInfoPacket->data().charId = targetId;
|
||||
|
|
|
@ -50,16 +50,16 @@ private:
|
|||
|
||||
memcpy( m_data.look, pTarget->getLookArray(), sizeof( m_data.look ) );
|
||||
|
||||
m_data.models[ Common::GearModelSlot::ModelHead ] = player.getModelForSlot( Common::GearModelSlot::ModelHead );
|
||||
m_data.models[ Common::GearModelSlot::ModelBody ] = player.getModelForSlot( Common::GearModelSlot::ModelBody );
|
||||
m_data.models[ Common::GearModelSlot::ModelHands ] = player.getModelForSlot( Common::GearModelSlot::ModelHands );
|
||||
m_data.models[ Common::GearModelSlot::ModelLegs ] = player.getModelForSlot( Common::GearModelSlot::ModelLegs );
|
||||
m_data.models[ Common::GearModelSlot::ModelFeet ] = player.getModelForSlot( Common::GearModelSlot::ModelFeet );
|
||||
m_data.models[ Common::GearModelSlot::ModelNeck ] = player.getModelForSlot( Common::GearModelSlot::ModelNeck );
|
||||
m_data.models[ Common::GearModelSlot::ModelEar ] = player.getModelForSlot( Common::GearModelSlot::ModelEar );
|
||||
m_data.models[ Common::GearModelSlot::ModelRing1 ] = player.getModelForSlot( Common::GearModelSlot::ModelRing1 );
|
||||
m_data.models[ Common::GearModelSlot::ModelRing2 ] = player.getModelForSlot( Common::GearModelSlot::ModelRing2 );
|
||||
m_data.models[ Common::GearModelSlot::ModelWrist ] = player.getModelForSlot( Common::GearModelSlot::ModelWrist );
|
||||
m_data.models[ Common::GearModelSlot::ModelHead ] = pTarget->getModelForSlot( Common::GearModelSlot::ModelHead );
|
||||
m_data.models[ Common::GearModelSlot::ModelBody ] = pTarget->getModelForSlot( Common::GearModelSlot::ModelBody );
|
||||
m_data.models[ Common::GearModelSlot::ModelHands ] = pTarget->getModelForSlot( Common::GearModelSlot::ModelHands );
|
||||
m_data.models[ Common::GearModelSlot::ModelLegs ] = pTarget->getModelForSlot( Common::GearModelSlot::ModelLegs );
|
||||
m_data.models[ Common::GearModelSlot::ModelFeet ] = pTarget->getModelForSlot( Common::GearModelSlot::ModelFeet );
|
||||
m_data.models[ Common::GearModelSlot::ModelNeck ] = pTarget->getModelForSlot( Common::GearModelSlot::ModelNeck );
|
||||
m_data.models[ Common::GearModelSlot::ModelEar ] = pTarget->getModelForSlot( Common::GearModelSlot::ModelEar );
|
||||
m_data.models[ Common::GearModelSlot::ModelRing1 ] = pTarget->getModelForSlot( Common::GearModelSlot::ModelRing1 );
|
||||
m_data.models[ Common::GearModelSlot::ModelRing2 ] = pTarget->getModelForSlot( Common::GearModelSlot::ModelRing2 );
|
||||
m_data.models[ Common::GearModelSlot::ModelWrist ] = pTarget->getModelForSlot( Common::GearModelSlot::ModelWrist );
|
||||
|
||||
// todo: main/sub/other stuff too
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue