Fix Metagem bug exploit. Thanks Azazel and p.alexej.
Fixes issue #579. Fixes issue #453. --HG-- branch : trunk
This commit is contained in:
+10
-5
@@ -6888,15 +6888,20 @@ 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())
|
||||
return;
|
||||
|
||||
ItemPrototype const *proto = item->GetProto();
|
||||
|
||||
if (!proto)
|
||||
return;
|
||||
|
||||
// not apply mods for broken item
|
||||
if (item->IsBroken())
|
||||
{
|
||||
if (proto->Socket[0].Color)
|
||||
CorrectMetaGemEnchants(slot, apply);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
sLog.outDetail("applying mods for item %u ",item->GetGUIDLow());
|
||||
|
||||
uint8 attacktype = Player::GetAttackBySlot(slot);
|
||||
@@ -19413,7 +19418,7 @@ bool Player::EnchantmentFitsRequirements(uint32 enchantmentcondition, int8 slot)
|
||||
if (i == slot)
|
||||
continue;
|
||||
Item *pItem2 = GetItemByPos(INVENTORY_SLOT_BAG_0, i);
|
||||
if(pItem2 && pItem2->GetProto()->Socket[0].Color)
|
||||
if (pItem2 && !pItem2->IsBroken() && pItem2->GetProto()->Socket[0].Color)
|
||||
{
|
||||
for (uint32 enchant_slot = SOCK_ENCHANTMENT_SLOT; enchant_slot < SOCK_ENCHANTMENT_SLOT+3; ++enchant_slot)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user