fix: Crash (#13241)

This commit is contained in:
Angelo Venturini
2022-10-03 16:14:43 -03:00
committed by GitHub
parent 590525b86c
commit be423a91b5
18 changed files with 190 additions and 165 deletions

View File

@@ -171,8 +171,8 @@ class spell_pet_charge : public AuraScript
{
return ValidateSpellInfo(
{
SPELL_PET_SWOOP,
SPELL_PET_CHARGE
SPELL_PET_SWOOP,
SPELL_PET_CHARGE
});
}
@@ -224,7 +224,7 @@ class spell_pet_guard_dog : public AuraScript
PreventDefaultAction();
Unit* caster = eventInfo.GetActor();
caster->CastSpell((Unit*)nullptr, SPELL_PET_GUARD_DOG_HAPPINESS, true);
caster->CastSpell((Unit*)nullptr, SPELL_PET_GUARD_DOG_HAPPINESS, true, nullptr, aurEff);
float addThreat = CalculatePct(eventInfo.GetSpellInfo()->Effects[EFFECT_0].CalcValue(caster), aurEff->GetAmount());
eventInfo.GetProcTarget()->AddThreat(caster, addThreat);
@@ -258,14 +258,14 @@ class spell_pet_silverback : public AuraScript
return true;
}
void HandleProc(AuraEffect const* /* aurEff */, ProcEventInfo& eventInfo)
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
{
static uint32 const triggerSpell[2] = { SPELL_PET_SILVERBACK_RANK_1, SPELL_PET_SILVERBACK_RANK_2 };
PreventDefaultAction();
uint32 spellId = triggerSpell[GetSpellInfo()->GetRank() - 1];
eventInfo.GetActor()->CastSpell((Unit*)nullptr, spellId, true);
eventInfo.GetActor()->CastSpell((Unit*)nullptr, spellId, true, nullptr, aurEff);
}
void Register() override