mirror of
https://github.com/whoahq/whoa.git
synced 2026-11-27 16:22:32 +03:00
fix(net): correct layout of CHARACTER_INFO struct
This commit is contained in:
2 files changed
+18
-11
No files matched your search
+4
-7
@@ -1,6 +1,7 @@
|
|||||||
#ifndef NET_TYPES_HPP
|
#ifndef NET_TYPES_HPP
|
||||||
#define NET_TYPES_HPP
|
#define NET_TYPES_HPP
|
||||||
|
|
||||||
|
#include "object/Types.hpp"
|
||||||
#include <tempest/Vector.hpp>
|
#include <tempest/Vector.hpp>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
@@ -1186,12 +1187,6 @@ struct REALM_INFO {
|
|||||||
uint16_t revision;
|
uint16_t revision;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct INVENTORY_ITEM {
|
|
||||||
uint8_t type;
|
|
||||||
uint32_t displayID;
|
|
||||||
uint32_t auraID;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct CHARACTER_INFO {
|
struct CHARACTER_INFO {
|
||||||
uint64_t guid;
|
uint64_t guid;
|
||||||
char name[48];
|
char name[48];
|
||||||
@@ -1199,7 +1194,9 @@ struct CHARACTER_INFO {
|
|||||||
uint32_t zoneID;
|
uint32_t zoneID;
|
||||||
uint32_t guildID;
|
uint32_t guildID;
|
||||||
C3Vector position;
|
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 petDisplayInfoID;
|
||||||
uint32_t petExperienceLevel;
|
uint32_t petExperienceLevel;
|
||||||
uint32_t petCreatureFamilyID;
|
uint32_t petCreatureFamilyID;
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
#include "net/connection/RealmConnection.hpp"
|
#include "net/connection/RealmConnection.hpp"
|
||||||
#include "net/connection/RealmResponse.hpp"
|
#include "net/connection/RealmResponse.hpp"
|
||||||
#include "net/Types.hpp"
|
#include "net/Types.hpp"
|
||||||
|
#include "object/Types.hpp"
|
||||||
#include <common/DataStore.hpp>
|
#include <common/DataStore.hpp>
|
||||||
#include <common/SHA1.hpp>
|
#include <common/SHA1.hpp>
|
||||||
#include <storm/String.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.petExperienceLevel);
|
||||||
msg->Get(character.petCreatureFamilyID);
|
msg->Get(character.petCreatureFamilyID);
|
||||||
|
|
||||||
for (auto& item : character.items) {
|
for (int32_t s = 0; s < NUM_INVENTORY_SLOTS; s++) {
|
||||||
msg->Get(item.displayID);
|
uint32_t displayID;
|
||||||
msg->Get(item.type);
|
msg->Get(displayID);
|
||||||
msg->Get(item.auraID);
|
|
||||||
|
uint8_t itemType;
|
||||||
|
msg->Get(itemType);
|
||||||
|
|
||||||
|
uint32_t visualID;
|
||||||
|
msg->Get(visualID);
|
||||||
|
|
||||||
|
character.inventoryItemDisplayID[s] = displayID;
|
||||||
|
character.inventoryItemType[s] = itemType;
|
||||||
|
character.inventoryItemVisualID[s] = visualID;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user