Esempio n. 1
0
        public override void Handle(GameSession session, PacketReader packet)
        {
            QuestMode mode = (QuestMode)packet.ReadByte();

            switch (mode)
            {
            case QuestMode.AcceptQuest:
                HandleAcceptQuest(session, packet);
                break;

            case QuestMode.CompleteQuest:
                HandleCompleteQuest(session, packet);
                break;

            case QuestMode.ExplorationQuests:
                HandleAddExplorationQuests(session, packet);
                break;

            case QuestMode.CompleteNavigator:
                HandleCompleteNavigator(session, packet);
                break;

            default:
                IPacketHandler <GameSession> .LogUnknownMode(mode);

                break;
            }
        }
Esempio n. 2
0
        public override void Handle(GameSession session, PacketReader packet)
        {
            DungeonMode mode = (DungeonMode)packet.ReadByte();

            switch (mode)
            {
            case DungeonMode.AddRewards:
                HandleAddRewards(session, packet);
                break;

            case DungeonMode.GetHelp:
                HandleGetHelp(session, packet);
                break;

            case DungeonMode.Veteran:
                HandleVeteran(session, packet);
                break;

            case DungeonMode.Favorite:
                HandleFavorite(session, packet);
                break;

            default:
                IPacketHandler <GameSession> .LogUnknownMode(mode);

                break;
            }
        }
Esempio n. 3
0
        public override void Handle(GameSession session, PacketReader packet)
        {
            SkillHandlerMode mode = (SkillHandlerMode)packet.ReadByte();

            switch (mode)
            {
            case SkillHandlerMode.Cast:
                HandleCast(session, packet);
                break;

            case SkillHandlerMode.Damage:
                HandleDamageMode(session, packet);
                break;

            case SkillHandlerMode.Sync:
                HandleSyncSkills(session, packet);
                break;

            case SkillHandlerMode.SyncTick:
                HandleSyncTick(packet);
                break;

            case SkillHandlerMode.Cancel:
                HandleCancelSkill(packet);
                break;

            default:
                IPacketHandler <GameSession> .LogUnknownMode(mode);

                break;
            }
        }
        public override void Handle(GameSession session, PacketReader packet)
        {
            ClubMode mode = (ClubMode) packet.ReadByte();

            switch (mode)
            {
                case ClubMode.Create:
                    HandleCreate(session, packet);
                    break;
                case ClubMode.Join:
                    HandleJoin(session, packet);
                    break;
                case ClubMode.SendInvite:
                    HandleSendInvite(session, packet);
                    break;
                case ClubMode.InviteResponse:
                    HandleInviteResponse(session, packet);
                    break;
                case ClubMode.Leave:
                    HandleLeave(session, packet);
                    break;
                case ClubMode.Buff:
                    HandleBuff(packet);
                    break;
                case ClubMode.Rename:
                    HandleRename(packet);
                    break;
                default:
                    IPacketHandler<GameSession>.LogUnknownMode(mode);
                    break;
            }
        }
Esempio n. 5
0
    protected override void HandleCommon(Session session, PacketReader packet)
    {
        QuitMode mode = (QuitMode)packet.ReadByte();

        switch (mode)
        {
        case QuitMode.ChangeCharacter:
            if (session is GameSession gameSession)
            {
                HandleChangeCharacter(gameSession);
            }
            break;

        case QuitMode.Quit:
            if (session is GameSession gameSession2)
            {
                HandleQuit(gameSession2);
            }
            session.Dispose();
            break;

        default:
            IPacketHandler <GameSession> .LogUnknownMode(mode);

            break;
        }
    }
Esempio n. 6
0
        public override void Handle(GameSession session, PacketReader packet)
        {
            ChatStickerMode mode = (ChatStickerMode)packet.ReadByte();

            switch (mode)
            {
            case ChatStickerMode.OpenWindow:
                HandleOpenWindow(/*session, packet*/);
                break;

            case ChatStickerMode.UseSticker:
                HandleUseSticker(session, packet);
                break;

            case ChatStickerMode.GroupChatSticker:
                HandleGroupChatSticker(session, packet);
                break;

            case ChatStickerMode.Favorite:
                HandleFavorite(session, packet);
                break;

            case ChatStickerMode.Unfavorite:
                HandleUnfavorite(session, packet);
                break;

            default:
                IPacketHandler <GameSession> .LogUnknownMode(mode);

                break;
            }
        }
