コード例 #1
0
        public static void HandleCharLogin(S_LOGIN p)
        {
            SessionManager.Logged = true;
            SessionManager.CurrentPlayer.Class    = p.CharacterClass;
            SessionManager.CurrentPlayer.EntityId = p.entityId;
            SessionManager.CurrentPlayer.Name     = p.Name;
            SessionManager.CurrentPlayer.Level    = p.Level;
            SessionManager.SetPlayerLaurel(p.Name);

            switch (SessionManager.CurrentPlayer.Class)
            {
            case Class.Warrior:
                WindowManager.CharacterWindow.ShowResolve();
                break;

            case Class.Lancer:
                WindowManager.CharacterWindow.ShowResolve();
                break;

            case Class.Engineer:
                WindowManager.CharacterWindow.ShowResolve(Colors.Orange);
                break;

            case Class.Fighter:
                WindowManager.CharacterWindow.ShowResolve(Colors.OrangeRed);
                break;

            case Class.Assassin:
                WindowManager.CharacterWindow.ShowResolve(Color.FromRgb(208, 165, 255));
                break;

            case Class.Glaiver:
                WindowManager.CharacterWindow.ShowResolve(Color.FromRgb(204, 224, 255));

                break;

            default:
                WindowManager.CharacterWindow.HideResolve();
                break;
            }

            App.Current.Dispatcher.Invoke(() =>
            {
                WindowManager.ChangeClickThru(WindowManager.Transparent);
            });
        }
コード例 #2
0
        public static void HandleLogin(S_LOGIN p)
        {
            if (SettingsManager.ClassWindowSettings.Enabled)
            {
                ClassWindowViewModel.Instance.CurrentClass = p.CharacterClass;
            }
            Server = BasicTeraData.Instance.Servers.GetServer(p.ServerId);
            if (!SettingsManager.StatSent)
            {
                App.SendUsageStat();
            }
            SettingsManager.LastRegion = Language;
            TimeManager.Instance.SetServerTimeZone(SettingsManager.LastRegion);
            TimeManager.Instance.SetGuildBamTime(false);
            SessionManager.InitDatabases(SettingsManager.LastRegion);
            CooldownWindowViewModel.Instance.ClearSkills();
            SessionManager.CurrentPlayer.Class = p.CharacterClass;
            if (Utils.ClassEnumToString(p.CharacterClass).ToLower() != "") //why????
            {
                CooldownWindowViewModel.Instance.LoadSkills(Utils.ClassEnumToString(p.CharacterClass).ToLower() + "-skills.xml", p.CharacterClass);
            }
            WindowManager.FloatingButton.SetMoongourdButtonVisibility();
            EntitiesManager.ClearNPC();
            GroupWindowViewModel.Instance.ClearAll();

            BuffBarWindowViewModel.Instance.Player.ClearAbnormalities();
            SkillManager.Clear();

            SessionManager.LoadingScreen = true;
            SessionManager.Logged        = true;
            SessionManager.Encounter     = false;
            MessageFactory.Update();
            SessionManager.CurrentPlayer.EntityId = p.entityId;
            SessionManager.CurrentPlayer.PlayerId = p.PlayerId;
            SessionManager.CurrentPlayer.ServerId = p.ServerId;
            SessionManager.CurrentPlayer.Name     = p.Name;
            SessionManager.CurrentPlayer.Level    = p.Level;
            SessionManager.SetPlayerLaurel(SessionManager.CurrentPlayer);

            CharacterWindowViewModel.Instance.Player.Class = p.CharacterClass;
            CharacterWindowViewModel.Instance.Player.Name  = p.Name;
            CharacterWindowViewModel.Instance.Player.Level = p.Level;
            SessionManager.SetPlayerLaurel(CharacterWindowViewModel.Instance.Player);
            InfoWindowViewModel.Instance.SetLoggedIn(p.PlayerId);
        }
コード例 #3
0
        public static void HandleLogin(S_LOGIN p)
        {
            var srv = p.ServerId;

            ServerId = srv;
            InitDb(srv);

            CooldownWindowViewModel.Instance.ClearSkills();
            CooldownWindowViewModel.Instance.LoadSkills(Utils.ClassEnumToString(p.CharacterClass).ToLower() + "-skills.xml", p.CharacterClass);
            if (SettingsManager.ClassWindowSettings.Enabled)
            {
                WindowManager.ClassWindow.Context.CurrentClass = p.CharacterClass;
            }

            EntitiesManager.ClearNPC();
            GroupWindowViewModel.Instance.ClearAll();

            BuffBarWindowViewModel.Instance.Player.ClearAbnormalities();
            SkillManager.Clear();

            SessionManager.LoadingScreen       = true;
            SessionManager.Logged              = true;
            SessionManager.Encounter           = false;
            SessionManager.CurrentPlayer.Class = p.CharacterClass;
            MessageFactory.Update();
            SessionManager.CurrentPlayer.EntityId = p.entityId;
            SessionManager.CurrentPlayer.PlayerId = p.PlayerId;
            SessionManager.CurrentPlayer.ServerId = p.ServerId;
            SessionManager.CurrentPlayer.Name     = p.Name;
            SessionManager.CurrentPlayer.Level    = p.Level;
            SessionManager.SetPlayerLaurel(SessionManager.CurrentPlayer);

            CharacterWindowViewModel.Instance.Player.Class = p.CharacterClass;
            CharacterWindowViewModel.Instance.Player.Name  = p.Name;
            CharacterWindowViewModel.Instance.Player.Level = p.Level;
            SessionManager.SetPlayerLaurel(CharacterWindowViewModel.Instance.Player);
            InfoWindowViewModel.Instance.SetLoggedIn(p.PlayerId);
        }
