mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-05-03 17:27:47 +00:00
Merge remote-tracking branch 'origin/develop'
This commit is contained in:
commit
ddae03382a
17 changed files with 186 additions and 84 deletions
|
@ -47,7 +47,7 @@ ALTER TABLE `charainfo` CHANGE `Mounts` `Mounts` BINARY(17) NULL DEFAULT NULL;
|
|||
ALTER TABLE `charainfo` CHANGE `Orchestrion` `Orchestrion` BINARY(40) NULL DEFAULT NULL;
|
||||
ALTER TABLE `charainfo` CHANGE `Minions` `Minions` BINARY(40) NULL DEFAULT NULL;
|
||||
ALTER TABLE `charainfo` CHANGE `QuestCompleteFlags` `QuestCompleteFlags` VARBINARY(396) NULL DEFAULT NULL;
|
||||
ALTER TABLE `charainfo` CHANGE `Aetheryte` `Minions` BINARY(17) NULL DEFAULT NULL;
|
||||
ALTER TABLE `charainfo` CHANGE `Aetheryte` `Aetheryte` BINARY(17) NULL DEFAULT NULL;
|
||||
ALTER TABLE `charainfo` ADD COLUMN `EquipDisplayFlags` INT(3) NULL DEFAULT '0' AFTER `GMRank`;
|
||||
ALTER TABLE `charainfo` ADD COLUMN `Pose` INT(3) NULL DEFAULT '0' AFTER `EquipDisplayFlags`;
|
||||
|
||||
|
|
|
@ -287,6 +287,8 @@ enum ClientTriggerType
|
|||
AchievementCritReq = 0x3E8,
|
||||
AchievementList = 0x3E9,
|
||||
|
||||
RequestSharedEstateSettings = 0x46F,
|
||||
|
||||
CompanionAction = 0x6A4,
|
||||
CompanionSetBarding = 0x6A5,
|
||||
CompanionActionUnlock = 0x6A6,
|
||||
|
|
|
@ -33,7 +33,7 @@ enum ClientLobbyIpcType :
|
|||
{
|
||||
ReqCharList = 0x0003,
|
||||
ReqEnterWorld = 0x0004,
|
||||
ReqServiceAccountList = 0x0005,
|
||||
ClientVersionInfo = 0x0005,
|
||||
|
||||
ReqCharDelete = 0x000A,
|
||||
ReqCharCreate = 0x000B,
|
||||
|
@ -64,6 +64,7 @@ enum ServerZoneIpcType :
|
|||
///////////////////////////////////////////////////
|
||||
|
||||
ChatBanned = 0x006B,
|
||||
Playtime = 0x006C, // updated 4.4
|
||||
Logout = 0x0077, // updated 4.4
|
||||
CFNotify = 0x0078,
|
||||
CFMemberStatus = 0x0079,
|
||||
|
@ -78,7 +79,6 @@ enum ServerZoneIpcType :
|
|||
|
||||
|
||||
|
||||
Playtime = 0x00F5, // updated 4.3
|
||||
Chat = 0x00F4, // updated 4.4
|
||||
SocialList = 0x00FB, // updated 4.4
|
||||
|
||||
|
@ -99,6 +99,11 @@ enum ServerZoneIpcType :
|
|||
|
||||
LinkshellList = 0x0117, // updated 4.4
|
||||
|
||||
MailDeleteRequest = 0x0118, // updated 4.4
|
||||
ReqMoogleMailList = 0x0119, // updated 4.4
|
||||
ReqMoogleMailLetter = 0x01A, // updated 4.4
|
||||
MailLetterNotification = 0x011B, // updated 4.4
|
||||
|
||||
ExamineFreeCompanyInfo = 0x013A, // updated 4.1
|
||||
CharaFreeCompanyTag = 0x0127, // updated 4.4
|
||||
FreeCompanyBoardMsg = 0x0128, // updated 4.4
|
||||
|
@ -127,7 +132,7 @@ enum ServerZoneIpcType :
|
|||
ObjectSpawn = 0x0179, // updated 4.4
|
||||
ObjectDespawn = 0x017A, // updated 4.4
|
||||
|
||||
SetLevelSync = 0x017B, // updated 4.4
|
||||
UpdateClassInfo = 0x017B, // updated 4.4
|
||||
SilentSetClassJob = 0x017C, // updated 4.4 - seems to be the case, not sure if it's actually used for anything
|
||||
|
||||
InitUI = 0x017D, // updated 4.4
|
||||
|
@ -138,7 +143,7 @@ enum ServerZoneIpcType :
|
|||
ModelEquip = 0x0182, // updated 4.4
|
||||
Examine = 0x0183, // updated 4.4
|
||||
CharaNameReq = 0x0185, // updated 4.4
|
||||
UpdateClassInfo = 0x0186, // updated 4.4
|
||||
SetLevelSync = 0x0186, // not updated for 4.4, not sure what it is anymore
|
||||
|
||||
ItemInfo = 0x018C, // updated 4.4
|
||||
ContainerInfo = 0x018D, // updated 4.4
|
||||
|
@ -179,13 +184,15 @@ enum ServerZoneIpcType :
|
|||
PlayerTitleList = 0x01FD, // updated 4.4
|
||||
Discovery = 0x01FE, // updated 4.4
|
||||
|
||||
EorzeaTimeOffset = 0x01FF, // updated 4.4
|
||||
EorzeaTimeOffset = 0x0200, // updated 4.4
|
||||
|
||||
EquipDisplayFlags = 0x020C, // updated 4.4
|
||||
|
||||
WardInfo = 0x0220, // updated 4.4
|
||||
WardHousingPermission = 0x0229, // updated 4.4
|
||||
WardYardInfo = 0x022B, // updated 4.4
|
||||
WardYardInfo = 0x022C, // updated 4.4
|
||||
|
||||
SharedEstateSettingsResponse = 0x023C, // updated 4.4
|
||||
|
||||
DuelChallenge = 0x0277, // 4.2; this is responsible for opening the ui
|
||||
PerformNote = 0x0286, // updated 4.3
|
||||
|
@ -280,6 +287,8 @@ enum ClientZoneIpcType :
|
|||
LinkshellEventHandler = 0x0150, // updated 4.1 ??
|
||||
LinkshellEventHandler1 = 0x0151, // updated 4.1 ??
|
||||
|
||||
SetSharedEstateSettings = 0x0177, // updated 4.4
|
||||
|
||||
PerformNoteHandler = 0x029B, // updated 4.3
|
||||
|
||||
ReqEquipDisplayFlagsChange = 0x016F, // updated 4.4
|
||||
|
|
|
@ -15,16 +15,22 @@ struct FFXIVIpcGmCommand1 :
|
|||
/* 0000 */ uint32_t commandId;
|
||||
/* 0004 */ uint32_t param1;
|
||||
/* 0008 */ uint32_t param2;
|
||||
/* 000C */ uint8_t unknown_C[0xC];
|
||||
/* 0018 */ uint32_t param3;
|
||||
/* 000C */ uint32_t param3;
|
||||
/* 0010 */ uint32_t param4;
|
||||
/* 0014 */ uint32_t unknown1;
|
||||
/* 0018 */ uint32_t target;
|
||||
};
|
||||
|
||||
struct FFXIVIpcGmCommand2 :
|
||||
FFXIVIpcBasePacket< GMCommand2 >
|
||||
{
|
||||
/* 0000 */ uint32_t commandId;
|
||||
/* 0004 */ char unk_4[0x10];
|
||||
/* 0014 */ char param1[0x20];
|
||||
/* 0004 */ uint32_t param1;
|
||||
/* 0008 */ uint32_t param2;
|
||||
/* 000C */ uint32_t param3;
|
||||
/* 0010 */ uint32_t param4;
|
||||
/* 0014 */ char target[0x20];
|
||||
/* 0034 */ uint32_t unknown1;
|
||||
};
|
||||
|
||||
struct FFXIVIpcClientTrigger :
|
||||
|
@ -183,6 +189,20 @@ struct FFXIVIpcInventoryModifyHandler :
|
|||
/* 0028 */ uint32_t splitCount;
|
||||
};
|
||||
|
||||
struct FFXIVIpcSetSharedEstateSettings :
|
||||
FFXIVIpcBasePacket< SetSharedEstateSettings >
|
||||
{
|
||||
/* 0000 */ uint64_t char1ContentId;
|
||||
/* 0008 */ uint64_t char2ContentId;
|
||||
/* 0010 */ uint64_t char3ContentId;
|
||||
/* 0018 */ uint8_t char1Permissions;
|
||||
/* 0019 */ char padding1[0x7];
|
||||
/* 0020 */ uint8_t char2Permissions;
|
||||
/* 0021 */ char padding2[0x7];
|
||||
/* 0028 */ uint8_t char3Permissions;
|
||||
/* 0029 */ char padding3[0x7];
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -210,6 +210,44 @@ struct FFXIVIpcLinkshellList :
|
|||
} entry[8];
|
||||
};
|
||||
|
||||
/**
|
||||
* Structural representation of the packet sent by the server
|
||||
* to send a list of mail the player has
|
||||
*/
|
||||
struct FFXIVIpcReqMoogleMailList :
|
||||
FFXIVIpcBasePacket< ReqMoogleMailList >
|
||||
{
|
||||
struct letterEntry
|
||||
{
|
||||
char unk[0x8];
|
||||
uint32_t timeStamp; // The time the mail was sent (this also seems to be used as a Id)
|
||||
char unk1[0x30]; // This should be items, gil, etc for the letter
|
||||
uint8_t read; // 0 = false | 1 = true
|
||||
uint8_t type; // 0 = Friends | 1 = Rewards | 2 = GM
|
||||
uint8_t unk2;
|
||||
char senderName[0x20]; // The name of the sender
|
||||
char summary[0x3C]; // The start of the full letter text
|
||||
char padding2[0x5];
|
||||
} letter[5];
|
||||
char unk3[0x08];
|
||||
};
|
||||
|
||||
/**
|
||||
* Structural representation of the packet sent by the server
|
||||
* to show the mail delivery notification
|
||||
*/
|
||||
struct FFXIVIpcMailLetterNotificationt :
|
||||
FFXIVIpcBasePacket< MailLetterNotification >
|
||||
{
|
||||
uint32_t sendbackCount; // The amount of letters sent back since you ran out of room (moogle dialog changes based on this)
|
||||
uint16_t friendLetters; // The amount of letters in the friends section of the letterbox
|
||||
uint16_t unreadCount; // The amount of unreads in the letterbox (this is the number that shows up)
|
||||
uint16_t rewardLetters; // The amount of letters in the rewards section of the letterbox
|
||||
uint8_t isGmLetter; // Makes the letter notification flash red
|
||||
uint8_t isSupportDesk; // After setting this to 1 we can no longer update mail notifications (more research needed on the support desk)
|
||||
char unk2[0x4]; // This has probs something to do with the support desk (inquiry id?)
|
||||
};
|
||||
|
||||
struct FFXIVIpcExamineFreeCompanyInfo :
|
||||
FFXIVIpcBasePacket< ExamineFreeCompanyInfo >
|
||||
{
|
||||
|
@ -976,7 +1014,10 @@ struct FFXIVIpcModelEquip :
|
|||
{
|
||||
/* 0000 */ uint64_t mainWeapon;
|
||||
/* 0008 */ uint64_t offWeapon;
|
||||
/* 0010 */ uint32_t padding1;
|
||||
/* 0010 */ uint8_t unk1;
|
||||
/* 0011 */ uint8_t classJobId;
|
||||
/* 0012 */ uint8_t level;
|
||||
/* 0013 */ uint8_t unk2;
|
||||
/* 0014 */ uint32_t models[10];
|
||||
/* 003C */ uint32_t padding2;
|
||||
};
|
||||
|
@ -1592,6 +1633,22 @@ struct FFXIVIpcWardYardInfo :
|
|||
} object[100];
|
||||
};
|
||||
|
||||
/**
|
||||
* Structural representation of the packet sent by the server
|
||||
* to show the current shared estate settings
|
||||
*/
|
||||
struct FFXIVIpcSharedEstateSettingsResponse :
|
||||
FFXIVIpcBasePacket< SharedEstateSettingsResponse >
|
||||
{
|
||||
struct playerEntry
|
||||
{
|
||||
uint64_t contentId;
|
||||
uint8_t permissions;
|
||||
char name[0x20];
|
||||
char padding[0x7];
|
||||
} entry[3];
|
||||
};
|
||||
|
||||
struct FFXIVIpcMSQTrackerProgress :
|
||||
FFXIVIpcBasePacket< MSQTrackerProgress >
|
||||
{
|
||||
|
|
|
@ -319,6 +319,7 @@ void PlayerMinimal::saveAsNew()
|
|||
createInvDbContainer( InventoryType::ArmoryWrist );
|
||||
createInvDbContainer( InventoryType::ArmoryRing );
|
||||
createInvDbContainer( InventoryType::ArmoryMain );
|
||||
createInvDbContainer( InventoryType::ArmorySoulCrystal );
|
||||
|
||||
createInvDbContainer( InventoryType::Currency );
|
||||
createInvDbContainer( InventoryType::Crystal );
|
||||
|
|
|
@ -409,8 +409,9 @@ void Core::Network::GameConnection::handleGamePacket( Packets::FFXIVARR_PACKET_R
|
|||
|
||||
switch( *reinterpret_cast< uint16_t* >( &packet.data[ 2 ] ) )
|
||||
{
|
||||
case ReqServiceAccountList:
|
||||
case ClientVersionInfo:
|
||||
{
|
||||
// todo: validate client version based on sha1 or gamever/bootver
|
||||
sendServiceAccountList( packet, tmpId );
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -324,7 +324,7 @@ public:
|
|||
void unequipItem( Common::GearSetSlot equipSlotId, ItemPtr pItem );
|
||||
|
||||
/*! equip a weapon, possibly forcing a job change */
|
||||
void equipWeapon( ItemPtr pItem );
|
||||
void equipWeapon( ItemPtr pItem, bool updateClass );
|
||||
|
||||
/*! get player ilvl */
|
||||
uint16_t getItemLevel() const;
|
||||
|
@ -356,7 +356,7 @@ public:
|
|||
/*! return the current amount of crystals of type */
|
||||
uint32_t getCrystal( uint8_t type ) const;
|
||||
|
||||
void updateModels( Common::GearSetSlot equipSlotId, const Core::ItemPtr& pItem );
|
||||
void updateModels( Common::GearSetSlot equipSlotId, const Core::ItemPtr& pItem, bool updateClass );
|
||||
|
||||
Common::GearModelSlot equipSlotToModelSlot( Common::GearSetSlot slot );
|
||||
|
||||
|
|
|
@ -114,7 +114,7 @@ void Core::Entity::Player::sendItemLevel()
|
|||
queuePacket( makeActorControl142( getId(), SetItemLevel, getItemLevel(), 0 ) );
|
||||
}
|
||||
|
||||
void Core::Entity::Player::equipWeapon( ItemPtr pItem )
|
||||
void Core::Entity::Player::equipWeapon( ItemPtr pItem, bool updateClass )
|
||||
{
|
||||
auto exdData = g_fw.get< Core::Data::ExdDataGenerated >();
|
||||
if( !exdData )
|
||||
|
@ -122,16 +122,17 @@ void Core::Entity::Player::equipWeapon( ItemPtr pItem )
|
|||
|
||||
auto itemInfo = exdData->get< Core::Data::Item >( pItem->getId() );
|
||||
auto itemClassJob = itemInfo->classJobUse;
|
||||
|
||||
auto currentClass = getClass();
|
||||
auto classJobInfo = exdData->get< Core::Data::ClassJob >( static_cast< uint32_t >( getClass() ) );
|
||||
auto currentParentClass = static_cast< ClassJob >( classJobInfo->classJobParent );
|
||||
auto newClassJob = static_cast< ClassJob >( itemClassJob );
|
||||
|
||||
if( isClassJobUnlocked( newClassJob ) )
|
||||
return;
|
||||
|
||||
// todo: check if soul crystal is equipped and use job instead
|
||||
|
||||
if( ( isClassJobUnlocked( newClassJob ) ) && ( currentParentClass != newClassJob ) )
|
||||
{
|
||||
if ( updateClass )
|
||||
setClassJob( newClassJob );
|
||||
else
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// equip an item
|
||||
|
@ -139,18 +140,18 @@ void Core::Entity::Player::equipItem( Common::GearSetSlot equipSlotId, ItemPtr p
|
|||
{
|
||||
|
||||
//g_framework.getLogger().debug( "Equipping into slot " + std::to_string( equipSlotId ) );
|
||||
|
||||
updateModels( equipSlotId, pItem );
|
||||
|
||||
if( sendUpdate )
|
||||
{
|
||||
updateModels( equipSlotId, pItem, true );
|
||||
this->sendModel();
|
||||
m_itemLevel = calculateEquippedGearItemLevel();
|
||||
sendItemLevel();
|
||||
}
|
||||
else
|
||||
updateModels( equipSlotId, pItem, false );
|
||||
}
|
||||
|
||||
void Core::Entity::Player::updateModels( GearSetSlot equipSlotId, const Core::ItemPtr& pItem )
|
||||
void Core::Entity::Player::updateModels( GearSetSlot equipSlotId, const Core::ItemPtr& pItem, bool updateClass )
|
||||
{
|
||||
uint64_t model = pItem->getModelId1();
|
||||
uint64_t model2 = pItem->getModelId2();
|
||||
|
@ -160,8 +161,7 @@ void Core::Entity::Player::updateModels( GearSetSlot equipSlotId, const Core::It
|
|||
case MainHand:
|
||||
m_modelMainWeapon = model;
|
||||
m_modelSubWeapon = model2;
|
||||
// TODO: add job change upon changing weapon if needed
|
||||
// equipWeapon( pItem );
|
||||
equipWeapon( pItem, updateClass );
|
||||
break;
|
||||
|
||||
case OffHand:
|
||||
|
|
|
@ -608,7 +608,7 @@ bool Core::Entity::Player::loadInventory()
|
|||
{
|
||||
uint16_t storageId = res->getUInt16( 1 );
|
||||
|
||||
for( uint32_t i = 1; i <= 13; i++ )
|
||||
for( uint32_t i = 1; i <= 14; i++ )
|
||||
{
|
||||
uint64_t uItemId = res->getUInt64( i + 1 );
|
||||
if( uItemId == 0 )
|
||||
|
|
|
@ -41,10 +41,10 @@ void Core::Network::GameConnection::actionHandler( const Packets::FFXIVARR_PACKE
|
|||
{
|
||||
const auto packet = ZoneChannelPacket< Client::FFXIVIpcSkillHandler >( inPacket );
|
||||
|
||||
const auto& type = packet.data().type;
|
||||
const auto& action = packet.data().actionId;
|
||||
const auto& useCount = packet.data().useCount;
|
||||
const auto& targetId = packet.data().targetId;
|
||||
const auto type = packet.data().type;
|
||||
const auto action = packet.data().actionId;
|
||||
const auto useCount = packet.data().useCount;
|
||||
const auto targetId = packet.data().targetId;
|
||||
|
||||
player.sendDebug( "Skill type:" + std::to_string( type ) );
|
||||
|
||||
|
|
|
@ -72,12 +72,12 @@ void Core::Network::GameConnection::clientTriggerHandler( const Packets::FFXIVAR
|
|||
|
||||
const auto packet = ZoneChannelPacket< Client::FFXIVIpcClientTrigger >( inPacket );
|
||||
|
||||
const auto& commandId = packet.data().commandId;
|
||||
const auto& param1 = *reinterpret_cast< const uint64_t* >( &packet.data().param11 );
|
||||
const auto& param11 = packet.data().param11;
|
||||
const auto& param12 = packet.data().param12;
|
||||
const auto& param2 = packet.data().param2;
|
||||
const auto& param3 = packet.data().param3;
|
||||
const auto commandId = packet.data().commandId;
|
||||
const auto param1 = *reinterpret_cast< const uint64_t* >( &packet.data().param11 );
|
||||
const auto param11 = packet.data().param11;
|
||||
const auto param12 = packet.data().param12;
|
||||
const auto param2 = packet.data().param2;
|
||||
const auto param3 = packet.data().param3;
|
||||
|
||||
pLog->debug( "[" + std::to_string( m_pSession->getId() ) + "] Incoming action: " +
|
||||
boost::str( boost::format( "%|04X|" ) % ( uint32_t ) ( commandId & 0xFFFF ) ) +
|
||||
|
|
|
@ -39,8 +39,8 @@ void Core::Network::GameConnection::eventHandlerTalk( const Packets::FFXIVARR_PA
|
|||
|
||||
const auto packet = ZoneChannelPacket< Client::FFXIVIpcEventHandlerTalk >( inPacket );
|
||||
|
||||
const auto& actorId = packet.data().actorId;
|
||||
const auto& eventId = packet.data().eventId;
|
||||
const auto actorId = packet.data().actorId;
|
||||
const auto eventId = packet.data().eventId;
|
||||
|
||||
auto eventType = static_cast< uint16_t >( eventId >> 16 );
|
||||
|
||||
|
@ -84,9 +84,9 @@ void Core::Network::GameConnection::eventHandlerEmote( const Packets::FFXIVARR_P
|
|||
|
||||
const auto packet = ZoneChannelPacket< Client::FFXIVIpcEventHandlerEmote >( inPacket );
|
||||
|
||||
const auto& actorId = packet.data().actorId;
|
||||
const auto& eventId = packet.data().eventId;
|
||||
const auto& emoteId = packet.data().emoteId;
|
||||
const auto actorId = packet.data().actorId;
|
||||
const auto eventId = packet.data().eventId;
|
||||
const auto emoteId = packet.data().emoteId;
|
||||
const auto eventType = static_cast< uint16_t >( eventId >> 16 );
|
||||
|
||||
std::string eventName = "onEmote";
|
||||
|
@ -122,8 +122,8 @@ void Core::Network::GameConnection::eventHandlerWithinRange( const Packets::FFXI
|
|||
|
||||
const auto packet = ZoneChannelPacket< Client::FFXIVIpcEventHandlerWithinRange >( inPacket );
|
||||
|
||||
const auto& eventId = packet.data().eventId;
|
||||
const auto& param1 = packet.data().param1;
|
||||
const auto eventId = packet.data().eventId;
|
||||
const auto param1 = packet.data().param1;
|
||||
const auto& pos = packet.data().position;
|
||||
|
||||
std::string eventName = "onWithinRange";
|
||||
|
@ -144,8 +144,8 @@ void Core::Network::GameConnection::eventHandlerOutsideRange( const Packets::FFX
|
|||
auto pScriptMgr = g_fw.get< Scripting::ScriptMgr >();
|
||||
|
||||
const auto packet = ZoneChannelPacket< Client::FFXIVIpcEventHandlerOutsideRange >( inPacket );
|
||||
const auto& eventId = packet.data().eventId;
|
||||
const auto& param1 = packet.data().param1;
|
||||
const auto eventId = packet.data().eventId;
|
||||
const auto param1 = packet.data().param1;
|
||||
const auto& pos = packet.data().position;
|
||||
|
||||
std::string eventName = "onOutsideRange";
|
||||
|
@ -167,9 +167,9 @@ void Core::Network::GameConnection::eventHandlerEnterTerritory( const Packets::F
|
|||
|
||||
const auto packet = ZoneChannelPacket< Client::FFXIVIpcEnterTerritoryHandler >( inPacket );
|
||||
|
||||
const auto& eventId = packet.data().eventId;
|
||||
const auto& param1 = packet.data().param1;
|
||||
const auto& param2 = packet.data().param2;
|
||||
const auto eventId = packet.data().eventId;
|
||||
const auto param1 = packet.data().param1;
|
||||
const auto param2 = packet.data().param2;
|
||||
|
||||
std::string eventName = "onEnterTerritory";
|
||||
|
||||
|
@ -195,12 +195,12 @@ void Core::Network::GameConnection::eventHandlerReturn( const Packets::FFXIVARR_
|
|||
Entity::Player& player )
|
||||
{
|
||||
const auto packet = ZoneChannelPacket< Client::FFXIVIpcEventHandlerReturn >( inPacket );
|
||||
const auto& eventId = packet.data().eventId;
|
||||
const auto& scene = packet.data().scene;
|
||||
const auto& param1 = packet.data().param1;
|
||||
const auto& param2 = packet.data().param2;
|
||||
const auto& param3 = packet.data().param3;
|
||||
const auto& param4 = packet.data().param4;
|
||||
const auto eventId = packet.data().eventId;
|
||||
const auto scene = packet.data().scene;
|
||||
const auto param1 = packet.data().param1;
|
||||
const auto param2 = packet.data().param2;
|
||||
const auto param3 = packet.data().param3;
|
||||
const auto param4 = packet.data().param4;
|
||||
|
||||
std::string eventName = Event::getEventName( eventId );
|
||||
|
||||
|
|
|
@ -95,20 +95,23 @@ void Core::Network::GameConnection::gm1Handler( const Packets::FFXIVARR_PACKET_R
|
|||
return;
|
||||
|
||||
const auto packet = ZoneChannelPacket< Client::FFXIVIpcGmCommand1 >( inPacket );
|
||||
const auto& commandId = packet.data().commandId;
|
||||
const auto& param1 = packet.data().param1;
|
||||
const auto& param2 = packet.data().param2;
|
||||
const auto& param3 = packet.data().param3;
|
||||
const auto commandId = packet.data().commandId;
|
||||
const auto param1 = packet.data().param1;
|
||||
const auto param2 = packet.data().param2;
|
||||
const auto param3 = packet.data().param3;
|
||||
const auto param4 = packet.data().param4;
|
||||
const auto target = packet.data().target;
|
||||
|
||||
auto pLog = g_fw.get< Logger >();
|
||||
pLog->debug( player.getName() + " used GM1 commandId: " + std::to_string( commandId ) +
|
||||
", params: " + std::to_string( param1 ) + ", " +
|
||||
std::to_string( param2 ) + ", " + std::to_string( param3 ) );
|
||||
std::to_string( param2 ) + ", " + std::to_string( param3 ) + ", " + std::to_string( param4 ) +
|
||||
", target: " + std::to_string( target ) );
|
||||
|
||||
Core::Entity::ActorPtr targetActor;
|
||||
|
||||
|
||||
if( player.getId() == param3 )
|
||||
if( player.getId() == target )
|
||||
{
|
||||
targetActor = player.getAsPlayer();
|
||||
}
|
||||
|
@ -117,7 +120,7 @@ void Core::Network::GameConnection::gm1Handler( const Packets::FFXIVARR_PACKET_R
|
|||
auto inRange = player.getInRangeActors();
|
||||
for( auto& actor : inRange )
|
||||
{
|
||||
if( actor->getId() == param3 )
|
||||
if( actor->getId() == target )
|
||||
targetActor = actor;
|
||||
}
|
||||
}
|
||||
|
@ -539,12 +542,19 @@ void Core::Network::GameConnection::gm2Handler( const Packets::FFXIVARR_PACKET_R
|
|||
|
||||
const auto packet = ZoneChannelPacket< Client::FFXIVIpcGmCommand2 >( inPacket );
|
||||
|
||||
const auto& commandId = packet.data().commandId;
|
||||
const auto& param1 = std::string( packet.data().param1 );
|
||||
const auto commandId = packet.data().commandId;
|
||||
const auto param1 = packet.data().param1;
|
||||
const auto param2 = packet.data().param2;
|
||||
const auto param3 = packet.data().param3;
|
||||
const auto param4 = packet.data().param4;
|
||||
const auto target = std::string( packet.data().target );
|
||||
|
||||
pLog->debug( player.getName() + " used GM2 commandId: " + std::to_string( commandId ) + ", params: " + param1 );
|
||||
pLog->debug( player.getName() + " used GM2 commandId: " + std::to_string( commandId ) +
|
||||
", params: " + std::to_string( param1 ) + ", " +
|
||||
std::to_string( param2 ) + ", " + std::to_string( param3 ) + ", " + std::to_string( param4 ) +
|
||||
", target: " + target );
|
||||
|
||||
auto targetSession = pServerZone->getSession( param1 );
|
||||
auto targetSession = pServerZone->getSession( target );
|
||||
Core::Entity::CharaPtr targetActor;
|
||||
|
||||
if( targetSession != nullptr )
|
||||
|
@ -553,13 +563,13 @@ void Core::Network::GameConnection::gm2Handler( const Packets::FFXIVARR_PACKET_R
|
|||
}
|
||||
else
|
||||
{
|
||||
if( param1 == "self" )
|
||||
if( target == "self" )
|
||||
{
|
||||
targetActor = player.getAsPlayer();
|
||||
}
|
||||
else
|
||||
{
|
||||
player.sendUrgent( "Player " + param1 + " not found on this server." );
|
||||
player.sendUrgent( "Player " + target + " not found on this server." );
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,13 +32,13 @@ void Core::Network::GameConnection::inventoryModifyHandler( const Packets::FFXIV
|
|||
{
|
||||
const auto packet = ZoneChannelPacket< Client::FFXIVIpcInventoryModifyHandler >( inPacket );
|
||||
|
||||
const auto& action = packet.data().action;
|
||||
const auto& splitCount = packet.data().splitCount;
|
||||
const auto action = packet.data().action;
|
||||
const auto splitCount = packet.data().splitCount;
|
||||
|
||||
const auto& fromSlot = packet.data().fromSlot;
|
||||
const auto& fromContainer = packet.data().fromContainer;
|
||||
const auto& toSlot = packet.data().toSlot;
|
||||
const auto& toContainer = packet.data().toContainer;
|
||||
const auto fromSlot = packet.data().fromSlot;
|
||||
const auto fromContainer = packet.data().fromContainer;
|
||||
const auto toSlot = packet.data().toSlot;
|
||||
const auto toContainer = packet.data().toContainer;
|
||||
|
||||
auto ackPacket = makeZonePacket< Server::FFXIVIpcInventoryActionAck >( player.getId() );
|
||||
ackPacket->data().sequence = packet.data().seq;
|
||||
|
|
|
@ -65,10 +65,10 @@ void Core::Network::GameConnection::setSearchInfoHandler( const Packets::FFXIVAR
|
|||
{
|
||||
const auto packet = ZoneChannelPacket< Client::FFXIVIpcSetSearchInfo >( inPacket );
|
||||
|
||||
const auto& inval = packet.data().status1;
|
||||
const auto& inval1 = packet.data().status2;
|
||||
const auto& status = packet.data().status;
|
||||
const auto& selectRegion = packet.data().language;
|
||||
const auto inval = packet.data().status1;
|
||||
const auto inval1 = packet.data().status2;
|
||||
const auto status = packet.data().status;
|
||||
const auto selectRegion = packet.data().language;
|
||||
|
||||
player.setSearchInfo( selectRegion, 0, packet.data().searchComment );
|
||||
|
||||
|
@ -317,7 +317,7 @@ void Core::Network::GameConnection::zoneLineHandler( const Core::Network::Packet
|
|||
auto pTeriMgr = g_fw.get< TerritoryMgr >();
|
||||
|
||||
const auto packet = ZoneChannelPacket< Client::FFXIVIpcZoneLineHandler >( inPacket );
|
||||
const auto& zoneLineId = packet.data().zoneLineId;
|
||||
const auto zoneLineId = packet.data().zoneLineId;
|
||||
|
||||
player.sendDebug( "Walking ZoneLine " + std::to_string( zoneLineId ) );
|
||||
|
||||
|
@ -361,7 +361,7 @@ void Core::Network::GameConnection::discoveryHandler( const Core::Network::Packe
|
|||
Entity::Player& player )
|
||||
{
|
||||
const auto packet = ZoneChannelPacket< Client::FFXIVIpcDiscoveryHandler >( inPacket );
|
||||
const auto& positionRef = packet.data().positionRef;
|
||||
const auto positionRef = packet.data().positionRef;
|
||||
|
||||
auto pDb = g_fw.get< Db::DbWorkerPool< Db::ZoneDbConnection > >();
|
||||
|
||||
|
|
|
@ -28,6 +28,8 @@ private:
|
|||
{
|
||||
m_data.mainWeapon = player.getModelMainWeapon();
|
||||
m_data.offWeapon = player.getModelSubWeapon();
|
||||
m_data.classJobId = static_cast< uint8_t >( player.getClass() );
|
||||
m_data.level = player.getLevel();
|
||||
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 );
|
||||
|
|
Loading…
Add table
Reference in a new issue