Ejemplo n.º 1
0
    private void changeParentChatMode()
    {
        GameObject gameObject = GameObject.Find("Main");

        if (null != gameObject)
        {
            Lobby component = gameObject.GetComponent <Lobby>();
            if (null != component)
            {
                component.lobbyChat.ChatMode = chatMode;
            }
            Briefing4TeamMatch component2 = gameObject.GetComponent <Briefing4TeamMatch>();
            if (null != component2)
            {
                component2.lobbyChat.ChatMode = chatMode;
            }
            BattleChat component3 = gameObject.GetComponent <BattleChat>();
            if (null != component3)
            {
                component3.ChatMode = chatMode;
            }
            SquadingMain component4 = gameObject.GetComponent <SquadingMain>();
            if (null != component4)
            {
                component4.lobbyChat.ChatMode = chatMode;
            }
            SquadMain component5 = gameObject.GetComponent <SquadMain>();
            if (null != component5)
            {
                component5.lobbyChat.ChatMode = chatMode;
            }
        }
    }
Ejemplo n.º 2
0
    private void VerifyChatView()
    {
        GameObject gameObject = GameObject.Find("Main");

        if (null != gameObject)
        {
            Lobby component = gameObject.GetComponent <Lobby>();
            if (null != component)
            {
                chatView = component.bChatView;
            }
            Briefing4TeamMatch component2 = gameObject.GetComponent <Briefing4TeamMatch>();
            if (null != component2)
            {
                chatView = component2.bChatView;
            }
            BattleChat component3 = gameObject.GetComponent <BattleChat>();
            if (null != component3)
            {
                chatView = component3.IsChatting;
            }
            SquadingMain component4 = gameObject.GetComponent <SquadingMain>();
            if (null != component4)
            {
                chatView = true;
            }
            SquadMain component5 = gameObject.GetComponent <SquadMain>();
            if (null != component5)
            {
                chatView = true;
            }
        }
    }
Ejemplo n.º 3
0
    private bool VerifyBriefingRoom()
    {
        GameObject gameObject = GameObject.Find("Main");

        if (null != gameObject)
        {
            Briefing4TeamMatch component = gameObject.GetComponent <Briefing4TeamMatch>();
            if (null != component)
            {
                return(component.GotoLobby());
            }
        }
        return(false);
    }
Ejemplo n.º 4
0
    private void VerifyChatView()
    {
        GameObject gameObject = GameObject.Find("Main");

        if (null != gameObject)
        {
            Lobby component = gameObject.GetComponent <Lobby>();
            if (null != component)
            {
                chatView = component.bChatView;
            }
            Briefing4TeamMatch component2 = gameObject.GetComponent <Briefing4TeamMatch>();
            if (null != component2)
            {
                chatView = component2.bChatView;
            }
        }
    }
Ejemplo n.º 5
0
        public void Apply()
        {
            MyInfoManager.Instance.inventory.Clear();
            foreach (Item item in equipment)
            {
                MyInfoManager.Instance.SetItem(item.Seq, item.Code, item.Usage, -1, 0, 1000);
            }
            GameObject mainObject = GameObject.Find("Main");
            Lobby lobby = mainObject.GetComponent<Lobby>();
            Briefing4TeamMatch roomLobby = mainObject.GetComponent<Briefing4TeamMatch>();
            if (lobby != null)
            {
                lobby.mirror.mySelf.GetComponent<LookCoordinator>().Reset();
                lobby.mirror.Start();
            }

            if (roomLobby != null)
            {
                roomLobby.mirror.mySelf.GetComponent<LookCoordinator>().Reset();
                roomLobby.mirror.Start();
            }
        }
