mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 01:08:35 +00:00
fix(Player/SpellQueue): bandaid crashfix (#21103)
This commit is contained in:
@@ -2333,6 +2333,12 @@ void Player::ProcessSpellQueue()
|
||||
{
|
||||
PendingSpellCastRequest& request = SpellQueue.front(); // Peek at the first spell
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(request.spellId);
|
||||
if (!spellInfo)
|
||||
{
|
||||
LOG_ERROR("entities.player", "Player::ProcessSpellQueue: Invalid spell {}", request.spellId);
|
||||
SpellQueue.clear();
|
||||
break;
|
||||
}
|
||||
if (CanExecutePendingSpellCastRequest(spellInfo))
|
||||
{
|
||||
ExecuteOrCancelSpellCastRequest(&request);
|
||||
|
||||
Reference in New Issue
Block a user