Esempio n. 7
0
        public override void Handle(GameSession session, PacketReader packet)
        {
            RequestMoveFieldMode mode = (RequestMoveFieldMode)packet.ReadByte();

            switch (mode)
            {
            case RequestMoveFieldMode.Move:
                HandleMove(session, packet);
                break;

            case RequestMoveFieldMode.LeaveInstance:
                HandleLeaveInstance(session);
                break;

            case RequestMoveFieldMode.VisitHouse:
                HandleVisitHouse(session, packet);
                break;

            case RequestMoveFieldMode.ReturnMap:
                HandleReturnMap(session);
                break;

            case RequestMoveFieldMode.EnterDecorPlaner:
                HandleEnterDecorPlaner(session);
                break;

            default:
                IPacketHandler <GameSession> .LogUnknownMode(mode);

                break;
            }
        }
        public override void Handle(GameSession session, PacketReader packet)
        {
            RideMode mode = (RideMode)packet.ReadByte();

            switch (mode)
            {
            case RideMode.StartRide:
                HandleStartRide(session, packet);
                break;

            case RideMode.StopRide:
                HandleStopRide(session, packet);
                break;

            case RideMode.ChangeRide:
                HandleChangeRide(session, packet);
                break;

            case RideMode.StartMultiPersonRide:
                HandleStartMultiPersonRide(session, packet);
                break;

            case RideMode.StopMultiPersonRide:
                HandleStopMultiPersonRide(session);
                break;

            default:
                IPacketHandler <GameSession> .LogUnknownMode(mode);

                break;
            }
        }
Esempio n. 9
0
    public override void Handle(GameSession session, PacketReader packet)
    {
        FishingMode mode = (FishingMode)packet.ReadByte();

        switch (mode)
        {
        case FishingMode.PrepareFishing:
            HandlePrepareFishing(session, packet);
            break;

        case FishingMode.Stop:
            HandleStop(session);
            break;

        case FishingMode.Catch:
            HandleCatch(session, packet);
            break;

        case FishingMode.Start:
            HandleStart(session, packet);
            break;

        case FishingMode.FailMinigame:
            HandleFailMinigame();
            break;

        default:
            IPacketHandler <GameSession> .LogUnknownMode(mode);

            break;
        }
    }
Esempio n. 10
0
    public override void Handle(GameSession session, PacketReader packet)
    {
        HomeActionMode mode = (HomeActionMode)packet.ReadByte();

        switch (mode)
        {
        case HomeActionMode.Kick:
            HandleKick(packet);
            break;

        case HomeActionMode.Survey:
            HandleRespondSurvey(session, packet);
            break;

        case HomeActionMode.ChangePortalSettings:
            HandleChangePortalSettings(session, packet);
            break;

        case HomeActionMode.UpdateBallCoord:
            HandleUpdateBallCoord(session, packet);
            break;

        case HomeActionMode.SendPortalSettings:
            HandleSendPortalSettings(session, packet);
            break;

        default:
            IPacketHandler <GameSession> .LogUnknownMode(mode);

            break;
        }
    }
        public override void Handle(GameSession session, PacketReader packet)
        {
            ItemBreakMode mode = (ItemBreakMode)packet.ReadByte();

            switch (mode)
            {
            case ItemBreakMode.Open:
                session.Player.DismantleSlots = new Tuple <long, int> [100];
                session.Player.Rewards        = new Dictionary <int, int>();
                break;

            case ItemBreakMode.Add:
                HandleAdd(session, packet);
                break;

            case ItemBreakMode.Remove:
                HandleRemove(session, packet);
                break;

            case ItemBreakMode.Dismantle:
                HandleDismantle(session);
                break;

            case ItemBreakMode.AutoAdd:
                HandleAutoAdd(session, packet);
                break;

            default:
                IPacketHandler <GameSession> .LogUnknownMode(mode);

                break;
            }
        }
