Core/Auras: Implemented ChangeSpec, ChangeTalent and ChangeGlyph interrupt flags
Port From (https://github.com/TrinityCore/TrinityCore/commit/05037bd936756b8ae553d17fd920ad8316f27487)
This commit is contained in:
@@ -168,7 +168,7 @@ namespace Framework.Constants
|
||||
Ground = 0x08,
|
||||
Transform = 0x10, // NYI
|
||||
Jump = 0x20,
|
||||
ChangeSpec = 0x40, // NYI
|
||||
ChangeSpec = 0x40,
|
||||
AbandonVehicle = 0x80, // NYI
|
||||
StartOfEncounter = 0x100, // NYI
|
||||
EndOfEncounter = 0x200, // NYI
|
||||
@@ -176,8 +176,8 @@ namespace Framework.Constants
|
||||
EnteringInstance = 0x800, // NYI
|
||||
DuelEnd = 0x1000, // NYI
|
||||
LeaveArenaOrBattleground = 0x2000, // NYI
|
||||
ChangeTalent = 0x4000, // NYI
|
||||
ChangeGlyph = 0x8000, // NYI
|
||||
ChangeTalent = 0x4000,
|
||||
ChangeGlyph = 0x8000,
|
||||
SeamlessTransfer = 0x10000, // NYI
|
||||
WarModeLeave = 0x20000, // NYI
|
||||
TouchingGround = 0x40000, // NYI
|
||||
|
||||
@@ -79,6 +79,9 @@ namespace Game.Entities
|
||||
else
|
||||
GetTalentMap(spec)[talent.Id] = learning ? PlayerSpellState.New : PlayerSpellState.Unchanged;
|
||||
|
||||
if (learning)
|
||||
RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags2.ChangeTalent);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -273,6 +276,8 @@ namespace Game.Entities
|
||||
ExitVehicle();
|
||||
RemoveAllControlled();
|
||||
|
||||
RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags2.ChangeSpec);
|
||||
|
||||
// remove single target auras at other targets
|
||||
var scAuras = GetSingleCastAuras();
|
||||
foreach (var aura in scAuras)
|
||||
|
||||
@@ -3076,6 +3076,8 @@ namespace Game.Spells
|
||||
else if (glyphId != 0)
|
||||
glyphs.Add(glyphId);
|
||||
|
||||
player.RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags2.ChangeGlyph);
|
||||
|
||||
GlyphPropertiesRecord glyphProperties = CliDB.GlyphPropertiesStorage.LookupByKey(glyphId);
|
||||
if (glyphProperties != null)
|
||||
player.CastSpell(player, glyphProperties.SpellID, new CastSpellExtraArgs(TriggerCastFlags.FullMask).SetOriginalCastId(m_castId));
|
||||
|
||||
Reference in New Issue
Block a user