diff options
author | megamage <none@none> | 2008-12-09 10:20:02 -0600 |
---|---|---|
committer | megamage <none@none> | 2008-12-09 10:20:02 -0600 |
commit | d3c2c31e2ed7d27e64a09d804d2222ad20715574 (patch) | |
tree | b9c73b7da51266a94cecc10f11c5caeb03f98f96 /src | |
parent | b5476118f28bbeb79abf0219b861773a024b28a5 (diff) |
*Fix the bug that some creature spells are broken.
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/game/Unit.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 40ed45d027b..5c41ecaf9be 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -862,15 +862,15 @@ void Unit::CastSpell(Unit* Victim,SpellEntry const *spellInfo, bool triggered, I SpellCastTargets targets; uint32 targetMask = spellInfo->Targets; - if(targetMask & (TARGET_FLAG_UNIT|TARGET_FLAG_UNK2)) + targets.setUnitTarget(Victim); + /*if(targetMask & (TARGET_FLAG_UNIT|TARGET_FLAG_UNK2)) { if(!Victim) { sLog.outError("CastSpell: spell id %i by caster: %s %u) does not have unit target", spellInfo->Id,(GetTypeId()==TYPEID_PLAYER ? "player (GUID:" : "creature (Entry:"),(GetTypeId()==TYPEID_PLAYER ? GetGUIDLow() : GetEntry())); return; } - targets.setUnitTarget(Victim); - } + }*/ if(targetMask & (TARGET_FLAG_SOURCE_LOCATION|TARGET_FLAG_DEST_LOCATION)) { if(!Victim) @@ -916,15 +916,15 @@ void Unit::CastCustomSpell(Unit* Victim,SpellEntry const *spellInfo, int32 const SpellCastTargets targets; uint32 targetMask = spellInfo->Targets; - if(targetMask & (TARGET_FLAG_UNIT|TARGET_FLAG_UNK2)) + targets.setUnitTarget(Victim); + /*if(targetMask & (TARGET_FLAG_UNIT|TARGET_FLAG_UNK2)) { if(!Victim) { sLog.outError("CastCustomSpell: spell id %i by caster: %s %u) does not have unit target", spellInfo->Id,(GetTypeId()==TYPEID_PLAYER ? "player (GUID:" : "creature (Entry:"),(GetTypeId()==TYPEID_PLAYER ? GetGUIDLow() : GetEntry())); return; } - targets.setUnitTarget(Victim); - } + }*/ if(targetMask & (TARGET_FLAG_SOURCE_LOCATION|TARGET_FLAG_DEST_LOCATION)) { if(!Victim) |