Core/Spells: Defined new spell attributes
Port From (https://github.com/TrinityCore/TrinityCore/commit/b2ddf547ff7acd3dab7c93579d8a44fe825c7ecf)
This commit is contained in:
@@ -1537,7 +1537,7 @@ namespace Framework.Constants
|
|||||||
CantTargetInCombat = 0x100, // 8 Can Target Only Out Of Combat Units
|
CantTargetInCombat = 0x100, // 8 Can Target Only Out Of Combat Units
|
||||||
MeleeCombatStart = 0x200, // 9 Player Starts Melee Combat After This Spell Is Cast
|
MeleeCombatStart = 0x200, // 9 Player Starts Melee Combat After This Spell Is Cast
|
||||||
NoThreat = 0x400, // 10 No Generates Threat On Cast 100% (Old NoInitialAggro)
|
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
|
IsPickpocket = 0x1000, // 12 Pickpocket
|
||||||
Farsight = 0x2000, // 13 Client Removes Farsight On Aura Loss
|
Farsight = 0x2000, // 13 Client Removes Farsight On Aura Loss
|
||||||
ChannelTrackTarget = 0x4000, // 14 Client Automatically Forces Player To Face Target When Channeling
|
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
|
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?
|
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.
|
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
|
Unk22 = 0x400000, // 22 Seal Of Command (42058,57770) And Gymer'S Smash 55426
|
||||||
Unk23 = 0x800000, // 23
|
Unk23 = 0x800000, // 23
|
||||||
Unk24 = 0x1000000, // 24 Some Shoot Spell
|
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
|
SingleTargetSpell = 0x20, // 5 Only One Target Can Be Apply At A Time
|
||||||
Unk6 = 0x40, // 6
|
Unk6 = 0x40, // 6
|
||||||
Unk7 = 0x80, // 7
|
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
|
StartPeriodicAtApply = 0x200, // 9 Begin Periodic Tick At Aura Apply
|
||||||
HideDuration = 0x400, // 10 Do Not Send Duration To Client
|
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)
|
AllowTargetOfTargetAsTarget = 0x800, // 11 (Nyi) Uses Target'S Target As Target If Original Target Not Valid (Intervene For Example)
|
||||||
Unk12 = 0x1000, // 12 Cleave Related?
|
Unk12 = 0x1000, // 12 Cleave Related?
|
||||||
HasteAffectDuration = 0x2000, // 13 Haste Effects Decrease Duration Of This
|
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?
|
Unk15 = 0x8000, // 15 Inflits On Multiple Targets?
|
||||||
Unk16 = 0x10000, // 16
|
Unk16 = 0x10000, // 16
|
||||||
UsableWhileFeared = 0x20000, // 17 Usable While Feared
|
UsableWhileFeared = 0x20000, // 17 Usable While Feared
|
||||||
@@ -1854,11 +1854,11 @@ namespace Framework.Constants
|
|||||||
Unk10 = 0x400, // 10
|
Unk10 = 0x400, // 10
|
||||||
HerbGatheringMining = 0x800, // 11
|
HerbGatheringMining = 0x800, // 11
|
||||||
UseSpellBaseLevelForScaling = 0x1000, // 12
|
UseSpellBaseLevelForScaling = 0x1000, // 12
|
||||||
Unk13 = 0x2000, // 13
|
ResetColldownOnEncounterEnd = 0x2000, // 13
|
||||||
Unk14 = 0x4000, // 14
|
Unk14 = 0x4000, // 14
|
||||||
Unk15 = 0x8000, // 15
|
Unk15 = 0x8000, // 15
|
||||||
Unk16 = 0x10000, // 16
|
Unk16 = 0x10000, // 16
|
||||||
Unk17 = 0x20000, // 17
|
CanDodgeParryWhileCasting = 0x20000, // 17
|
||||||
Unk18 = 0x40000, // 18
|
Unk18 = 0x40000, // 18
|
||||||
Unk19 = 0x80000, // 19
|
Unk19 = 0x80000, // 19
|
||||||
Unk20 = 0x100000, // 20
|
Unk20 = 0x100000, // 20
|
||||||
@@ -1887,7 +1887,7 @@ namespace Framework.Constants
|
|||||||
Unk8 = 0x100, // 8
|
Unk8 = 0x100, // 8
|
||||||
Unk9 = 0x200, // 9
|
Unk9 = 0x200, // 9
|
||||||
Unk10 = 0x400, // 10
|
Unk10 = 0x400, // 10
|
||||||
Unk11 = 0x800, // 11
|
NotUsableInInstances = 0x800, // 11
|
||||||
Unk12 = 0x1000, // 12
|
Unk12 = 0x1000, // 12
|
||||||
Unk13 = 0x2000, // 13
|
Unk13 = 0x2000, // 13
|
||||||
Unk14 = 0x4000, // 14
|
Unk14 = 0x4000, // 14
|
||||||
@@ -1934,7 +1934,7 @@ namespace Framework.Constants
|
|||||||
Unk20 = 0x100000, // 20
|
Unk20 = 0x100000, // 20
|
||||||
Unk21 = 0x200000, // 21
|
Unk21 = 0x200000, // 21
|
||||||
Unk22 = 0x400000, // 22
|
Unk22 = 0x400000, // 22
|
||||||
Unk23 = 0x800000, // 23
|
StartCooldownOnCastStart = 0x800000, // 23
|
||||||
IsGarrisonBuff = 0x1000000, // 24
|
IsGarrisonBuff = 0x1000000, // 24
|
||||||
Unk25 = 0x2000000, // 25
|
Unk25 = 0x2000000, // 25
|
||||||
Unk26 = 0x4000000, // 26
|
Unk26 = 0x4000000, // 26
|
||||||
|
|||||||
@@ -3744,7 +3744,7 @@ namespace Game.Entities
|
|||||||
RemoveAppliedAuras(aurApp =>
|
RemoveAppliedAuras(aurApp =>
|
||||||
{
|
{
|
||||||
Aura aura = aurApp.GetBase();
|
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
|
&& !aura.IsPassive() // don't remove passive auras
|
||||||
&& (aurApp.IsPositive() || !aura.GetSpellInfo().HasAttribute(SpellAttr3.DeathPersistent)); // not negative death persistent auras
|
&& (aurApp.IsPositive() || !aura.GetSpellInfo().HasAttribute(SpellAttr3.DeathPersistent)); // not negative death persistent auras
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -881,7 +881,7 @@ namespace Game.Spells
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool refresh = stackAmount >= GetStackAmount();
|
bool refresh = stackAmount >= GetStackAmount() && (m_spellInfo.StackAmount != 0 || !m_spellInfo.HasAttribute(SpellAttr1.DontRefreshDurationOnRecast));
|
||||||
|
|
||||||
// Update stack amount
|
// Update stack amount
|
||||||
SetStackAmount((byte)stackAmount);
|
SetStackAmount((byte)stackAmount);
|
||||||
|
|||||||
@@ -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());
|
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
|
//Containers for channeled spells have to be set
|
||||||
// @todoApply this to all casted spells if needed
|
// @todoApply this to all casted spells if needed
|
||||||
// Why check duration? 29350: channelled triggers channelled
|
// Why check duration? 29350: channelled triggers channelled
|
||||||
@@ -2823,7 +2826,8 @@ namespace Game.Spells
|
|||||||
}
|
}
|
||||||
|
|
||||||
// CAST SPELL
|
// CAST SPELL
|
||||||
SendSpellCooldown();
|
if (!m_spellInfo.HasAttribute(SpellAttr12.StartCooldownOnCastStart))
|
||||||
|
SendSpellCooldown();
|
||||||
|
|
||||||
PrepareScriptHitHandlers();
|
PrepareScriptHitHandlers();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user