[Cleanup] Remove ReturnItemPacket from client.h/inventory.cpp (#3002)

# Notes
- This is unused.
This commit is contained in:
Alex King 2023-02-25 20:10:08 -05:00 committed by GitHub
parent 0980a780d0
commit 078db3460d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 27 deletions

View File

@ -338,8 +338,6 @@ public:
bool HasRecipeLearned(uint32 recipe_id); bool HasRecipeLearned(uint32 recipe_id);
bool CanIncreaseTradeskill(EQ::skills::SkillType tradeskill); bool CanIncreaseTradeskill(EQ::skills::SkillType tradeskill);
EQApplicationPacket* ReturnItemPacket(int16 slot_id, const EQ::ItemInstance* inst, ItemPacketType packet_type);
bool GetRevoked() const { return revoked; } bool GetRevoked() const { return revoked; }
void SetRevoked(bool rev) { revoked = rev; } void SetRevoked(bool rev) { revoked = rev; }
inline uint32 GetIP() const { return ip; } inline uint32 GetIP() const { return ip; }

View File

@ -3376,31 +3376,6 @@ void Client::SendItemPacket(int16 slot_id, const EQ::ItemInstance* inst, ItemPac
FastQueuePacket(&outapp); FastQueuePacket(&outapp);
} }
EQApplicationPacket* Client::ReturnItemPacket(int16 slot_id, const EQ::ItemInstance* inst, ItemPacketType packet_type)
{
if (!inst)
return nullptr;
// Serialize item into |-delimited string
std::string packet = inst->Serialize(slot_id);
EmuOpcode opcode = OP_Unknown;
EQApplicationPacket* outapp = nullptr;
BulkItemPacket_Struct* itempacket = nullptr;
// Construct packet
opcode = OP_ItemPacket;
outapp = new EQApplicationPacket(opcode, packet.length()+1);
itempacket = (BulkItemPacket_Struct*)outapp->pBuffer;
memcpy(itempacket->SerializedItem, packet.c_str(), packet.length());
#if EQDEBUG >= 9
DumpPacket(outapp);
#endif
return outapp;
}
static int16 BandolierSlotToWeaponSlot(int BandolierSlot) static int16 BandolierSlotToWeaponSlot(int BandolierSlot)
{ {
switch (BandolierSlot) switch (BandolierSlot)