public class AutoChatInstance { protected int _npcId; private long _defaultDelay = DEFAULT_CHAT_DELAY; private String[] _defaultTexts; private boolean _defaultRandom = false; private boolean _globalChat = false; private boolean _isActive; private Map _chatDefinitions = new FastMap(); public ScheduledFuture _chatTask; protected AutoChatInstance(int npcId, String[] chatTexts, long chatDelay, boolean isGlobal) { _defaultTexts = chatTexts; _npcId = npcId; _defaultDelay = chatDelay; _globalChat = isGlobal; if (_log.isDebugEnabled()) _log.info("AutoChatHandler: Registered auto chat for NPC ID " + _npcId + " (Global Chat = " + _globalChat + ")."); setActive(true); } protected AutoChatDefinition getChatDefinition(int objectId) { return _chatDefinitions.get(objectId); } protected AutoChatDefinition[] getChatDefinitions() { return _chatDefinitions.values().toArray( new AutoChatDefinition[_chatDefinitions.values().size()]); }