Core/Misc: Fix exploit
Fix exploit that allowed to duplicate stackable splitable items. If the item that cast the spell can't be found anymore, the spell is cancelled. Fixes https://github.com/TrinityCore/TrinityCore/issues/11977
This commit is contained in:
1 parent
d7b1405725
commit
720c3cbbd0
3 files changed
+33
-6
No files matched your search
@@ -2096,6 +2096,7 @@ void Spell::EffectSummonChangeItem(SpellEffIndex effIndex)
|
||||
m_targets.SetItemTarget(NULL);
|
||||
|
||||
m_CastItem = NULL;
|
||||
m_castItemGUID = 0;
|
||||
|
||||
player->StoreItem(dest, pNewItem, true);
|
||||
return;
|
||||
@@ -2114,6 +2115,7 @@ void Spell::EffectSummonChangeItem(SpellEffIndex effIndex)
|
||||
m_targets.SetItemTarget(NULL);
|
||||
|
||||
m_CastItem = NULL;
|
||||
m_castItemGUID = 0;
|
||||
|
||||
player->BankItem(dest, pNewItem, true);
|
||||
return;
|
||||
@@ -2136,6 +2138,7 @@ void Spell::EffectSummonChangeItem(SpellEffIndex effIndex)
|
||||
m_targets.SetItemTarget(NULL);
|
||||
|
||||
m_CastItem = NULL;
|
||||
m_castItemGUID = 0;
|
||||
|
||||
player->EquipItem(dest, pNewItem, true);
|
||||
player->AutoUnequipOffhandIfNeed();
|
||||
|
||||
Reference in new issue
Block a user