diff --git a/changelog.txt b/changelog.txt index cdbda16e0..81233fcd7 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,8 @@ EQEMu Changelog (Started on Sept 24, 2003 15:50) ------------------------------------------------------- +== 10/02/2014 == +Uleat: First round of Ti/6.2 translators added - needed for re-enumeration + == 10/01/2014 == Kayen: Exported to PERL $client->SendColoredText(color, msg) demonstar55: Exported SendColoredText to lua diff --git a/common/eq_packet_structs.h b/common/eq_packet_structs.h index 2e4b29261..47516b24a 100644 --- a/common/eq_packet_structs.h +++ b/common/eq_packet_structs.h @@ -1449,17 +1449,18 @@ struct BulkItemPacket_Struct struct Consume_Struct { -/*0000*/ uint32 slot; -/*0004*/ uint32 auto_consumed; // 0xffffffff when auto eating e7030000 when right click -/*0008*/ uint8 c_unknown1[4]; -/*0012*/ uint8 type; // 0x01=Food 0x02=Water -/*0013*/ uint8 unknown13[3]; +/*0000*/ uint32 slot; +/*0004*/ uint32 auto_consumed; // 0xffffffff when auto eating e7030000 when right click +/*0008*/ uint8 c_unknown1[4]; +/*0012*/ uint8 type; // 0x01=Food 0x02=Water +/*0013*/ uint8 unknown13[3]; }; struct DeleteItem_Struct { -/*0000*/ uint32 from_slot; -/*0004*/ uint32 to_slot; -/*0008*/ uint32 number_in_stack; +/*0000*/ uint32 from_slot; +/*0004*/ uint32 to_slot; +/*0008*/ uint32 number_in_stack; +/*0012*/ }; struct MoveItem_Struct @@ -1467,16 +1468,18 @@ struct MoveItem_Struct /*0000*/ uint32 from_slot; /*0004*/ uint32 to_slot; /*0008*/ uint32 number_in_stack; +/*0012*/ }; // both MoveItem_Struct/DeleteItem_Struct server structures will be changing to a structure-based slot format..this will // be used for handling SoF/SoD/etc... time stamps sent using the MoveItem_Struct format. (nothing will be done with this -// info at the moment..but, it forwards it on to the server for handling/future use) +// info at the moment..but, it is forwarded on to the server for handling/future use) struct ClientTimeStamp_Struct { -/*0000*/ uint32 from_slot; -/*0004*/ uint32 to_slot; -/*0008*/ uint32 number_in_stack; +/*0000*/ uint32 from_slot; +/*0004*/ uint32 to_slot; +/*0008*/ uint32 number_in_stack; +/*0012*/ }; // @@ -3400,7 +3403,7 @@ struct Split_Struct */ struct NewCombine_Struct { /*00*/ int16 container_slot; -/*02*/ char unknown02[2]; +/*02*/ int16 guildtribute_slot; /*04*/ }; diff --git a/common/patches/client62.cpp b/common/patches/client62.cpp index 65ebe3600..bbc8757d0 100644 --- a/common/patches/client62.cpp +++ b/common/patches/client62.cpp @@ -18,15 +18,15 @@ namespace Client62 static OpcodeManager *opcodes = nullptr; static Strategy struct_strategy; - char* SerializeItem(const ItemInst *inst, int16 slot_id, uint32 *length, uint8 depth); + char* SerializeItem(const ItemInst *inst, int16 slot_id_in, uint32 *length, uint8 depth); // server to client inventory location converters - static inline uint32 ServerToClient62Slot(uint32 ServerSlot); - static inline uint32 ServerToClient62CorpseSlot(uint32 ServerCorpse); + static inline int16 ServerToClient62Slot(uint32 ServerSlot); + static inline int16 ServerToClient62CorpseSlot(uint32 ServerCorpse); // client to server inventory location converters - static inline uint32 Client62ToServerSlot(uint32 Client62Slot); - static inline uint32 Client62ToServerCorpseSlot(uint32 Client62Corpse); + static inline uint32 Client62ToServerSlot(int16 Client62Slot); + static inline uint32 Client62ToServerCorpseSlot(int16 Client62Corpse); void Register(EQStreamIdentifier &into) { @@ -131,6 +131,31 @@ namespace Client62 FINISH_ENCODE(); } + ENCODE(OP_AdventureMerchantSell) + { + ENCODE_LENGTH_EXACT(Adventure_Sell_Struct); + SETUP_DIRECT_ENCODE(Adventure_Sell_Struct, structs::Adventure_Sell_Struct); + + eq->unknown000 = 1; + OUT(npcid); + eq->slot = ServerToClient62Slot(emu->slot); + OUT(charges); + OUT(sell_price); + + FINISH_ENCODE(); + } + + ENCODE(OP_ApplyPoison) + { + ENCODE_LENGTH_EXACT(ApplyPoison_Struct); + SETUP_DIRECT_ENCODE(ApplyPoison_Struct, structs::ApplyPoison_Struct); + + eq->inventorySlot = ServerToClient62Slot(emu->inventorySlot); + OUT(success); + + FINISH_ENCODE(); + } + ENCODE(OP_BazaarSearch) { EQApplicationPacket *in = *p; @@ -234,6 +259,20 @@ namespace Client62 dest->FastQueuePacket(&in, ack_req); } + ENCODE(OP_DeleteCharge) { ENCODE_FORWARD(OP_MoveItem); } + + ENCODE(OP_DeleteItem) + { + ENCODE_LENGTH_EXACT(DeleteItem_Struct); + SETUP_DIRECT_ENCODE(DeleteItem_Struct, structs::DeleteItem_Struct); + + eq->from_slot = ServerToClient62Slot(emu->from_slot); + eq->to_slot = ServerToClient62Slot(emu->to_slot); + OUT(number_in_stack); + + FINISH_ENCODE(); + } + ENCODE(OP_DeleteSpawn) { SETUP_DIRECT_ENCODE(DeleteSpawn_Struct, structs::DeleteSpawn_Struct); @@ -400,6 +439,31 @@ namespace Client62 FINISH_ENCODE(); } + ENCODE(OP_LootItem) + { + ENCODE_LENGTH_EXACT(LootingItem_Struct); + SETUP_DIRECT_ENCODE(LootingItem_Struct, structs::LootingItem_Struct); + + OUT(lootee); + OUT(looter); + eq->slot_id = emu->slot_id; + OUT(auto_loot); + + FINISH_ENCODE(); + } + + ENCODE(OP_MoveItem) + { + ENCODE_LENGTH_EXACT(MoveItem_Struct); + SETUP_DIRECT_ENCODE(MoveItem_Struct, structs::MoveItem_Struct); + + eq->from_slot = ServerToClient62Slot(emu->from_slot); + eq->to_slot = ServerToClient62Slot(emu->to_slot); + OUT(number_in_stack); + + FINISH_ENCODE(); + } + ENCODE(OP_NewSpawn) { ENCODE_FORWARD(OP_ZoneSpawns); } ENCODE(OP_OnLevelMessage) @@ -616,6 +680,7 @@ namespace Client62 ENCODE(OP_ReadBook) { + // no apparent slot translation needed -U EQApplicationPacket *in = *p; *p = nullptr; @@ -732,6 +797,19 @@ namespace Client62 FINISH_ENCODE(); } + ENCODE(OP_ShopPlayerSell) + { + ENCODE_LENGTH_EXACT(Merchant_Purchase_Struct); + SETUP_DIRECT_ENCODE(Merchant_Purchase_Struct, structs::Merchant_Purchase_Struct); + + OUT(npcid); + eq->itemslot = ServerToClient62Slot(emu->itemslot); + OUT(quantity); + OUT(price); + + FINISH_ENCODE(); + } + ENCODE(OP_Track) { EQApplicationPacket *in = *p; @@ -764,6 +842,19 @@ namespace Client62 dest->FastQueuePacket(&in, ack_req); } + ENCODE(OP_TributeItem) + { + ENCODE_LENGTH_EXACT(TributeItem_Struct); + SETUP_DIRECT_ENCODE(TributeItem_Struct, structs::TributeItem_Struct); + + eq->slot = ServerToClient62Slot(emu->slot); + OUT(quantity); + OUT(tribute_master_id); + OUT(tribute_points); + + FINISH_ENCODE(); + } + ENCODE(OP_WearChange) { ENCODE_LENGTH_EXACT(WearChange_Struct); @@ -875,6 +966,59 @@ namespace Client62 } // DECODE methods + DECODE(OP_AdventureMerchantSell) + { + DECODE_LENGTH_EXACT(structs::Adventure_Sell_Struct); + SETUP_DIRECT_DECODE(Adventure_Sell_Struct, structs::Adventure_Sell_Struct); + + IN(npcid); + emu->slot = Client62ToServerSlot(eq->slot); + IN(charges); + IN(sell_price); + + FINISH_DIRECT_DECODE(); + } + + DECODE(OP_ApplyPoison) + { + DECODE_LENGTH_EXACT(structs::ApplyPoison_Struct); + SETUP_DIRECT_DECODE(ApplyPoison_Struct, structs::ApplyPoison_Struct); + + emu->inventorySlot = Client62ToServerSlot(eq->inventorySlot); + IN(success); + + FINISH_DIRECT_DECODE(); + } + +#if 0 + // needs to be tested (and OpCode found) + DECODE(OP_AugmentInfo) { DECODE_FORWARD(OP_ReadBook); } +#endif + + DECODE(OP_AugmentItem) + { + DECODE_LENGTH_EXACT(structs::AugmentItem_Struct); + SETUP_DIRECT_DECODE(AugmentItem_Struct, structs::AugmentItem_Struct); + + emu->container_slot = Client62ToServerSlot(eq->container_slot); + emu->augment_slot = eq->augment_slot; + + FINISH_DIRECT_DECODE(); + } + + DECODE(OP_CastSpell) + { + DECODE_LENGTH_EXACT(structs::CastSpell_Struct); + SETUP_DIRECT_DECODE(CastSpell_Struct, structs::CastSpell_Struct); + + IN(slot); + IN(spell_id); + emu->inventoryslot = Client62ToServerSlot(eq->inventoryslot); + IN(target_id); + + FINISH_DIRECT_DECODE(); + } + DECODE(OP_CharacterCreate) { DECODE_LENGTH_EXACT(structs::CharCreate_Struct); @@ -903,6 +1047,30 @@ namespace Client62 FINISH_DIRECT_DECODE(); } + DECODE(OP_Consume) + { + DECODE_LENGTH_EXACT(structs::Consume_Struct); + SETUP_DIRECT_DECODE(Consume_Struct, structs::Consume_Struct); + + emu->slot = Client62ToServerSlot(eq->slot); + IN(auto_consumed); + IN(type); + + FINISH_DIRECT_DECODE(); + } + + DECODE(OP_DeleteItem) + { + DECODE_LENGTH_EXACT(structs::DeleteItem_Struct); + SETUP_DIRECT_DECODE(DeleteItem_Struct, structs::DeleteItem_Struct); + + emu->from_slot = Client62ToServerSlot(eq->from_slot); + emu->to_slot = Client62ToServerSlot(eq->to_slot); + IN(number_in_stack); + + FINISH_DIRECT_DECODE(); + } + DECODE(OP_FaceChange) { DECODE_LENGTH_EXACT(structs::FaceChange_Struct); @@ -935,8 +1103,36 @@ namespace Client62 FINISH_DIRECT_DECODE(); } + DECODE(OP_LootItem) + { + DECODE_LENGTH_EXACT(structs::LootingItem_Struct); + SETUP_DIRECT_DECODE(LootingItem_Struct, structs::LootingItem_Struct); + + IN(lootee); + IN(looter); + emu->slot_id = eq->slot_id; + IN(auto_loot); + + FINISH_DIRECT_DECODE(); + } + + DECODE(OP_MoveItem) + { + DECODE_LENGTH_EXACT(structs::MoveItem_Struct); + SETUP_DIRECT_DECODE(MoveItem_Struct, structs::MoveItem_Struct); + + _log(NET__ERROR, "Moved item from %u to %u", eq->from_slot, eq->to_slot); + + emu->from_slot = Client62ToServerSlot(eq->from_slot); + emu->to_slot = Client62ToServerSlot(eq->to_slot); + IN(number_in_stack); + + FINISH_DIRECT_DECODE(); + } + DECODE(OP_ReadBook) { + // no apparent slot translation needed -U DECODE_LENGTH_ATLEAST(structs::BookRequest_Struct); SETUP_DIRECT_DECODE(BookRequest_Struct, structs::BookRequest_Struct); @@ -964,6 +1160,43 @@ namespace Client62 FINISH_DIRECT_DECODE(); } + DECODE(OP_ShopPlayerSell) + { + DECODE_LENGTH_EXACT(structs::Merchant_Purchase_Struct); + SETUP_DIRECT_DECODE(Merchant_Purchase_Struct, structs::Merchant_Purchase_Struct); + + IN(npcid); + emu->itemslot = Client62ToServerSlot(eq->itemslot); + IN(quantity); + IN(price); + + FINISH_DIRECT_DECODE(); + } + + DECODE(OP_TradeSkillCombine) + { + DECODE_LENGTH_EXACT(structs::NewCombine_Struct); + SETUP_DIRECT_DECODE(NewCombine_Struct, structs::NewCombine_Struct); + + emu->container_slot = Client62ToServerSlot(eq->container_slot); + IN(guildtribute_slot); + + FINISH_DIRECT_DECODE(); + } + + DECODE(OP_TributeItem) + { + DECODE_LENGTH_EXACT(structs::TributeItem_Struct); + SETUP_DIRECT_DECODE(TributeItem_Struct, structs::TributeItem_Struct); + + emu->slot = Client62ToServerSlot(eq->slot); + IN(quantity); + IN(tribute_master_id); + IN(tribute_points); + + FINISH_DIRECT_DECODE(); + } + DECODE(OP_WearChange) { DECODE_LENGTH_EXACT(structs::WearChange_Struct); @@ -992,13 +1225,14 @@ namespace Client62 } // file scope helper methods - char *SerializeItem(const ItemInst *inst, int16 slot_id, uint32 *length, uint8 depth) + char *SerializeItem(const ItemInst *inst, int16 slot_id_in, uint32 *length, uint8 depth) { char *serialization = nullptr; char *instance = nullptr; const char *protection = (const char *)"\\\\\\\\\\"; char *sub_items[10] = { nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr }; bool stackable = inst->IsStackable(); + int16 slot_id = ServerToClient62Slot(slot_id_in); uint32 merchant_slot = inst->GetMerchantSlot(); int16 charges = inst->GetCharges(); const Item_Struct *item = inst->GetItem(); @@ -1009,7 +1243,8 @@ namespace Client62 "%i|%i|%i|%i|%i|%i|%i|%i|%i|%i|", stackable ? charges : 1, 0, - (merchant_slot == 0) ? slot_id : merchant_slot, + //(merchant_slot == 0) ? slot_id : merchant_slot, // change when translator activated + (merchant_slot == 0) ? slot_id_in : merchant_slot, inst->GetPrice(), (merchant_slot == 0) ? 1 : inst->GetMerchantCount(), 0, @@ -1075,22 +1310,30 @@ namespace Client62 return serialization; } - static inline uint32 ServerToClient62Slot(uint32 ServerSlot) + static inline int16 ServerToClient62Slot(uint32 ServerSlot) { - //uint32 Client62Slot; + //int16 Client62Slot; + if (ServerSlot == INVALID_INDEX) + return INVALID_INDEX; + + return ServerSlot; // deprecated } - static inline uint32 ServerToClient62CorpseSlot(uint32 ServerCorpse) + static inline int16 ServerToClient62CorpseSlot(uint32 ServerCorpse) { - //uint32 Client62Corpse; + //int16 Client62Corpse; } - static inline uint32 Client62ToServerSlot(uint32 Client62Slot) + static inline uint32 Client62ToServerSlot(int16 Client62Slot) { //uint32 ServerSlot; + if (Client62Slot == INVALID_INDEX) + return INVALID_INDEX; + + return Client62Slot; // deprecated } - static inline uint32 Client62ToServerCorpseSlot(uint32 Client62Corpse) + static inline uint32 Client62ToServerCorpseSlot(int16 Client62Corpse) { //uint32 ServerCorpse; } diff --git a/common/patches/client62_ops.h b/common/patches/client62_ops.h index 8f544ccfc..0ff0cdaa7 100644 --- a/common/patches/client62_ops.h +++ b/common/patches/client62_ops.h @@ -1,8 +1,12 @@ // out-going packets that require an ENCODE translation: E(OP_Action) +E(OP_AdventureMerchantSell) +E(OP_ApplyPoison) E(OP_BazaarSearch) E(OP_BecomeTrader) E(OP_CharInventory) +E(OP_DeleteCharge) +E(OP_DeleteItem) E(OP_DeleteSpawn) E(OP_GuildMemberLevelUpdate) E(OP_GuildMemberList) @@ -10,6 +14,8 @@ E(OP_Illusion) E(OP_ItemLinkResponse) E(OP_ItemPacket) E(OP_LeadershipExpUpdate) +E(OP_LootItem) +E(OP_MoveItem) E(OP_NewSpawn) E(OP_OnLevelMessage) E(OP_PetBuffWindow) @@ -18,17 +24,31 @@ E(OP_ReadBook) E(OP_RespondAA) E(OP_SendAATable) E(OP_SendCharInfo) +E(OP_ShopPlayerSell) E(OP_Track) +E(OP_TributeItem) E(OP_WearChange) E(OP_ZoneEntry) E(OP_ZoneServerReady) E(OP_ZoneSpawns) // incoming packets that require a DECODE translation: +D(OP_AdventureMerchantSell) +D(OP_ApplyPoison) +//D(OP_AugmentInfo) - needs opcode for conf file update +D(OP_AugmentItem) +D(OP_CastSpell) D(OP_CharacterCreate) +D(OP_Consume) +D(OP_DeleteItem) D(OP_FaceChange) D(OP_ItemLinkClick) +D(OP_LootItem) +D(OP_MoveItem) D(OP_ReadBook) D(OP_SetServerFilter) +D(OP_ShopPlayerSell) +D(OP_TradeSkillCombine) +D(OP_TributeItem) D(OP_WearChange) D(OP_WhoAllRequest) #undef E diff --git a/common/patches/client62_structs.h b/common/patches/client62_structs.h index 73726e165..70f05859e 100644 --- a/common/patches/client62_structs.h +++ b/common/patches/client62_structs.h @@ -406,7 +406,7 @@ struct CastSpell_Struct uint32 spell_id; uint32 inventoryslot; // slot for clicky item, 0xFFFF = normal cast uint32 target_id; - uint8 cs_unknown[4]; + uint8 cs_unknown[4]; }; /* @@ -1148,19 +1148,27 @@ struct BulkItemPacket_Struct struct Consume_Struct { -/*0000*/ uint32 slot; -/*0004*/ uint32 auto_consumed; // 0xffffffff when auto eating e7030000 when right click -/*0008*/ uint8 c_unknown1[4]; -/*0012*/ uint8 type; // 0x01=Food 0x02=Water -/*0013*/ uint8 unknown13[3]; +/*0000*/ uint32 slot; +/*0004*/ uint32 auto_consumed; // 0xffffffff when auto eating e7030000 when right click +/*0008*/ uint8 c_unknown1[4]; +/*0012*/ uint8 type; // 0x01=Food 0x02=Water +/*0013*/ uint8 unknown13[3]; }; +struct DeleteItem_Struct +{ +/*0000*/ uint32 from_slot; +/*0004*/ uint32 to_slot; +/*0008*/ uint32 number_in_stack; +/*0012*/ +}; struct MoveItem_Struct { -/*0000*/ uint32 from_slot; -/*0004*/ uint32 to_slot; -/*0008*/ uint32 number_in_stack; +/*0000*/ uint32 from_slot; +/*0004*/ uint32 to_slot; +/*0008*/ uint32 number_in_stack; +/*0012*/ }; // @@ -1362,12 +1370,6 @@ struct CombatAbility_Struct { uint32 m_skill; }; -struct DeleteItem_Struct { -/*0000*/ uint32 from_slot; -/*0004*/ uint32 to_slot; -/*0008*/ uint32 number_in_stack; -}; - //Instill Doubt struct Instill_Doubt_Struct { uint8 i_id; @@ -1521,6 +1523,14 @@ struct Adventure_Purchase_Struct { /*008*/ uint32 variable; }; +struct Adventure_Sell_Struct { +/*000*/ uint32 unknown000; //0x01 +/*004*/ uint32 npcid; +/*008*/ uint32 slot; +/*012*/ uint32 charges; +/*016*/ uint32 sell_price; +}; + struct AdventurePoints_Update_Struct { /*000*/ uint32 ldon_available_points; // Total available points /*004*/ uint8 unkown_apu004[20]; @@ -2524,10 +2534,10 @@ struct TributeInfo_Struct { }; struct TributeItem_Struct { - uint32 slot; - uint32 quantity; - uint32 tribute_master_id; - int32 tribute_points; + uint32 slot; + uint32 quantity; + uint32 tribute_master_id; + int32 tribute_points; }; struct TributePoint_Struct { @@ -2563,7 +2573,7 @@ struct Split_Struct */ struct NewCombine_Struct { /*00*/ int16 container_slot; -/*02*/ char unknown02[2]; +/*02*/ int16 guildtribute_slot; /*04*/ }; @@ -3076,6 +3086,11 @@ struct AnnoyingZoneUnknown_Struct { uint32 value; //always 4 }; +struct ApplyPoison_Struct { + uint32 inventorySlot; + uint32 success; +}; + struct GuildMemberUpdate_Struct { /*00*/ uint32 guild_id; //not sure /*04*/ char member_name[64]; diff --git a/common/patches/rof.cpp b/common/patches/rof.cpp index 2643b909e..581858381 100644 --- a/common/patches/rof.cpp +++ b/common/patches/rof.cpp @@ -4671,6 +4671,7 @@ namespace RoF slot_id = legacy::SLOT_TRADESKILL; // 1000 } emu->container_slot = slot_id; + emu->guildtribute_slot = RoFToServerSlot(eq->guildtribute_slot); // this should only return INVALID_INDEX until implemented -U FINISH_DIRECT_DECODE(); } @@ -5498,6 +5499,10 @@ namespace RoF ServerSlot = TempSlot; }*/ + else if (RoFSlot.SlotType == maps::MapGuildTribute) { + ServerSlot = INVALID_INDEX; + } + _log(NET__ERROR, "Convert RoF Slots: Type %i, Unk2 %i, Main %i, Sub %i, Aug %i, Unk1 %i to Server Slot %i", RoFSlot.SlotType, RoFSlot.Unknown02, RoFSlot.MainSlot, RoFSlot.SubSlot, RoFSlot.AugSlot, RoFSlot.Unknown01, ServerSlot); return ServerSlot; diff --git a/common/patches/rof_structs.h b/common/patches/rof_structs.h index 79b4f21b8..9cec4f5fa 100644 --- a/common/patches/rof_structs.h +++ b/common/patches/rof_structs.h @@ -1678,7 +1678,7 @@ struct BulkItemPacket_Struct struct Consume_Struct { -/*000*/ ItemSlotStruct slot; +/*000*/ ItemSlotStruct slot; /*012*/ uint32 auto_consumed; // 0xffffffff when auto eating e7030000 when right click /*016*/ uint32 type; // 0x01=Food 0x02=Water /*020*/ uint32 c_unknown1; // Seen 2 @@ -1711,17 +1711,17 @@ struct ItemProperties_Struct { }; struct DeleteItem_Struct { -/*0000*/ ItemSlotStruct from_slot; -/*0004*/ ItemSlotStruct to_slot; -/*0008*/ uint32 number_in_stack; -/*0012*/ +/*0000*/ ItemSlotStruct from_slot; +/*0012*/ ItemSlotStruct to_slot; +/*0024*/ uint32 number_in_stack; +/*0028*/ }; struct MoveItem_Struct { -/*0000*/ ItemSlotStruct from_slot; -/*0004*/ ItemSlotStruct to_slot; -/*0008*/ uint32 number_in_stack; -/*0012*/ +/*0000*/ ItemSlotStruct from_slot; +/*0012*/ ItemSlotStruct to_slot; +/*0024*/ uint32 number_in_stack; +/*0028*/ }; // @@ -2045,7 +2045,7 @@ struct Merchant_Sell_Struct { struct Merchant_Purchase_Struct { /*000*/ uint32 npcid; // Merchant NPC's entity id -/*004*/ MainInvItemSlotStruct itemslot; +/*004*/ MainInvItemSlotStruct itemslot; /*012*/ uint32 quantity; /*016*/ uint32 price; /*020*/ @@ -3488,10 +3488,10 @@ struct TributeInfo_Struct { struct TributeItem_Struct { -/*00*/ ItemSlotStruct slot; -/*12*/ uint32 quantity; -/*16*/ uint32 tribute_master_id; -/*20*/ int32 tribute_points; +/*00*/ ItemSlotStruct slot; +/*12*/ uint32 quantity; +/*16*/ uint32 tribute_master_id; +/*20*/ int32 tribute_points; /*24*/ }; @@ -3527,7 +3527,7 @@ struct Split_Struct */ struct NewCombine_Struct { /*00*/ ItemSlotStruct container_slot; -/*12*/ ItemSlotStruct unknown_slot; // Slot type is 8? +/*12*/ ItemSlotStruct guildtribute_slot; // Slot type is 8? (MapGuildTribute = 8 -U) /*24*/ }; diff --git a/common/patches/sod.cpp b/common/patches/sod.cpp index 69ec9f1cb..90c5644fe 100644 --- a/common/patches/sod.cpp +++ b/common/patches/sod.cpp @@ -3074,6 +3074,7 @@ namespace SoD SETUP_DIRECT_DECODE(NewCombine_Struct, structs::NewCombine_Struct); emu->container_slot = SoDToServerSlot(eq->container_slot); + IN(guildtribute_slot); FINISH_DIRECT_DECODE(); } diff --git a/common/patches/sod_structs.h b/common/patches/sod_structs.h index ffd6e9ecb..ea4726a62 100644 --- a/common/patches/sod_structs.h +++ b/common/patches/sod_structs.h @@ -519,7 +519,7 @@ struct CastSpell_Struct uint32 spell_id; uint32 inventoryslot; // slot for clicky item, 0xFFFF = normal cast uint32 target_id; - uint8 cs_unknown[4]; + uint8 cs_unknown[4]; }; /* @@ -1469,11 +1469,11 @@ struct BulkItemPacket_Struct struct Consume_Struct { -/*0000*/ uint32 slot; -/*0004*/ uint32 auto_consumed; // 0xffffffff when auto eating e7030000 when right click -/*0008*/ uint8 c_unknown1[4]; -/*0012*/ uint8 type; // 0x01=Food 0x02=Water -/*0013*/ uint8 unknown13[3]; +/*0000*/ uint32 slot; +/*0004*/ uint32 auto_consumed; // 0xffffffff when auto eating e7030000 when right click +/*0008*/ uint8 c_unknown1[4]; +/*0012*/ uint8 type; // 0x01=Food 0x02=Water +/*0013*/ uint8 unknown13[3]; /*0016*/ }; @@ -1503,17 +1503,17 @@ struct ItemProperties_Struct { }; struct DeleteItem_Struct { -/*0000*/ uint32 from_slot; -/*0004*/ uint32 to_slot; -/*0008*/ uint32 number_in_stack; +/*0000*/ uint32 from_slot; +/*0004*/ uint32 to_slot; +/*0008*/ uint32 number_in_stack; /*0012*/ }; struct MoveItem_Struct { -/*0000*/ uint32 from_slot; -/*0004*/ uint32 to_slot; -/*0008*/ uint32 number_in_stack; +/*0000*/ uint32 from_slot; +/*0004*/ uint32 to_slot; +/*0008*/ uint32 number_in_stack; /*0012*/ }; @@ -3090,10 +3090,10 @@ struct TributeInfo_Struct { }; struct TributeItem_Struct { - uint32 slot; - uint32 quantity; - uint32 tribute_master_id; - int32 tribute_points; + uint32 slot; + uint32 quantity; + uint32 tribute_master_id; + int32 tribute_points; }; struct TributePoint_Struct { @@ -3129,7 +3129,7 @@ struct Split_Struct */ struct NewCombine_Struct { /*00*/ int16 container_slot; -/*02*/ char unknown02[2]; +/*02*/ int16 guildtribute_slot; /*04*/ }; diff --git a/common/patches/sof.cpp b/common/patches/sof.cpp index 5e00a2870..861edcb3d 100644 --- a/common/patches/sof.cpp +++ b/common/patches/sof.cpp @@ -2398,6 +2398,7 @@ namespace SoF SETUP_DIRECT_DECODE(NewCombine_Struct, structs::NewCombine_Struct); emu->container_slot = SoFToServerSlot(eq->container_slot); + IN(guildtribute_slot); FINISH_DIRECT_DECODE(); } diff --git a/common/patches/sof_structs.h b/common/patches/sof_structs.h index 7d250a568..0beb17db6 100644 --- a/common/patches/sof_structs.h +++ b/common/patches/sof_structs.h @@ -497,7 +497,7 @@ struct CastSpell_Struct uint32 spell_id; uint32 inventoryslot; // slot for clicky item, 0xFFFF = normal cast uint32 target_id; - uint8 cs_unknown[4]; + uint8 cs_unknown[4]; }; /* @@ -1445,11 +1445,11 @@ struct BulkItemPacket_Struct struct Consume_Struct { -/*0000*/ uint32 slot; -/*0004*/ uint32 auto_consumed; // 0xffffffff when auto eating e7030000 when right click -/*0008*/ uint8 c_unknown1[4]; -/*0012*/ uint8 type; // 0x01=Food 0x02=Water -/*0013*/ uint8 unknown13[3]; +/*0000*/ uint32 slot; +/*0004*/ uint32 auto_consumed; // 0xffffffff when auto eating e7030000 when right click +/*0008*/ uint8 c_unknown1[4]; +/*0012*/ uint8 type; // 0x01=Food 0x02=Water +/*0013*/ uint8 unknown13[3]; /*0016*/ }; @@ -1479,17 +1479,17 @@ struct ItemProperties_Struct { }; struct DeleteItem_Struct { -/*0000*/ uint32 from_slot; -/*0004*/ uint32 to_slot; -/*0008*/ uint32 number_in_stack; +/*0000*/ uint32 from_slot; +/*0004*/ uint32 to_slot; +/*0008*/ uint32 number_in_stack; /*0012*/ }; struct MoveItem_Struct { -/*0000*/ uint32 from_slot; -/*0004*/ uint32 to_slot; -/*0008*/ uint32 number_in_stack; +/*0000*/ uint32 from_slot; +/*0004*/ uint32 to_slot; +/*0008*/ uint32 number_in_stack; /*0012*/ }; @@ -2953,10 +2953,10 @@ struct TributeInfo_Struct { }; struct TributeItem_Struct { - uint32 slot; - uint32 quantity; - uint32 tribute_master_id; - int32 tribute_points; + uint32 slot; + uint32 quantity; + uint32 tribute_master_id; + int32 tribute_points; }; struct TributePoint_Struct { @@ -2992,7 +2992,7 @@ struct Split_Struct */ struct NewCombine_Struct { /*00*/ int16 container_slot; -/*02*/ char unknown02[2]; +/*02*/ int16 guildtribute_slot; /*04*/ }; diff --git a/common/patches/titanium.cpp b/common/patches/titanium.cpp index eaa7b3b10..92695f7a1 100644 --- a/common/patches/titanium.cpp +++ b/common/patches/titanium.cpp @@ -18,15 +18,15 @@ namespace Titanium static OpcodeManager *opcodes = nullptr; static Strategy struct_strategy; - char* SerializeItem(const ItemInst *inst, int16 slot_id, uint32 *length, uint8 depth); + char* SerializeItem(const ItemInst *inst, int16 slot_id_in, uint32 *length, uint8 depth); // server to client inventory location converters - static inline uint32 ServerToTitaniumSlot(uint32 ServerSlot); - static inline uint32 ServerToTitaniumCorpseSlot(uint32 ServerCorpse); + static inline int16 ServerToTitaniumSlot(uint32 ServerSlot); + static inline int16 ServerToTitaniumCorpseSlot(uint32 ServerCorpse); // client to server inventory location converters - static inline uint32 TitaniumToServerSlot(uint32 TitaniumSlot); - static inline uint32 TitaniumToServerCorpseSlot(uint32 TitaniumCorpse); + static inline uint32 TitaniumToServerSlot(int16 TitaniumSlot); + static inline uint32 TitaniumToServerCorpseSlot(int16 TitaniumCorpse); void Register(EQStreamIdentifier &into) { @@ -133,6 +133,31 @@ namespace Titanium FINISH_ENCODE(); } + ENCODE(OP_AdventureMerchantSell) + { + ENCODE_LENGTH_EXACT(Adventure_Sell_Struct); + SETUP_DIRECT_ENCODE(Adventure_Sell_Struct, structs::Adventure_Sell_Struct); + + eq->unknown000 = 1; + OUT(npcid); + eq->slot = ServerToTitaniumSlot(emu->slot); + OUT(charges); + OUT(sell_price); + + FINISH_ENCODE(); + } + + ENCODE(OP_ApplyPoison) + { + ENCODE_LENGTH_EXACT(ApplyPoison_Struct); + SETUP_DIRECT_ENCODE(ApplyPoison_Struct, structs::ApplyPoison_Struct); + + eq->inventorySlot = ServerToTitaniumSlot(emu->inventorySlot); + OUT(success); + + FINISH_ENCODE(); + } + ENCODE(OP_BazaarSearch) { if (((*p)->size == sizeof(BazaarReturnDone_Struct)) || ((*p)->size == sizeof(BazaarWelcome_Struct))) { @@ -237,6 +262,20 @@ namespace Titanium dest->FastQueuePacket(&in, ack_req); } + ENCODE(OP_DeleteCharge) { ENCODE_FORWARD(OP_MoveItem); } + + ENCODE(OP_DeleteItem) + { + ENCODE_LENGTH_EXACT(DeleteItem_Struct); + SETUP_DIRECT_ENCODE(DeleteItem_Struct, structs::DeleteItem_Struct); + + eq->from_slot = ServerToTitaniumSlot(emu->from_slot); + eq->to_slot = ServerToTitaniumSlot(emu->to_slot); + OUT(number_in_stack); + + FINISH_ENCODE(); + } + ENCODE(OP_DeleteSpawn) { SETUP_DIRECT_ENCODE(DeleteSpawn_Struct, structs::DeleteSpawn_Struct); @@ -608,6 +647,31 @@ namespace Titanium delete in; } + ENCODE(OP_LootItem) + { + ENCODE_LENGTH_EXACT(LootingItem_Struct); + SETUP_DIRECT_ENCODE(LootingItem_Struct, structs::LootingItem_Struct); + + OUT(lootee); + OUT(looter); + eq->slot_id = emu->slot_id; + OUT(auto_loot); + + FINISH_ENCODE(); + } + + ENCODE(OP_MoveItem) + { + ENCODE_LENGTH_EXACT(MoveItem_Struct); + SETUP_DIRECT_ENCODE(MoveItem_Struct, structs::MoveItem_Struct); + + eq->from_slot = ServerToTitaniumSlot(emu->from_slot); + eq->to_slot = ServerToTitaniumSlot(emu->to_slot); + OUT(number_in_stack); + + FINISH_ENCODE(); + } + ENCODE(OP_NewSpawn) { ENCODE_FORWARD(OP_ZoneSpawns); } ENCODE(OP_OnLevelMessage) @@ -870,6 +934,7 @@ namespace Titanium ENCODE(OP_ReadBook) { + // no apparent slot translation needed -U EQApplicationPacket *in = *p; *p = nullptr; @@ -992,6 +1057,19 @@ namespace Titanium FINISH_ENCODE(); } + ENCODE(OP_ShopPlayerSell) + { + ENCODE_LENGTH_EXACT(Merchant_Purchase_Struct); + SETUP_DIRECT_ENCODE(Merchant_Purchase_Struct, structs::Merchant_Purchase_Struct); + + OUT(npcid); + eq->itemslot = ServerToTitaniumSlot(emu->itemslot); + OUT(quantity); + OUT(price); + + FINISH_ENCODE(); + } + ENCODE(OP_Track) { EQApplicationPacket *in = *p; @@ -1052,6 +1130,19 @@ namespace Titanium FINISH_ENCODE(); } + ENCODE(OP_TributeItem) + { + ENCODE_LENGTH_EXACT(TributeItem_Struct); + SETUP_DIRECT_ENCODE(TributeItem_Struct, structs::TributeItem_Struct); + + eq->slot = ServerToTitaniumSlot(emu->slot); + OUT(quantity); + OUT(tribute_master_id); + OUT(tribute_points); + + FINISH_ENCODE(); + } + ENCODE(OP_VetRewardsAvaliable) { EQApplicationPacket *inapp = *p; @@ -1232,6 +1323,57 @@ namespace Titanium } // DECODE methods + DECODE(OP_AdventureMerchantSell) + { + DECODE_LENGTH_EXACT(structs::Adventure_Sell_Struct); + SETUP_DIRECT_DECODE(Adventure_Sell_Struct, structs::Adventure_Sell_Struct); + + IN(npcid); + emu->slot = TitaniumToServerSlot(eq->slot); + IN(charges); + IN(sell_price); + + FINISH_DIRECT_DECODE(); + } + + DECODE(OP_ApplyPoison) + { + DECODE_LENGTH_EXACT(structs::ApplyPoison_Struct); + SETUP_DIRECT_DECODE(ApplyPoison_Struct, structs::ApplyPoison_Struct); + + emu->inventorySlot = TitaniumToServerSlot(eq->inventorySlot); + IN(success); + + FINISH_DIRECT_DECODE(); + } + + // needs to be tested + DECODE(OP_AugmentInfo) { DECODE_FORWARD(OP_ReadBook); } + + DECODE(OP_AugmentItem) + { + DECODE_LENGTH_EXACT(structs::AugmentItem_Struct); + SETUP_DIRECT_DECODE(AugmentItem_Struct, structs::AugmentItem_Struct); + + emu->container_slot = TitaniumToServerSlot(eq->container_slot); + emu->augment_slot = eq->augment_slot; + + FINISH_DIRECT_DECODE(); + } + + DECODE(OP_CastSpell) + { + DECODE_LENGTH_EXACT(structs::CastSpell_Struct); + SETUP_DIRECT_DECODE(CastSpell_Struct, structs::CastSpell_Struct); + + IN(slot); + IN(spell_id); + emu->inventoryslot = TitaniumToServerSlot(eq->inventoryslot); + IN(target_id); + + FINISH_DIRECT_DECODE(); + } + DECODE(OP_CharacterCreate) { DECODE_LENGTH_EXACT(structs::CharCreate_Struct); @@ -1260,6 +1402,30 @@ namespace Titanium FINISH_DIRECT_DECODE(); } + DECODE(OP_Consume) + { + DECODE_LENGTH_EXACT(structs::Consume_Struct); + SETUP_DIRECT_DECODE(Consume_Struct, structs::Consume_Struct); + + emu->slot = TitaniumToServerSlot(eq->slot); + IN(auto_consumed); + IN(type); + + FINISH_DIRECT_DECODE(); + } + + DECODE(OP_DeleteItem) + { + DECODE_LENGTH_EXACT(structs::DeleteItem_Struct); + SETUP_DIRECT_DECODE(DeleteItem_Struct, structs::DeleteItem_Struct); + + emu->from_slot = TitaniumToServerSlot(eq->from_slot); + emu->to_slot =TitaniumToServerSlot(eq->to_slot); + IN(number_in_stack); + + FINISH_DIRECT_DECODE(); + } + DECODE(OP_FaceChange) { DECODE_LENGTH_EXACT(structs::FaceChange_Struct); @@ -1347,8 +1513,36 @@ namespace Titanium FINISH_DIRECT_DECODE(); } + DECODE(OP_LootItem) + { + DECODE_LENGTH_EXACT(structs::LootingItem_Struct); + SETUP_DIRECT_DECODE(LootingItem_Struct, structs::LootingItem_Struct); + + IN(lootee); + IN(looter); + emu->slot_id = eq->slot_id; + IN(auto_loot); + + FINISH_DIRECT_DECODE(); + } + + DECODE(OP_MoveItem) + { + DECODE_LENGTH_EXACT(structs::MoveItem_Struct); + SETUP_DIRECT_DECODE(MoveItem_Struct, structs::MoveItem_Struct); + + _log(NET__ERROR, "Moved item from %u to %u", eq->from_slot, eq->to_slot); + + emu->from_slot = TitaniumToServerSlot(eq->from_slot); + emu->to_slot = TitaniumToServerSlot(eq->to_slot); + IN(number_in_stack); + + FINISH_DIRECT_DECODE(); + } + DECODE(OP_ReadBook) { + // no apparent slot translation needed -U DECODE_LENGTH_ATLEAST(structs::BookRequest_Struct); SETUP_DIRECT_DECODE(BookRequest_Struct, structs::BookRequest_Struct); @@ -1372,6 +1566,19 @@ namespace Titanium FINISH_DIRECT_DECODE(); } + DECODE(OP_ShopPlayerSell) + { + DECODE_LENGTH_EXACT(structs::Merchant_Purchase_Struct); + SETUP_DIRECT_DECODE(Merchant_Purchase_Struct, structs::Merchant_Purchase_Struct); + + IN(npcid); + emu->itemslot = TitaniumToServerSlot(eq->itemslot); + IN(quantity); + IN(price); + + FINISH_DIRECT_DECODE(); + } + DECODE(OP_TraderBuy) { DECODE_LENGTH_EXACT(structs::TraderBuy_Struct); @@ -1388,6 +1595,30 @@ namespace Titanium FINISH_DIRECT_DECODE(); } + DECODE(OP_TradeSkillCombine) + { + DECODE_LENGTH_EXACT(structs::NewCombine_Struct); + SETUP_DIRECT_DECODE(NewCombine_Struct, structs::NewCombine_Struct); + + emu->container_slot = TitaniumToServerSlot(eq->container_slot); + IN(guildtribute_slot); + + FINISH_DIRECT_DECODE(); + } + + DECODE(OP_TributeItem) + { + DECODE_LENGTH_EXACT(structs::TributeItem_Struct); + SETUP_DIRECT_DECODE(TributeItem_Struct, structs::TributeItem_Struct); + + emu->slot = TitaniumToServerSlot(eq->slot); + IN(quantity); + IN(tribute_master_id); + IN(tribute_points); + + FINISH_DIRECT_DECODE(); + } + DECODE(OP_WearChange) { DECODE_LENGTH_EXACT(structs::WearChange_Struct); @@ -1422,13 +1653,14 @@ namespace Titanium } // file scope helper methods - char *SerializeItem(const ItemInst *inst, int16 slot_id, uint32 *length, uint8 depth) + char *SerializeItem(const ItemInst *inst, int16 slot_id_in, uint32 *length, uint8 depth) { char *serialization = nullptr; char *instance = nullptr; const char *protection = (const char *)"\\\\\\\\\\"; char *sub_items[10] = { nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr }; bool stackable = inst->IsStackable(); + int16 slot_id = ServerToTitaniumSlot(slot_id_in); uint32 merchant_slot = inst->GetMerchantSlot(); int16 charges = inst->GetCharges(); const Item_Struct *item = inst->GetItem(); @@ -1439,7 +1671,8 @@ namespace Titanium "%i|%i|%i|%i|%i|%i|%i|%i|%i|%i|%i|", stackable ? charges : 0, 0, - (merchant_slot == 0) ? slot_id : merchant_slot, + //(merchant_slot == 0) ? slot_id : merchant_slot, // change when translator activated + (merchant_slot == 0) ? slot_id_in : merchant_slot, inst->GetPrice(), (merchant_slot == 0) ? 1 : inst->GetMerchantCount(), 0, @@ -1503,22 +1736,30 @@ namespace Titanium return serialization; } - static inline uint32 ServerToTitaniumSlot(uint32 ServerSlot) + static inline int16 ServerToTitaniumSlot(uint32 ServerSlot) { - //uint32 TitaniumSlot; + //int16 TitaniumSlot; + if (ServerSlot == INVALID_INDEX) + return INVALID_INDEX; + + return ServerSlot; // deprecated } - static inline uint32 ServerToTitaniumCorpseSlot(uint32 ServerCorpse) + static inline int16 ServerToTitaniumCorpseSlot(uint32 ServerCorpse) { - //uint32 TitaniumCorpse; + //int16 TitaniumCorpse; } - static inline uint32 TitaniumToServerSlot(uint32 TitaniumSlot) + static inline uint32 TitaniumToServerSlot(int16 TitaniumSlot) { //uint32 ServerSlot; + if (TitaniumSlot == INVALID_INDEX) + return INVALID_INDEX; + + return TitaniumSlot; // deprecated } - static inline uint32 TitaniumToServerCorpseSlot(uint32 TitaniumCorpse) + static inline uint32 TitaniumToServerCorpseSlot(int16 TitaniumCorpse) { //uint32 ServerCorpse; } diff --git a/common/patches/titanium_ops.h b/common/patches/titanium_ops.h index 40651a652..2aa3d8071 100644 --- a/common/patches/titanium_ops.h +++ b/common/patches/titanium_ops.h @@ -1,8 +1,12 @@ // out-going packets that require an ENCODE translation: E(OP_Action) +E(OP_AdventureMerchantSell) +E(OP_ApplyPoison) E(OP_BazaarSearch) E(OP_BecomeTrader) E(OP_CharInventory) +E(OP_DeleteCharge) +E(OP_DeleteItem) E(OP_DeleteSpawn) E(OP_DzCompass) E(OP_DzExpeditionEndsWarning) @@ -20,6 +24,8 @@ E(OP_ItemLinkResponse) E(OP_ItemPacket) E(OP_LeadershipExpUpdate) E(OP_LFGuild) +E(OP_LootItem) +E(OP_MoveItem) E(OP_OnLevelMessage) E(OP_PetBuffWindow) E(OP_PlayerProfile) @@ -28,24 +34,38 @@ E(OP_ReadBook) E(OP_RespondAA) E(OP_SendCharInfo) E(OP_SendAATable) +E(OP_ShopPlayerSell) E(OP_Track) E(OP_Trader) E(OP_TraderBuy) +E(OP_TributeItem) E(OP_VetRewardsAvaliable) E(OP_WearChange) E(OP_ZoneEntry) E(OP_ZoneServerReady) E(OP_ZoneSpawns) // incoming packets that require a DECODE translation: +D(OP_AdventureMerchantSell) +D(OP_ApplyPoison) +D(OP_AugmentInfo) +D(OP_AugmentItem) +D(OP_CastSpell) D(OP_CharacterCreate) +D(OP_Consume) +D(OP_DeleteItem) D(OP_FaceChange) D(OP_InspectAnswer) D(OP_InspectRequest) D(OP_ItemLinkClick) D(OP_LFGuild) +D(OP_LootItem) +D(OP_MoveItem) D(OP_ReadBook) D(OP_SetServerFilter) +D(OP_ShopPlayerSell) D(OP_TraderBuy) +D(OP_TradeSkillCombine) +D(OP_TributeItem) D(OP_WearChange) D(OP_WhoAllRequest) #undef E diff --git a/common/patches/titanium_structs.h b/common/patches/titanium_structs.h index 1fcd31b77..0e74af75e 100644 --- a/common/patches/titanium_structs.h +++ b/common/patches/titanium_structs.h @@ -419,7 +419,7 @@ struct CastSpell_Struct uint32 spell_id; uint32 inventoryslot; // slot for clicky item, 0xFFFF = normal cast uint32 target_id; - uint8 cs_unknown[4]; + uint8 cs_unknown[4]; }; /* @@ -1217,19 +1217,27 @@ struct BulkItemPacket_Struct struct Consume_Struct { -/*0000*/ uint32 slot; -/*0004*/ uint32 auto_consumed; // 0xffffffff when auto eating e7030000 when right click -/*0008*/ uint8 c_unknown1[4]; -/*0012*/ uint8 type; // 0x01=Food 0x02=Water -/*0013*/ uint8 unknown13[3]; +/*0000*/ uint32 slot; +/*0004*/ uint32 auto_consumed; // 0xffffffff when auto eating e7030000 when right click +/*0008*/ uint8 c_unknown1[4]; +/*0012*/ uint8 type; // 0x01=Food 0x02=Water +/*0013*/ uint8 unknown13[3]; }; +struct DeleteItem_Struct +{ +/*0000*/ uint32 from_slot; +/*0004*/ uint32 to_slot; +/*0008*/ uint32 number_in_stack; +/*0012*/ +}; struct MoveItem_Struct { -/*0000*/ uint32 from_slot; -/*0004*/ uint32 to_slot; -/*0008*/ uint32 number_in_stack; +/*0000*/ uint32 from_slot; +/*0004*/ uint32 to_slot; +/*0008*/ uint32 number_in_stack; +/*0012*/ }; // @@ -1431,12 +1439,6 @@ struct CombatAbility_Struct { uint32 m_skill; }; -struct DeleteItem_Struct { -/*0000*/ uint32 from_slot; -/*0004*/ uint32 to_slot; -/*0008*/ uint32 number_in_stack; -}; - //Instill Doubt struct Instill_Doubt_Struct { uint8 i_id; @@ -1590,6 +1592,14 @@ struct Adventure_Purchase_Struct { /*008*/ uint32 variable; }; +struct Adventure_Sell_Struct { +/*000*/ uint32 unknown000; //0x01 +/*004*/ uint32 npcid; +/*008*/ uint32 slot; +/*012*/ uint32 charges; +/*016*/ uint32 sell_price; +}; + struct AdventurePoints_Update_Struct { /*000*/ uint32 ldon_available_points; // Total available points /*004*/ uint8 unkown_apu004[20]; @@ -2583,10 +2593,10 @@ struct TributeInfo_Struct { }; struct TributeItem_Struct { - uint32 slot; - uint32 quantity; - uint32 tribute_master_id; - int32 tribute_points; + uint32 slot; + uint32 quantity; + uint32 tribute_master_id; + int32 tribute_points; }; struct TributePoint_Struct { @@ -2622,7 +2632,7 @@ struct Split_Struct */ struct NewCombine_Struct { /*00*/ int16 container_slot; -/*02*/ char unknown02[2]; +/*02*/ int16 guildtribute_slot; /*04*/ }; @@ -3154,6 +3164,11 @@ struct AnnoyingZoneUnknown_Struct { uint32 value; //always 4 }; +struct ApplyPoison_Struct { + uint32 inventorySlot; + uint32 success; +}; + struct GuildMemberUpdate_Struct { /*000*/ uint32 guild_id; //not sure /*004*/ char member_name[64]; diff --git a/common/patches/underfoot.cpp b/common/patches/underfoot.cpp index a1d16f077..0cec336b2 100644 --- a/common/patches/underfoot.cpp +++ b/common/patches/underfoot.cpp @@ -3472,6 +3472,7 @@ namespace Underfoot SETUP_DIRECT_DECODE(NewCombine_Struct, structs::NewCombine_Struct); emu->container_slot = UnderfootToServerSlot(eq->container_slot); + IN(guildtribute_slot); FINISH_DIRECT_DECODE(); } diff --git a/common/patches/underfoot_structs.h b/common/patches/underfoot_structs.h index 8226e8fd7..f7716834b 100644 --- a/common/patches/underfoot_structs.h +++ b/common/patches/underfoot_structs.h @@ -519,7 +519,7 @@ struct CastSpell_Struct uint32 spell_id; uint32 inventoryslot; // slot for clicky item, 0xFFFF = normal cast uint32 target_id; - uint32 cs_unknown[5]; + uint32 cs_unknown[5]; }; /* @@ -1505,11 +1505,11 @@ struct BulkItemPacket_Struct struct Consume_Struct { -/*0000*/ uint32 slot; -/*0004*/ uint32 auto_consumed; // 0xffffffff when auto eating e7030000 when right click -/*0008*/ uint8 c_unknown1[4]; -/*0012*/ uint8 type; // 0x01=Food 0x02=Water -/*0013*/ uint8 unknown13[3]; +/*0000*/ uint32 slot; +/*0004*/ uint32 auto_consumed; // 0xffffffff when auto eating e7030000 when right click +/*0008*/ uint8 c_unknown1[4]; +/*0012*/ uint8 type; // 0x01=Food 0x02=Water +/*0013*/ uint8 unknown13[3]; /*0016*/ }; @@ -1539,17 +1539,17 @@ struct ItemProperties_Struct { }; struct DeleteItem_Struct { -/*0000*/ uint32 from_slot; -/*0004*/ uint32 to_slot; -/*0008*/ uint32 number_in_stack; +/*0000*/ uint32 from_slot; +/*0004*/ uint32 to_slot; +/*0008*/ uint32 number_in_stack; /*0012*/ }; struct MoveItem_Struct { -/*0000*/ uint32 from_slot; -/*0004*/ uint32 to_slot; -/*0008*/ uint32 number_in_stack; +/*0000*/ uint32 from_slot; +/*0004*/ uint32 to_slot; +/*0008*/ uint32 number_in_stack; /*0012*/ }; @@ -3129,10 +3129,10 @@ struct TributeInfo_Struct { }; struct TributeItem_Struct { - uint32 slot; - uint32 quantity; - uint32 tribute_master_id; - int32 tribute_points; + uint32 slot; + uint32 quantity; + uint32 tribute_master_id; + int32 tribute_points; }; struct TributePoint_Struct { @@ -3168,7 +3168,7 @@ struct Split_Struct */ struct NewCombine_Struct { /*00*/ int16 container_slot; -/*02*/ char unknown02[2]; +/*02*/ int16 guildtribute_slot; /*04*/ };