Core/Spells: Update CAST_FLAG_NO_GCD flag implementation
Signed-off-by: luis <[email protected]>
This commit is contained in:
@@ -4805,8 +4805,8 @@ void Spell::SendSpellStart()
|
|||||||
&& std::ranges::any_of(m_powerCost, [](SpellPowerCost const& cost) { return cost.Power != POWER_HEALTH; }))
|
&& std::ranges::any_of(m_powerCost, [](SpellPowerCost const& cost) { return cost.Power != POWER_HEALTH; }))
|
||||||
castFlags |= CAST_FLAG_POWER_LEFT_SELF;
|
castFlags |= CAST_FLAG_POWER_LEFT_SELF;
|
||||||
|
|
||||||
if (HasPowerTypeCost(POWER_RUNES))
|
if (m_fromClient)
|
||||||
castFlags |= CAST_FLAG_NO_GCD; // not needed, but Blizzard sends it
|
castFlags |= CAST_FLAG_FROM_CLIENT;
|
||||||
|
|
||||||
if (m_spellInfo->HasAttribute(SPELL_ATTR8_HEAL_PREDICTION) && m_casttime && m_caster->IsUnit())
|
if (m_spellInfo->HasAttribute(SPELL_ATTR8_HEAL_PREDICTION) && m_casttime && m_caster->IsUnit())
|
||||||
castFlags |= CAST_FLAG_HEAL_PREDICTION;
|
castFlags |= CAST_FLAG_HEAL_PREDICTION;
|
||||||
@@ -4908,16 +4908,13 @@ void Spell::SendSpellGo()
|
|||||||
&& (m_caster->ToPlayer()->GetClass() == CLASS_DEATH_KNIGHT)
|
&& (m_caster->ToPlayer()->GetClass() == CLASS_DEATH_KNIGHT)
|
||||||
&& HasPowerTypeCost(POWER_RUNES)
|
&& HasPowerTypeCost(POWER_RUNES)
|
||||||
&& !(_triggeredCastFlags & TRIGGERED_IGNORE_POWER_COST))
|
&& !(_triggeredCastFlags & TRIGGERED_IGNORE_POWER_COST))
|
||||||
{
|
|
||||||
castFlags |= CAST_FLAG_NO_GCD; // not needed, but it's being sent according to sniffs
|
|
||||||
castFlags |= CAST_FLAG_RUNE_LIST; // rune cooldowns list
|
castFlags |= CAST_FLAG_RUNE_LIST; // rune cooldowns list
|
||||||
}
|
|
||||||
|
|
||||||
if (m_targets.HasTraj())
|
if (m_targets.HasTraj())
|
||||||
castFlags |= CAST_FLAG_ADJUST_MISSILE;
|
castFlags |= CAST_FLAG_ADJUST_MISSILE;
|
||||||
|
|
||||||
if (!m_spellInfo->StartRecoveryTime)
|
if (m_fromClient)
|
||||||
castFlags |= CAST_FLAG_NO_GCD;
|
castFlags |= CAST_FLAG_FROM_CLIENT;
|
||||||
|
|
||||||
WorldPackets::Spells::SpellGo packet;
|
WorldPackets::Spells::SpellGo packet;
|
||||||
WorldPackets::Spells::SpellCastData& castData = packet.Cast;
|
WorldPackets::Spells::SpellCastData& castData = packet.Cast;
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ enum SpellCastFlags : uint32
|
|||||||
CAST_FLAG_UNKNOWN_16 = 0x00008000,
|
CAST_FLAG_UNKNOWN_16 = 0x00008000,
|
||||||
CAST_FLAG_UNKNOWN_17 = 0x00010000,
|
CAST_FLAG_UNKNOWN_17 = 0x00010000,
|
||||||
CAST_FLAG_ADJUST_MISSILE = 0x00020000,
|
CAST_FLAG_ADJUST_MISSILE = 0x00020000,
|
||||||
CAST_FLAG_NO_GCD = 0x00040000, // no GCD for spell casts from charm/summon (vehicle spells is an example)
|
CAST_FLAG_FROM_CLIENT = 0x00040000, // no GCD for spell casts from charm/summon (vehicle spells is an example)
|
||||||
CAST_FLAG_VISUAL_CHAIN = 0x00080000,
|
CAST_FLAG_VISUAL_CHAIN = 0x00080000,
|
||||||
CAST_FLAG_UNKNOWN_21 = 0x00100000,
|
CAST_FLAG_UNKNOWN_21 = 0x00100000,
|
||||||
CAST_FLAG_RUNE_LIST = 0x00200000,
|
CAST_FLAG_RUNE_LIST = 0x00200000,
|
||||||
|
|||||||
Reference in New Issue
Block a user