コード例 #4
0
        public static void HandleLogin(S_LOGIN p)
        {
            SessionManager.CurrentPlayer.Class = p.CharacterClass;
            WindowManager.ReloadPositions();
            //S_IMAGE_DATA.LoadCachedImages(); //TODO: refactor this thing
            if (Settings.SettingsHolder.ClassWindowSettings.Enabled) ClassWindowViewModel.Instance.CurrentClass = p.CharacterClass;
            AbnormalityManager.SetAbnormalityTracker(p.CharacterClass);
            SessionManager.Server = BasicTeraData.Instance.Servers.GetServer(p.ServerId);
            if (!Settings.SettingsHolder.StatSent) App.SendUsageStat();
            Settings.SettingsHolder.LastRegion = SessionManager.Language;
            TimeManager.Instance.SetServerTimeZone(Settings.SettingsHolder.LastRegion);
            TimeManager.Instance.SetGuildBamTime(false);
            SessionManager.InitDatabases(Settings.SettingsHolder.LastRegion);
            SkillManager.Clear();
            CooldownWindowViewModel.Instance.LoadSkills(p.CharacterClass);
            WindowManager.FloatingButton.SetMoongourdButtonVisibility();
            EntityManager.ClearNPC();
            GroupWindowViewModel.Instance.ClearAll();
            ChatWindowManager.Instance.BlockedUsers.Clear();
            SessionManager.CurrentPlayer.ClearAbnormalities();

            SessionManager.LoadingScreen = true;
            SessionManager.Logged = true;
            SessionManager.Encounter = false;
            MessageFactory.Update();
            SessionManager.CurrentPlayer.EntityId = p.EntityId;
            SessionManager.CurrentPlayer.PlayerId = p.PlayerId;
            SessionManager.CurrentPlayer.ServerId = p.ServerId;
            SessionManager.CurrentPlayer.Name = p.Name;
            SessionManager.CurrentPlayer.Level = p.Level;
            SessionManager.SetPlayerLaurel(SessionManager.CurrentPlayer);
            WindowManager.Dashboard.VM.SetLoggedIn(p.PlayerId);
            SessionManager.GuildMembersNames.Clear();
            //if (Settings.Settings.LastRegion == "NA")
            //    Task.Delay(20000).ContinueWith(t => ChatWindowManager.Instance.AddTccMessage(App.ThankYou_mEME));

        }
コード例 #5
0
 private void OnLogin(S_LOGIN m)
 {
     Clear();
 }
