mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-31 09:33:47 +00:00
feat(Core/Spell): AssertSpellInfo (#6115)
* feat(Core/Spell): AssertSpellInfo (cherry picked from commite52878b6b5) (cherry picked from commit8c44259fae) Co-Authored-By: Shauren <shauren.trinity@gmail.com> Co-Authored-By: Giacomo Pozzoni <giacomopoz@gmail.com> * Update SpellMgr.h
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user