*Fix a crash in latest rev.
--HG-- branch : trunk
This commit is contained in:
+4
-1
@@ -1196,7 +1196,10 @@ void Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask)
|
||||
if (GetSpellDuration(i->first)==-1)
|
||||
// get duration from aura-only once
|
||||
if (!_duration)
|
||||
_duration = unit->GetAuraByCasterSpell(m_spellInfo->Id, m_caster->GetGUID())->GetAuraDuration();
|
||||
{
|
||||
Aura * aur = unit->GetAuraByCasterSpell(m_spellInfo->Id, m_caster->GetGUID());
|
||||
_duration = aur ? aur->GetAuraDuration() : -1;
|
||||
}
|
||||
unit->SetAurasDurationByCasterSpell(i->first->Id, m_caster->GetGUID(), _duration);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -240,9 +240,8 @@ class TRINITY_DLL_SPEC Aura
|
||||
}
|
||||
void SetAuraDurationAndUpdate(int32 duration)
|
||||
{
|
||||
m_duration = duration;
|
||||
if(GetAuraSlot() < MAX_AURAS) // slot found send data to client
|
||||
{ m_target->UpdateAuraForGroup(GetAuraSlot()); }
|
||||
SetAuraDuration (duration);
|
||||
m_target->UpdateAuraForGroup(GetAuraSlot());
|
||||
}
|
||||
time_t GetAuraApplyTime() { return m_applyTime; }
|
||||
|
||||
@@ -269,16 +268,14 @@ class TRINITY_DLL_SPEC Aura
|
||||
if (m_procCharges == charges)
|
||||
return;
|
||||
m_procCharges = charges;
|
||||
if(GetAuraSlot() < MAX_AURAS) // slot found send data to client
|
||||
{ m_target->UpdateAuraForGroup(GetAuraSlot()); }
|
||||
m_target->UpdateAuraForGroup(GetAuraSlot());
|
||||
}
|
||||
bool DropAuraCharge() // return true if last charge dropped
|
||||
{
|
||||
if (m_procCharges == 0)
|
||||
return false;
|
||||
m_procCharges--;
|
||||
if(GetAuraSlot() < MAX_AURAS) // slot found send data to client
|
||||
{ m_target->UpdateAuraForGroup(GetAuraSlot()); }
|
||||
m_target->UpdateAuraForGroup(GetAuraSlot());
|
||||
return m_procCharges == 0;
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -4160,7 +4160,7 @@ void Unit::SetAurasDurationByCasterSpell(uint32 spellId, uint64 casterGUID, int3
|
||||
{
|
||||
if(itr->second->GetCasterGUID()==casterGUID)
|
||||
{
|
||||
itr->second->SetAuraDuration(duration);
|
||||
itr->second->SetAuraDurationAndUpdate(duration);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -6027,7 +6027,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
|
||||
if( spellProto->SpellFamilyName == SPELLFAMILY_ROGUE &&
|
||||
spellProto->SpellFamilyFlags[0] & 0x40000)
|
||||
{
|
||||
RefreshAurasByCasterSpell(spellProto->Id, GetGUID());
|
||||
SetAurasDurationByCasterSpell(spellProto->Id, GetGUID(), GetSpellMaxDuration(spellProto));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user