mirror of
https://github.com/mangosfour/server.git
synced 2025-12-18 01:37:01 +00:00
[12191] Update mastery on mastery aura apply/remove.
Add comment to previous commit. Signed-off-by: Yaki Khadafi <elsoldollo@gmail.com>
This commit is contained in:
parent
8726754f7a
commit
6b87ab329b
5 changed files with 17 additions and 3 deletions
|
|
@ -2620,7 +2620,7 @@ inline SkillType SkillByLockType(LockType locktype)
|
|||
{
|
||||
switch (locktype)
|
||||
{
|
||||
case LOCKTYPE_PICKLOCK: return SkillType(MAX_SKILL_TYPE);
|
||||
case LOCKTYPE_PICKLOCK: return SkillType(MAX_SKILL_TYPE); // no skill for such lock, 'skill' value scales with level
|
||||
case LOCKTYPE_HERBALISM: return SKILL_HERBALISM;
|
||||
case LOCKTYPE_MINING: return SKILL_MINING;
|
||||
case LOCKTYPE_FISHING: return SKILL_FISHING;
|
||||
|
|
|
|||
|
|
@ -7581,6 +7581,7 @@ SpellCastResult Spell::CanOpenLock(SpellEffectIndex effIndex, uint32 lockId, Ski
|
|||
reqSkillValue = lockInfo->Skill[j];
|
||||
|
||||
// castitem check: rogue using skeleton keys. the skill values should not be added in this case.
|
||||
// MAX_SKILL_TYPE - skill value scales with caster level
|
||||
if (skillId == MAX_SKILL_TYPE)
|
||||
skillValue = m_CastItem || m_caster->GetTypeId() != TYPEID_PLAYER ? 0 : m_caster->getLevel() * 5;
|
||||
else
|
||||
|
|
|
|||
|
|
@ -371,7 +371,7 @@ pAuraHandler AuraHandler[TOTAL_AURAS] =
|
|||
&Aura::HandleNULL, //315 SPELL_AURA_UNDERWATER_WALKING 4 spells in 4.3.4 underwater walking
|
||||
&Aura::HandleUnused, //316 0 spells in 4.3.4
|
||||
&Aura::HandleNULL, //317 SPELL_AURA_MOD_INCREASE_SPELL_POWER_PCT 13 spells in 4.3.4
|
||||
&Aura::HandleNULL, //318 SPELL_AURA_MASTERY 12 spells in 4.3
|
||||
&Aura::HandleAuraMastery, //318 SPELL_AURA_MASTERY 12 spells in 4.3
|
||||
&Aura::HandleNULL, //319 SPELL_AURA_MOD_MELEE_ATTACK_SPEED 47 spells in 4.3.4
|
||||
&Aura::HandleNULL, //320 SPELL_AURA_MOD_RANGED_ATTACK_SPEED 5 spells in 4.3.4
|
||||
&Aura::HandleNULL, //321 1 spells in 4.3 Hex
|
||||
|
|
@ -8744,6 +8744,18 @@ void Aura::HandleAuraStopNaturalManaRegen(bool apply, bool Real)
|
|||
GetTarget()->ApplyModFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_REGENERATE_POWER, !apply && !GetTarget()->IsUnderLastManaUseEffect());
|
||||
}
|
||||
|
||||
void Aura::HandleAuraMastery(bool apply, bool Real)
|
||||
{
|
||||
if (!Real)
|
||||
return;
|
||||
|
||||
Unit* target = GetTarget();
|
||||
if (target->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
||||
((Player*)target)->UpdateMasteryAuras();
|
||||
}
|
||||
|
||||
bool Aura::IsLastAuraOnHolder()
|
||||
{
|
||||
for (int32 i = 0; i < MAX_EFFECT_INDEX; ++i)
|
||||
|
|
|
|||
|
|
@ -374,6 +374,7 @@ class MANGOS_DLL_SPEC Aura
|
|||
void HandleAuraOpenStable(bool apply, bool Real);
|
||||
void HandleAuraAddMechanicAbilities(bool apply, bool Real);
|
||||
void HandleAuraStopNaturalManaRegen(bool apply, bool Real);
|
||||
void HandleAuraMastery(bool apply, bool Real);
|
||||
|
||||
virtual ~Aura();
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "12190"
|
||||
#define REVISION_NR "12191"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue