mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-17 19:05:42 +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:
@@ -4367,7 +4367,7 @@ bool Player::Has310Flyer(bool checkAllSpells, uint32 excludeSpellId)
|
||||
if (_spell_idx->second->skillId != SKILL_MOUNTS)
|
||||
break; // We can break because mount spells belong only to one skillline (at least 310 flyers do)
|
||||
|
||||
spellInfo = sSpellMgr->GetSpellInfo(itr->first);
|
||||
spellInfo = sSpellMgr->AssertSpellInfo(itr->first);
|
||||
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
|
||||
if (spellInfo->Effects[i].ApplyAuraName == SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED &&
|
||||
spellInfo->Effects[i].CalcValue() == 310)
|
||||
@@ -4408,9 +4408,7 @@ void Player::RemoveArenaSpellCooldowns(bool removeActivePetCooldowns)
|
||||
{
|
||||
next = itr;
|
||||
++next;
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(itr->first);
|
||||
if (!spellInfo) // xinef: impossibru...
|
||||
continue;
|
||||
SpellInfo const* spellInfo = sSpellMgr->AssertSpellInfo(itr->first);
|
||||
|
||||
if (spellInfo->HasAttribute(SPELL_ATTR4_IGNORE_DEFAULT_ARENA_RESTRICTIONS))
|
||||
RemoveSpellCooldown(itr->first, true);
|
||||
@@ -22480,12 +22478,7 @@ void Player::ProhibitSpellSchool(SpellSchoolMask idSchoolMask, uint32 unTimeMs)
|
||||
if (itr->second->State == PLAYERSPELL_REMOVED)
|
||||
continue;
|
||||
uint32 unSpellId = itr->first;
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(unSpellId);
|
||||
if (!spellInfo)
|
||||
{
|
||||
ASSERT(spellInfo);
|
||||
continue;
|
||||
}
|
||||
SpellInfo const* spellInfo = sSpellMgr->AssertSpellInfo(unSpellId);
|
||||
|
||||
// Not send cooldown for this spells
|
||||
if (spellInfo->IsCooldownStartedOnEvent())
|
||||
|
||||
Reference in New Issue
Block a user