Aller au contenu

Photo

item_singletarget.nss


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

#1
Adaram

Adaram
  • Members
  • 464 messages
In the above noted script, there are events for handling the various poisons.  Code sample for one of them follows:

case ABILITY_ITEM_VENOM:        {            eEffect = EffectEnchantment(ENCHANTMENT_VENOM, 1);            ApplyEffectOnObject(EFFECT_DURATION_TYPE_TEMPORARY, eEffect, stEvent.oTarget, VENOM_DURATION, stEvent.oCaster, stEvent.nAbility);
            break;        }

What I can't seem to figure out is where this limits the application to weapons only and not to arrows/bolts. I am sure I'm just missing a piece of the puzzle. Can anyone enlighten me?

Thanks in advance


Adaram

#2
Eurypterid

Eurypterid
  • Members
  • 4 668 messages
Is it perhaps hard coded that the target is always weapons?

#3
Adaram

Adaram
  • Members
  • 464 messages
I think that may be true, but I am trying to see "where" this happens. The code snippet above seems to apply an effect to stEvent.oTarget, which I assume means to the Target that the user "clicked to apply". I don't see any code in this script that checks to see if that traget is valid (ie. only weapons). I am hoping someone can find me that exception handling place.



Thanks :)


#4
Adaram

Adaram
  • Members
  • 464 messages
Anyone else know anything about this? Thanks.

#5
FalloutBoy

FalloutBoy
  • Members
  • 580 messages
I'd say figure out who is sending the event in that code snippet because that is who set stEvent.oTarget to be your melee weapon.



DisplayFloatyMessage( GetHero(), GetTag( stEvent.oTarget ) );