Scripts/Temple of Anh'Qiraj: Fixed possible crash in mob_anubisath_sentinel
--HG-- branch : trunk
This commit is contained in:
@@ -3435,9 +3435,8 @@ void Unit::_AddAura(UnitAura * aura, Unit * caster)
|
||||
if (Aura * foundAura = GetOwnedAura(aura->GetId(), aura->GetCasterGUID(), aura->GetCastItemGUID(), 0, aura))
|
||||
{
|
||||
if (aura->GetSpellProto()->StackAmount)
|
||||
{
|
||||
aura->ModStackAmount(foundAura->GetStackAmount());
|
||||
}
|
||||
|
||||
// Update periodic timers from the previous aura
|
||||
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
|
||||
{
|
||||
|
||||
@@ -258,13 +258,12 @@ public:
|
||||
|
||||
Unit *GetHatedManaUser() const
|
||||
{
|
||||
std::list<HostileReference*>::const_iterator i;
|
||||
for (i = me->getThreatManager().getThreatList().begin(); i != me->getThreatManager().getThreatList().end(); ++i)
|
||||
{
|
||||
Unit* pUnit = Unit::GetUnit((*me), (*i)->getUnitGuid());
|
||||
if (pUnit->getPowerType() == POWER_MANA)
|
||||
return pUnit;
|
||||
}
|
||||
std::list<HostileReference*> const& threatList = me->getThreatManager().getThreatList();
|
||||
for (std::list<HostileReference*>::const_iterator i = threatList.begin(); i != threatList.end(); ++i)
|
||||
if (Unit* unit = (*i)->getTarget())
|
||||
if (unit->getPowerType() == POWER_MANA)
|
||||
return unit;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user