Jump to content

TARGET_SCRIPT with GO


Recommended Posts

Posted

MANGOS: 9272

I'm not quite shure if it is a bug but when tying to fix issue with Prison Break quest i found something like that:

1) GO arcane prison is casting spell http://thottbot.com/s45447 at use (go template triggered)

2) this spell has effect forcing player to cast http://thottbot.com/s45449 . 45449 has TARGET_SCRIPT implicit target. but when cast of 45449 is processed nothing is happening. It is not applying spell effects. even when trying to .cast 45449 core does not reach void Spell::EffectDummy(uint32 i)

I must confess that i've got custom code in Spell::handle_immediate() ( http://www.pastebin.org/85181 ) checking if lists are not empty so i wondered why m_UniqueGOTargetInfo is empty or filled with null pointer when EffectImplicitTarget is set in spell_script_target ( http://www.pastebin.org/85184 ) and found that after grid searcher finished to lookup for nearest matching target, GO is stored in goScriptTarget but goScriptTarget is not pushed back to AddGOTarget() for TARGET_SCRIPT

when added http://www.pastebin.org/85186 everything works normal now

maybe i misunderstood something in mechanic how this quest should work, but lack of goScriptTarget pushed back to Targets when the same is done for units was confusing for me.

Posted

Bug, or a feature not meant for TARGET_SCRIPT. TARGET_SCRIPT will not work as intended in client when you use a GO as the _target_ for the spell, mainly because the visual effects will not show. I cannot say with 100% certainty it is expected to be creature target in all cases, but research has shown that this is the case so far.

Using GO as target for TARGET_SCRIPT was however the preferred way as a "easy way out" when the real creature target was not obvious or unknown.

At first look at this, i would suggest try find a suitable creature target, if that doesn't turn out well, we probably need to implement a effect-field in database table so that we don't break too much of the functionality (adding code to fill TARGET_SCRIPT with a GO again, will only lead to problems with other spells, for cases where spell has more than just one effect using TARGET_SCRIPT).

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