Esempio n. 12
0
    public override void Handle(GameSession session, PacketReader packet)
    {
        MesoMarketMode mode = (MesoMarketMode)packet.ReadByte();

        switch (mode)
        {
        case MesoMarketMode.Load:
            HandleLoad(session);
            break;

        case MesoMarketMode.CreateListing:
            HandleCreateListing(session, packet);
            break;

        case MesoMarketMode.CancelListing:
            HandleCancelListing(session, packet);
            break;

        case MesoMarketMode.RefreshListings:
            HandleRefreshListings(session, packet);
            break;

        case MesoMarketMode.Purchase:
            HandlePurchase(session, packet);
            break;

        default:
            IPacketHandler <GameSession> .LogUnknownMode(mode);

            break;
        }
    }
Esempio n. 13
0
        public override void Handle(GameSession session, PacketReader packet)
        {
            ShopMode mode = (ShopMode)packet.ReadByte();

            switch (mode)
            {
            case ShopMode.Close:
                HandleClose(session);
                break;

            case ShopMode.Buy:
                HandleBuy(session, packet);
                break;

            case ShopMode.Sell:
                HandleSell(session, packet);
                break;

            case ShopMode.OpenViaItem:
                HandleOpenViaItem(session, packet);
                break;

            default:
                IPacketHandler <GameSession> .LogUnknownMode(mode);

                break;
            }
        }
Esempio n. 14
0
        public override void Handle(GameSession session, PacketReader packet)
        {
            RequestItemInventoryMode mode = (RequestItemInventoryMode)packet.ReadByte();
            Inventory inventory           = session.Player.Inventory;

            switch (mode)
            {
            case RequestItemInventoryMode.Move:
                HandleMove(session, packet);
                break;

            case RequestItemInventoryMode.Drop:
                HandleDrop(session, packet);
                break;

            case RequestItemInventoryMode.DropBound:
                HandleDropBound(session, packet);
                break;

            case RequestItemInventoryMode.Sort:
                HandleSort(session, packet, inventory);
                break;

            case RequestItemInventoryMode.Expand:
                HandleExpand(session, packet);
                break;

            default:
                IPacketHandler <GameSession> .LogUnknownMode(mode);

                break;
            }
        }
Esempio n. 15
0
    public override void Handle(GameSession session, PacketReader packet)
    {
        LapenshardMode mode = (LapenshardMode)packet.ReadByte();

        switch (mode)
        {
        case LapenshardMode.Equip:
            HandleEquip(session, packet);
            break;

        case LapenshardMode.Unequip:
            HandleUnequip(session, packet);
            break;

        case LapenshardMode.AddFusion:
            HandleAddFusion(session, packet);
            break;

        case LapenshardMode.AddCatalyst:
            HandleAddCatalyst(session, packet);
            break;

        case LapenshardMode.Fusion:
            HandleFusion(session, packet);
            break;

        default:
            IPacketHandler <GameSession> .LogUnknownMode(mode);

            break;
        }
    }
Esempio n. 16
0
        public override void Handle(GameSession session, PacketReader packet)
        {
            KeyTableEnum requestType = (KeyTableEnum)packet.ReadByte();

            switch (requestType)
            {
            case KeyTableEnum.SetKeyBind:
                SetKeyBinds(session, packet);
                break;

            case KeyTableEnum.MoveQuickSlot:
                MoveQuickSlot(session, packet);
                break;

            case KeyTableEnum.AddToFirstSlot:
                AddToQuickSlot(session, packet);
                break;

            case KeyTableEnum.RemoveQuickSlot:
                RemoveQuickSlot(session, packet);
                break;

            case KeyTableEnum.SetActiveHotbar:
                SetActiveHotbar(session, packet);
                break;

            default:
                IPacketHandler <GameSession> .LogUnknownMode(requestType);

                break;
            }
        }
Esempio n. 17
0
        public override void Handle(GameSession session, PacketReader packet)
        {
            SkillHandlerMode mode = (SkillHandlerMode)packet.ReadByte();

            switch (mode)
            {
            case SkillHandlerMode.FirstSent:
                HandleFirstSent(session, packet);
                break;

            case SkillHandlerMode.Damage:
                HandleDamage(session, packet);
                break;

            case SkillHandlerMode.Mode3:
                HandleMode3(packet);
                break;

            case SkillHandlerMode.Mode4:
                HandleMode4(packet);
                break;

            default:
                IPacketHandler <GameSession> .LogUnknownMode(mode);

                break;
            }
        }
