mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-02-07 20:51:09 +00:00
FIX Onyxia Crash (#2062)
Solve these two problems #2043 #1981 @Regrad is the main contributor of the code, while I was just helping to submit the pull request. Express my gratitude to him. After testing, the code is proven to be effective.
This commit is contained in:
@@ -17,7 +17,7 @@ bool OnyxiaDeepBreathTrigger::IsActive()
|
||||
// Check if Onyxia is casting
|
||||
Spell* currentSpell = boss->GetCurrentSpell(CURRENT_GENERIC_SPELL);
|
||||
|
||||
if (!currentSpell)
|
||||
if (!currentSpell || !currentSpell->m_spellInfo)
|
||||
return false;
|
||||
|
||||
uint32 spellId = currentSpell->m_spellInfo->Id;
|
||||
@@ -65,7 +65,7 @@ bool RaidOnyxiaFireballSplashTrigger::IsActive()
|
||||
|
||||
// Check if Onyxia is casting Fireball
|
||||
Spell* currentSpell = boss->GetCurrentSpell(CURRENT_GENERIC_SPELL);
|
||||
if (!currentSpell || currentSpell->m_spellInfo->Id != 18392) // 18392 is the classic Fireball ID
|
||||
if (!currentSpell || !currentSpell->m_spellInfo || currentSpell->m_spellInfo->Id != 18392) // 18392 is the classic Fireball ID // 18392 is the classic Fireball ID
|
||||
return false;
|
||||
|
||||
GuidVector nearbyUnits = AI_VALUE(GuidVector, "nearest friendly players");
|
||||
|
||||
Reference in New Issue
Block a user