Core/Spells: Implement spell queue
Port From (https://github.com/TrinityCore/TrinityCore/commit/27019a62a4294f8dd48d975f85b1907c5adee0e3)
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user