Ejemplo n.º 6
0
    public override bool DoDialog()
    {
        if (target < 0 || target == MyInfoManager.Instance.Seq)
        {
            return(true);
        }
        bool    result = false;
        GUISkin skin   = GUI.skin;

        GUI.skin = GUISkinFinder.Instance.GetGUISkin();
        Rect rc = crdBtnBase;

        if (RoomManager.Instance.HaveCurrentRoomInfo)
        {
            if (GlobalVars.Instance.MyButton(rc, StringMgr.Instance.Get("INVITE_MENU"), "BtnBlue"))
            {
                CSNetManager.Instance.Sock.SendCS_INVITE_REQ(target, targetNickname);
                result = true;
            }
            rc.y += crdBtnBase.height + 4f;
        }
        else
        {
            if (GlobalVars.Instance.MyButton(rc, StringMgr.Instance.Get("JOIN_MENU"), "BtnBlue"))
            {
                CSNetManager.Instance.Sock.SendCS_FOLLOWING_REQ(target, targetNickname);
                result = true;
            }
            rc.y += crdBtnBase.height + 4f;
        }
        if (!MyInfoManager.Instance.IsFriend(target) && !MyInfoManager.Instance.IsBan(target))
        {
            if (GlobalVars.Instance.MyButton(rc, StringMgr.Instance.Get("ADD_FRIEND"), "BtnBlue"))
            {
                CSNetManager.Instance.Sock.SendCS_ADD_FRIEND_REQ(target);
                result = true;
            }
            rc.y += crdBtnBase.height + 4f;
            if (GlobalVars.Instance.MyButton(rc, StringMgr.Instance.Get("ADD_BAN"), "BtnBlue"))
            {
                CSNetManager.Instance.Sock.SendCS_ADD_BAN_REQ(target);
                result = true;
            }
            rc.y += crdBtnBase.height + 4f;
        }
        else
        {
            if (MyInfoManager.Instance.IsFriend(target))
            {
                if (GlobalVars.Instance.MyButton(rc, StringMgr.Instance.Get("DEL_FRIEND"), "BtnBlue"))
                {
                    CSNetManager.Instance.Sock.SendCS_DEL_FRIEND_REQ(target);
                    result = true;
                }
                rc.y += crdBtnBase.height + 4f;
            }
            if (MyInfoManager.Instance.IsBan(target))
            {
                if (GlobalVars.Instance.MyButton(rc, StringMgr.Instance.Get("DEL_BAN"), "BtnBlue"))
                {
                    CSNetManager.Instance.Sock.SendCS_DEL_BAN_REQ(target);
                    result = true;
                }
                rc.y += crdBtnBase.height + 4f;
            }
        }
        if (MyInfoManager.Instance.IsClanStaff && isClanInvitable)
        {
            if (GlobalVars.Instance.MyButton(rc, StringMgr.Instance.Get("CLAN_INVITATION"), "BtnBlue"))
            {
                string title    = "CLAN_INVITATION";
                string contents = "CLAN_INVITATION_COMMENT" + GlobalVars.DELIMITER + "n" + MyInfoManager.Instance.Nickname + GlobalVars.DELIMITER + "n" + MyInfoManager.Instance.ClanName;
                CSNetManager.Instance.Sock.SendCS_SEND_CLAN_INVITATION_REQ(target, targetNickname, title, contents);
                result = true;
            }
            rc.y += crdBtnBase.height + 4f;
        }
        if (isMasterAssign)
        {
            if (GlobalVars.Instance.MyButton(rc, StringMgr.Instance.Get("MASTER_ASSIGN"), "BtnBlue"))
            {
                CSNetManager.Instance.Sock.SendCS_DELEGATE_MASTER_REQ(target);
                result = true;
            }
            rc.y += crdBtnBase.height + 4f;
        }
        if (GlobalVars.Instance.MyButton(rc, StringMgr.Instance.Get("WHISPER"), "BtnBlue"))
        {
            DialogManager.Instance.CloseAll();
            GameObject gameObject = GameObject.Find("Main");
            if (gameObject != null)
            {
                Lobby component = gameObject.GetComponent <Lobby>();
                if (component != null)
                {
                    component.lobbyChat.Message = "/w " + targetNickname + " ";
                    component.lobbyChat.ApplyFocus();
                    component.lobbyChat.CursorToEnd = true;
                }
                Briefing4TeamMatch component2 = gameObject.GetComponent <Briefing4TeamMatch>();
                if (component2 != null)
                {
                    component2.IsMessenger       = false;
                    component2.lobbyChat.Message = "/w " + targetNickname + " ";
                    component2.lobbyChat.ApplyFocus();
                    component2.lobbyChat.CursorToEnd = true;
                }
            }
            result = true;
        }
        rc.y += crdBtnBase.height + 4f;
        if (GlobalVars.Instance.MyButton(rc, StringMgr.Instance.Get("SEND_MEMO"), "BtnBlue"))
        {
            result = true;
            DialogManager.Instance.CloseAll();
            DialogManager.Instance.Push(DialogManager.DIALOG_INDEX.MEMO, targetNickname);
        }
        rc.y += crdBtnBase.height + 4f;
        if (BuildOption.Instance.Props.UseAccuse)
        {
            if (GlobalVars.Instance.MyButton(rc, StringMgr.Instance.Get("REPORT_GM_TITLE_01"), "BtnBlue"))
            {
                AccusationDialog accusationDialog = (AccusationDialog)DialogManager.Instance.Popup(DialogManager.DIALOG_INDEX.ACCUSATION, exclusive: true);
                string[]         users            = new string[1]
                {
                    targetNickname
                };
                accusationDialog?.InitDialog(users);
                result = true;
            }
            rc.y += crdBtnBase.height + 4f;
        }
        if (GlobalVars.Instance.MyButton(rc, StringMgr.Instance.Get("SHOW_PLAYER_INFO"), "BtnBlue"))
        {
            CSNetManager.Instance.Sock.SendCS_PLAYER_DETAIL_REQ(target);
            result = true;
        }
        rc.y += crdBtnBase.height + 4f;
        WindowUtil.EatEvent();
        GUI.skin = skin;
        return(result);
    }