Core/Spells: Fix some possible crashes in HandleAuraDummy, caster can be null for auras.
This commit is contained in:
@@ -4793,11 +4793,14 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool
|
||||
}
|
||||
break;
|
||||
case 63322: // Saronite Vapors
|
||||
{
|
||||
if (caster)
|
||||
{
|
||||
int32 mana = int32(GetAmount() * pow(2.0f, GetBase()->GetStackAmount())); // mana restore - bp * 2^stackamount
|
||||
int32 damage = mana * 2; // damage
|
||||
caster->CastCustomSpell(target, 63337, &mana, NULL, NULL, true);
|
||||
caster->CastCustomSpell(target, 63338, &damage, NULL, NULL, true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 71563:
|
||||
@@ -4805,9 +4808,8 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool
|
||||
newAura->SetStackAmount(newAura->GetSpellInfo()->StackAmount);
|
||||
break;
|
||||
case 59628: // Tricks of the Trade
|
||||
if (!caster->GetMisdirectionTarget())
|
||||
break;
|
||||
target->SetReducedThreatPercent(100,caster->GetMisdirectionTarget()->GetGUID());
|
||||
if (caster && caster->GetMisdirectionTarget())
|
||||
target->SetReducedThreatPercent(100, caster->GetMisdirectionTarget()->GetGUID());
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -5208,7 +5210,7 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool
|
||||
if (!(mode & AURA_EFFECT_HANDLE_REAL))
|
||||
break;
|
||||
// Sentry Totem
|
||||
if (GetId() == 6495 && caster->GetTypeId() == TYPEID_PLAYER)
|
||||
if (GetId() == 6495 && caster && caster->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
if (apply)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user