diff options
| author | megamage <none@none> | 2009-07-12 18:00:50 +0800 |
|---|---|---|
| committer | megamage <none@none> | 2009-07-12 18:00:50 +0800 |
| commit | 8a0427c70f037d3f5de62996ba3271b197764743 (patch) | |
| tree | 859a98e9eefe978004f85c91ba6da6ed9931d65a /src | |
| parent | d0973d2b9eb96a46f077d8a9dbe5935e72640d42 (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.cpp | 7 |
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; } |
