[8583] Prevent crash at casting DK spells by non-DK characters.

This commit is contained in:
VladimirMangos 2009-10-02 21:54:10 +04:00
parent 5440deddea
commit e167a567d5
5 changed files with 10 additions and 3 deletions

View file

@ -1972,6 +1972,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...