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 `Orchestrion` `Orchestrion` BINARY(40) NULL DEFAULT NULL;
|
||||||
ALTER TABLE `charainfo` CHANGE `Minions` `Minions` 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 `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 `EquipDisplayFlags` INT(3) NULL DEFAULT '0' AFTER `GMRank`;
|
||||||
ALTER TABLE `charainfo` ADD COLUMN `Pose` INT(3) NULL DEFAULT '0' AFTER `EquipDisplayFlags`;
|
ALTER TABLE `charainfo` ADD COLUMN `Pose` INT(3) NULL DEFAULT '0' AFTER `EquipDisplayFlags`;
|
||||||
|
|
||||||
|
|
|
@ -287,6 +287,8 @@ enum ClientTriggerType
|
||||||
AchievementCritReq = 0x3E8,
|
AchievementCritReq = 0x3E8,
|
||||||
AchievementList = 0x3E9,
|
AchievementList = 0x3E9,
|
||||||
|
|
||||||
|
RequestSharedEstateSettings = 0x46F,
|
||||||
|
|
||||||
CompanionAction = 0x6A4,
|
CompanionAction = 0x6A4,
|
||||||
CompanionSetBarding = 0x6A5,
|
CompanionSetBarding = 0x6A5,
|
||||||
CompanionActionUnlock = 0x6A6,
|
CompanionActionUnlock = 0x6A6,
|
||||||
|
|
|
@ -33,7 +33,7 @@ enum ClientLobbyIpcType :
|
||||||
{
|
{
|
||||||
ReqCharList = 0x0003,
|
ReqCharList = 0x0003,
|
||||||
ReqEnterWorld = 0x0004,
|
ReqEnterWorld = 0x0004,
|
||||||
ReqServiceAccountList = 0x0005,
|
ClientVersionInfo = 0x0005,
|
||||||
|
|
||||||
ReqCharDelete = 0x000A,
|
ReqCharDelete = 0x000A,
|
||||||
ReqCharCreate = 0x000B,
|
ReqCharCreate = 0x000B,
|
||||||
|
@ -64,6 +64,7 @@ enum ServerZoneIpcType :
|
||||||
///////////////////////////////////////////////////
|
///////////////////////////////////////////////////
|
||||||
|
|
||||||
ChatBanned = 0x006B,
|
ChatBanned = 0x006B,
|
||||||
|
Playtime = 0x006C, // updated 4.4
|
||||||
Logout = 0x0077, // updated 4.4
|
Logout = 0x0077, // updated 4.4
|
||||||
CFNotify = 0x0078,
|
CFNotify = 0x0078,
|
||||||
CFMemberStatus = 0x0079,
|
CFMemberStatus = 0x0079,
|
||||||
|
@ -78,7 +79,6 @@ enum ServerZoneIpcType :
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Playtime = 0x00F5, // updated 4.3
|
|
||||||
Chat = 0x00F4, // updated 4.4
|
Chat = 0x00F4, // updated 4.4
|
||||||
SocialList = 0x00FB, // updated 4.4
|
SocialList = 0x00FB, // updated 4.4
|
||||||
|
|
||||||
|
@ -98,6 +98,11 @@ enum ServerZoneIpcType :
|
||||||
LogMessage = 0x00D0,
|
LogMessage = 0x00D0,
|
||||||
|
|
||||||
LinkshellList = 0x0117, // updated 4.4
|
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
|
ExamineFreeCompanyInfo = 0x013A, // updated 4.1
|
||||||
CharaFreeCompanyTag = 0x0127, // updated 4.4
|
CharaFreeCompanyTag = 0x0127, // updated 4.4
|
||||||
|
@ -127,7 +132,7 @@ enum ServerZoneIpcType :
|
||||||
ObjectSpawn = 0x0179, // updated 4.4
|
ObjectSpawn = 0x0179, // updated 4.4
|
||||||
ObjectDespawn = 0x017A, // 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
|
SilentSetClassJob = 0x017C, // updated 4.4 - seems to be the case, not sure if it's actually used for anything
|
||||||
|
|
||||||
InitUI = 0x017D, // updated 4.4
|
InitUI = 0x017D, // updated 4.4
|
||||||
|
@ -138,7 +143,7 @@ enum ServerZoneIpcType :
|
||||||
ModelEquip = 0x0182, // updated 4.4
|
ModelEquip = 0x0182, // updated 4.4
|
||||||
Examine = 0x0183, // updated 4.4
|
Examine = 0x0183, // updated 4.4
|
||||||
CharaNameReq = 0x0185, // 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
|
ItemInfo = 0x018C, // updated 4.4
|
||||||
ContainerInfo = 0x018D, // updated 4.4
|
ContainerInfo = 0x018D, // updated 4.4
|
||||||
|
@ -179,13 +184,15 @@ enum ServerZoneIpcType :
|
||||||
PlayerTitleList = 0x01FD, // updated 4.4
|
PlayerTitleList = 0x01FD, // updated 4.4
|
||||||
Discovery = 0x01FE, // updated 4.4
|
Discovery = 0x01FE, // updated 4.4
|
||||||
|
|
||||||
EorzeaTimeOffset = 0x01FF, // updated 4.4
|
EorzeaTimeOffset = 0x0200, // updated 4.4
|
||||||
|
|
||||||
EquipDisplayFlags = 0x020C, // updated 4.4
|
EquipDisplayFlags = 0x020C, // updated 4.4
|
||||||
|
|
||||||
WardInfo = 0x0220, // updated 4.4
|
WardInfo = 0x0220, // updated 4.4
|
||||||
WardHousingPermission = 0x0229, // 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
|
DuelChallenge = 0x0277, // 4.2; this is responsible for opening the ui
|
||||||
PerformNote = 0x0286, // updated 4.3
|
PerformNote = 0x0286, // updated 4.3
|
||||||
|
@ -280,6 +287,8 @@ enum ClientZoneIpcType :
|
||||||
LinkshellEventHandler = 0x0150, // updated 4.1 ??
|
LinkshellEventHandler = 0x0150, // updated 4.1 ??
|
||||||
LinkshellEventHandler1 = 0x0151, // updated 4.1 ??
|
LinkshellEventHandler1 = 0x0151, // updated 4.1 ??
|
||||||
|
|
||||||
|
SetSharedEstateSettings = 0x0177, // updated 4.4
|
||||||
|
|
||||||
PerformNoteHandler = 0x029B, // updated 4.3
|
PerformNoteHandler = 0x029B, // updated 4.3
|
||||||
|
|
||||||
ReqEquipDisplayFlagsChange = 0x016F, // updated 4.4
|
ReqEquipDisplayFlagsChange = 0x016F, // updated 4.4
|
||||||
|
|
|
@ -15,16 +15,22 @@ struct FFXIVIpcGmCommand1 :
|
||||||
/* 0000 */ uint32_t commandId;
|
/* 0000 */ uint32_t commandId;
|
||||||
/* 0004 */ uint32_t param1;
|
/* 0004 */ uint32_t param1;
|
||||||
/* 0008 */ uint32_t param2;
|
/* 0008 */ uint32_t param2;
|
||||||
/* 000C */ uint8_t unknown_C[0xC];
|
/* 000C */ uint32_t param3;
|
||||||
/* 0018 */ uint32_t param3;
|
/* 0010 */ uint32_t param4;
|
||||||
|
/* 0014 */ uint32_t unknown1;
|
||||||
|
/* 0018 */ uint32_t target;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct FFXIVIpcGmCommand2 :
|
struct FFXIVIpcGmCommand2 :
|
||||||
FFXIVIpcBasePacket< GMCommand2 >
|
FFXIVIpcBasePacket< GMCommand2 >
|
||||||
{
|
{
|
||||||
/* 0000 */ uint32_t commandId;
|
/* 0000 */ uint32_t commandId;
|
||||||
/* 0004 */ char unk_4[0x10];
|
/* 0004 */ uint32_t param1;
|
||||||
/* 0014 */ char param1[0x20];
|
/* 0008 */ uint32_t param2;
|
||||||
|
/* 000C */ uint32_t param3;
|
||||||
|
/* 0010 */ uint32_t param4;
|
||||||
|
/* 0014 */ char target[0x20];
|
||||||
|
/* 0034 */ uint32_t unknown1;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct FFXIVIpcClientTrigger :
|
struct FFXIVIpcClientTrigger :
|
||||||
|
@ -183,6 +189,20 @@ struct FFXIVIpcInventoryModifyHandler :
|
||||||
/* 0028 */ uint32_t splitCount;
|
/* 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];
|
} 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 :
|
struct FFXIVIpcExamineFreeCompanyInfo :
|
||||||
FFXIVIpcBasePacket< ExamineFreeCompanyInfo >
|
FFXIVIpcBasePacket< ExamineFreeCompanyInfo >
|
||||||
{
|
{
|
||||||
|
@ -976,7 +1014,10 @@ struct FFXIVIpcModelEquip :
|
||||||
{
|
{
|
||||||
/* 0000 */ uint64_t mainWeapon;
|
/* 0000 */ uint64_t mainWeapon;
|
||||||
/* 0008 */ uint64_t offWeapon;
|
/* 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];
|
/* 0014 */ uint32_t models[10];
|
||||||
/* 003C */ uint32_t padding2;
|
/* 003C */ uint32_t padding2;
|
||||||
};
|
};
|
||||||
|
@ -1592,6 +1633,22 @@ struct FFXIVIpcWardYardInfo :
|
||||||
} object[100];
|
} 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 :
|
struct FFXIVIpcMSQTrackerProgress :
|
||||||
FFXIVIpcBasePacket< MSQTrackerProgress >
|
FFXIVIpcBasePacket< MSQTrackerProgress >
|
||||||
{
|
{
|
||||||
|
|
|
@ -319,6 +319,7 @@ void PlayerMinimal::saveAsNew()
|
||||||
createInvDbContainer( InventoryType::ArmoryWrist );
|
createInvDbContainer( InventoryType::ArmoryWrist );
|
||||||
createInvDbContainer( InventoryType::ArmoryRing );
|
createInvDbContainer( InventoryType::ArmoryRing );
|
||||||
createInvDbContainer( InventoryType::ArmoryMain );
|
createInvDbContainer( InventoryType::ArmoryMain );
|
||||||
|
createInvDbContainer( InventoryType::ArmorySoulCrystal );
|
||||||
|
|
||||||
createInvDbContainer( InventoryType::Currency );
|
createInvDbContainer( InventoryType::Currency );
|
||||||
createInvDbContainer( InventoryType::Crystal );
|
createInvDbContainer( InventoryType::Crystal );
|
||||||
|
|
|
@ -409,8 +409,9 @@ void Core::Network::GameConnection::handleGamePacket( Packets::FFXIVARR_PACKET_R
|
||||||
|
|
||||||
switch( *reinterpret_cast< uint16_t* >( &packet.data[ 2 ] ) )
|
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 );
|
sendServiceAccountList( packet, tmpId );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -324,7 +324,7 @@ public:
|
||||||
void unequipItem( Common::GearSetSlot equipSlotId, ItemPtr pItem );
|
void unequipItem( Common::GearSetSlot equipSlotId, ItemPtr pItem );
|
||||||
|
|
||||||
/*! equip a weapon, possibly forcing a job change */
|
/*! equip a weapon, possibly forcing a job change */
|
||||||
void equipWeapon( ItemPtr pItem );
|
void equipWeapon( ItemPtr pItem, bool updateClass );
|
||||||
|
|
||||||
/*! get player ilvl */
|
/*! get player ilvl */
|
||||||
uint16_t getItemLevel() const;
|
uint16_t getItemLevel() const;
|
||||||
|
@ -356,7 +356,7 @@ public:
|
||||||
/*! return the current amount of crystals of type */
|
/*! return the current amount of crystals of type */
|
||||||
uint32_t getCrystal( uint8_t type ) const;
|
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 );
|
Common::GearModelSlot equipSlotToModelSlot( Common::GearSetSlot slot );
|
||||||
|
|
||||||
|
|
|
@ -114,7 +114,7 @@ void Core::Entity::Player::sendItemLevel()
|
||||||
queuePacket( makeActorControl142( getId(), SetItemLevel, getItemLevel(), 0 ) );
|
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 >();
|
auto exdData = g_fw.get< Core::Data::ExdDataGenerated >();
|
||||||
if( !exdData )
|
if( !exdData )
|
||||||
|
@ -122,16 +122,17 @@ void Core::Entity::Player::equipWeapon( ItemPtr pItem )
|
||||||
|
|
||||||
auto itemInfo = exdData->get< Core::Data::Item >( pItem->getId() );
|
auto itemInfo = exdData->get< Core::Data::Item >( pItem->getId() );
|
||||||
auto itemClassJob = itemInfo->classJobUse;
|
auto itemClassJob = itemInfo->classJobUse;
|
||||||
|
auto classJobInfo = exdData->get< Core::Data::ClassJob >( static_cast< uint32_t >( getClass() ) );
|
||||||
auto currentClass = getClass();
|
auto currentParentClass = static_cast< ClassJob >( classJobInfo->classJobParent );
|
||||||
auto newClassJob = static_cast< ClassJob >( itemClassJob );
|
auto newClassJob = static_cast< ClassJob >( itemClassJob );
|
||||||
|
|
||||||
if( isClassJobUnlocked( newClassJob ) )
|
if( ( isClassJobUnlocked( newClassJob ) ) && ( currentParentClass != newClassJob ) )
|
||||||
return;
|
{
|
||||||
|
if ( updateClass )
|
||||||
// todo: check if soul crystal is equipped and use job instead
|
setClassJob( newClassJob );
|
||||||
|
else
|
||||||
setClassJob( newClassJob );
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// equip an item
|
// 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 ) );
|
//g_framework.getLogger().debug( "Equipping into slot " + std::to_string( equipSlotId ) );
|
||||||
|
|
||||||
updateModels( equipSlotId, pItem );
|
|
||||||
|
|
||||||
if( sendUpdate )
|
if( sendUpdate )
|
||||||
{
|
{
|
||||||
|
updateModels( equipSlotId, pItem, true );
|
||||||
this->sendModel();
|
this->sendModel();
|
||||||
m_itemLevel = calculateEquippedGearItemLevel();
|
m_itemLevel = calculateEquippedGearItemLevel();
|
||||||
sendItemLevel();
|
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 model = pItem->getModelId1();
|
||||||
uint64_t model2 = pItem->getModelId2();
|
uint64_t model2 = pItem->getModelId2();
|
||||||
|
@ -160,8 +161,7 @@ void Core::Entity::Player::updateModels( GearSetSlot equipSlotId, const Core::It
|
||||||
case MainHand:
|
case MainHand:
|
||||||
m_modelMainWeapon = model;
|
m_modelMainWeapon = model;
|
||||||
m_modelSubWeapon = model2;
|
m_modelSubWeapon = model2;
|
||||||
// TODO: add job change upon changing weapon if needed
|
equipWeapon( pItem, updateClass );
|
||||||
// equipWeapon( pItem );
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case OffHand:
|
case OffHand:
|
||||||
|
|
|
@ -608,7 +608,7 @@ bool Core::Entity::Player::loadInventory()
|
||||||
{
|
{
|
||||||
uint16_t storageId = res->getUInt16( 1 );
|
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 );
|
uint64_t uItemId = res->getUInt64( i + 1 );
|
||||||
if( uItemId == 0 )
|
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 packet = ZoneChannelPacket< Client::FFXIVIpcSkillHandler >( inPacket );
|
||||||
|
|
||||||
const auto& type = packet.data().type;
|
const auto type = packet.data().type;
|
||||||
const auto& action = packet.data().actionId;
|
const auto action = packet.data().actionId;
|
||||||
const auto& useCount = packet.data().useCount;
|
const auto useCount = packet.data().useCount;
|
||||||
const auto& targetId = packet.data().targetId;
|
const auto targetId = packet.data().targetId;
|
||||||
|
|
||||||
player.sendDebug( "Skill type:" + std::to_string( type ) );
|
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 packet = ZoneChannelPacket< Client::FFXIVIpcClientTrigger >( inPacket );
|
||||||
|
|
||||||
const auto& commandId = packet.data().commandId;
|
const auto commandId = packet.data().commandId;
|
||||||
const auto& param1 = *reinterpret_cast< const uint64_t* >( &packet.data().param11 );
|
const auto param1 = *reinterpret_cast< const uint64_t* >( &packet.data().param11 );
|
||||||
const auto& param11 = packet.data().param11;
|
const auto param11 = packet.data().param11;
|
||||||
const auto& param12 = packet.data().param12;
|
const auto param12 = packet.data().param12;
|
||||||
const auto& param2 = packet.data().param2;
|
const auto param2 = packet.data().param2;
|
||||||
const auto& param3 = packet.data().param3;
|
const auto param3 = packet.data().param3;
|
||||||
|
|
||||||
pLog->debug( "[" + std::to_string( m_pSession->getId() ) + "] Incoming action: " +
|
pLog->debug( "[" + std::to_string( m_pSession->getId() ) + "] Incoming action: " +
|
||||||
boost::str( boost::format( "%|04X|" ) % ( uint32_t ) ( commandId & 0xFFFF ) ) +
|
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 packet = ZoneChannelPacket< Client::FFXIVIpcEventHandlerTalk >( inPacket );
|
||||||
|
|
||||||
const auto& actorId = packet.data().actorId;
|
const auto actorId = packet.data().actorId;
|
||||||
const auto& eventId = packet.data().eventId;
|
const auto eventId = packet.data().eventId;
|
||||||
|
|
||||||
auto eventType = static_cast< uint16_t >( eventId >> 16 );
|
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 packet = ZoneChannelPacket< Client::FFXIVIpcEventHandlerEmote >( inPacket );
|
||||||
|
|
||||||
const auto& actorId = packet.data().actorId;
|
const auto actorId = packet.data().actorId;
|
||||||
const auto& eventId = packet.data().eventId;
|
const auto eventId = packet.data().eventId;
|
||||||
const auto& emoteId = packet.data().emoteId;
|
const auto emoteId = packet.data().emoteId;
|
||||||
const auto eventType = static_cast< uint16_t >( eventId >> 16 );
|
const auto eventType = static_cast< uint16_t >( eventId >> 16 );
|
||||||
|
|
||||||
std::string eventName = "onEmote";
|
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 packet = ZoneChannelPacket< Client::FFXIVIpcEventHandlerWithinRange >( inPacket );
|
||||||
|
|
||||||
const auto& eventId = packet.data().eventId;
|
const auto eventId = packet.data().eventId;
|
||||||
const auto& param1 = packet.data().param1;
|
const auto param1 = packet.data().param1;
|
||||||
const auto& pos = packet.data().position;
|
const auto& pos = packet.data().position;
|
||||||
|
|
||||||
std::string eventName = "onWithinRange";
|
std::string eventName = "onWithinRange";
|
||||||
|
@ -144,8 +144,8 @@ void Core::Network::GameConnection::eventHandlerOutsideRange( const Packets::FFX
|
||||||
auto pScriptMgr = g_fw.get< Scripting::ScriptMgr >();
|
auto pScriptMgr = g_fw.get< Scripting::ScriptMgr >();
|
||||||
|
|
||||||
const auto packet = ZoneChannelPacket< Client::FFXIVIpcEventHandlerOutsideRange >( inPacket );
|
const auto packet = ZoneChannelPacket< Client::FFXIVIpcEventHandlerOutsideRange >( inPacket );
|
||||||
const auto& eventId = packet.data().eventId;
|
const auto eventId = packet.data().eventId;
|
||||||
const auto& param1 = packet.data().param1;
|
const auto param1 = packet.data().param1;
|
||||||
const auto& pos = packet.data().position;
|
const auto& pos = packet.data().position;
|
||||||
|
|
||||||
std::string eventName = "onOutsideRange";
|
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 packet = ZoneChannelPacket< Client::FFXIVIpcEnterTerritoryHandler >( inPacket );
|
||||||
|
|
||||||
const auto& eventId = packet.data().eventId;
|
const auto eventId = packet.data().eventId;
|
||||||
const auto& param1 = packet.data().param1;
|
const auto param1 = packet.data().param1;
|
||||||
const auto& param2 = packet.data().param2;
|
const auto param2 = packet.data().param2;
|
||||||
|
|
||||||
std::string eventName = "onEnterTerritory";
|
std::string eventName = "onEnterTerritory";
|
||||||
|
|
||||||
|
@ -195,12 +195,12 @@ void Core::Network::GameConnection::eventHandlerReturn( const Packets::FFXIVARR_
|
||||||
Entity::Player& player )
|
Entity::Player& player )
|
||||||
{
|
{
|
||||||
const auto packet = ZoneChannelPacket< Client::FFXIVIpcEventHandlerReturn >( inPacket );
|
const auto packet = ZoneChannelPacket< Client::FFXIVIpcEventHandlerReturn >( inPacket );
|
||||||
const auto& eventId = packet.data().eventId;
|
const auto eventId = packet.data().eventId;
|
||||||
const auto& scene = packet.data().scene;
|
const auto scene = packet.data().scene;
|
||||||
const auto& param1 = packet.data().param1;
|
const auto param1 = packet.data().param1;
|
||||||
const auto& param2 = packet.data().param2;
|
const auto param2 = packet.data().param2;
|
||||||
const auto& param3 = packet.data().param3;
|
const auto param3 = packet.data().param3;
|
||||||
const auto& param4 = packet.data().param4;
|
const auto param4 = packet.data().param4;
|
||||||
|
|
||||||
std::string eventName = Event::getEventName( eventId );
|
std::string eventName = Event::getEventName( eventId );
|
||||||
|
|
||||||
|
|
|
@ -95,20 +95,23 @@ void Core::Network::GameConnection::gm1Handler( const Packets::FFXIVARR_PACKET_R
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const auto packet = ZoneChannelPacket< Client::FFXIVIpcGmCommand1 >( inPacket );
|
const auto packet = ZoneChannelPacket< Client::FFXIVIpcGmCommand1 >( inPacket );
|
||||||
const auto& commandId = packet.data().commandId;
|
const auto commandId = packet.data().commandId;
|
||||||
const auto& param1 = packet.data().param1;
|
const auto param1 = packet.data().param1;
|
||||||
const auto& param2 = packet.data().param2;
|
const auto param2 = packet.data().param2;
|
||||||
const auto& param3 = packet.data().param3;
|
const auto param3 = packet.data().param3;
|
||||||
|
const auto param4 = packet.data().param4;
|
||||||
|
const auto target = packet.data().target;
|
||||||
|
|
||||||
auto pLog = g_fw.get< Logger >();
|
auto pLog = g_fw.get< Logger >();
|
||||||
pLog->debug( player.getName() + " used GM1 commandId: " + std::to_string( commandId ) +
|
pLog->debug( player.getName() + " used GM1 commandId: " + std::to_string( commandId ) +
|
||||||
", params: " + std::to_string( param1 ) + ", " +
|
", 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;
|
Core::Entity::ActorPtr targetActor;
|
||||||
|
|
||||||
|
|
||||||
if( player.getId() == param3 )
|
if( player.getId() == target )
|
||||||
{
|
{
|
||||||
targetActor = player.getAsPlayer();
|
targetActor = player.getAsPlayer();
|
||||||
}
|
}
|
||||||
|
@ -117,7 +120,7 @@ void Core::Network::GameConnection::gm1Handler( const Packets::FFXIVARR_PACKET_R
|
||||||
auto inRange = player.getInRangeActors();
|
auto inRange = player.getInRangeActors();
|
||||||
for( auto& actor : inRange )
|
for( auto& actor : inRange )
|
||||||
{
|
{
|
||||||
if( actor->getId() == param3 )
|
if( actor->getId() == target )
|
||||||
targetActor = actor;
|
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 packet = ZoneChannelPacket< Client::FFXIVIpcGmCommand2 >( inPacket );
|
||||||
|
|
||||||
const auto& commandId = packet.data().commandId;
|
const auto commandId = packet.data().commandId;
|
||||||
const auto& param1 = std::string( packet.data().param1 );
|
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;
|
Core::Entity::CharaPtr targetActor;
|
||||||
|
|
||||||
if( targetSession != nullptr )
|
if( targetSession != nullptr )
|
||||||
|
@ -553,13 +563,13 @@ void Core::Network::GameConnection::gm2Handler( const Packets::FFXIVARR_PACKET_R
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if( param1 == "self" )
|
if( target == "self" )
|
||||||
{
|
{
|
||||||
targetActor = player.getAsPlayer();
|
targetActor = player.getAsPlayer();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
player.sendUrgent( "Player " + param1 + " not found on this server." );
|
player.sendUrgent( "Player " + target + " not found on this server." );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,13 +32,13 @@ void Core::Network::GameConnection::inventoryModifyHandler( const Packets::FFXIV
|
||||||
{
|
{
|
||||||
const auto packet = ZoneChannelPacket< Client::FFXIVIpcInventoryModifyHandler >( inPacket );
|
const auto packet = ZoneChannelPacket< Client::FFXIVIpcInventoryModifyHandler >( inPacket );
|
||||||
|
|
||||||
const auto& action = packet.data().action;
|
const auto action = packet.data().action;
|
||||||
const auto& splitCount = packet.data().splitCount;
|
const auto splitCount = packet.data().splitCount;
|
||||||
|
|
||||||
const auto& fromSlot = packet.data().fromSlot;
|
const auto fromSlot = packet.data().fromSlot;
|
||||||
const auto& fromContainer = packet.data().fromContainer;
|
const auto fromContainer = packet.data().fromContainer;
|
||||||
const auto& toSlot = packet.data().toSlot;
|
const auto toSlot = packet.data().toSlot;
|
||||||
const auto& toContainer = packet.data().toContainer;
|
const auto toContainer = packet.data().toContainer;
|
||||||
|
|
||||||
auto ackPacket = makeZonePacket< Server::FFXIVIpcInventoryActionAck >( player.getId() );
|
auto ackPacket = makeZonePacket< Server::FFXIVIpcInventoryActionAck >( player.getId() );
|
||||||
ackPacket->data().sequence = packet.data().seq;
|
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 packet = ZoneChannelPacket< Client::FFXIVIpcSetSearchInfo >( inPacket );
|
||||||
|
|
||||||
const auto& inval = packet.data().status1;
|
const auto inval = packet.data().status1;
|
||||||
const auto& inval1 = packet.data().status2;
|
const auto inval1 = packet.data().status2;
|
||||||
const auto& status = packet.data().status;
|
const auto status = packet.data().status;
|
||||||
const auto& selectRegion = packet.data().language;
|
const auto selectRegion = packet.data().language;
|
||||||
|
|
||||||
player.setSearchInfo( selectRegion, 0, packet.data().searchComment );
|
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 >();
|
auto pTeriMgr = g_fw.get< TerritoryMgr >();
|
||||||
|
|
||||||
const auto packet = ZoneChannelPacket< Client::FFXIVIpcZoneLineHandler >( inPacket );
|
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 ) );
|
player.sendDebug( "Walking ZoneLine " + std::to_string( zoneLineId ) );
|
||||||
|
|
||||||
|
@ -361,7 +361,7 @@ void Core::Network::GameConnection::discoveryHandler( const Core::Network::Packe
|
||||||
Entity::Player& player )
|
Entity::Player& player )
|
||||||
{
|
{
|
||||||
const auto packet = ZoneChannelPacket< Client::FFXIVIpcDiscoveryHandler >( inPacket );
|
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 > >();
|
auto pDb = g_fw.get< Db::DbWorkerPool< Db::ZoneDbConnection > >();
|
||||||
|
|
||||||
|
|
|
@ -28,6 +28,8 @@ private:
|
||||||
{
|
{
|
||||||
m_data.mainWeapon = player.getModelMainWeapon();
|
m_data.mainWeapon = player.getModelMainWeapon();
|
||||||
m_data.offWeapon = player.getModelSubWeapon();
|
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::ModelHead ] = player.getModelForSlot( Common::GearModelSlot::ModelHead );
|
||||||
m_data.models[ Common::GearModelSlot::ModelBody ] = player.getModelForSlot( Common::GearModelSlot::ModelBody );
|
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::ModelHands ] = player.getModelForSlot( Common::GearModelSlot::ModelHands );
|
||||||
|
|
Loading…
Add table
Reference in a new issue