aboutsummaryrefslogtreecommitdiff
path: root/src/game/SpellEffects.cpp
diff options
context:
space:
mode:
authormaximius <none@none>2009-10-13 23:04:11 -0700
committermaximius <none@none>2009-10-13 23:04:11 -0700
commit075989a8a401ef09d334a149d7d7b4086ff564ae (patch)
tree459562d9755577cbeb2193a19eae65af7036cd64 /src/game/SpellEffects.cpp
parent832159de12964f450d535130856ce213631b5872 (diff)
*Wintergrasp: Set Faction on workshop capture + GO check faction fix, by Spp
--HG-- branch : trunk
Diffstat (limited to 'src/game/SpellEffects.cpp')
-rw-r--r--src/game/SpellEffects.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index 465730eaab6..573ff7acfcb 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -7043,13 +7043,9 @@ void Spell::EffectWMODamage(uint32 /*i*/)
if(!caster)
return;
- const GameObjectInfo *gInfo = objmgr.GetGameObjectInfo(gameObjTarget->GetEntry());
- if (!gInfo)
- return;
-
FactionTemplateEntry const *casterft, *goft;
casterft = caster->getFactionTemplateEntry();
- goft = sFactionTemplateStore.LookupEntry(gInfo->faction);
+ goft = sFactionTemplateStore.LookupEntry(gameObjTarget->GetUInt32Value(GAMEOBJECT_FACTION));
// Do not allow to damage GO's of friendly factions (ie: Wintergrasp Walls)
if (casterft && goft && !casterft->IsFriendlyTo(*goft))
gameObjTarget->TakenDamage((uint32)damage);