Aller au contenu

Photo

[SOLVED] Overriding EVENT_TYPE_REMOVE_EFFECT


  • Veuillez vous connecter pour répondre
1 réponse à ce sujet

#1
FramnkRulez

FramnkRulez
  • Members
  • 19 messages
So I've been playing around with effects and overriding the handlers for my custom campaign and I'm finding that I can override the effect 'apply' handlers for EVENT_TYPE_APPLY_EFFECT I can't seem to override the EVENT_TYPE_REMOVE_EFFECT in the same way.

Basically, I'm modifying events.xls and specifying the name of my override script for both EVENT_ types (same script).  Then in code when I call ApplyEffectOnObject() the EVENT_TYPE_APPLY_EFFECT routes through my script override.  However when I call RemoveEffect() or RemoveEffectsByParameters() my override script is never called to handle the event.  I would have thought this would routed a EVENT_TYPE_REMOVE_EFFECT to my script override.

Has anyone else run into this?  Am I expecting the wrong thing here?

Modifié par FramnkRulez, 16 novembre 2010 - 07:05 .


#2
FramnkRulez

FramnkRulez
  • Members
  • 19 messages
I was firing my RemoveEffect call based on the EQUIP/UNEQUIP events and I erroneously assumed that oCreator on UNQUIP was the creature that unequipped the item (like EQUIP), however this was incorrect so my RemoveEffect was not being hit.