Jump to content

Spell Target Selection Improvement


Recommended Posts

currently many target selection types are bugged, causing many spells bugged. A patch for some types can be found here:

http://getmangos.eu/community/viewtopic.p...20&start=20

SetTargetMap function can be changed as:

// dest type
case 17:
case 22:
case 53:
case ...:
               SetDestination(x,y,z)
               if (!targetB) // teleport, summon or visual spells
                               push_back(caster) 

// area type
case 15:
case 16:
case 30:
               if (dest) // do not know if this check is needed, dest should always be set at this moment
                               GridSearch(dest)

This will clear most redundant codes. For example, if A=53, B=16, first SetTargetMap(A), a dest is set, then SetTargetMap(:cool:, the gridsearch is done with the center=dest

Another example is A=87, B=86, first SetTargetMap(A), the selected dest is set, then SetTargetMap(:cool:, a random dest around A is found, and replace the old one

These are all target types in dbc, some of them need further investigation

TARGET_ means the selected target, DEST_ means a coord, AREA_ means a grid search is needed, NEARBY_ means a random target nearby

1 UNIT_SELF // B=dest

2 NEARBY_ENEMY_CHAIN

3 TARGET_UNIT2 // not sure

4 NEARBY_ALLY

5 UNIT_PET

6 TARGET_ENEMY_CHAIN // B=74,38 only for dummy, or B=17, teleport

7 AREA_ENTRY

8 AREA_ENEMY_GROUND2 // not sure

9 DEST_HOME // only used as B

11 TARGET_PLAYER_DEST_SELF // only used for gm spell 4

15 AREA_ENEMY

16 AREA_ENEMY_GROUND

17 DEST_TABLE

18 DEST_SELF // has ground visual (46263), and ignores range (45848)

20 PARTY_SELF // only used as A

21 TARGET_ALLY

22 DEST_SELF_NOGROUND // no ground visual

23 TARGET_GOBJECT_OPEN

24 CONE_ENEMY

25 TARGET_UNIT // B=37, that is the difference from 6

26 TARGET_GOBJECT_PICKLOCK // also for items

27 UNIT_MASTER

28 AREA_ENEMY_GROUND_PSTAURA // only with effect 27

29 AREA_ALLY_GROUND_PSTAURA // only with effect 27

30 AREA_ALLY

31 AREA_ALLY_GROUND

32 DEST_SUMMON // B=0

33 AREA_PARTY

34 AREA_PARTY_GROUND

36 DEST_SELF_RANDOM2 // radius=0, range<>0

37 PARTY_TARGET // target's party, A=25

38 NEARBY_ENTRY // B=41

39 UNIT_SELF_FISHING

40 TARGET_GOBJECT_USE // only with effect 86 and 3

41 DEST_SELF_FRONT_LEFT

42 DEST_SELF_BACK_LEFT

43 DEST_SELF_BACK_RIGHT

44 DEST_SELF_FRONT_RIGHT

45 TARGET_CHAINHEAL

46 DEST_TABLE2

47 DEST_SELF_FRONT

48 DEST_SELF_BACK

49 DEST_SELF_RIGHT

50 DEST_SELF_LEFT // 39583

51 AREA_GOBJECT // only used as B with A = 22

52 DEST_DUMMY // not sure, seems no real effect

53 DEST_TARGET_ENEMY

54 CONE_ENEMY2

55 DEST_SELF_FRONT_LEAP // only used as B

56 AREA_RAID // only used as B with A=22

57 TARGET_RAIDMEMBER

59 CONE_ALLY

60 AREA_SCRIPT2 // for example, nearest target with certain entry

61 CLASS_TARGET

62 TEST // for a test spell

63 DEST_TARGET_ENEMY2 // cannot find difference from 53

64 DEST_TARGET_FRONT

65 DEST_TARGET_BEHIND

66 DEST_TARGET_RIGHT

67 DEST_TARGET_LEFT

70 DEST_TARGET_ENEMY3 // only for 45105, cannot find difference from 53

72 DEST_SELF_RANDOM

73 DEST_SELF_RADIUS

74 DEST_TARGET_RANDOM // see 39226, 46463

75 DEST_TARGET_RADIUS // see 47690

76 DEST_CHANNEL // blizzard, dest decided by A=28 spell, dest is locked

77 TARGET_CHANNEL // arcane missile, target is locked

78 DEST_SELF_FRONT2 // not sure, only used as B

80 DEST_TABLE3 // only for one spell 42029

86 DEST_DEST_RANDOM

87 DEST_DEST

88 AREA_ENEMY_GROUND_PSTAURA2 // 44475, do not know if can affect ally

90 UNIT_MINIPET

some target types in svn is hacked. For example, 56 is not TARGET_RANDOM_RAID_MEMBER, it is all raid memeber, but some spells using it are "only selected one target" spell. TARGET_EFFECT_SELECT should be dest_self with ground visual. Spells such as blizzard are handled incorrectly. Each wave should casted on the fixed dest by caster (target 76), just as each arcane missile is cased on the fixed target (target 77). But target 76 is even not defined in the svn. Because spell such as blizzard are hacked, periodic_trigger function is not correct and many other non-76 spells are bugged.

Link to comment
Share on other sites

  • 38 years later...

spells like Life Drain (28542) which have spell target 15, should affect only a limited (random?) raid members effect 15 is not only for aoe spells, but I don't found any difference between this spell and others with aoe effects...maybe that behaviour is described by an unused dbc field

Link to comment
Share on other sites

  • 3 weeks later...
Guest
This topic is now closed to further replies.
 Share

×
×
  • 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