mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-08 15:58:04 +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
|
PendingSpellCastRequest& request = SpellQueue.front(); // Peek at the first spell
|
||||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(request.spellId);
|
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))
|
if (CanExecutePendingSpellCastRequest(spellInfo))
|
||||||
{
|
{
|
||||||
ExecuteOrCancelSpellCastRequest(&request);
|
ExecuteOrCancelSpellCastRequest(&request);
|
||||||
|
|||||||
Reference in New Issue
Block a user