wyvern.lib.properties
Class HealersCurse

java.lang.Object
  extended bywyvern.lib.properties.HealersCurse
All Implemented Interfaces:
AddRemoveNotify, HookCallback, MutableProperty

public class HealersCurse
extends java.lang.Object
implements AddRemoveNotify, HookCallback, MutableProperty

Property that prohibits players from entering hospitals or drinking from fountains When the property gets added or removed to the player, it registers apply and teleport hooks on the player.

Version:
1.0, Dec 8, 2002
Author:
ron

Constructor Summary
HealersCurse()
           
 
Method Summary
 void addTime()
           
 java.lang.Object createClone()
          Clones the object.
 GameObject getTarget()
          Returns the NPC we're attached to.
 void handleApply(CommandEvent event)
           
 void handleTeleport(CommandEvent event)
          Handles user trying to leave.
 void hookEvent(java.lang.String hookName, CommandEvent data)
          Gives the HookCallback a chance to do something with the passed event.
 void notifyAdd(PropertyList obj)
          Notifies the property it's been added to the target.
 void notifyRemove(PropertyList obj)
          Notifies the property it's been removed from the monster.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HealersCurse

public HealersCurse()
Method Detail

handleApply

public void handleApply(CommandEvent event)

handleTeleport

public void handleTeleport(CommandEvent event)
Handles user trying to leave.


hookEvent

public void hookEvent(java.lang.String hookName,
                      CommandEvent data)
Description copied from interface: HookCallback
Gives the HookCallback a chance to do something with the passed event. Sometimes more than one command is registered with the same verb (e.g. "turn wheel", "turn ring"), so the HookCallback should check the class of the passed CommandEvent and make sure it's the right event.

Specified by:
hookEvent in interface HookCallback
Parameters:
hookName - the name of the hook, such as "movePreHook".
data - the CommandEvent encapsulating the event parameters

notifyAdd

public void notifyAdd(PropertyList obj)
Notifies the property it's been added to the target. Registers on agent's apply/teleport hooks.

Specified by:
notifyAdd in interface AddRemoveNotify
Parameters:
obj - the monster to add the property to

notifyRemove

public void notifyRemove(PropertyList obj)
Notifies the property it's been removed from the monster.

Specified by:
notifyRemove in interface AddRemoveNotify
Parameters:
obj - the PropertyList we're being removed from

getTarget

public GameObject getTarget()
Returns the NPC we're attached to.


addTime

public void addTime()

createClone

public java.lang.Object createClone()
Clones the object.

Specified by:
createClone in interface MutableProperty