aboutsummaryrefslogtreecommitdiff
path: root/src/game/Unit.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-05-30 00:09:50 -0500
committermegamage <none@none>2009-05-30 00:09:50 -0500
commit15633ec97e23c9cdf364a9c146150a76a496792e (patch)
treeef8c86bfebfb57b724d2cad6cb9e7869f0b66ea7 /src/game/Unit.cpp
parentd3e1e1eae60caec9fd5962cf2912fcefb48a7809 (diff)
*Fix spell Rune Strike.
--HG-- branch : trunk
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r--src/game/Unit.cpp23
1 files changed, 16 insertions, 7 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index b901f76a7f3..cd199ee76d2 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -9724,12 +9724,21 @@ bool Unit::IsDamageToThreatSpell(SpellEntry const * spellInfo) const
if(!spellInfo)
return false;
- uint32 family = spellInfo->SpellFamilyName;
- uint64 flags = spellInfo->SpellFamilyFlags;
-
- if((family == 5 && flags == 256) || //Searing Pain
- (family == SPELLFAMILY_SHAMAN && flags == SPELLFAMILYFLAG_SHAMAN_FROST_SHOCK))
- return true;
+ switch(spellInfo->SpellFamilyName)
+ {
+ case SPELLFAMILY_WARLOCK:
+ if(spellInfo->SpellFamilyFlags[0] == 0x100) // Searing Pain
+ return true;
+ break;
+ case SPELLFAMILY_SHAMAN:
+ if(spellInfo->SpellFamilyFlags[0] == SPELLFAMILYFLAG_SHAMAN_FROST_SHOCK)
+ return true;
+ break;
+ case SPELLFAMILY_DEATHKNIGHT:
+ if(spellInfo->SpellFamilyFlags[1] == 0x20000000) // Rune Strike
+ return true;
+ break;
+ }
return false;
}
@@ -11718,7 +11727,7 @@ void CharmInfo::InitPetActionBar()
SetActionBar(i,COMMAND_ATTACK - i,ACT_COMMAND);
SetActionBar(i + 7,COMMAND_ATTACK - i,ACT_REACTION);
}
- for(uint32 i = 4; i < 8; ++i)
+ for(uint32 i = 3; i < 7; ++i)
SetActionBar(i,0,ACT_PASSIVE);
}