mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 00:48:56 +01:00
Core/Spells: Defined new spell attributes
This commit is contained in:
@@ -419,7 +419,7 @@ enum SpellAttr1
|
||||
SPELL_ATTR1_CANT_TARGET_IN_COMBAT = 0x00000100, // 8 can target only out of combat units
|
||||
SPELL_ATTR1_MELEE_COMBAT_START = 0x00000200, // 9 player starts melee combat after this spell is cast
|
||||
SPELL_ATTR1_NO_THREAT = 0x00000400, // 10 no generates threat on cast 100% (old NO_INITIAL_AGGRO)
|
||||
SPELL_ATTR1_UNK11 = 0x00000800, // 11 aura
|
||||
SPELL_ATTR1_DONT_REFRESH_DURATION_ON_RECAST = 0x00000800, // 11 aura will not refresh its duration when recast
|
||||
SPELL_ATTR1_IS_PICKPOCKET = 0x00001000, // 12 Pickpocket
|
||||
SPELL_ATTR1_FARSIGHT = 0x00002000, // 13 Client removes farsight on aura loss
|
||||
SPELL_ATTR1_CHANNEL_TRACK_TARGET = 0x00004000, // 14 Client automatically forces player to face target when channeling
|
||||
@@ -537,7 +537,7 @@ enum SpellAttr4
|
||||
SPELL_ATTR4_AREA_TARGET_CHAIN = 0x00040000, // 18 (NYI)hits area targets one after another instead of all at once
|
||||
SPELL_ATTR4_UNK19 = 0x00080000, // 19 proc dalayed, after damage or don't proc on absorb?
|
||||
SPELL_ATTR4_NOT_CHECK_SELFCAST_POWER = 0x00100000, // 20 supersedes message "More powerful spell applied" for self casts.
|
||||
SPELL_ATTR4_UNK21 = 0x00200000, // 21 Pally aura, dk presence, dudu form, warrior stance, shadowform, hunter track
|
||||
SPELL_ATTR4_DONT_REMOVE_IN_ARENA = 0x00200000, // 21 Pally aura, dk presence, dudu form, warrior stance, shadowform, hunter track
|
||||
SPELL_ATTR4_UNK22 = 0x00400000, // 22 Seal of Command (42058, 57770) and Gymer's Smash 55426
|
||||
SPELL_ATTR4_UNK23 = 0x00800000, // 23
|
||||
SPELL_ATTR4_UNK24 = 0x01000000, // 24 some shoot spell
|
||||
@@ -560,13 +560,13 @@ enum SpellAttr5
|
||||
SPELL_ATTR5_SINGLE_TARGET_SPELL = 0x00000020, // 5 Only one target can be apply at a time
|
||||
SPELL_ATTR5_UNK6 = 0x00000040, // 6
|
||||
SPELL_ATTR5_UNK7 = 0x00000080, // 7
|
||||
SPELL_ATTR5_UNK8 = 0x00000100, // 8
|
||||
SPELL_ATTR5_CANT_TARGET_PLAYER_CONTROLLED = 0x00000100, // 8 cannot target player controlled units but can target players
|
||||
SPELL_ATTR5_START_PERIODIC_AT_APPLY = 0x00000200, // 9 begin periodic tick at aura apply
|
||||
SPELL_ATTR5_HIDE_DURATION = 0x00000400, // 10 do not send duration to client
|
||||
SPELL_ATTR5_ALLOW_TARGET_OF_TARGET_AS_TARGET = 0x00000800, // 11 (NYI) uses target's target as target if original target not valid (intervene for example)
|
||||
SPELL_ATTR5_UNK12 = 0x00001000, // 12 Cleave related?
|
||||
SPELL_ATTR5_HASTE_AFFECT_DURATION = 0x00002000, // 13 haste effects decrease duration of this
|
||||
SPELL_ATTR5_UNK14 = 0x00004000, // 14
|
||||
SPELL_ATTR5_NOT_USABLE_WHILE_CHARMED = 0x00004000, // 14 Charmed units cannot cast this spell
|
||||
SPELL_ATTR5_UNK15 = 0x00008000, // 15 Inflits on multiple targets?
|
||||
SPELL_ATTR5_UNK16 = 0x00010000, // 16
|
||||
SPELL_ATTR5_USABLE_WHILE_FEARED = 0x00020000, // 17 usable while feared
|
||||
@@ -745,11 +745,11 @@ enum SpellAttr10
|
||||
SPELL_ATTR10_UNK10 = 0x00000400, // 10
|
||||
SPELL_ATTR10_HERB_GATHERING_MINING = 0x00000800, // 11 Only Herb Gathering and Mining
|
||||
SPELL_ATTR10_USE_SPELL_BASE_LEVEL_FOR_SCALING= 0x00001000, // 12
|
||||
SPELL_ATTR10_UNK13 = 0x00002000, // 13
|
||||
SPELL_ATTR10_RESET_COOLDOWN_ON_ENCOUNTER_END = 0x00002000, // 13
|
||||
SPELL_ATTR10_UNK14 = 0x00004000, // 14
|
||||
SPELL_ATTR10_UNK15 = 0x00008000, // 15
|
||||
SPELL_ATTR10_UNK16 = 0x00010000, // 16
|
||||
SPELL_ATTR10_UNK17 = 0x00020000, // 17
|
||||
SPELL_ATTR10_CAN_DODGE_PARRY_WHILE_CASTING = 0x00020000, // 17
|
||||
SPELL_ATTR10_UNK18 = 0x00040000, // 18
|
||||
SPELL_ATTR10_UNK19 = 0x00080000, // 19
|
||||
SPELL_ATTR10_UNK20 = 0x00100000, // 20
|
||||
@@ -779,7 +779,7 @@ enum SpellAttr11
|
||||
SPELL_ATTR11_UNK8 = 0x00000100, // 8
|
||||
SPELL_ATTR11_UNK9 = 0x00000200, // 9
|
||||
SPELL_ATTR11_UNK10 = 0x00000400, // 10
|
||||
SPELL_ATTR11_UNK11 = 0x00000800, // 11
|
||||
SPELL_ATTR11_NOT_USABLE_IN_INSTANCES = 0x00000800, // 11
|
||||
SPELL_ATTR11_UNK12 = 0x00001000, // 12
|
||||
SPELL_ATTR11_UNK13 = 0x00002000, // 13
|
||||
SPELL_ATTR11_UNK14 = 0x00004000, // 14
|
||||
@@ -827,7 +827,7 @@ enum SpellAttr12
|
||||
SPELL_ATTR12_UNK20 = 0x00100000, // 20
|
||||
SPELL_ATTR12_UNK21 = 0x00200000, // 21
|
||||
SPELL_ATTR12_UNK22 = 0x00400000, // 22
|
||||
SPELL_ATTR12_UNK23 = 0x00800000, // 23
|
||||
SPELL_ATTR12_START_COOLDOWN_ON_CAST_START = 0x00800000, // 23
|
||||
SPELL_ATTR12_IS_GARRISON_BUFF = 0x01000000, // 24
|
||||
SPELL_ATTR12_UNK25 = 0x02000000, // 25
|
||||
SPELL_ATTR12_UNK26 = 0x04000000, // 26
|
||||
|
||||
@@ -944,7 +944,7 @@ bool Aura::ModStackAmount(int32 num, AuraRemoveMode removeMode /*= AURA_REMOVE_B
|
||||
return true;
|
||||
}
|
||||
|
||||
bool refresh = stackAmount >= GetStackAmount();
|
||||
bool refresh = stackAmount >= GetStackAmount() && (m_spellInfo->StackAmount || !m_spellInfo->HasAttribute(SPELL_ATTR1_DONT_REFRESH_DURATION_ON_RECAST));
|
||||
|
||||
// Update stack amount
|
||||
SetStackAmount(stackAmount);
|
||||
|
||||
@@ -3041,6 +3041,9 @@ void Spell::prepare(SpellCastTargets const* targets, AuraEffect const* triggered
|
||||
|
||||
TC_LOG_DEBUG("spells", "Spell::prepare: spell id %u source %u caster %d customCastFlags %u mask %u", m_spellInfo->Id, m_caster->GetEntry(), m_originalCaster ? m_originalCaster->GetEntry() : -1, _triggeredCastFlags, m_targets.GetTargetMask());
|
||||
|
||||
if (m_spellInfo->HasAttribute(SPELL_ATTR12_START_COOLDOWN_ON_CAST_START))
|
||||
SendSpellCooldown();
|
||||
|
||||
//Containers for channeled spells have to be set
|
||||
/// @todoApply this to all cast spells if needed
|
||||
// Why check duration? 29350: channelled triggers channelled
|
||||
@@ -3300,7 +3303,8 @@ void Spell::_cast(bool skipCheck)
|
||||
}
|
||||
|
||||
// CAST SPELL
|
||||
SendSpellCooldown();
|
||||
if (!m_spellInfo->HasAttribute(SPELL_ATTR12_START_COOLDOWN_ON_CAST_START))
|
||||
SendSpellCooldown();
|
||||
|
||||
PrepareScriptHitHandlers();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user