Aller au contenu

Photo

Properly stacking ability damages with DelayCommand


  • Veuillez vous connecter pour répondre
2 réponses à ce sujet

#1
Kato -

Kato -
  • Members
  • 392 messages
Hi,

I have seen the example of doing this in the script "x2_s1_shadow", but I'm wondering what is the basic concept? Does one simply need to apply the damage effect through a delayed function wich can be called from anywhere?

Thank you!


Kato 

Modifié par Kato_Yang, 18 décembre 2011 - 04:40 .


#2
Shadooow

Shadooow
  • Members
  • 4 471 messages
Not really.

While wiki states that effect usually doesn't stack, it is not very precise because most effect stacks if the spell ID of the effect is -1 (that is outside of the spellscript). AC (except) dodge and maybe some others are exceptions as these never stack, only highest is used.

But if the effect is created within spellscript (and spell id of the effect will be higher than -1) engine doesn't stack some effects. Ability decrease, negative levels or curse are some of them. In these cases if you want them to stack you have to create effect outside spellscript. That might be done via already mentioned delay command or via assigncommand or signal event...

Just dont forget that effect creator is object on which you define the effect, so you either have to pass full effect on one line into delay function or create new function where you create the effect) if you define effect in spellscript it gets spellid of GetSpellId and thus will stack even if you delay it/assign it etc.

#3
Kato -

Kato -
  • Members
  • 392 messages
Ahh. Precious infos, thank you once more ShadoOoW!


Kato

Modifié par Kato_Yang, 18 décembre 2011 - 04:55 .