diff --git a/src/game/Player.cpp b/src/game/Player.cpp index e6f38020f..1ca36b098 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -19657,6 +19657,16 @@ void Player::InitRunes() SetFloatValue(PLAYER_RUNE_REGEN_1 + i, 0.1f); } + +bool Player::IsBaseRuneSlotsOnCooldown( RuneType runeType ) const +{ + for(uint32 i = 0; i < MAX_RUNES; ++i) + if (GetBaseRune(i) == runeType && GetRuneCooldown(i) == 0) + return false; + + return true; +} + void Player::AutoStoreLoot(uint8 bag, uint8 slot, uint32 loot_id, LootStore const& store, bool broadcast) { Loot loot; diff --git a/src/game/Player.h b/src/game/Player.h index 59bd8fd49..b8973fb9c 100644 --- a/src/game/Player.h +++ b/src/game/Player.h @@ -2209,6 +2209,7 @@ class MANGOS_DLL_SPEC Player : public Unit RuneType GetBaseRune(uint8 index) const { return RuneType(m_runes->runes[index].BaseRune); } RuneType GetCurrentRune(uint8 index) const { return RuneType(m_runes->runes[index].CurrentRune); } uint16 GetRuneCooldown(uint8 index) const { return m_runes->runes[index].Cooldown; } + bool IsBaseRuneSlotsOnCooldown(RuneType runeType) const; void SetBaseRune(uint8 index, RuneType baseRune) { m_runes->runes[index].BaseRune = baseRune; } 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); } diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 6ff290eaf..c5976fb72 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -6986,6 +6986,12 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggeredB break; } } + // Blade Barrier + if (auraSpellInfo->SpellFamilyName == SPELLFAMILY_DEATHKNIGHT && auraSpellInfo->SpellIconID == 85) + { + if (this->GetTypeId() != TYPEID_PLAYER || !((Player*)this)->IsBaseRuneSlotsOnCooldown(RUNE_BLOOD)) + return false; + } // Custom basepoints/target for exist spell // dummy basepoints or other customs diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 61a379546..37e07b1d8 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 "8519" + #define REVISION_NR "8520" #endif // __REVISION_NR_H__