Core/Spells: Define SPELL_ATTR0_ABILITY (old SPELL_ATTR0_UNK4)
This commit is contained in:
@@ -22929,7 +22929,7 @@ void Player::AddGlobalCooldown(SpellEntry const *spellInfo, Spell* spell)
|
|||||||
|
|
||||||
float cdTime = float(spellInfo->StartRecoveryTime);
|
float cdTime = float(spellInfo->StartRecoveryTime);
|
||||||
|
|
||||||
if (!(spellInfo->Attributes & (SPELL_ATTR0_UNK4|SPELL_ATTR0_PASSIVE)))
|
if (!(spellInfo->Attributes & (SPELL_ATTR0_ABILITY|SPELL_ATTR0_PASSIVE)))
|
||||||
cdTime *= GetFloatValue(UNIT_MOD_CAST_SPEED);
|
cdTime *= GetFloatValue(UNIT_MOD_CAST_SPEED);
|
||||||
else if (IsRangedWeaponSpell(spellInfo) && spell && !spell->IsAutoRepeat())
|
else if (IsRangedWeaponSpell(spellInfo) && spell && !spell->IsAutoRepeat())
|
||||||
cdTime *= m_modAttackSpeedPct[RANGED_ATTACK];
|
cdTime *= m_modAttackSpeedPct[RANGED_ATTACK];
|
||||||
|
|||||||
@@ -13140,7 +13140,7 @@ void Unit::ModSpellCastTime(SpellEntry const* spellProto, int32 & castTime, Spel
|
|||||||
if (Player* modOwner = GetSpellModOwner())
|
if (Player* modOwner = GetSpellModOwner())
|
||||||
modOwner->ApplySpellMod(spellProto->Id, SPELLMOD_CASTING_TIME, castTime, spell);
|
modOwner->ApplySpellMod(spellProto->Id, SPELLMOD_CASTING_TIME, castTime, spell);
|
||||||
|
|
||||||
if (!(spellProto->Attributes & (SPELL_ATTR0_UNK4|SPELL_ATTR0_TRADESPELL)) && spellProto->SpellFamilyName)
|
if (!(spellProto->Attributes & (SPELL_ATTR0_ABILITY|SPELL_ATTR0_TRADESPELL)) && spellProto->SpellFamilyName)
|
||||||
castTime = int32(float(castTime) * GetFloatValue(UNIT_MOD_CAST_SPEED));
|
castTime = int32(float(castTime) * GetFloatValue(UNIT_MOD_CAST_SPEED));
|
||||||
else if (spellProto->Attributes & SPELL_ATTR0_REQ_AMMO && !(spellProto->AttributesEx2 & SPELL_ATTR2_AUTOREPEAT_FLAG))
|
else if (spellProto->Attributes & SPELL_ATTR0_REQ_AMMO && !(spellProto->AttributesEx2 & SPELL_ATTR2_AUTOREPEAT_FLAG))
|
||||||
castTime = int32(float(castTime) * m_modAttackSpeedPct[RANGED_ATTACK]);
|
castTime = int32(float(castTime) * m_modAttackSpeedPct[RANGED_ATTACK]);
|
||||||
|
|||||||
@@ -267,8 +267,8 @@ enum SpellAttr0
|
|||||||
SPELL_ATTR0_REQ_AMMO = 0x00000002, // 1
|
SPELL_ATTR0_REQ_AMMO = 0x00000002, // 1
|
||||||
SPELL_ATTR0_ON_NEXT_SWING = 0x00000004, // 2 on next swing
|
SPELL_ATTR0_ON_NEXT_SWING = 0x00000004, // 2 on next swing
|
||||||
SPELL_ATTR0_UNK3 = 0x00000008, // 3 not set in 3.0.3
|
SPELL_ATTR0_UNK3 = 0x00000008, // 3 not set in 3.0.3
|
||||||
SPELL_ATTR0_UNK4 = 0x00000010, // 4
|
SPELL_ATTR0_ABILITY = 0x00000010, // 4 client puts 'ability' instead of 'spell' in game strings for these spells
|
||||||
SPELL_ATTR0_TRADESPELL = 0x00000020, // 5 trade spells, will be added by client to a sublist of profession spell
|
SPELL_ATTR0_TRADESPELL = 0x00000020, // 5 trade spells (re, will be added by client to a sublist of profession spell
|
||||||
SPELL_ATTR0_PASSIVE = 0x00000040, // 6 Passive spell
|
SPELL_ATTR0_PASSIVE = 0x00000040, // 6 Passive spell
|
||||||
SPELL_ATTR0_HIDDEN_CLIENTSIDE = 0x00000080, // 7 Spells with this attribute are not visible in spellbook or aura bar
|
SPELL_ATTR0_HIDDEN_CLIENTSIDE = 0x00000080, // 7 Spells with this attribute are not visible in spellbook or aura bar
|
||||||
SPELL_ATTR0_HIDE_IN_COMBAT_LOG = 0x00000100, // 8 This attribite controls whether spell appears in combat logs
|
SPELL_ATTR0_HIDE_IN_COMBAT_LOG = 0x00000100, // 8 This attribite controls whether spell appears in combat logs
|
||||||
|
|||||||
@@ -3814,8 +3814,9 @@ void AuraEffect::HandleModTotalPercentStat(AuraApplication const* aurApp, uint8
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//recalculate current HP/MP after applying aura modifications (only for spells with SPELL_ATTR0_UNK4 0x00000010 flag)
|
// recalculate current HP/MP after applying aura modifications (only for spells with SPELL_ATTR0_UNK4 0x00000010 flag)
|
||||||
if (GetMiscValue() == STAT_STAMINA && (m_spellProto->Attributes & SPELL_ATTR0_UNK4))
|
// this check is total bullshit i think
|
||||||
|
if (GetMiscValue() == STAT_STAMINA && (m_spellProto->Attributes & SPELL_ATTR0_ABILITY))
|
||||||
target->SetHealth(std::max<uint32>(uint32(healthPct * target->GetMaxHealth() * 0.01f), (alive ? 1 : 0)));
|
target->SetHealth(std::max<uint32>(uint32(healthPct * target->GetMaxHealth() * 0.01f), (alive ? 1 : 0)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user