diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/game/Player.cpp | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp index af898061aea..529dbd16274 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -6888,14 +6888,19 @@ void Player::_ApplyItemMods(Item *item, uint8 slot,bool apply) if(slot >= INVENTORY_SLOT_BAG_END || !item) return; - // not apply mods for broken item - if(item->IsBroken()) + ItemPrototype const *proto = item->GetProto(); + + if (!proto) return; - ItemPrototype const *proto = item->GetProto(); + // not apply mods for broken item + if (item->IsBroken()) + { + if (proto->Socket[0].Color) + CorrectMetaGemEnchants(slot, apply); - if(!proto) return; + } sLog.outDetail("applying mods for item %u ",item->GetGUIDLow()); @@ -19410,10 +19415,10 @@ bool Player::EnchantmentFitsRequirements(uint32 enchantmentcondition, int8 slot) //counting current equipped gem colors for (uint8 i = EQUIPMENT_SLOT_START; i < EQUIPMENT_SLOT_END; ++i) { - if(i == slot) + if (i == slot) continue; - Item *pItem2 = GetItemByPos( INVENTORY_SLOT_BAG_0, i ); - if(pItem2 && pItem2->GetProto()->Socket[0].Color) + Item *pItem2 = GetItemByPos(INVENTORY_SLOT_BAG_0, i); + if (pItem2 && !pItem2->IsBroken() && pItem2->GetProto()->Socket[0].Color) { for (uint32 enchant_slot = SOCK_ENCHANTMENT_SLOT; enchant_slot < SOCK_ENCHANTMENT_SLOT+3; ++enchant_slot) { |
