Core/Spells: Implemented SPELL_ATTR6_DELAY_COMBAT_TIMER_DURING_CAST
This commit is contained in:
1 parent
b394faf376
commit
1f60928a51
2 files changed
+15
-8
No files matched your search
@@ -468,13 +468,20 @@ void Unit::Update(uint32 p_time)
|
|||||||
|
|
||||||
m_combatManager.Update(p_time);
|
m_combatManager.Update(p_time);
|
||||||
|
|
||||||
// not implemented before 3.0.2
|
auto spellPausesCombatTimer = [&](CurrentSpellTypes type)
|
||||||
if (uint32 base_att = getAttackTimer(BASE_ATTACK))
|
{
|
||||||
setAttackTimer(BASE_ATTACK, (p_time >= base_att ? 0 : base_att - p_time));
|
return GetCurrentSpell(type) && GetCurrentSpell(type)->GetSpellInfo()->HasAttribute(SPELL_ATTR6_DELAY_COMBAT_TIMER_DURING_CAST);
|
||||||
if (uint32 ranged_att = getAttackTimer(RANGED_ATTACK))
|
};
|
||||||
setAttackTimer(RANGED_ATTACK, (p_time >= ranged_att ? 0 : ranged_att - p_time));
|
|
||||||
if (uint32 off_att = getAttackTimer(OFF_ATTACK))
|
if (!spellPausesCombatTimer(CURRENT_GENERIC_SPELL) && !spellPausesCombatTimer(CURRENT_CHANNELED_SPELL))
|
||||||
setAttackTimer(OFF_ATTACK, (p_time >= off_att ? 0 : off_att - p_time));
|
{
|
||||||
|
if (uint32 base_att = getAttackTimer(BASE_ATTACK))
|
||||||
|
setAttackTimer(BASE_ATTACK, (p_time >= base_att ? 0 : base_att - p_time));
|
||||||
|
if (uint32 ranged_att = getAttackTimer(RANGED_ATTACK))
|
||||||
|
setAttackTimer(RANGED_ATTACK, (p_time >= ranged_att ? 0 : ranged_att - p_time));
|
||||||
|
if (uint32 off_att = getAttackTimer(OFF_ATTACK))
|
||||||
|
setAttackTimer(OFF_ATTACK, (p_time >= off_att ? 0 : off_att - p_time));
|
||||||
|
}
|
||||||
|
|
||||||
// update abilities available only for fraction of time
|
// update abilities available only for fraction of time
|
||||||
UpdateReactives(p_time);
|
UpdateReactives(p_time);
|
||||||
|
|||||||
@@ -589,7 +589,7 @@ enum SpellAttr6 : uint32
|
|||||||
SPELL_ATTR6_NO_JUMP_PATHING = 0x00010000, /*NYI*/ // TITLE No Jump Pathing
|
SPELL_ATTR6_NO_JUMP_PATHING = 0x00010000, /*NYI*/ // TITLE No Jump Pathing
|
||||||
SPELL_ATTR6_ALLOW_EQUIP_WHILE_CASTING = 0x00020000, // TITLE Allow Equip While Casting
|
SPELL_ATTR6_ALLOW_EQUIP_WHILE_CASTING = 0x00020000, // TITLE Allow Equip While Casting
|
||||||
SPELL_ATTR6_ORIGINATE_FROM_CONTROLLER = 0x00040000, // TITLE Originate From Controller DESCRIPTION Client will prevent casting if not possessed, charmer will be caster for all intents and purposes
|
SPELL_ATTR6_ORIGINATE_FROM_CONTROLLER = 0x00040000, // TITLE Originate From Controller DESCRIPTION Client will prevent casting if not possessed, charmer will be caster for all intents and purposes
|
||||||
SPELL_ATTR6_DELAY_COMBAT_TIMER_DURING_CAST = 0x00080000, /*NYI*/ // TITLE Delay Combat Timer During Cast
|
SPELL_ATTR6_DELAY_COMBAT_TIMER_DURING_CAST = 0x00080000, // TITLE Delay Combat Timer During Cast
|
||||||
SPELL_ATTR6_AURA_ICON_ONLY_FOR_CASTER_LIMIT_10 = 0x00100000, // TITLE Aura Icon Only For Caster (Limit 10) (client only)
|
SPELL_ATTR6_AURA_ICON_ONLY_FOR_CASTER_LIMIT_10 = 0x00100000, // TITLE Aura Icon Only For Caster (Limit 10) (client only)
|
||||||
SPELL_ATTR6_SHOW_MECHANIC_AS_COMBAT_TEXT = 0x00200000, // TITLE Show Mechanic as Combat Text (client only)
|
SPELL_ATTR6_SHOW_MECHANIC_AS_COMBAT_TEXT = 0x00200000, // TITLE Show Mechanic as Combat Text (client only)
|
||||||
SPELL_ATTR6_ABSORB_CANNOT_BE_IGNORE = 0x00400000, /*NYI*/ // TITLE Absorb Cannot Be Ignore
|
SPELL_ATTR6_ABSORB_CANNOT_BE_IGNORE = 0x00400000, /*NYI*/ // TITLE Absorb Cannot Be Ignore
|
||||||
|
|||||||
Reference in new issue
Block a user