Changeset 145 for trunk/src/game/Spell.cpp
- Timestamp:
- 11/19/08 13:40:25 (17 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/game/Spell.cpp
r142 r145 95 95 } 96 96 97 void SpellCastTargets::setDestination(float x, float y, float z, bool send, uint32 mapId)97 void SpellCastTargets::setDestination(float x, float y, float z, bool send, int32 mapId) 98 98 { 99 99 m_destX = x; … … 103 103 if(send) 104 104 m_targetMask |= TARGET_FLAG_DEST_LOCATION; 105 if(mapId )105 if(mapId >= 0) 106 106 m_mapId = mapId; 107 107 } … … 416 416 std::list<Unit*> tmpUnitMap; 417 417 418 // Note: this hack with search required until GO casting not implemented 419 // environment damage spells already have around enemies targeting but this not help in case not existed GO casting support 420 // currently each enemy selected explicitly and self cast damage 421 if(m_spellInfo->EffectImplicitTargetA[i] == TARGET_ALL_AROUND_CASTER 422 && m_spellInfo->EffectImplicitTargetB[i]==TARGET_ALL_ENEMY_IN_AREA 423 && m_spellInfo->Effect[i]==SPELL_EFFECT_ENVIRONMENTAL_DAMAGE) 424 { 425 tmpUnitMap.push_back(m_targets.getUnitTarget()); 426 } 427 else 428 { 429 SetTargetMap(i,m_spellInfo->EffectImplicitTargetA[i],tmpUnitMap); 430 SetTargetMap(i,m_spellInfo->EffectImplicitTargetB[i],tmpUnitMap); 431 } 418 SetTargetMap(i,m_spellInfo->EffectImplicitTargetA[i],tmpUnitMap); 419 SetTargetMap(i,m_spellInfo->EffectImplicitTargetB[i],tmpUnitMap); 432 420 433 421 if(m_targets.HasDest()) … … 717 705 718 706 // Calculate hit result 719 target.missCondition = m_caster->SpellHitResult(pVictim, m_spellInfo, m_canReflect); 707 if(m_originalCaster) 708 target.missCondition = m_originalCaster->SpellHitResult(pVictim, m_spellInfo, m_canReflect); 709 else 710 target.missCondition = SPELL_MISS_NONE; 720 711 if (target.missCondition == SPELL_MISS_NONE) 721 712 ++m_countOfHit; … … 1455 1446 || m_spellInfo->Effect[1] == SPELL_EFFECT_TELEPORT_UNITS 1456 1447 || m_spellInfo->Effect[2] == SPELL_EFFECT_TELEPORT_UNITS) 1457 m_targets.setDestination(st->target_X, st->target_Y, st->target_Z, true, st->target_mapId);1448 m_targets.setDestination(st->target_X, st->target_Y, st->target_Z, true, (int32)st->target_mapId); 1458 1449 else if(st->target_mapId == m_caster->GetMapId()) 1459 1450 m_targets.setDestination(st->target_X, st->target_Y, st->target_Z);