Esempio n. 18
0
        public override void Handle(GameSession session, PacketReader packet)
        {
            SkillBookMode mode = (SkillBookMode)packet.ReadByte();

            switch (mode)
            {
            case SkillBookMode.Open:
                HandleOpen(session);
                break;

            case SkillBookMode.Save:
                HandleSave(session, packet);
                break;

            case SkillBookMode.Rename:
                HandleRename(session, packet);
                break;

            case SkillBookMode.AddTab:
                HandleAddTab(session);
                break;

            default:
                IPacketHandler <GameSession> .LogUnknownMode(mode);

                break;
            }
        }
Esempio n. 19
0
        public override void Handle(GameSession session, PacketReader packet)
        {
            NpcTalkMode function = (NpcTalkMode)packet.ReadByte();

            switch (function)
            {
            case NpcTalkMode.Close:
                return;

            case NpcTalkMode.Respond:
                HandleRespond(session, packet);
                break;

            case NpcTalkMode.Continue:
                HandleContinue(session, index: packet.ReadInt());
                break;

            case NpcTalkMode.NextQuest:
                HandleNextQuest(session, packet);
                break;

            default:
                IPacketHandler <GameSession> .LogUnknownMode(function);

                break;
            }
        }
Esempio n. 20
0
        public override void Handle(GameSession session, PacketReader packet)
        {
            GroupChatMode mode = (GroupChatMode)packet.ReadByte();

            switch (mode)
            {
            case GroupChatMode.Create:
                HandleCreate(session);
                break;

            case GroupChatMode.Invite:
                HandleInvite(session, packet);
                break;

            case GroupChatMode.Leave:
                HandleLeave(session, packet);
                break;

            case GroupChatMode.Chat:
                HandleChat(session, packet);
                break;

            default:
                IPacketHandler <GameSession> .LogUnknownMode(mode);

                break;
            }
        }
Esempio n. 21
0
    public override void Handle(GameSession session, PacketReader packet)
    {
        JobMode mode = (JobMode)packet.ReadByte();

        switch (mode)
        {
        case JobMode.Close:
            HandleCloseSkillTree(session);
            break;

        case JobMode.Save:
            HandleSaveSkillTree(session, packet);
            break;

        case JobMode.Reset:
            HandleResetSkillTree(session, packet);
            break;

        case JobMode.Preset:
            HandlePresetSkillTree(session, packet);
            break;

        default:
            IPacketHandler <GameSession> .LogUnknownMode(mode);

            break;
        }
    }
Esempio n. 22
0
        public override void Handle(GameSession session, PacketReader packet)
        {
            MeretMarketMode mode = (MeretMarketMode)packet.ReadByte();

            switch (mode)
            {
            case MeretMarketMode.Initialize:
                HandleInitialize(session);
                break;

            case MeretMarketMode.OpenPremium:
                HandleOpenPremium(session, packet);
                break;

            case MeretMarketMode.Purchase:
                HandlePurchase(session, packet);
                break;

            case MeretMarketMode.Home:
                HandleHome(session);
                break;

            case MeretMarketMode.LoadCart:
                HandleLoadCart(session);
                break;

            default:
                IPacketHandler <GameSession> .LogUnknownMode(mode);

                break;
            }
        }
Esempio n. 23
0
        public override void Handle(GameSession session, PacketReader packet)
        {
            ItemLockMode mode = (ItemLockMode)packet.ReadByte();

            switch (mode)
            {
            case ItemLockMode.Open:
                session.Player.LockInventory = new LockInventory();
                break;

            case ItemLockMode.Add:
                HandleAdd(session, packet);
                break;

            case ItemLockMode.Remove:
                HandleRemove(session, packet);
                break;

            case ItemLockMode.Update:
                HandleUpdateItem(session, packet);
                break;

            default:
                IPacketHandler <GameSession> .LogUnknownMode(mode);

                break;
            }
        }
