Beispiel #1
0
 public ItemHandler(PlayerConnection c)
 {
     c.AddHandler(OP.CMSG_SWAP_INV_ITEM, new DoMessageFunction(SwapInv), c.player);
     c.AddHandler(OP.CMSG_SWAP_ITEM, new DoMessageFunction(Swap), c.player);
     c.AddHandler(OP.CMSG_DESTROYITEM, new DoMessageFunction(Destroy), c.player);
     c.AddHandler(OP.CMSG_AUTOEQUIP_ITEM, new DoMessageFunction(AutoEquip), c.player);
     c.AddHandler(OP.CMSG_AUTOSTORE_BAG_ITEM, new DoMessageFunction(AutoStoreBag), c.player);
 }
        public CharacterHandler(GameServer gs, PlayerConnection c, string chars)
        {
            gameServer = gs;
            if (chars != null)
            {
                string[] schars = chars.Split(' ');
                foreach (string s in schars)
                {
                    charids.Add(s);
                }
            }

            c.AddHandler(OP.CMSG_CHAR_CREATE, new DoMessageFunction(DoMsgCreate), this);
            c.AddHandler(OP.CMSG_CHAR_ENUM, new DoMessageFunction(DoMsgEnum), this);
            c.AddHandler(OP.CMSG_CHAR_DELETE, new DoMessageFunction(DoMsgDelete), this);
            c.AddHandler(OP.CMSG_PLAYER_LOGIN, new DoMessageFunction(DoMsgLogin), this);
        }
Beispiel #3
0
        public QueryHandler(GameServer gs, PlayerConnection c)
        {
            gameServer = gs;
            c.AddHandler(OP.CMSG_NAME_QUERY, new DoMessageFunction(NameQuery), c.player);
            c.AddHandler(OP.CMSG_MEETING_STONE_INFO, new DoMessageFunction(MeetingStoneQuery), c.player);
            c.AddHandler(OP.CMSG_GMTICKET_GETTICKET, new DoMessageFunction(GMTicketQuery), c.player);
            c.AddHandler(OP.CMSG_QUERY_TIME, new DoMessageFunction(TimeQuery), c.player);
            c.AddHandler(OP.MSG_QUERY_NEXT_MAIL_TIME, new DoMessageFunction(NextMailTimeQuery), c.player);

            c.AddHandler(OP.CMSG_ITEM_QUERY_SINGLE, new DoMessageFunction(QuerySingle), c.player);
            c.AddHandler(OP.CMSG_CREATURE_QUERY, new DoMessageFunction(CreatureQuery), c.player);
            // c.AddHandler( OP.MSG_CORPSE_QUERY, new DoMessageFunction( CorpseQuery ), c.player);
        }
Beispiel #4
0
        void SetMessageHandler()
        {
            gameServer.Channel.Set(this);
            new QueryHandler(gameServer, conn);
            new ItemHandler(conn);
            new MovementHandler(conn);

            conn.AddHandler(OP.CMSG_LOGOUT_REQUEST, new DoMessageFunction(DoLogoutRequest), this);
            conn.AddHandler(OP.CMSG_PLAYER_LOGOUT, new DoMessageFunction(DoLogoutConfirm), this);
            conn.AddHandler(OP.CMSG_LOGOUT_CANCEL, new DoMessageFunction(DoLogoutCancel), this);
            conn.AddHandler(OP.CMSG_SET_TARGET, new DoMessageFunction(DoSetSelection), this);
            conn.AddHandler(OP.CMSG_SET_SELECTION, new DoMessageFunction(DoSetSelection), this);

            conn.AddHandler(OP.CMSG_ATTACKSWING, new DoMessageFunction(DoAttackSwing), this);
            conn.AddHandler(OP.CMSG_ATTACKSTOP, new DoMessageFunction(DoAttackStop), this);
            conn.AddHandler(OP.CMSG_UPDATE_ACCOUNT_DATA, new DoMessageFunction(DoUpdateAccountData), this);
        }
Beispiel #5
0
 public MovementHandler(PlayerConnection c)
 {
     c.AddHandler(OP.CMSG_STANDSTATECHANGE, new DoMessageFunction(StandStateChange), c.player);
     c.AddHandler(OP.CMSG_SETSHEATHED, new DoMessageFunction(SheatheTypeChange), c.player);
     c.AddHandler(OP.MSG_MOVE_JUMP, new DoMessageFunction(MoveChange), c.player);
     c.AddHandler(OP.MSG_MOVE_START_FORWARD, new DoMessageFunction(MoveChange), c.player);
     c.AddHandler(OP.MSG_MOVE_START_BACKWARD, new DoMessageFunction(MoveChange), c.player);
     c.AddHandler(OP.MSG_MOVE_SET_FACING, new DoMessageFunction(MoveChange), c.player);
     c.AddHandler(OP.MSG_MOVE_STOP, new DoMessageFunction(MoveChange), c.player);
     c.AddHandler(OP.MSG_MOVE_START_STRAFE_LEFT, new DoMessageFunction(MoveChange), c.player);
     c.AddHandler(OP.MSG_MOVE_START_STRAFE_RIGHT, new DoMessageFunction(MoveChange), c.player);
     c.AddHandler(OP.MSG_MOVE_STOP_STRAFE, new DoMessageFunction(MoveChange), c.player);
     c.AddHandler(OP.MSG_MOVE_START_TURN_LEFT, new DoMessageFunction(MoveChange), c.player);
     c.AddHandler(OP.MSG_MOVE_START_TURN_RIGHT, new DoMessageFunction(MoveChange), c.player);
     c.AddHandler(OP.MSG_MOVE_STOP_TURN, new DoMessageFunction(MoveChange), c.player);
     c.AddHandler(OP.MSG_MOVE_START_PITCH_UP, new DoMessageFunction(MoveChange), c.player);
     c.AddHandler(OP.MSG_MOVE_START_PITCH_DOWN, new DoMessageFunction(MoveChange), c.player);
     c.AddHandler(OP.MSG_MOVE_STOP_PITCH, new DoMessageFunction(MoveChange), c.player);
     c.AddHandler(OP.MSG_MOVE_SET_RUN_MODE, new DoMessageFunction(MoveChange), c.player);
     c.AddHandler(OP.MSG_MOVE_SET_WALK_MODE, new DoMessageFunction(MoveChange), c.player);
     c.AddHandler(OP.MSG_MOVE_SET_PITCH, new DoMessageFunction(MoveChange), c.player);
     c.AddHandler(OP.MSG_MOVE_START_SWIM, new DoMessageFunction(MoveChange), c.player);
     c.AddHandler(OP.MSG_MOVE_STOP_SWIM, new DoMessageFunction(MoveChange), c.player);
     c.AddHandler(OP.MSG_MOVE_HEARTBEAT, new DoMessageFunction(MoveChange), c.player);
     c.AddHandler(OP.MSG_MOVE_FALL_LAND, new DoMessageFunction(MoveChange), c.player);
 }