mirror of
https://github.com/whoahq/whoa.git
synced 2026-02-01 00:02:45 +03:00
fix(net): correct layout of CHARACTER_INFO struct
This commit is contained in:
parent
7cbda9339f
commit
cc48239bcf
@ -1,6 +1,7 @@
|
||||
#ifndef NET_TYPES_HPP
|
||||
#define NET_TYPES_HPP
|
||||
|
||||
#include "object/Types.hpp"
|
||||
#include <tempest/Vector.hpp>
|
||||
#include <cstdint>
|
||||
|
||||
@ -1186,12 +1187,6 @@ struct REALM_INFO {
|
||||
uint16_t revision;
|
||||
};
|
||||
|
||||
struct INVENTORY_ITEM {
|
||||
uint8_t type;
|
||||
uint32_t displayID;
|
||||
uint32_t auraID;
|
||||
};
|
||||
|
||||
struct CHARACTER_INFO {
|
||||
uint64_t guid;
|
||||
char name[48];
|
||||
@ -1199,7 +1194,9 @@ struct CHARACTER_INFO {
|
||||
uint32_t zoneID;
|
||||
uint32_t guildID;
|
||||
C3Vector position;
|
||||
INVENTORY_ITEM items[23];
|
||||
uint32_t inventoryItemDisplayID[NUM_INVENTORY_SLOTS];
|
||||
uint32_t inventoryItemType[NUM_INVENTORY_SLOTS];
|
||||
uint32_t inventoryItemVisualID[NUM_INVENTORY_SLOTS];
|
||||
uint32_t petDisplayInfoID;
|
||||
uint32_t petExperienceLevel;
|
||||
uint32_t petCreatureFamilyID;
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
#include "net/connection/RealmConnection.hpp"
|
||||
#include "net/connection/RealmResponse.hpp"
|
||||
#include "net/Types.hpp"
|
||||
#include "object/Types.hpp"
|
||||
#include <common/DataStore.hpp>
|
||||
#include <common/SHA1.hpp>
|
||||
#include <storm/String.hpp>
|
||||
@ -246,10 +247,19 @@ int32_t RealmConnection::HandleCharEnum(uint32_t msgId, uint32_t time, CDataStor
|
||||
msg->Get(character.petExperienceLevel);
|
||||
msg->Get(character.petCreatureFamilyID);
|
||||
|
||||
for (auto& item : character.items) {
|
||||
msg->Get(item.displayID);
|
||||
msg->Get(item.type);
|
||||
msg->Get(item.auraID);
|
||||
for (int32_t s = 0; s < NUM_INVENTORY_SLOTS; s++) {
|
||||
uint32_t displayID;
|
||||
msg->Get(displayID);
|
||||
|
||||
uint8_t itemType;
|
||||
msg->Get(itemType);
|
||||
|
||||
uint32_t visualID;
|
||||
msg->Get(visualID);
|
||||
|
||||
character.inventoryItemDisplayID[s] = displayID;
|
||||
character.inventoryItemType[s] = itemType;
|
||||
character.inventoryItemVisualID[s] = visualID;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user