Author Topic: Properly stacking ability damages with DelayCommand  (Read 306 times)

Legacy_Kato -

  • Hero Member
  • *****
  • Posts: 747
  • Karma: +0/-0
Properly stacking ability damages with DelayCommand
« on: December 18, 2011, 04:34:31 pm »


               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 .
                     
                  


            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Properly stacking ability damages with DelayCommand
« Reply #1 on: December 18, 2011, 04:48:58 pm »


               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.
               
               

               
            

Legacy_Kato -

  • Hero Member
  • *****
  • Posts: 747
  • Karma: +0/-0
Properly stacking ability damages with DelayCommand
« Reply #2 on: December 18, 2011, 04:51:57 pm »


               Ahh. Precious infos, thank you once more ShadoOoW!


Kato
               
               

               


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