mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-17 09:33:51 +00:00
Fix online mode combat and implement server inventory sync
Right-click now attacks hostile NPCs (npcFlags==0) and interacts with friendly ones in online mode. Parse UNIT_FIELD_FLAGS (59) and UNIT_NPC_FLAGS (82) from update packets. Stop auto-attack when target dies or despawns. Add CMSG_ITEM_QUERY_SINGLE/SMSG_ITEM_QUERY_SINGLE_RESPONSE to populate inventory from server item objects and player slot fields.
This commit is contained in:
parent
4d80b92c39
commit
ab1f39c73b
7 changed files with 397 additions and 15 deletions
|
|
@ -715,6 +715,41 @@ public:
|
|||
static bool parse(network::Packet& packet, CreatureQueryResponseData& data);
|
||||
};
|
||||
|
||||
// ============================================================
|
||||
// Item Query
|
||||
// ============================================================
|
||||
|
||||
/** CMSG_ITEM_QUERY_SINGLE packet builder */
|
||||
class ItemQueryPacket {
|
||||
public:
|
||||
static network::Packet build(uint32_t entry, uint64_t guid);
|
||||
};
|
||||
|
||||
/** SMSG_ITEM_QUERY_SINGLE_RESPONSE data */
|
||||
struct ItemQueryResponseData {
|
||||
uint32_t entry = 0;
|
||||
std::string name;
|
||||
uint32_t displayInfoId = 0;
|
||||
uint32_t quality = 0;
|
||||
uint32_t inventoryType = 0;
|
||||
int32_t maxStack = 1;
|
||||
uint32_t containerSlots = 0;
|
||||
int32_t armor = 0;
|
||||
int32_t stamina = 0;
|
||||
int32_t strength = 0;
|
||||
int32_t agility = 0;
|
||||
int32_t intellect = 0;
|
||||
int32_t spirit = 0;
|
||||
std::string subclassName;
|
||||
bool valid = false;
|
||||
};
|
||||
|
||||
/** SMSG_ITEM_QUERY_SINGLE_RESPONSE parser */
|
||||
class ItemQueryResponseParser {
|
||||
public:
|
||||
static bool parse(network::Packet& packet, ItemQueryResponseData& data);
|
||||
};
|
||||
|
||||
// ============================================================
|
||||
// Phase 2: Combat Core
|
||||
// ============================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue