diff options
| author | Xanadu <none@none> | 2010-03-19 00:21:57 +0100 |
|---|---|---|
| committer | Xanadu <none@none> | 2010-03-19 00:21:57 +0100 |
| commit | 812874a55bc3b21ae069e283a9c7fd5531aeb751 (patch) | |
| tree | fcc191c56a111d17a08cf9b490723adf5ca8489b /src/game/Unit.cpp | |
| parent | 35a7f4849e161ebab96120a091cce7ed40bb5fc8 (diff) | |
Fixed broken missile visuals in certain DST and SRC type spells (Void Reaver's Arcane Orb and many others). Achieved by fixing wildly incorrect SMSG_SPELL_GO target mask data handling.
--HG--
branch : trunk
Diffstat (limited to 'src/game/Unit.cpp')
| -rw-r--r-- | src/game/Unit.cpp | 58 |
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(); |
