RegisterOnDispose() public method

public RegisterOnDispose ( OnDispose handler ) : void
handler OnDispose
return void
示例#1
0
        public Player (TelnetClient client, Location location)
            : base(location, null) {
            Client = client;
            client.RegisterOnDispose(OnDisconnected);

            RebuildCommandTrie();
            AddExitCommands(location);

            AddEventHandler(EventType.CombatHit, OnEventCombatHit);
            AddEventHandler(EventType.CombatMiss, OnEventCombatMiss);
            AddEventHandler(EventType.CombatStart, OnEventCombatStart);
            AddEventHandler(EventType.Death, OnEventDeath);
            AddEventHandler(EventType.Emote, OnEventEmote);
            AddEventHandler(EventType.Enter, OnEventEnter);
            AddEventHandler(EventType.Leave, OnEventLeave);
            AddEventHandler(EventType.Say, OnEventSay);
            AddEventHandler(EventType.Tell, OnEventTell);
        }
示例#2
0
        public Player(TelnetClient client, Location location)
            : base(location, null)
        {
            Client = client;
            client.RegisterOnDispose(OnDisconnected);

            RebuildCommandTrie();
            AddExitCommands(location);

            AddEventHandler(EventType.CombatHit, OnEventCombatHit);
            AddEventHandler(EventType.CombatMiss, OnEventCombatMiss);
            AddEventHandler(EventType.CombatStart, OnEventCombatStart);
            AddEventHandler(EventType.Death, OnEventDeath);
            AddEventHandler(EventType.Emote, OnEventEmote);
            AddEventHandler(EventType.Enter, OnEventEnter);
            AddEventHandler(EventType.Leave, OnEventLeave);
            AddEventHandler(EventType.Say, OnEventSay);
            AddEventHandler(EventType.Tell, OnEventTell);
        }