Esempio n. 24
0
    public override void Handle(GameSession session, PacketReader packet)
    {
        ItemEnchantMode mode = (ItemEnchantMode)packet.ReadByte();

        switch (mode)
        {
        case ItemEnchantMode.None:     // Sent when opening up enchant ui
            break;

        case ItemEnchantMode.BeginEnchant:
            HandleBeginEnchant(session, packet);
            break;

        case ItemEnchantMode.Ophelia:
            HandleOpheliaEnchant(session, packet);
            break;

        case ItemEnchantMode.Peachy:
            HandlePeachyEnchant(session, packet);
            break;

        default:
            IPacketHandler <GameSession> .LogUnknownMode(mode);

            break;
        }
    }
Esempio n. 25
0
        public override void Handle(GameSession session, PacketReader packet)
        {
            PremiumClubMode mode = (PremiumClubMode)packet.ReadByte();

            switch (mode)
            {
            case PremiumClubMode.Open:
                HandleOpen(session);
                break;

            case PremiumClubMode.ClaimItems:
                HandleClaimItems(session, packet);
                break;

            case PremiumClubMode.OpenPurchaseWindow:
                HandleOpenPurchaseWindow(session);
                break;

            case PremiumClubMode.PurchaseMembership:
                HandlePurchaseMembership(session, packet);
                break;

            default:
                IPacketHandler <GameSession> .LogUnknownMode(mode);

                break;
            }
        }
Esempio n. 26
0
        public override void Handle(GameSession session, PacketReader packet)
        {
            BeautyMode mode = (BeautyMode)packet.ReadByte();

            switch (mode)
            {
            case BeautyMode.LoadShop:
                HandleLoadShop(session, packet);
                break;

            case BeautyMode.NewBeauty:
                HandleNewBeauty(session, packet);
                break;

            case BeautyMode.ModifyExistingBeauty:
                HandleModifyExistingBeauty(session, packet);
                break;

            case BeautyMode.ModifySkin:
                HandleModifySkin(session, packet);
                break;

            case BeautyMode.RandomHair:
                HandleRandomHair(session, packet);
                break;

            case BeautyMode.ChooseRandomHair:
                HandleChooseRandomHair(session, packet);
                break;

            case BeautyMode.SaveHair:
                HandleSaveHair(session, packet);
                break;

            case BeautyMode.Teleport:
                HandleTeleport(session, packet);
                break;

            case BeautyMode.DeleteSavedHair:
                HandleDeleteSavedHair(session, packet);
                break;

            case BeautyMode.ChangeToSavedHair:
                HandleChangeToSavedHair(session, packet);
                break;

            case BeautyMode.DyeItem:
                HandleDyeItem(session, packet);
                break;

            case BeautyMode.BeautyVoucher:
                HandleBeautyVoucher(session, packet);
                break;

            default:
                IPacketHandler <GameSession> .LogUnknownMode(mode);

                break;
            }
        }
Esempio n. 27
0
    public override void Handle(GameSession session, PacketReader packet)
    {
        PartyMode mode = (PartyMode)packet.ReadByte();  //Mode

        switch (mode)
        {
        case PartyMode.Invite:
            HandleInvite(session, packet);
            break;

        case PartyMode.Join:
            HandleJoin(session, packet);
            break;

        case PartyMode.Leave:
            HandleLeave(session);
            break;

        case PartyMode.Kick:
            HandleKick(session, packet);
            break;

        case PartyMode.SetLeader:
            HandleSetLeader(session, packet);
            break;

        case PartyMode.FinderJoin:
            HandleFinderJoin(session, packet);
            break;

        case PartyMode.SummonParty:
            HandleSummonParty();
            break;

        case PartyMode.VoteKick:
            HandleVoteKick(session, packet);
            break;

        case PartyMode.ReadyCheck:
            HandleStartReadyCheck(session);
            break;

        case PartyMode.FindDungeonParty:
            HandleFindDungeonParty(session, packet);
            break;

        case PartyMode.ReadyCheckUpdate:
            HandleReadyCheckUpdate(session, packet);
            break;

        default:
            IPacketHandler <GameSession> .LogUnknownMode(mode);

            break;
        }
    }
