mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-25 05:57:45 +00:00
Removal/Replacement of old packet opcodes and structs
This commit is contained in:
parent
ebcce49448
commit
a1b3c3acf6
5 changed files with 53 additions and 251 deletions
|
@ -378,19 +378,6 @@ namespace Sapphire::Network::Packets
|
||||||
FinishContentMatchToClient = 0x338,
|
FinishContentMatchToClient = 0x338,
|
||||||
UnMountLink = 0x33E,
|
UnMountLink = 0x33E,
|
||||||
|
|
||||||
///////////////////////////////////////////////////
|
|
||||||
// CFNotify = 0x0241, // updated 5.21
|
|
||||||
CFMemberStatus = 0x0079,
|
|
||||||
ExamineSearchInfo = 0x032B, // updated 5.21 hotfix
|
|
||||||
ExamineSearchComment = 0x0102, // updated 4.1
|
|
||||||
MarketBoardItemListingCount = 0x030A,
|
|
||||||
MarketBoardItemListing = 0x023E,
|
|
||||||
ExamineFreeCompanyInfo = 0x013E, // updated 4.5
|
|
||||||
FreeCompanyUpdateShortMessage = 0x0157, // added 5.0
|
|
||||||
GCAffiliation = 0x016F, // updated 5.0
|
|
||||||
NpcSpawn = 0x00B3, // updated 5.21 hotfix
|
|
||||||
InventoryActionAck = 0x01B2, // updated 5.21 hotfix
|
|
||||||
UpdateInventorySlot = 0x0213, // updated 5.21 hotfix
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -199,28 +199,6 @@ namespace Sapphire::Network::Packets::WorldPackets::Server
|
||||||
uint8_t IsChestLock;
|
uint8_t IsChestLock;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct FFXIVIpcExamineSearchInfo : FFXIVIpcBasePacket< ExamineSearchInfo >
|
|
||||||
{
|
|
||||||
uint32_t unknown;
|
|
||||||
uint16_t unknown1;
|
|
||||||
uint16_t unknown2;
|
|
||||||
char padding[16];
|
|
||||||
uint32_t unknown3;
|
|
||||||
uint16_t unknown4;
|
|
||||||
uint16_t unknown5;
|
|
||||||
uint16_t unknown6;
|
|
||||||
uint8_t worldId;
|
|
||||||
char searchMessage[193];
|
|
||||||
char fcName[24];
|
|
||||||
uint8_t unknown7;
|
|
||||||
uint16_t padding1;
|
|
||||||
struct ClassJobEntry
|
|
||||||
{
|
|
||||||
uint16_t id;
|
|
||||||
uint16_t level;
|
|
||||||
} levelEntries[Common::CLASSJOB_TOTAL];
|
|
||||||
};
|
|
||||||
|
|
||||||
struct FFXIVIpcSetProfileResult : FFXIVIpcBasePacket< SetProfileResult >
|
struct FFXIVIpcSetProfileResult : FFXIVIpcBasePacket< SetProfileResult >
|
||||||
{
|
{
|
||||||
uint64_t OnlineStatus;
|
uint64_t OnlineStatus;
|
||||||
|
@ -240,13 +218,16 @@ namespace Sapphire::Network::Packets::WorldPackets::Server
|
||||||
char SearchComment[193];
|
char SearchComment[193];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct FFXIVIpcExamineSearchComment : FFXIVIpcBasePacket< ExamineSearchComment >
|
struct FFXIVIpcGetSearchCommentResult : FFXIVIpcBasePacket< GetSearchCommentResult >
|
||||||
{
|
{
|
||||||
uint32_t charId;
|
uint32_t TargetEntityID;
|
||||||
// packet only has 196 bytes after the charid
|
char SearchComment[193];
|
||||||
// likely utf8
|
};
|
||||||
char searchComment[195];
|
|
||||||
char padding;
|
struct FFXIVIpcGetCharacterNameResult : FFXIVIpcBasePacket< GetCharacterNameResult >
|
||||||
|
{
|
||||||
|
uint64_t CharacterID;
|
||||||
|
char CharacterName[32];
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -402,60 +383,44 @@ namespace Sapphire::Network::Packets::WorldPackets::Server
|
||||||
uint8_t SupportCount;
|
uint8_t SupportCount;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct FFFXIVIpcMarketBoardItemListingCount : FFXIVIpcBasePacket< MarketBoardItemListingCount >
|
struct FFFXIVIpcItemSearchResult : FFXIVIpcBasePacket< ItemSearchResult >
|
||||||
{
|
{
|
||||||
uint32_t itemCatalogId;
|
uint32_t CatalogID;
|
||||||
uint32_t unknown1; // does some shit if nonzero
|
uint32_t Result;
|
||||||
uint16_t requestId;
|
uint8_t SubQuality;
|
||||||
uint16_t quantity; // high/low u8s read separately?
|
uint8_t MateriaCount;
|
||||||
uint32_t unknown3;
|
uint8_t Count;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct FFXIVIpcMarketBoardItemListing : FFXIVIpcBasePacket< MarketBoardItemListing >
|
struct ZoneProtoDownItemSearchData
|
||||||
{
|
{
|
||||||
struct ItemListing // 152 bytes each
|
uint64_t ItemID;
|
||||||
|
uint64_t SellRetainerID;
|
||||||
|
uint64_t OwnerCharacterID;
|
||||||
|
uint64_t SignatureID;
|
||||||
|
uint32_t SellPrice;
|
||||||
|
uint32_t BuyTax;
|
||||||
|
uint32_t Stack;
|
||||||
|
uint32_t CatalogID;
|
||||||
|
uint32_t SellRealDate;
|
||||||
|
uint16_t StorageID;
|
||||||
|
uint16_t ContainerIndex;
|
||||||
|
uint16_t Durability;
|
||||||
|
uint16_t Refine;
|
||||||
|
uint16_t Materia[8];
|
||||||
|
char SellRetainerName[32];
|
||||||
|
uint8_t SubQuality;
|
||||||
|
uint8_t MateriaCount;
|
||||||
|
uint8_t RegisterMarket;
|
||||||
|
uint8_t Stain;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct FFXIVIpcGetItemSearchListResult : FFXIVIpcBasePacket< GetItemSearchListResult >
|
||||||
{
|
{
|
||||||
uint64_t listingId;
|
ZoneProtoDownItemSearchData ItemSearchList[10];
|
||||||
uint64_t retainerId;
|
uint8_t NextIndex;
|
||||||
uint64_t retainerOwnerId;
|
uint8_t Index;
|
||||||
uint64_t artisanId;
|
uint8_t RequestKey;
|
||||||
uint32_t pricePerUnit;
|
|
||||||
uint32_t totalTax;
|
|
||||||
uint32_t itemQuantity;
|
|
||||||
uint32_t itemId;
|
|
||||||
uint16_t lastReviewTime;
|
|
||||||
uint16_t containerId;
|
|
||||||
uint32_t slotId;
|
|
||||||
uint16_t durability;
|
|
||||||
uint16_t spiritBond;
|
|
||||||
/**
|
|
||||||
* auto materiaId = (i & 0xFF0) >> 4;
|
|
||||||
* auto index = i & 0xF;
|
|
||||||
* auto leftover = i >> 8;
|
|
||||||
*/
|
|
||||||
uint16_t materiaValue[5];
|
|
||||||
uint16_t padding1;
|
|
||||||
uint32_t padding2;
|
|
||||||
char retainerName[32];
|
|
||||||
char playerName[32];
|
|
||||||
bool hq;
|
|
||||||
uint8_t materiaCount;
|
|
||||||
uint8_t onMannequin;
|
|
||||||
Common::Town marketCity;
|
|
||||||
uint16_t dyeId;
|
|
||||||
uint16_t padding3;
|
|
||||||
uint32_t padding4;
|
|
||||||
} listing[10]; // Multiple packets are sent if there are more than 10 search results.
|
|
||||||
uint8_t listingIndexEnd;
|
|
||||||
uint8_t listingIndexStart;
|
|
||||||
uint16_t requestId;
|
|
||||||
char padding7[16];
|
|
||||||
uint8_t unknown13;
|
|
||||||
uint16_t padding8;
|
|
||||||
uint8_t unknown14;
|
|
||||||
uint64_t padding9;
|
|
||||||
uint32_t unknown15;
|
|
||||||
uint32_t padding10;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ZoneProtoDownItemHistoryData
|
struct ZoneProtoDownItemHistoryData
|
||||||
|
@ -492,34 +457,6 @@ namespace Sapphire::Network::Packets::WorldPackets::Server
|
||||||
uint8_t Type;
|
uint8_t Type;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct FFXIVIpcExamineFreeCompanyInfo : FFXIVIpcBasePacket< ExamineFreeCompanyInfo >
|
|
||||||
{
|
|
||||||
char unknown[0x20]; // likely fc allegiance/icon/housing info etc
|
|
||||||
uint32_t charId;
|
|
||||||
uint32_t fcTimeCreated;
|
|
||||||
char unknown2[0x10];
|
|
||||||
uint16_t unknown3;
|
|
||||||
char fcName[0x14]; // 20 char limit
|
|
||||||
uint16_t padding;
|
|
||||||
char fcTag[0x05]; // 5 char tag limit
|
|
||||||
uint16_t padding2; // null terminator?
|
|
||||||
char fcLeader[0x20]; // leader name (32 bytes)
|
|
||||||
char fcSlogan[192]; // source: https://ffxiv.gamerescape.com/wiki/Free_Company (packet cap confirms this size also)
|
|
||||||
char padding3; // null terminator?
|
|
||||||
char fcEstateProfile[20]; // todo: size needs confirmation
|
|
||||||
uint32_t padding4;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct FFXIVIpcFreeCompanyUpdateShortMessage : FFXIVIpcBasePacket< FreeCompanyUpdateShortMessage >
|
|
||||||
{
|
|
||||||
uint32_t unknown;
|
|
||||||
uint16_t unknown1;
|
|
||||||
uint16_t unknown2;
|
|
||||||
uint32_t unknown3;
|
|
||||||
uint32_t unknown5;
|
|
||||||
char shortMessage[104];
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Structural representation of the packet sent by the server
|
* Structural representation of the packet sent by the server
|
||||||
* add a status effect
|
* add a status effect
|
||||||
|
@ -748,85 +685,6 @@ namespace Sapphire::Network::Packets::WorldPackets::Server
|
||||||
uint8_t State[3];
|
uint8_t State[3];
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
|
||||||
* Structural representation of the packet sent by the server
|
|
||||||
* to spawn an actor
|
|
||||||
*/
|
|
||||||
struct FFXIVIpcNpcSpawn : FFXIVIpcBasePacket< NpcSpawn >
|
|
||||||
{
|
|
||||||
uint32_t gimmickId; // needs to be existing in the map, mob will snap to it
|
|
||||||
uint8_t u2b;
|
|
||||||
uint8_t u2ab;
|
|
||||||
uint8_t gmRank;
|
|
||||||
uint8_t u3b;
|
|
||||||
|
|
||||||
uint8_t aggressionMode; // 1 passive, 2 aggressive
|
|
||||||
uint8_t onlineStatus;
|
|
||||||
uint8_t u3c;
|
|
||||||
uint8_t pose;
|
|
||||||
|
|
||||||
uint32_t u4;
|
|
||||||
|
|
||||||
uint64_t targetId;
|
|
||||||
uint32_t u6;
|
|
||||||
uint32_t u7;
|
|
||||||
uint64_t mainWeaponModel;
|
|
||||||
uint64_t secWeaponModel;
|
|
||||||
uint64_t craftToolModel;
|
|
||||||
|
|
||||||
uint32_t u14;
|
|
||||||
uint32_t u15;
|
|
||||||
uint32_t bNPCBase;
|
|
||||||
uint32_t bNPCName;
|
|
||||||
uint32_t levelId;
|
|
||||||
uint32_t u19;
|
|
||||||
uint32_t directorId;
|
|
||||||
uint32_t spawnerId;
|
|
||||||
uint32_t parentActorId;
|
|
||||||
uint32_t hPMax;
|
|
||||||
uint32_t hPCurr;
|
|
||||||
uint32_t displayFlags;
|
|
||||||
uint16_t fateID;
|
|
||||||
uint16_t mPCurr;
|
|
||||||
uint16_t unknown1; // 0
|
|
||||||
uint16_t unknown2; // 0 or pretty big numbers > 30000
|
|
||||||
uint16_t modelChara;
|
|
||||||
uint16_t rotation;
|
|
||||||
uint16_t activeMinion;
|
|
||||||
uint8_t spawnIndex;
|
|
||||||
uint8_t state;
|
|
||||||
uint8_t persistantEmote;
|
|
||||||
uint8_t modelType;
|
|
||||||
uint8_t subtype;
|
|
||||||
uint8_t voice;
|
|
||||||
uint16_t u25c;
|
|
||||||
uint8_t enemyType;
|
|
||||||
uint8_t level;
|
|
||||||
uint8_t classJob;
|
|
||||||
uint8_t u26d;
|
|
||||||
uint16_t u27a;
|
|
||||||
uint8_t currentMount;
|
|
||||||
uint8_t mountHead;
|
|
||||||
uint8_t mountBody;
|
|
||||||
uint8_t mountFeet;
|
|
||||||
uint8_t mountColor;
|
|
||||||
uint8_t scale;
|
|
||||||
uint16_t elementalLevel; // Eureka
|
|
||||||
uint16_t element; // Eureka
|
|
||||||
Common::StatusWork effect[30];
|
|
||||||
Common::FFXIVARR_POSITION3 pos;
|
|
||||||
uint32_t models[10];
|
|
||||||
char name[32];
|
|
||||||
uint8_t look[26];
|
|
||||||
char fcTag[6];
|
|
||||||
uint32_t unk30;
|
|
||||||
uint32_t unk31;
|
|
||||||
uint8_t bNPCPartSlot;
|
|
||||||
uint8_t unk32;
|
|
||||||
uint16_t unk33;
|
|
||||||
uint32_t unk34;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Structural representation of the packet sent by the server
|
* Structural representation of the packet sent by the server
|
||||||
* to show player movement
|
* to show player movement
|
||||||
|
@ -1327,49 +1185,6 @@ namespace Sapphire::Network::Packets::WorldPackets::Server
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
struct FFXIVIpcInventoryActionAck : FFXIVIpcBasePacket< InventoryActionAck >
|
|
||||||
{
|
|
||||||
uint32_t sequence;
|
|
||||||
uint16_t type;
|
|
||||||
uint16_t padding;
|
|
||||||
uint32_t padding1;
|
|
||||||
uint32_t padding2;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Structural representation of the packet sent by the server
|
|
||||||
* to update a slot in the inventory
|
|
||||||
*/
|
|
||||||
struct FFXIVIpcUpdateInventorySlot : FFXIVIpcBasePacket< UpdateInventorySlot >
|
|
||||||
{
|
|
||||||
uint32_t sequence;
|
|
||||||
uint32_t unknown;
|
|
||||||
uint16_t containerId;
|
|
||||||
uint16_t slot;
|
|
||||||
uint32_t quantity;
|
|
||||||
uint32_t catalogId;
|
|
||||||
uint32_t reservedFlag;
|
|
||||||
uint64_t signatureId;
|
|
||||||
uint16_t hqFlag;
|
|
||||||
uint16_t condition;
|
|
||||||
uint16_t spiritBond;
|
|
||||||
uint16_t color;
|
|
||||||
uint32_t glamourCatalogId;
|
|
||||||
uint16_t materia1;
|
|
||||||
uint16_t materia2;
|
|
||||||
uint16_t materia3;
|
|
||||||
uint16_t materia4;
|
|
||||||
uint16_t materia5;
|
|
||||||
uint8_t buffer1;
|
|
||||||
uint8_t buffer2;
|
|
||||||
uint8_t buffer3;
|
|
||||||
uint8_t buffer4;
|
|
||||||
uint8_t buffer5;
|
|
||||||
uint8_t padding;
|
|
||||||
uint32_t unknown10;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Structural representation of the packet sent by the server
|
* Structural representation of the packet sent by the server
|
||||||
* to start an event, not actually playing it, but registering
|
* to start an event, not actually playing it, but registering
|
||||||
|
|
|
@ -709,7 +709,7 @@ bool Sapphire::Entity::Player::loadInventory()
|
||||||
while ( currencyRes->next() )
|
while ( currencyRes->next() )
|
||||||
{
|
{
|
||||||
uint16_t storageId = currencyRes->getUInt16( 1 );
|
uint16_t storageId = currencyRes->getUInt16( 1 );
|
||||||
uint32_t money = currencyRes->getUInt64( 2 );
|
uint32_t money = currencyRes->getUInt( 2 );
|
||||||
|
|
||||||
auto slot = static_cast< uint8_t >( static_cast< uint8_t >( CurrencyType::Gil ) - 1 );
|
auto slot = static_cast< uint8_t >( static_cast< uint8_t >( CurrencyType::Gil ) - 1 );
|
||||||
auto currItem = m_storageMap[ Currency ]->getItem( slot );
|
auto currItem = m_storageMap[ Currency ]->getItem( slot );
|
||||||
|
|
|
@ -65,10 +65,10 @@ void MarketMgr::requestItemListingInfo( Entity::Player& player, uint32_t catalog
|
||||||
auto& server = Common::Service< World::WorldServer >::ref();
|
auto& server = Common::Service< World::WorldServer >::ref();
|
||||||
auto pSession = server.getSession( player.getCharacterId() );
|
auto pSession = server.getSession( player.getCharacterId() );
|
||||||
|
|
||||||
auto countPkt = makeZonePacket< FFFXIVIpcMarketBoardItemListingCount >( player.getId() );
|
auto countPkt = makeZonePacket< FFFXIVIpcItemSearchResult >( player.getId() );
|
||||||
countPkt->data().quantity = 1 << 8;
|
countPkt->data().Count = 1 << 8;
|
||||||
countPkt->data().itemCatalogId = catalogId;
|
countPkt->data().CatalogID = catalogId;
|
||||||
countPkt->data().requestId = requestId;
|
countPkt->data().Result = requestId;
|
||||||
|
|
||||||
pSession->getZoneConnection()->queueOutPacket( countPkt );
|
pSession->getZoneConnection()->queueOutPacket( countPkt );
|
||||||
|
|
||||||
|
|
|
@ -127,9 +127,9 @@ void Sapphire::Network::GameConnection::getSearchCommentHandler( const Packets::
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// retail sends the requester's id as both (isForSelf)
|
// retail sends the requester's id as both (isForSelf)
|
||||||
auto searchInfoPacket = makeZonePacket< FFXIVIpcExamineSearchComment >( player.getId() );
|
auto searchInfoPacket = makeZonePacket< FFXIVIpcGetSearchCommentResult >( player.getId() );
|
||||||
searchInfoPacket->data().charId = targetId;
|
searchInfoPacket->data().TargetEntityID = targetId;
|
||||||
strcpy( searchInfoPacket->data().searchComment, pPlayer->getSearchMessage() );
|
strcpy( searchInfoPacket->data().SearchComment, pPlayer->getSearchMessage() );
|
||||||
server.queueForPlayer( player.getCharacterId(), searchInfoPacket );
|
server.queueForPlayer( player.getCharacterId(), searchInfoPacket );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -150,8 +150,8 @@ void Sapphire::Network::GameConnection::reqExamineFcInfo( const Packets::FFXIVAR
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// retail sends the requester's id as both (isForSelf)
|
// retail sends the requester's id as both (isForSelf)
|
||||||
auto examineFcInfoPacket = makeZonePacket< FFXIVIpcExamineFreeCompanyInfo >( player.getId() );
|
auto examineFcInfoPacket = makeZonePacket< FFXIVIpcGetFcProfileResult >( player.getId() );
|
||||||
examineFcInfoPacket->data().charId = targetId;
|
examineFcInfoPacket->data().TargetEntityID = targetId;
|
||||||
// todo: populate with fc info
|
// todo: populate with fc info
|
||||||
|
|
||||||
server.queueForPlayer( player.getCharacterId(), examineFcInfoPacket );
|
server.queueForPlayer( player.getCharacterId(), examineFcInfoPacket );
|
||||||
|
|
Loading…
Add table
Reference in a new issue