mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-15 18:10:26 +00:00
fix: Crash (#13241)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user