diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 919e88137..d10779d2c 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -1982,6 +1982,9 @@ void Player::Regenerate(Powers power, uint32 diff) } break; case POWER_RUNE: { + if (getClass() != CLASS_DEATH_KNIGHT) + break; + for(uint32 i = 0; i < MAX_RUNES; ++i) { if(uint16 cd = GetRuneCooldown(i)) // if we have cooldown, reduce it... diff --git a/src/game/Player.h b/src/game/Player.h index 5c75c6231..41d852f85 100644 --- a/src/game/Player.h +++ b/src/game/Player.h @@ -2224,6 +2224,8 @@ class MANGOS_DLL_SPEC Player : public Unit bool isAllowedToLoot(Creature* creature); DeclinedName const* GetDeclinedNames() const { return m_declinedname; } + + // Rune functions, need check getClass() == CLASS_DEATH_KNIGHT before access uint8 GetRunesState() const { return m_runes->runeState; } RuneType GetBaseRune(uint8 index) const { return RuneType(m_runes->runes[index].BaseRune); } RuneType GetCurrentRune(uint8 index) const { return RuneType(m_runes->runes[index].CurrentRune); } @@ -2236,6 +2238,7 @@ class MANGOS_DLL_SPEC Player : public Unit void ResyncRunes(uint8 count); void AddRunePower(uint8 index); void InitRunes(); + AchievementMgr& GetAchievementMgr() { return m_achievementMgr; } void UpdateAchievementCriteria(AchievementCriteriaTypes type, uint32 miscvalue1=0, uint32 miscvalue2=0, Unit *unit=NULL, uint32 time=0); bool HasTitle(uint32 bitIndex); diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 01699d772..8a68ea7ff 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -3180,7 +3180,7 @@ void Spell::SendSpellGo() if ( castFlags & CAST_FLAG_UNKNOWN7 ) // rune cooldowns list { uint8 v1 = m_runesState; - uint8 v2 = ((Player*)m_caster)->GetRunesState(); + uint8 v2 = m_caster->getClass() == CLASS_DEATH_KNIGHT ? ((Player*)m_caster)->GetRunesState() : 0; data << uint8(v1); // runes state before data << uint8(v2); // runes state after for(uint8 i = 0; i < MAX_RUNES; ++i) diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 3543837a4..55cca34bd 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -7008,7 +7008,8 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggeredB // Blade Barrier if (auraSpellInfo->SpellFamilyName == SPELLFAMILY_DEATHKNIGHT && auraSpellInfo->SpellIconID == 85) { - if (this->GetTypeId() != TYPEID_PLAYER || !((Player*)this)->IsBaseRuneSlotsOnCooldown(RUNE_BLOOD)) + if (GetTypeId() != TYPEID_PLAYER || getClass() != CLASS_DEATH_KNIGHT || + !((Player*)this)->IsBaseRuneSlotsOnCooldown(RUNE_BLOOD)) return false; } diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index cfc2bbbf5..2f2538551 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 "8582" + #define REVISION_NR "8583" #endif // __REVISION_NR_H__