Esempio n. 1
0
        private void Demotion(GameObject go)
        {
            bool flag = this.selectedMember != null && this.gos.ContainsKey(this.selectedMember);

            if (flag)
            {
                A3_LegionMember a3_LegionMember = this.gos[this.selectedMember];
                bool            flag2           = a3_LegionMember.cid == (int)ModelBase <PlayerModel> .getInstance().cid;

                if (flag2)
                {
                    flytxt.flyUseContId("clan_7", null, 0);
                }
                else
                {
                    bool flag3 = a3_LegionMember.clanc == 1;
                    if (flag3)
                    {
                        flytxt.flyUseContId("clan_13", null, 0);
                    }
                    else
                    {
                        BaseProxy <A3_LegionProxy> .getInstance().PromotionOrDemotion((uint)a3_LegionMember.cid, 0u);
                    }
                }
            }
        }
Esempio n. 2
0
        private void PromoteToBeLeader(GameObject go)
        {
            bool flag = this.selectedMember != null && this.gos.ContainsKey(this.selectedMember);

            if (flag)
            {
                A3_LegionMember a3_LegionMember = this.gos[this.selectedMember];
                bool            flag2           = a3_LegionMember.cid == (int)ModelBase <PlayerModel> .getInstance().cid;

                if (flag2)
                {
                    flytxt.flyUseContId("clan_7", null, 0);
                }
                else
                {
                    bool flag3 = a3_LegionMember.clanc < 3;
                    if (flag3)
                    {
                        flytxt.flyUseContId("clan_15", null, 0);
                    }
                    else
                    {
                        BaseProxy <A3_LegionProxy> .getInstance().SendBeLeader((uint)a3_LegionMember.cid);
                    }
                }
            }
        }
Esempio n. 3
0
        private void SetLine(Transform go, A3_LegionMember alm)
        {
            go.name = alm.cid.ToString();
            go.FindChild("zy/job2").gameObject.SetActive(false);
            go.FindChild("zy/job3").gameObject.SetActive(false);
            go.FindChild("zy/job5").gameObject.SetActive(false);
            string text = "";

            switch (alm.clanc)
            {
            case 0:
                text = "新人";
                break;

            case 1:
                text = "会员";
                break;

            case 2:
                text = "精英";
                break;

            case 3:
                text = "元老";
                break;

            case 4:
                text = "领袖";
                break;
            }
            int    lastlogoff = alm.lastlogoff;
            string text2;

            if (lastlogoff != 0)
            {
                text2 = "离线";
            }
            else
            {
                text2 = "在线";
            }
            go.FindChild("hyd").GetComponent <Text>().text  = alm.huoyue.ToString();
            go.FindChild("name").GetComponent <Text>().text = alm.name;
            go.FindChild("jj").GetComponent <Text>().text   = text;
            go.FindChild("zy/job" + alm.carr).gameObject.SetActive(true);
            go.FindChild("zt").GetComponent <Text>().text  = text2;
            go.FindChild("dj").GetComponent <Text>().text  = alm.zhuan.ToString() + "转" + alm.lvl.ToString() + "级";
            go.FindChild("zdl").GetComponent <Text>().text = alm.combpt.ToString();
            go.FindChild("gxd").GetComponent <Text>().text = alm.donate.ToString();
            this.gos[go.gameObject] = alm;
        }
Esempio n. 4
0
        public void AddMember(Variant data)
        {
            A3_LegionMember a3_LegionMember = default(A3_LegionMember);

            a3_LegionMember.cid    = data["cid"];
            a3_LegionMember.donate = data["donate"];
            a3_LegionMember.clanc  = data["clanc"];
            a3_LegionMember.name   = data["name"];
            a3_LegionMember.lvl    = data["lvl"];
            a3_LegionMember.zhuan  = data["zhuan"];
            a3_LegionMember.carr   = data["carr"];
            a3_LegionMember.combpt = data["combpt"];
            a3_LegionMember.huoyue = data["active"];
            bool flag = data.ContainsKey("lastlogoff");

            if (flag)
            {
                a3_LegionMember.lastlogoff = data["lastlogoff"];
            }
            this.members[a3_LegionMember.cid] = a3_LegionMember;
            bool flag2 = (ulong)ModelBase <PlayerModel> .getInstance().cid == (ulong)((long)a3_LegionMember.cid);

            if (flag2)
            {
                bool flag3 = a3_LegionMember.clanc > 1;
                if (flag3)
                {
                    a3_legion expr_13F = a3_legion.mInstance;
                    if (expr_13F != null)
                    {
                        expr_13F.transform.FindChild("s4/tabs/application").gameObject.SetActive(true);
                    }
                }
                else
                {
                    a3_legion expr_169 = a3_legion.mInstance;
                    if (expr_169 != null)
                    {
                        expr_169.transform.FindChild("s4/tabs/application").gameObject.SetActive(false);
                    }
                }
                this.donate = a3_LegionMember.donate;
            }
            bool flag4 = a3_legion_info.mInstance != null;

            if (flag4)
            {
                a3_legion_info.mInstance.buff_up();
            }
        }
Esempio n. 5
0
        public void RefreshApplicant(Variant data)
        {
            Variant variant = data["info"];

            this.applicant.Clear();
            foreach (Variant current in variant._arr)
            {
                A3_LegionMember a3_LegionMember = default(A3_LegionMember);
                a3_LegionMember.cid    = current["cid"];
                a3_LegionMember.name   = current["name"];
                a3_LegionMember.lvl    = current["lvl"];
                a3_LegionMember.zhuan  = current["zhuan"];
                a3_LegionMember.combpt = current["combpt"];
                a3_LegionMember.carr   = current["carr"];
                a3_LegionMember.tm     = current["tm"];
                this.applicant[a3_LegionMember.cid] = a3_LegionMember;
            }
        }
        public void RefreshApplicant(Variant data)
        {
            Variant da = data["info"];

            applicant.Clear();
            foreach (var v in da._arr)
            {
                A3_LegionMember am = new A3_LegionMember();
                am.cid            = v["cid"];
                am.name           = v["name"];
                am.lvl            = v["lvl"];
                am.zhuan          = v["zhuan"];
                am.combpt         = v["combpt"];
                am.carr           = v["carr"];
                am.tm             = v["tm"];
                applicant[am.cid] = am;
            }
        }
        public void AddMember(Variant data)
        {
            //debug.Log("kkkk"+data.dump());
            A3_LegionMember am = new A3_LegionMember();

            am.cid    = data["cid"];
            am.donate = data["donate"];
            am.clanc  = data["clanc"];
            am.name   = data["name"];
            am.lvl    = data["lvl"];
            am.zhuan  = data["zhuan"];
            am.carr   = data["carr"];
            am.combpt = data["combpt"];
            am.huoyue = data["active"];
            if (data.ContainsKey("lastlogoff"))
            {
                am.lastlogoff = data["lastlogoff"];
            }
            members[am.cid] = am;

            if (PlayerModel.getInstance().cid == am.cid)
            {
                if (am.clanc > 1)
                {
                    a3_legion.mInstance?.transform.FindChild("s4/tabs/application").gameObject.SetActive(true);
                }
                else
                {
                    a3_legion.mInstance?.transform.FindChild("s4/tabs/application").gameObject.SetActive(false);
                }
                donate = am.donate;
            }
            if (a3_legion_info.mInstance != null)
            {
                a3_legion_info.mInstance.buff_up();
            }
        }