aboutsummaryrefslogtreecommitdiff
path: root/src/game/Unit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r--src/game/Unit.cpp58
1 files changed, 0 insertions, 58 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 1b7813d6bbb..affdc47bbc5 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -884,39 +884,8 @@ void Unit::CastSpell(Unit* Victim,SpellEntry const *spellInfo, bool triggered, I
originalCaster=owner->GetGUID();
SpellCastTargets targets;
- uint32 targetMask = spellInfo->Targets;
- //if (targetMask & (TARGET_FLAG_UNIT|TARGET_FLAG_UNK2))
- for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
- {
- if (SpellTargetType[spellInfo->EffectImplicitTargetA[i]] == TARGET_TYPE_UNIT_TARGET)
- {
- /*SpellRangeEntry const* srange = sSpellRangeStore.LookupEntry(spellInfo->rangeIndex);
- if (srange && GetSpellMaxRange(srange) == 0.0f)
- {
- Victim = this;
- break;
- }
- else */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;
- }
- else
- break;
- }
- }
targets.setUnitTarget(Victim);
- if (targetMask & (TARGET_FLAG_SOURCE_LOCATION|TARGET_FLAG_DEST_LOCATION))
- {
- if (!Victim)
- {
- sLog.outError("CastSpell: spell id %i by caster: %s %u) does not have destination", spellInfo->Id,(GetTypeId() == TYPEID_PLAYER ? "player (GUID:" : "creature (Entry:"),(GetTypeId() == TYPEID_PLAYER ? GetGUIDLow() : GetEntry()));
- return;
- }
- targets.setDst(Victim);
- }
-
if (castItem)
DEBUG_LOG("WORLD: cast Item spellId - %i", spellInfo->Id);
@@ -958,35 +927,8 @@ void Unit::CastCustomSpell(uint32 spellId, CustomSpellValues const &value, Unit*
}
SpellCastTargets targets;
- uint32 targetMask = spellInfo->Targets;
-
- //check unit target
- for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
- {
- if (SpellTargetType[spellInfo->EffectImplicitTargetA[i]] == TARGET_TYPE_UNIT_TARGET)
- {
- 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;
- }
- else
- break;
- }
- }
targets.setUnitTarget(Victim);
- //check destination
- if (targetMask & (TARGET_FLAG_SOURCE_LOCATION|TARGET_FLAG_DEST_LOCATION))
- {
- if (!Victim)
- {
- sLog.outError("CastSpell: spell id %i by caster: %s %u) does not have destination", spellInfo->Id,(GetTypeId() == TYPEID_PLAYER ? "player (GUID:" : "creature (Entry:"),(GetTypeId() == TYPEID_PLAYER ? GetGUIDLow() : GetEntry()));
- return;
- }
- targets.setDst(Victim);
- }
-
if (!originalCaster && triggeredByAura)
originalCaster = triggeredByAura->GetCasterGUID();