Core/Misc: Fix enchants broken in 3aca9e64b3
Compare cast item entry instead of checking cast item spells to fix the exploit mentioned in 3aca9e64b3 without breaking any functionality.
This commit is contained in:
1 parent
3ac4e3033c
commit
2878b0d105
3 files changed
+15
-37
No files matched your search
@@ -2097,6 +2097,7 @@ void Spell::EffectSummonChangeItem(SpellEffIndex effIndex)
|
||||
|
||||
m_CastItem = NULL;
|
||||
m_castItemGUID = 0;
|
||||
m_castItemEntry = 0;
|
||||
|
||||
player->StoreItem(dest, pNewItem, true);
|
||||
return;
|
||||
@@ -2116,6 +2117,7 @@ void Spell::EffectSummonChangeItem(SpellEffIndex effIndex)
|
||||
|
||||
m_CastItem = NULL;
|
||||
m_castItemGUID = 0;
|
||||
m_castItemEntry = 0;
|
||||
|
||||
player->BankItem(dest, pNewItem, true);
|
||||
return;
|
||||
@@ -2139,6 +2141,7 @@ void Spell::EffectSummonChangeItem(SpellEffIndex effIndex)
|
||||
|
||||
m_CastItem = NULL;
|
||||
m_castItemGUID = 0;
|
||||
m_castItemEntry = 0;
|
||||
|
||||
player->EquipItem(dest, pNewItem, true);
|
||||
player->AutoUnequipOffhandIfNeed();
|
||||
|
||||
Reference in new issue
Block a user