feat(Core/Spell): AssertSpellInfo (#6115)

* feat(Core/Spell): AssertSpellInfo

(cherry picked from commit e52878b6b5)
(cherry picked from commit 8c44259fae)
Co-Authored-By: Shauren <shauren.trinity@gmail.com>
Co-Authored-By: Giacomo Pozzoni <giacomopoz@gmail.com>

* Update SpellMgr.h
This commit is contained in:
Kitzunu
2021-06-03 07:39:48 +02:00
committed by GitHub
parent 7152ddc82c
commit a75e34c793
15 changed files with 29 additions and 29 deletions

View File

@@ -594,7 +594,7 @@ public:
{
if ((aurEff->GetTickNumber() % 2) == 0)
return;
SpellInfo const* damageSpell = sSpellMgr->GetSpellInfo(SPELL_PACT_OF_THE_DARKFALLEN_DAMAGE);
SpellInfo const* damageSpell = sSpellMgr->AssertSpellInfo(SPELL_PACT_OF_THE_DARKFALLEN_DAMAGE);
int32 damage = damageSpell->Effects[EFFECT_0].CalcValue();
float herobonus = ((GetTarget()->FindMap() && GetTarget()->FindMap()->IsHeroic()) ? 0.2f : 0.0f);
float multiplier = 0.5f + herobonus + 0.1f * uint32(aurEff->GetTickNumber() / 10); // do not convert to 0.01f - we need tick number/10 as INT (damage increases every 10 ticks)

View File

@@ -1958,7 +1958,7 @@ public:
void HandleRemove(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
{
SpellInfo const* damageInfo = sSpellMgr->GetSpellInfo(SPELL_ROCKET_PACK_DAMAGE);
SpellInfo const* damageInfo = sSpellMgr->AssertSpellInfo(SPELL_ROCKET_PACK_DAMAGE);
GetTarget()->CastCustomSpell(SPELL_ROCKET_PACK_DAMAGE, SPELLVALUE_BASE_POINT0, 2 * (damageInfo->Effects[EFFECT_0].CalcValue() + aurEff->GetTickNumber() * aurEff->GetAmplitude()), nullptr, true);
GetTarget()->CastSpell((Unit*)nullptr, SPELL_ROCKET_BURST, true);
}

View File

@@ -1197,7 +1197,7 @@ public:
return;
uint32 triggerSpell = GetSpellInfo()->Effects[aurEff->GetEffIndex()].TriggerSpell;
SpellInfo const* spell = sSpellMgr->GetSpellInfo(triggerSpell);
SpellInfo const* spell = sSpellMgr->AssertSpellInfo(triggerSpell);
spell = sSpellMgr->GetSpellForDifficultyFromSpell(spell, caster);
int32 damage = spell->Effects[EFFECT_0].CalcValue(caster);