diff --git a/Source/Framework/Constants/Spells/SpellConst.cs b/Source/Framework/Constants/Spells/SpellConst.cs index 630a8ce1b..c77b0dee5 100644 --- a/Source/Framework/Constants/Spells/SpellConst.cs +++ b/Source/Framework/Constants/Spells/SpellConst.cs @@ -1537,7 +1537,7 @@ namespace Framework.Constants CantTargetInCombat = 0x100, // 8 Can Target Only Out Of Combat Units MeleeCombatStart = 0x200, // 9 Player Starts Melee Combat After This Spell Is Cast NoThreat = 0x400, // 10 No Generates Threat On Cast 100% (Old NoInitialAggro) - Unk11 = 0x800, // 11 Aura + DontRefreshDurationOnRecast = 0x800, // 11 aura will not refresh its duration when recast IsPickpocket = 0x1000, // 12 Pickpocket Farsight = 0x2000, // 13 Client Removes Farsight On Aura Loss ChannelTrackTarget = 0x4000, // 14 Client Automatically Forces Player To Face Target When Channeling @@ -1652,7 +1652,7 @@ namespace Framework.Constants AreaTargetChain = 0x40000, // 18 (Nyi)Hits Area Targets One After Another Instead Of All At Once Unk19 = 0x80000, // 19 Proc Dalayed, After Damage Or Don'T Proc On Absorb? NotCheckSelfcastPower = 0x100000, // 20 Supersedes Message "More Powerful Spell Applied" For Self Casts. - Unk21 = 0x200000, // 21 Pally Aura, Dk Presence, Dudu Form, Warrior Stance, Shadowform, Hunter Track + DontRemoveInArena = 0x200000, // 21 Pally Aura, Dk Presence, Dudu Form, Warrior Stance, Shadowform, Hunter Track Unk22 = 0x400000, // 22 Seal Of Command (42058,57770) And Gymer'S Smash 55426 Unk23 = 0x800000, // 23 Unk24 = 0x1000000, // 24 Some Shoot Spell @@ -1674,13 +1674,13 @@ namespace Framework.Constants SingleTargetSpell = 0x20, // 5 Only One Target Can Be Apply At A Time Unk6 = 0x40, // 6 Unk7 = 0x80, // 7 - Unk8 = 0x100, // 8 + CantTargetPlayerControlled = 0x100, // 8 cannot target player controlled units but can target players StartPeriodicAtApply = 0x200, // 9 Begin Periodic Tick At Aura Apply HideDuration = 0x400, // 10 Do Not Send Duration To Client AllowTargetOfTargetAsTarget = 0x800, // 11 (Nyi) Uses Target'S Target As Target If Original Target Not Valid (Intervene For Example) Unk12 = 0x1000, // 12 Cleave Related? HasteAffectDuration = 0x2000, // 13 Haste Effects Decrease Duration Of This - Unk14 = 0x4000, // 14 + NotUsableWhileCharmed = 0x4000, // 14 Charmed units cannot cast this spell Unk15 = 0x8000, // 15 Inflits On Multiple Targets? Unk16 = 0x10000, // 16 UsableWhileFeared = 0x20000, // 17 Usable While Feared @@ -1854,11 +1854,11 @@ namespace Framework.Constants Unk10 = 0x400, // 10 HerbGatheringMining = 0x800, // 11 UseSpellBaseLevelForScaling = 0x1000, // 12 - Unk13 = 0x2000, // 13 + ResetColldownOnEncounterEnd = 0x2000, // 13 Unk14 = 0x4000, // 14 Unk15 = 0x8000, // 15 Unk16 = 0x10000, // 16 - Unk17 = 0x20000, // 17 + CanDodgeParryWhileCasting = 0x20000, // 17 Unk18 = 0x40000, // 18 Unk19 = 0x80000, // 19 Unk20 = 0x100000, // 20 @@ -1887,7 +1887,7 @@ namespace Framework.Constants Unk8 = 0x100, // 8 Unk9 = 0x200, // 9 Unk10 = 0x400, // 10 - Unk11 = 0x800, // 11 + NotUsableInInstances = 0x800, // 11 Unk12 = 0x1000, // 12 Unk13 = 0x2000, // 13 Unk14 = 0x4000, // 14 @@ -1934,7 +1934,7 @@ namespace Framework.Constants Unk20 = 0x100000, // 20 Unk21 = 0x200000, // 21 Unk22 = 0x400000, // 22 - Unk23 = 0x800000, // 23 + StartCooldownOnCastStart = 0x800000, // 23 IsGarrisonBuff = 0x1000000, // 24 Unk25 = 0x2000000, // 25 Unk26 = 0x4000000, // 26 diff --git a/Source/Game/Entities/Unit/Unit.Spells.cs b/Source/Game/Entities/Unit/Unit.Spells.cs index 1a7a108f6..8cc733173 100644 --- a/Source/Game/Entities/Unit/Unit.Spells.cs +++ b/Source/Game/Entities/Unit/Unit.Spells.cs @@ -3744,7 +3744,7 @@ namespace Game.Entities RemoveAppliedAuras(aurApp => { Aura aura = aurApp.GetBase(); - return !aura.GetSpellInfo().HasAttribute(SpellAttr4.Unk21) // don't remove stances, shadowform, pally/hunter auras + return !aura.GetSpellInfo().HasAttribute(SpellAttr4.DontRemoveInArena) // don't remove stances, shadowform, pally/hunter auras && !aura.IsPassive() // don't remove passive auras && (aurApp.IsPositive() || !aura.GetSpellInfo().HasAttribute(SpellAttr3.DeathPersistent)); // not negative death persistent auras }); diff --git a/Source/Game/Spells/Auras/Aura.cs b/Source/Game/Spells/Auras/Aura.cs index f2371794f..6c07fed8c 100644 --- a/Source/Game/Spells/Auras/Aura.cs +++ b/Source/Game/Spells/Auras/Aura.cs @@ -881,7 +881,7 @@ namespace Game.Spells return true; } - bool refresh = stackAmount >= GetStackAmount(); + bool refresh = stackAmount >= GetStackAmount() && (m_spellInfo.StackAmount != 0 || !m_spellInfo.HasAttribute(SpellAttr1.DontRefreshDurationOnRecast)); // Update stack amount SetStackAmount((byte)stackAmount); diff --git a/Source/Game/Spells/Spell.cs b/Source/Game/Spells/Spell.cs index 759d3a16f..e1c8e3d12 100644 --- a/Source/Game/Spells/Spell.cs +++ b/Source/Game/Spells/Spell.cs @@ -2539,6 +2539,9 @@ namespace Game.Spells Log.outDebug(LogFilter.Spells, "Spell.prepare: spell id {0} source {1} caster {2} customCastFlags {3} mask {4}", m_spellInfo.Id, m_caster.GetEntry(), m_originalCaster != null ? (int)m_originalCaster.GetEntry() : -1, _triggeredCastFlags, m_targets.GetTargetMask()); + if (m_spellInfo.HasAttribute(SpellAttr12.StartCooldownOnCastStart)) + SendSpellCooldown(); + //Containers for channeled spells have to be set // @todoApply this to all casted spells if needed // Why check duration? 29350: channelled triggers channelled @@ -2823,7 +2826,8 @@ namespace Game.Spells } // CAST SPELL - SendSpellCooldown(); + if (!m_spellInfo.HasAttribute(SpellAttr12.StartCooldownOnCastStart)) + SendSpellCooldown(); PrepareScriptHitHandlers();