Core/Auras: Defined and implemented many new interrupt flags
Port From (https://github.com/TrinityCore/TrinityCore/commit/9b5a46ca2bb3a4632cb9914e0899df611a47d935)
This commit is contained in:
@@ -825,6 +825,9 @@ namespace Game
|
||||
pCurrChar.SetInGuild(0);
|
||||
}
|
||||
}
|
||||
|
||||
pCurrChar.RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags.Login);
|
||||
|
||||
pCurrChar.SendInitialPacketsAfterAddToMap();
|
||||
|
||||
PreparedStatement stmt = DB.Characters.GetPreparedStatement(CharStatements.UPD_CHAR_ONLINE);
|
||||
|
||||
@@ -571,9 +571,9 @@ namespace Game
|
||||
if (em == null)
|
||||
return;
|
||||
|
||||
uint emote_anim = em.EmoteId;
|
||||
Emote emoteAnim = (Emote)em.EmoteId;
|
||||
|
||||
switch ((Emote)emote_anim)
|
||||
switch (emoteAnim)
|
||||
{
|
||||
case Emote.StateSleep:
|
||||
case Emote.StateSit:
|
||||
@@ -582,13 +582,13 @@ namespace Game
|
||||
break;
|
||||
case Emote.StateDance:
|
||||
case Emote.StateRead:
|
||||
GetPlayer().SetEmoteState((Emote)emote_anim);
|
||||
GetPlayer().SetEmoteState(emoteAnim);
|
||||
break;
|
||||
default:
|
||||
// Only allow text-emotes for "dead" entities (feign death included)
|
||||
if (GetPlayer().HasUnitState(UnitState.Died))
|
||||
break;
|
||||
GetPlayer().HandleEmoteCommand((Emote)emote_anim);
|
||||
GetPlayer().HandleEmoteCommand(emoteAnim);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -611,6 +611,9 @@ namespace Game
|
||||
if (creature)
|
||||
creature.GetAI().ReceiveEmote(GetPlayer(), (TextEmotes)packet.EmoteID);
|
||||
}
|
||||
|
||||
if (emoteAnim != Emote.OneshotNone)
|
||||
_player.RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags.Anim);
|
||||
}
|
||||
|
||||
[WorldPacketHandler(ClientOpcodes.ChatReportIgnored)]
|
||||
|
||||
@@ -297,6 +297,8 @@ namespace Game
|
||||
// interrupt cast
|
||||
if (GetPlayer().IsNonMeleeSpellCast(false))
|
||||
GetPlayer().InterruptNonMeleeSpells(false);
|
||||
|
||||
GetPlayer().RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags.Looting);
|
||||
}
|
||||
|
||||
[WorldPacketHandler(ClientOpcodes.LootRelease)]
|
||||
|
||||
@@ -137,8 +137,8 @@ namespace Game
|
||||
plrMover.HandleFall(movementInfo);
|
||||
|
||||
// interrupt parachutes upon falling or landing in water
|
||||
if (opcode == ClientOpcodes.MoveFallLand || opcode == ClientOpcodes.MoveStartSwim)
|
||||
mover.RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags.Landing); // Parachutes
|
||||
if (opcode == ClientOpcodes.MoveFallLand || opcode == ClientOpcodes.MoveStartSwim || opcode == ClientOpcodes.MoveSetFly)
|
||||
mover.RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags.LandingOrFlight); // Parachutes
|
||||
|
||||
uint mstime = GameTime.GetGameTimeMS();
|
||||
|
||||
@@ -206,7 +206,7 @@ namespace Game
|
||||
|
||||
if (opcode == ClientOpcodes.MoveJump)
|
||||
{
|
||||
plrMover.RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags.Jump, 605); // Mind Control
|
||||
plrMover.RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags2.Jump); // Mind Control
|
||||
plrMover.ProcSkillsAndAuras(null, ProcFlags.Jump, ProcFlags.None, ProcFlagsSpellType.MaskAll, ProcFlagsSpellPhase.None, ProcFlagsHit.None, null, null, null);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -141,7 +141,7 @@ namespace Game
|
||||
if (factionTemplateEntry != null)
|
||||
GetPlayer().GetReputationMgr().SetVisible(factionTemplateEntry);
|
||||
|
||||
GetPlayer().RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags.Talk);
|
||||
GetPlayer().RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags.Interacting);
|
||||
|
||||
// Stop the npc if moving
|
||||
unit.PauseMovement(WorldConfig.GetUIntValue(WorldCfg.CreatureStopForPlayer));
|
||||
|
||||
@@ -115,6 +115,8 @@ namespace Game
|
||||
}
|
||||
}
|
||||
|
||||
user.RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags.ItemUse);
|
||||
|
||||
SpellCastTargets targets = new(user, packet.Cast);
|
||||
|
||||
// Note: If script stop casting it must send appropriate data to client to prevent stuck item in gray state.
|
||||
|
||||
Reference in New Issue
Block a user