Jump to content

[fix] TARGET_RANDOM_NEARBY_DEST


pasdVn

Recommended Posts

The current implementation of this targetmode in Spell::SetTargetMode is not fully correct, as I think. I listed all spells with those implicit target here. You can see at the combination of target modes, that this target mode is not meant to provide any unit targets, but just a random point around the 'current' target coordinates.

Any effects, that need unit targets always have another target mode (e.g. http://www.wowhead.com/?spell=40649 that searches a random point around the dynamic object coordinates and than has additionally has TARGET_ALL_ENEMY_IN_AREA_INSTANT that gets the unit targets in the area around this random point).

In most cases this mode is used for summon spells. Problem is, that mangos always needs a unit target to do the spell effects (while those summon spells in fact would only need some coordinates to spawn the new object), so I added the caster for positive spells (note: with old implementation no summons as well as multiple spawns are possible, because of aoe unit target detection).

patch: http://github.com/pasdVn/mangos/commit/30f55d3446924871fd4294060b9b76e9ffd11204

The original implementation of this mode was done here.

24.03.2010: Patch rebased onto [9443]

Link to comment
Share on other sites

  • 1 year later...

Hmm, I crashed on this some time ago as well.

But didn't have time to do the research you say you did;

So probably this patch is well and should be implemented.

A few minor issues might remain, no time just now to think about the problem if to add m_caster or not to the target-map.

But to bump this topic that it won't get lost ;)

Link to comment
Share on other sites

There are likely dozens of patches that have suffered a similar fate, where so much time passed that they were either forgotten or became so outdated the fix could no longer be applied.

I wish we had more people willing to step forward and choose to keep a submitted patch maintained with current core code until a review can be done. Maybe a thread listing the patches that would be acceptable if updated would raise awareness and perhaps gain a few volunteers for the "Adopt-A-Patch" idea.

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