Esempio n. 28
0
        public override void Handle(GameSession session, PacketReader packet) // TODO: Refactor when DB is implemented
        {
            QuestMode mode = (QuestMode)packet.ReadByte();

            switch (mode)
            {
            case QuestMode.AcceptQuest:
            {
                int questid  = packet.ReadInt();
                int objectid = packet.ReadInt();
                session.Send(QuestPacket.AcceptQuest(questid));
                break;
            }

            case QuestMode.CompleteQuest:
            {
                int questid  = packet.ReadInt();
                int objectid = packet.ReadInt();
                session.Send(QuestPacket.CompleteQuest(questid));
                QuestReward quest = QuestMetadataStorage.GetMetadata(questid).Reward;
                session.Player.Levels.GainExp(quest.Exp);
                session.Player.Wallet.Meso.Modify(quest.Money);
                break;
            }

            case QuestMode.ExplorationGoals:
                List <QuestMetadata> list = new List <QuestMetadata>();

                int listSize = packet.ReadInt();

                for (int i = 0; i < listSize; i++)
                {
                    list.Add(QuestMetadataStorage.GetMetadata(packet.ReadInt()));
                }

                session.Send(QuestPacket.SendQuests(list));
                break;

            case QuestMode.CompleteNavigator:
                int questId = packet.ReadInt();

                foreach (QuestRewardItem item in QuestMetadataStorage.GetMetadata(questId).RewardItem)
                {
                    InventoryController.Add(session, new Types.Item(item.Code), true);
                }

                session.Send(QuestPacket.CompleteQuest(questId));
                break;

            default:
                IPacketHandler <GameSession> .LogUnknownMode(mode);

                break;
            }
        }
Esempio n. 29
0
        public override void Handle(GameSession session, PacketReader packet)
        {
            RequestCubeMode mode = (RequestCubeMode)packet.ReadByte();

            switch (mode)
            {
            case RequestCubeMode.LoadFurnishingItem:
                HandleLoadFurnishingItem(session, packet);
                break;

            case RequestCubeMode.BuyPlot:
                HandleBuyPlot(session, packet);
                break;

            case RequestCubeMode.ForfeitPlot:
                HandleForfeitPlot();
                break;

            case RequestCubeMode.HandleAddFurnishing:
                HandleAddFurnishing(session, packet);
                break;

            case RequestCubeMode.RemoveCube:
                HandleRemoveCube(session, packet);
                break;

            case RequestCubeMode.RotateCube:
                HandleRotateCube(packet);
                break;

            case RequestCubeMode.ReplaceCube:
                HandleReplaceCube(session, packet);
                break;

            case RequestCubeMode.Pickup:
                HandlePickup(session, packet);
                break;

            case RequestCubeMode.Drop:
                HandleDrop(session);
                break;

            case RequestCubeMode.NameHome:
                HandleNameHome(session, packet);
                break;

            default:
                IPacketHandler <GameSession> .LogUnknownMode(mode);

                break;
            }
        }
Esempio n. 30
0
    public override void Handle(GameSession session, PacketReader packet)
    {
        InstrumentMode mode = (InstrumentMode)packet.ReadByte();

        switch (mode)
        {
        case InstrumentMode.StartImprovise:
            HandleStartImprovise(session, packet);
            break;

        case InstrumentMode.PlayNote:
            HandlePlayNote(session, packet);
            break;

        case InstrumentMode.StopImprovise:
            HandleStopImprovise(session);
            break;

        case InstrumentMode.PlayScore:
            HandlePlayScore(session, packet);
            break;

        case InstrumentMode.StopScore:
            HandleStopScore(session);
            break;

        case InstrumentMode.StartEnsemble:
            HandleStartEnsemble(session, packet);
            break;

        case InstrumentMode.LeaveEnsemble:
            HandleLeaveEnsemble(session);
            break;

        case InstrumentMode.Compose:
            HandleCompose(session, packet);
            break;

        case InstrumentMode.Fireworks:
            HandleFireworks(session);
            break;

        case InstrumentMode.AudienceEmote:
            HandleAudienceEmote(packet);
            break;

        default:
            IPacketHandler <GameSession> .LogUnknownMode(mode);

            break;
        }
    }