Example #1
0
        protected override void OnPacketHandlers()
        {
            Processor = new PacketProcessor("频道服务器");

            Processor.AppendHandler(RecvOpcodes.Pong, ChannelPacketHandlers.PONG);

            Processor.AppendHandler(RecvOpcodes.PlayerLoggedin, ChannelPacketHandlers.PLAYER_LOGGEDIN);
            Processor.AppendHandler(RecvOpcodes.PlayerUpdate, ChannelPacketHandlers.PLAYER_UPDATE);
            Processor.AppendHandler(RecvOpcodes.ChangeMapSpecial, ChannelPacketHandlers.CHANGE_MAP_SPECIAL);
            Processor.AppendHandler(RecvOpcodes.NpcAction, ChannelPacketHandlers.NPC_ACTION);
            Processor.AppendHandler(RecvOpcodes.MovePlayer, ChannelPacketHandlers.MOVE_PLAYER);
            Processor.AppendHandler(RecvOpcodes.ChangeMap, ChannelPacketHandlers.CHANGE_MAP);
            Processor.AppendHandler(RecvOpcodes.GeneralChat, ChannelPacketHandlers.GENERAL_CHAT);
            Processor.AppendHandler(RecvOpcodes.NpcTalk, ChannelPacketHandlers.NPC_TALK);
            Processor.AppendHandler(RecvOpcodes.NpcTalkMore, ChannelPacketHandlers.NPC_TALK_MORE);
            Processor.AppendHandler(RecvOpcodes.MoveLife, ChannelPacketHandlers.MOVE_LIFE);
            Processor.AppendHandler(RecvOpcodes.CloseRangeAttack, ChannelPacketHandlers.CLOSE_RANGE_ATTACK);
            Processor.AppendHandler(RecvOpcodes.TakeDamage, ChannelPacketHandlers.TAKE_DAMAGE);
            Processor.AppendHandler(RecvOpcodes.MagicAttack, ChannelPacketHandlers.MAGIC_ATTACK);
            Processor.AppendHandler(RecvOpcodes.ItemPickup, ChannelPacketHandlers.ITEM_PICKUP);
            Processor.AppendHandler(RecvOpcodes.DamageReactor, ChannelPacketHandlers.DAMAGE_REACTOR);
            Processor.AppendHandler(RecvOpcodes.DistributeAp, ChannelPacketHandlers.DISTRIBUTE_AP);
            Processor.AppendHandler(RecvOpcodes.DistributeAutoAp, ChannelPacketHandlers.DISTRIBUTE_AUTO_AP);
            Processor.AppendHandler(RecvOpcodes.DistributeSp, ChannelPacketHandlers.DISTRIBUTE_SP);
            Processor.AppendHandler(RecvOpcodes.HealOverTime, ChannelPacketHandlers.HEAL_OVERTIME);
            Processor.AppendHandler(RecvOpcodes.UseItem, ChannelPacketHandlers.USE_ITEM);
            Processor.AppendHandler(RecvOpcodes.SpecialMove, ChannelPacketHandlers.SPECIAL_MOVE);
            Processor.AppendHandler(RecvOpcodes.EnterCashShop, ChannelPacketHandlers.ENTER_CASHSHOP);
            Processor.AppendHandler(RecvOpcodes.EnterMts, ChannelPacketHandlers.ENTER_MTS);
            Processor.AppendHandler(RecvOpcodes.CashShop, ChannelPacketHandlers.CASHSHOP);
            Processor.AppendHandler(RecvOpcodes.ItemMove, ChannelPacketHandlers.ITEM_MOVE);
            Processor.AppendHandler(RecvOpcodes.TouchingCs, ChannelPacketHandlers.TOUCHING_CASHSHOP);
            Processor.AppendHandler(RecvOpcodes.UseChair, ChannelPacketHandlers.USE_CHAIR);
            Processor.AppendHandler(RecvOpcodes.CancelChair, ChannelPacketHandlers.CANCEL_CHAIR);
            Processor.AppendHandler(RecvOpcodes.UseUpgradeScroll, ChannelPacketHandlers.USE_UPGRADE_SCROLL);
            Processor.AppendHandler(RecvOpcodes.SpawnPet, ChannelPacketHandlers.SPAWN_PET);
            Processor.AppendHandler(RecvOpcodes.MovePet, ChannelPacketHandlers.MOVE_PET);
            Processor.AppendHandler(RecvOpcodes.CharInfoRequest, ChannelPacketHandlers.CHARINFO_REQUEST);
            Processor.AppendHandler(RecvOpcodes.PetLoot, ChannelPacketHandlers.PET_LOOT);
            Processor.AppendHandler(RecvOpcodes.PetAutoPot, ChannelPacketHandlers.PET_AUTO_POT);
            Processor.AppendHandler(RecvOpcodes.PetChat, ChannelPacketHandlers.PET_CHAT);
            Processor.AppendHandler(RecvOpcodes.PetCommand, ChannelPacketHandlers.PET_COMMAND);
            Processor.AppendHandler(RecvOpcodes.PetFood, ChannelPacketHandlers.PET_FOOD);
            Processor.AppendHandler(RecvOpcodes.UseReturnScroll, ChannelPacketHandlers.USE_RETURN_SCROLL);
            Processor.AppendHandler(RecvOpcodes.NpcShop, ChannelPacketHandlers.NPC_SHOP);
            Processor.AppendHandler(RecvOpcodes.ItemSort, ChannelPacketHandlers.ITEM_SORT);
            Processor.AppendHandler(RecvOpcodes.UseInnerPortal, ChannelPacketHandlers.USE_INNER_PORTAL);
        }
Example #2
0
        protected override void OnPacketHandlers()
        {
            Processor = new PacketProcessor("登录服务器");

            Processor.AppendHandler(RecvOpcodes.Pong, LoginPacketHandlers.PONG);

            Processor.AppendHandler(RecvOpcodes.LoginPassword, LoginPacketHandlers.LOGIN_AUTH);
            Processor.AppendHandler(RecvOpcodes.SetGender, LoginPacketHandlers.OnGENDER_RESULT);
            Processor.AppendHandler(RecvOpcodes.LicenseRequest, LoginPacketHandlers.OnLISENCE_RESULT);
            Processor.AppendHandler(RecvOpcodes.ServerstatusRequest, LoginPacketHandlers.SERVERSTATUS_REQUEST);
            Processor.AppendHandler(RecvOpcodes.ServerlistRequest, LoginPacketHandlers.SERVER_LIST_REQUEST);
            Processor.AppendHandler(RecvOpcodes.ServerlistRerequest, LoginPacketHandlers.SERVER_LIST_REQUEST);
            Processor.AppendHandler(RecvOpcodes.CharlistRequest, LoginPacketHandlers.CHARLIST_REQUEST);
            Processor.AppendHandler(RecvOpcodes.CheckCharName, LoginPacketHandlers.CHECK_CHAR_NAME);
            Processor.AppendHandler(RecvOpcodes.CreateChar, LoginPacketHandlers.CREATE_CHAR);
            Processor.AppendHandler(RecvOpcodes.CharSelect, LoginPacketHandlers.CHAR_SELECT);
            //m_processor.AppendHandler(RecvOpcodes.RELOG, LoginPacketHandlers.RELOG);
            Processor.AppendHandler(RecvOpcodes.ErrorLog, LoginPacketHandlers.ERROR_LOG);
            Processor.AppendHandler(RecvOpcodes.PlayerUpdate, LoginPacketHandlers.PLAYER_UPDATE);
        }