aboutsummaryrefslogtreecommitdiff
path: root/src
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
parentd3e1e1eae60caec9fd5962cf2912fcefb48a7809 (diff)
*Fix spell Rune Strike.
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/ObjectMgr.cpp14
-rw-r--r--src/game/Unit.cpp23
2 files changed, 28 insertions, 9 deletions
diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp
index 440ee986f43..52a06ed7e57 100644
--- a/src/game/ObjectMgr.cpp
+++ b/src/game/ObjectMgr.cpp
@@ -2293,8 +2293,18 @@ void ObjectMgr::LoadPlayerInfo()
continue;
}
- PlayerInfo* pInfo = &playerInfo[current_race][current_class];
- pInfo->spell.push_back(fields[2].GetUInt32());
+ if(!current_race || !current_class)
+ {
+ uint32 min_race = current_race ? current_race : 1;
+ uint32 max_race = current_race ? current_race + 1 : MAX_RACES;
+ uint32 min_class = current_class ? current_class : 1;
+ uint32 max_class = current_class ? current_class + 1 : MAX_CLASSES;
+ for(uint32 r = min_race; r < max_race; ++r)
+ for(uint32 c = min_class; c < max_class; ++c)
+ playerInfo[r][c].spell.push_back(fields[2].GetUInt32());
+ }
+ else
+ playerInfo[current_race][current_class].spell.push_back(fields[2].GetUInt32());
bar.step();
++count;
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);
}