コード例 #6
0
        public override void Process()
        {
            S_SELECT_USER sSelectUser = new S_SELECT_USER();

            sSelectUser.Send(this.Connection);

            S_UPDATE_CONTENTS_ON_OFF sUpdateContentsOnOff1 = new S_UPDATE_CONTENTS_ON_OFF(2);

            sUpdateContentsOnOff1.Send(this.Connection);

            S_UPDATE_CONTENTS_ON_OFF sUpdateContentsOnOff2 = new S_UPDATE_CONTENTS_ON_OFF(3);

            sUpdateContentsOnOff2.Send(this.Connection);

            S_UPDATE_CONTENTS_ON_OFF sUpdateContentsOnOff3 = new S_UPDATE_CONTENTS_ON_OFF(4);

            sUpdateContentsOnOff3.Send(this.Connection);

            S_UPDATE_CONTENTS_ON_OFF sUpdateContentsOnOff4 = new S_UPDATE_CONTENTS_ON_OFF(8);

            sUpdateContentsOnOff4.Send(this.Connection);

            S_UPDATE_CONTENTS_ON_OFF sUpdateContentsOnOff5 = new S_UPDATE_CONTENTS_ON_OFF(9);

            sUpdateContentsOnOff5.Send(this.Connection);

            S_BROCAST_GUILD_FLAG sBrocastGuildFlag = new S_BROCAST_GUILD_FLAG();

            sBrocastGuildFlag.Send(this.Connection);

            if (this.Connection.player.GM == 1)
            {
                S_QA_SET_ADMIN_LEVEL sQaSetAdminLevel = new S_QA_SET_ADMIN_LEVEL();
                sQaSetAdminLevel.Send(this.Connection);
            }

            S_LOGIN sLogin = new S_LOGIN(this.Connection.player);

            sLogin.Send(this.Connection);

            S_SHOW_NPC_TO_MAP sShowNpcToMap = new S_SHOW_NPC_TO_MAP();

            sShowNpcToMap.Send(this.Connection);

            S_PLAYER_STAT_UPDATE sPlayerStatUpdate = new S_PLAYER_STAT_UPDATE(this.Connection.player);

            sPlayerStatUpdate.Send(this.Connection);

            S_INVEN sInven = new S_INVEN(this.Connection.player);

            sInven.Send(this.Connection);

            S_AVAILABLE_SOCIAL_LIST sAvailableSocialList = new S_AVAILABLE_SOCIAL_LIST();

            sAvailableSocialList.Send(this.Connection);

            S_CLEAR_QUEST_INFO sClearQuestInfo = new S_CLEAR_QUEST_INFO();

            sClearQuestInfo.Send(this.Connection);

            S_DAILY_QUEST_COMPLETE_COUNT sDailyQuestCompleteCount = new S_DAILY_QUEST_COMPLETE_COUNT();

            sDailyQuestCompleteCount.Send(this.Connection);

            S_COMPLETED_MISSION_INFO sCompletedMissionInfo = new S_COMPLETED_MISSION_INFO();

            sCompletedMissionInfo.Send(this.Connection);

            S_ARTISAN_SKILL_LIST sArtisanSkillList = new S_ARTISAN_SKILL_LIST();

            sArtisanSkillList.Send(this.Connection);

            S_ARTISAN_RECIPE_LIST sArtisanRecipeList = new S_ARTISAN_RECIPE_LIST();

            sArtisanRecipeList.Send(this.Connection);

            S_PET_INCUBATOR_INFO_CHANGE sPetIncubatorInfoChange = new S_PET_INCUBATOR_INFO_CHANGE();

            sPetIncubatorInfoChange.Send(this.Connection);

            S_MOVE_DISTANCE_DELTA sMoveDistanceDelta = new S_MOVE_DISTANCE_DELTA();

            sMoveDistanceDelta.Send(this.Connection);

            S_MY_DESCRIPTION sMyDescription = new S_MY_DESCRIPTION();

            sMyDescription.Send(this.Connection);

            S_F2P_PremiumUser_Permission sF2PPremiumUserPermission = new S_F2P_PremiumUser_Permission();

            sF2PPremiumUserPermission.Send(this.Connection);

            S_HUDDLE_ADDING sHuddleAdding = new S_HUDDLE_ADDING();

            sHuddleAdding.Send(this.Connection);

            S_MASSTIGE_STATUS sMasstigeStatus = new S_MASSTIGE_STATUS();

            sMasstigeStatus.Send(this.Connection);

            S_AVAILABLE_EVENT_MATCHING_LIST sAvailableEventMatchingList = new S_AVAILABLE_EVENT_MATCHING_LIST();

            sAvailableEventMatchingList.Send(this.Connection);

            S_CURRENT_ELECTION_STATE sCurrentElectionState = new S_CURRENT_ELECTION_STATE();

            sCurrentElectionState.Send(this.Connection);

            S_USER_ITEM_EQUIP_CHANGER sUserItemEquipChanger = new S_USER_ITEM_EQUIP_CHANGER(this.Connection.player.playerId);

            sUserItemEquipChanger.Send(this.Connection);

            S_FESTIVAL_LIST sFestivalList = new S_FESTIVAL_LIST();

            sFestivalList.Send(this.Connection);

            S_LOAD_TOPO sLoadTopo = new S_LOAD_TOPO(this.Connection.player);

            sLoadTopo.Send(this.Connection);

            S_LOAD_HINT sLoadHint = new S_LOAD_HINT();

            sLoadHint.Send(this.Connection);

            S_ACCOUNT_BENEFIT_LIST sAccountBenefitList = new S_ACCOUNT_BENEFIT_LIST(this.Connection.Account);

            sAccountBenefitList.Send(this.Connection);

            S_SEND_USER_PLAY_TIME sSendUserPlayTime = new S_SEND_USER_PLAY_TIME();

            sSendUserPlayTime.Send(this.Connection);

            S_UPDATE_NPCGUILD sUpdateNpcguild = new S_UPDATE_NPCGUILD(this.Connection.player);

            sUpdateNpcguild.Send(this.Connection);

            S_COMPLETED_MISSION_INFO sCompletedMissionInfo2 = new S_COMPLETED_MISSION_INFO();

            sCompletedMissionInfo2.Send(this.Connection);

            S_FATIGABILITY_POINT sFatigabilityPoint = new S_FATIGABILITY_POINT();

            sFatigabilityPoint.Send(this.Connection);

            S_LOAD_EP_INFO sLoadEpInfo = new S_LOAD_EP_INFO();

            sLoadEpInfo.Send(this.Connection);
        }