Jump to content

[11541] Special case spell target (53, 16)


Guest breakwater

Recommended Posts

Hi,

A double calculation from function "FillAreaTargets"

I think this codelines are useless

spell.cpp Line 2389++

       case TARGET_CURRENT_ENEMY_COORDINATES:
       {
           Unit* currentTarget = m_targets.getUnitTarget();
           if(currentTarget)
           {
               targetUnitMap.push_back(currentTarget);
               m_targets.setDestination(currentTarget->GetPositionX(), currentTarget->GetPositionY(), currentTarget->GetPositionZ());
-                if(m_spellInfo->EffectImplicitTargetB[effIndex] == TARGET_ALL_ENEMY_IN_AREA_INSTANT)
-                    FillAreaTargets(targetUnitMap, radius, PUSH_TARGET_CENTER, SPELL_TARGETS_AOE_DAMAGE);
           }
           break;
       }

because

in spell.cpp Line 636 + 637

settargetmap start with target 53 (TARGET_CURRENT_ENEMY_COORDINATES) and 16 (TARGET_ALL_ENEMY_IN_AREA_INSTANT)

remember first function with target 53 (TARGET_CURRENT_ENEMY_COORDINATES)

this function make the current target to Destination (look in the code above)

the second function with target 16 (TARGET_ALL_ENEMY_IN_AREA_INSTANT)

looks so

 case TARGET_ALL_ENEMY_IN_AREA_INSTANT:
       {
           // targets the ground, not the units in the area
           switch(m_spellInfo->Effect[effIndex])
           {
               case SPELL_EFFECT_PERSISTENT_AREA_AURA:
                   break;
               case SPELL_EFFECT_SUMMON:
                   targetUnitMap.push_back(m_caster);
                   break;
               default:
                   FillAreaTargets(targetUnitMap, radius, PUSH_DEST_CENTER, SPELL_TARGETS_AOE_DAMAGE);
                   break;
           }
           break;
       }

this function fill targetUnitMap with all targets around destination, remember destination is set to target destination. Therefor I think this function is useless

I hope you unterstand me "crazy" way of logical. I have test some spells with this target Combination and in my opinion it's still works

What is your opinion?

I found the problem, when i start fixing the spell 63278 and the remove of target

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use