mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[9984] Implement item 43214 work.
* Original version suggested by timmit. * Required DB support for target requirement.
This commit is contained in:
parent
6ce82e4914
commit
86bef7ace5
5 changed files with 27 additions and 17 deletions
|
|
@ -3857,10 +3857,7 @@ void Spell::TakeCastItem()
|
|||
((Player*)m_caster)->DestroyItemCount(m_CastItem, count, true);
|
||||
|
||||
// prevent crash at access to deleted m_targets.getItemTarget
|
||||
if(m_CastItem == m_targets.getItemTarget())
|
||||
m_targets.setItemTarget(NULL);
|
||||
|
||||
m_CastItem = NULL;
|
||||
ClearCastItem();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -6634,4 +6631,12 @@ void Spell::SelectMountByAreaAndSkill(Unit* target, uint32 spellId75, uint32 spe
|
|||
target->CastSpell(target, spellId75, true);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void Spell::ClearCastItem()
|
||||
{
|
||||
if (m_CastItem==m_targets.getItemTarget())
|
||||
m_targets.setItemTarget(NULL);
|
||||
|
||||
m_CastItem = NULL;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue