Core/Spells: Implement spell queue

Port From (https://github.com/TrinityCore/TrinityCore/commit/27019a62a4294f8dd48d975f85b1907c5adee0e3)
This commit is contained in:
hondacrx
2024-02-03 13:11:01 -05:00
parent 284cb628c9
commit a5b8efd032
10 changed files with 390 additions and 192 deletions
+7
View File
@@ -358,6 +358,10 @@ namespace Game.Entities
base.Update(diff);
SetCanDelayTeleport(false);
// Unit::Update updates the spell history and spell states. We can now check if we can launch another pending cast.
if (CanExecutePendingSpellCastRequest())
ExecutePendingSpellCastRequest();
long now = GameTime.GetGameTime();
UpdatePvPFlag(now);
@@ -642,6 +646,9 @@ namespace Game.Entities
return;
}
// clear all pending spell cast requests when dying
CancelPendingCastRequest();
// drunken state is cleared on death
SetDrunkValue(0);