diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 818e863dd..5eccd943b 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -20984,16 +20984,20 @@ void Player::ConvertRune(uint8 index, RuneType newType) GetSession()->SendPacket(&data); } -void Player::ActivateRunes(RuneType type, uint32 count) +bool Player::ActivateRunes(RuneType type, uint32 count) { + bool modify = false; for(uint32 j = 0; count > 0 && j < MAX_RUNES; ++j) { if (GetRuneCooldown(j) && GetCurrentRune(j) == type) { SetRuneCooldown(j, 0); --count; + modify = true; } } + + return modify; } void Player::ResyncRunes() diff --git a/src/game/Player.h b/src/game/Player.h index 1e70f0117..169d1e759 100644 --- a/src/game/Player.h +++ b/src/game/Player.h @@ -2380,7 +2380,7 @@ class MANGOS_DLL_SPEC Player : public Unit void SetCurrentRune(uint8 index, RuneType currentRune) { m_runes->runes[index].CurrentRune = currentRune; } void SetRuneCooldown(uint8 index, uint16 cooldown) { m_runes->runes[index].Cooldown = cooldown; m_runes->SetRuneState(index, (cooldown == 0) ? true : false); } void ConvertRune(uint8 index, RuneType newType); - void ActivateRunes(RuneType type, uint32 count); + bool ActivateRunes(RuneType type, uint32 count); void ResyncRunes(); void AddRunePower(uint8 index); void InitRunes(); diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index a5875fdb7..a4334ef4c 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -2731,6 +2731,19 @@ void Spell::EffectTriggerSpell(SpellEffectIndex effIndex) pet->CastSpell(pet, 28305, true); return; } + // Empower Rune Weapon + case 53258: + { + // remove cooldown of frost/death, undead/blood activated in main spell + if (unitTarget->GetTypeId() == TYPEID_PLAYER) + { + bool res1 = ((Player*)unitTarget)->ActivateRunes(RUNE_FROST, 2); + bool res2 = ((Player*)unitTarget)->ActivateRunes(RUNE_DEATH, 2); + if (res1 || res2) + ((Player*)unitTarget)->ResyncRunes(); + } + return; + } } // normal case @@ -7913,8 +7926,8 @@ void Spell::EffectActivateRune(SpellEffectIndex eff_idx) return; int32 count = damage; // max amount of reset runes - plr->ActivateRunes(RuneType(m_spellInfo->EffectMiscValue[eff_idx]), count); - plr->ResyncRunes(); + if (plr->ActivateRunes(RuneType(m_spellInfo->EffectMiscValue[eff_idx]), count)) + plr->ResyncRunes(); } void Spell::EffectTitanGrip(SpellEffectIndex eff_idx) diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 941982ff1..170073dfa 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "10547" + #define REVISION_NR "10548" #endif // __REVISION_NR_H__