aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorkillerwife <killerwife@gmail.com>2018-07-20 17:10:57 +0200
committerShauren <shauren.trinity@gmail.com>2018-07-20 17:10:57 +0200
commit330d85bd6362cd3f66dbea72389102449484f8a7 (patch)
treee3c171aac128897c6fae0e2875e1f9ce6f30bbbc /src
parent8a4858bdcfba5b2c9fca27869db72704af39c2e6 (diff)
Core/PacketIO: Fixed SMSG_GUILD_BANK_LIST packet payload for enchantments and sockets (#22177)
Credit for reversing goes to Laizerox
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Guilds/Guild.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/server/game/Guilds/Guild.cpp b/src/server/game/Guilds/Guild.cpp
index ee6cb090d61..80aad9478ea 100644
--- a/src/server/game/Guilds/Guild.cpp
+++ b/src/server/game/Guilds/Guild.cpp
@@ -497,18 +497,18 @@ bool Guild::BankTab::WriteSlotPacket(WorldPacket& data, uint8 slotId, bool ignor
data << uint32(0);
data << uint32(pItem->GetCount()); // ITEM_FIELD_STACK_COUNT
- data << uint32(0);
+ data << uint32(pItem->GetEnchantmentId(PERM_ENCHANTMENT_SLOT)); // Permanent enchantment
data << uint8(abs(pItem->GetSpellCharges())); // Spell charges
uint8 enchCount = 0;
size_t enchCountPos = data.wpos();
data << uint8(enchCount); // Number of enchantments
- for (uint32 i = PERM_ENCHANTMENT_SLOT; i < MAX_ENCHANTMENT_SLOT; ++i)
+ for (uint32 socketSlot = SOCK_ENCHANTMENT_SLOT; socketSlot < SOCK_ENCHANTMENT_SLOT + MAX_GEM_SOCKETS; ++socketSlot)
{
- if (uint32 enchId = pItem->GetEnchantmentId(EnchantmentSlot(i)))
+ if (uint32 enchId = pItem->GetEnchantmentId(EnchantmentSlot(socketSlot)))
{
- data << uint8(i);
+ data << uint8(socketSlot - SOCK_ENCHANTMENT_SLOT);
data << uint32(enchId);
++enchCount;
}