mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 02:04:52 +01:00
Core/Auras: Implemented SPELL_AURA_LEARN_SPELL
This commit is contained in:
@@ -263,7 +263,7 @@ NonDefaultConstructible<pAuraEffectHandler> AuraEffectHandler[TOTAL_AURAS]=
|
||||
&AuraEffect::HandleModMeleeRangedSpeedPct, //192 SPELL_AURA_MOD_MELEE_RANGED_HASTE
|
||||
&AuraEffect::HandleModCombatSpeedPct, //193 SPELL_AURA_MELEE_SLOW (in fact combat (any type attack) speed pct)
|
||||
&AuraEffect::HandleNoImmediateEffect, //194 SPELL_AURA_MOD_TARGET_ABSORB_SCHOOL implemented in Unit::CalcAbsorbResist
|
||||
&AuraEffect::HandleNULL, //195 SPELL_AURA_LEARN_SPELL
|
||||
&AuraEffect::HandleLearnSpell, //195 SPELL_AURA_LEARN_SPELL
|
||||
&AuraEffect::HandleNULL, //196 SPELL_AURA_MOD_COOLDOWN - flat mod of spell cooldowns
|
||||
&AuraEffect::HandleNoImmediateEffect, //197 SPELL_AURA_MOD_ATTACKER_SPELL_AND_WEAPON_CRIT_CHANCE implemented in Unit::SpellCriticalBonus Unit::GetUnitCriticalChance
|
||||
&AuraEffect::HandleNULL, //198 SPELL_AURA_MOD_COMBAT_RATING_FROM_COMBAT_RATING
|
||||
@@ -4884,6 +4884,21 @@ void AuraEffect::HandleAuraModFaction(AuraApplication const* aurApp, uint8 mode,
|
||||
}
|
||||
}
|
||||
|
||||
void AuraEffect::HandleLearnSpell(AuraApplication const* aurApp, uint8 mode, bool apply) const
|
||||
{
|
||||
if (!(mode & AURA_EFFECT_HANDLE_REAL))
|
||||
return;
|
||||
|
||||
Player* player = aurApp->GetTarget()->ToPlayer();
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
if (apply)
|
||||
player->LearnSpell(GetMiscValue(), true, 0, true);
|
||||
else
|
||||
player->RemoveSpell(GetMiscValue(), false, false, true);
|
||||
}
|
||||
|
||||
void AuraEffect::HandleComprehendLanguage(AuraApplication const* aurApp, uint8 mode, bool apply) const
|
||||
{
|
||||
if (!(mode & AURA_EFFECT_HANDLE_SEND_FOR_CLIENT_MASK))
|
||||
|
||||
@@ -296,6 +296,7 @@ class TC_GAME_API AuraEffect
|
||||
void HandleForceReaction(AuraApplication const* aurApp, uint8 mode, bool apply) const;
|
||||
void HandleAuraEmpathy(AuraApplication const* aurApp, uint8 mode, bool apply) const;
|
||||
void HandleAuraModFaction(AuraApplication const* aurApp, uint8 mode, bool apply) const;
|
||||
void HandleLearnSpell(AuraApplication const* aurApp, uint8 mode, bool apply) const;
|
||||
void HandleComprehendLanguage(AuraApplication const* aurApp, uint8 mode, bool apply) const;
|
||||
void HandleAuraLinked(AuraApplication const* aurApp, uint8 mode, bool apply) const;
|
||||
void HandleAuraOpenStable(AuraApplication const* aurApp, uint8 mode, bool apply) const;
|
||||
|
||||
Reference in New Issue
Block a user