fix(Player/SpellQueue): bandaid crashfix (#21103)

This commit is contained in:
Jelle Meeus
2025-01-10 23:38:24 +01:00
committed by GitHub
parent e941d43a0a
commit 5bc20a184d

View File

@@ -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);