*Temp fix for the crash caused by CastItem.
--HG-- branch : trunk
This commit is contained in:
1 parent
67ea3f3d0a
commit
950a61e2ea
2 files changed
+9
No files matched your search
@@ -2027,6 +2027,11 @@ void Spell::SetTargetMap(uint32 i,uint32 cur,std::list<Unit*> &TagUnitMap)
|
||||
|
||||
void Spell::prepare(SpellCastTargets * targets, Aura* triggeredByAura)
|
||||
{
|
||||
if(m_CastItem)
|
||||
m_castItemGUID = m_CastItem->GetGUID();
|
||||
else
|
||||
m_castItemGUID = 0;
|
||||
|
||||
m_targets = *targets;
|
||||
|
||||
m_spellState = SPELL_STATE_PREPARING;
|
||||
@@ -4986,6 +4991,9 @@ void Spell::UpdatePointers()
|
||||
if(m_originalCaster && !m_originalCaster->IsInWorld()) m_originalCaster = NULL;
|
||||
}
|
||||
|
||||
if(m_castItemGUID && m_caster->GetTypeId() == TYPEID_PLAYER)
|
||||
m_CastItem = ((Player*)m_caster)->GetItemByGuid(m_castItemGUID);
|
||||
|
||||
m_targets.Update(m_caster);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user