Jump to content

[Patch] CastFlags instead of bool triggered


Guest kid 10

Recommended Posts

What features does the patch add?

It adds the possibility to send castflags with castspell() into the spell class.

This has the advantage that we can use castspell() with more than one option,

an example for an later option would be CAST_IGNORE_POWER or CAST_OUT_OF_RANGE.

Unfortunately, I had to remove vladimir's template trap, because the trap catched the castflags constants and didn't let them convert into uint32.

* For which repository revision was the patch created?

MaNGOS r10974

* Is there a thread in the bug report section or at lighthouse? If yes, please add a link to the thread.

No

* Who has been writing this patch? Please include either forum user names or email addresses.

Me, kid 10 <[email protected]>

Patch:

- Part 1 (to make the important functions with castflags compatible)

http://pastebin.com/T77ZY7x6

- Part 2 (triggered true / false replaced with castflags constants)

http://pastebin.com/0KGsN0ky

Feedback, ideas and improvements are welcome. =D

Link to comment
Share on other sites

Hmm, triggered flag gave not very clean semantic traditionally. But it slowly move with code changes to: most week form of triggered link in list with aura triggered, spell triggered cases. So i not think good merge it in enum with unrelated flags.

Maybe be i wrong and just need cleanup it meaning in form diff from "week triggering source case"

Link to comment
Share on other sites

  • 3 weeks later...

a little bump :)

This week I encountered two situations, where I would be very happy to pass a few more arguments to casted spells:

1) DrakTharon keep, novos encounter, there are trigger mobs who must cast a spell through LoS, so I would want to skip the LoS-checking (and I don't want to cast them 'triggered' with current handling) - spell 52106

2) spell 19773 (haven't examined this situation, perhaps this already can be done differntly): this spells instantly kills Majordomo, but sets both majordomo as ragnaros into combat (which I would not want)

Edit: Looked at the spell of 1), it has "SPELL_ATTR_EX2_CANT_REFLECTED 0x00000004 // 2 ? used for detect can or not spell reflected // do not need LOS (e.g. 18220 since 3.3.3)" - so _if_ we change this spell attribute to behave to ignore LoS, this spell would be working I guess

Link to comment
Share on other sites

  • 3 months later...
This attribute is clearly wrong as "can't reflected", so maybe it is "ignore LoS"...

i can confirm. For example spell 7720 that is placed in mangosd.conf as spell that should ignore LOS has this flag ;) There also some pet spells 7812 (voidwalker's Sacrifice), 48743 (death pact) - they also has this flag and should ignore LOS (i've already asked about this from offy players - they confirms)

I'm only not sure about Seed of Corruption explode spell - maybe it should only make you able to cast spell through walls but shouldn't make damage to targets of effects that stays near your victim

think reflecting should be only checked by spell damage class and by some other generic checks

Link to comment
Share on other sites

  • 1 month later...
×
×
  • 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