AbstractScript uses NPC templates to register events.
This commit is contained in:
		| @@ -1511,6 +1511,12 @@ public class Npc extends Creature | ||||
| 		return vars != null ? vars : addScript(new NpcVariables()); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| 	public boolean hasListener(EventType type) | ||||
| 	{ | ||||
| 		return getTemplate().hasListener(type); | ||||
| 	} | ||||
| 	 | ||||
| 	/** | ||||
| 	 * Send an "event" to all NPCs within given radius | ||||
| 	 * @param eventName - name of event | ||||
|   | ||||
| @@ -108,8 +108,7 @@ public class ListenersContainer | ||||
| 	 | ||||
| 	public boolean hasListener(EventType type) | ||||
| 	{ | ||||
| 		// FIXME: return (_listeners != null) && !getListeners(type).isEmpty(); | ||||
| 		return !getListeners(type).isEmpty(); | ||||
| 		return (_listeners != null) && !getListeners(type).isEmpty(); | ||||
| 	} | ||||
| 	 | ||||
| 	/** | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 MobiusDevelopment
					MobiusDevelopment