mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-14 09:39:11 +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:
@@ -1171,7 +1171,7 @@ public:
|
||||
|
||||
void CalculateAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& canBeRecalculated)
|
||||
{
|
||||
SpellInfo const* talentSpell = sSpellMgr->GetSpellInfo(SPELL_DK_ANTI_MAGIC_SHELL_TALENT);
|
||||
SpellInfo const* talentSpell = sSpellMgr->AssertSpellInfo(SPELL_DK_ANTI_MAGIC_SHELL_TALENT);
|
||||
amount = talentSpell->Effects[EFFECT_0].CalcValue(GetCaster());
|
||||
if (Unit* totem = GetCaster())
|
||||
if (Unit* owner = totem->ToTotem()->GetSummoner())
|
||||
@@ -2563,7 +2563,7 @@ public:
|
||||
{
|
||||
// min pct of hp is stored in effect 0 of talent spell
|
||||
uint8 rank = GetSpellInfo()->GetRank();
|
||||
SpellInfo const* talentProto = sSpellMgr->GetSpellInfo(sSpellMgr->GetSpellWithRank(SPELL_DK_WILL_OF_THE_NECROPOLIS_TALENT_R1, rank));
|
||||
SpellInfo const* talentProto = sSpellMgr->AssertSpellInfo(sSpellMgr->GetSpellWithRank(SPELL_DK_WILL_OF_THE_NECROPOLIS_TALENT_R1, rank));
|
||||
|
||||
int32 remainingHp = int32(GetTarget()->GetHealth() - dmgInfo.GetDamage());
|
||||
int32 minHp = int32(GetTarget()->CountPctFromMaxHealth(talentProto->Effects[EFFECT_0].CalcValue(GetCaster())));
|
||||
|
||||
Reference in New Issue
Block a user