aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormegamage <none@none>2009-07-12 18:00:50 +0800
committermegamage <none@none>2009-07-12 18:00:50 +0800
commit8a0427c70f037d3f5de62996ba3271b197764743 (patch)
tree859a98e9eefe978004f85c91ba6da6ed9931d65a /src
parentd0973d2b9eb96a46f077d8a9dbe5935e72640d42 (diff)
[8160] Now finally correct extraction uint16 enchantment id from uint32. Author: VladimirMangos
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/Player.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index 9cf2011593d..61c943961cf 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -1553,7 +1553,12 @@ bool Player::BuildEnumData( QueryResult * result, WorldPacket * p_data )
uint32 enchants = GetUInt32ValueFromArray(data, visualbase + 1);
for(uint8 enchantSlot = PERM_ENCHANTMENT_SLOT; enchantSlot <= TEMP_ENCHANTMENT_SLOT; ++enchantSlot)
{
- if(enchant = sSpellItemEnchantmentStore.LookupEntry(enchants >> enchantSlot*16))
+ // values stored in 2 uint16
+ uint32 enchantId = 0x0000FFFF & (enchants >> enchantSlot*16);
+ if(!enchantId)
+ continue;
+
+ if(enchant = sSpellItemEnchantmentStore.LookupEntry(enchantId))
break;
}