Exemplo n.º 1
0
        public void refreshAch_point()
        {
            BaseProxy <A3_RankProxy> .getInstance().sendProxy(A3_RankProxy.RANKREFRESH, -1, false);

            this.ach_num.text = (Globle.getBigText(ModelBase <PlayerModel> .getInstance().ach_point) ?? "");
        }
Exemplo n.º 2
0
        private void show_eqp()
        {
            bool flag = BaseProxy <OffLineExpProxy> .getInstance().eqp.Count <= 16;

            if (flag)
            {
                this.contain.GetComponent <GridLayoutGroup>().constraint      = GridLayoutGroup.Constraint.FixedColumnCount;
                this.contain.GetComponent <GridLayoutGroup>().constraintCount = 8;
            }
            else
            {
                this.contain.GetComponent <GridLayoutGroup>().constraint      = GridLayoutGroup.Constraint.FixedRowCount;
                this.contain.GetComponent <GridLayoutGroup>().constraintCount = 2;
            }
            using (List <a3_BagItemData> .Enumerator enumerator = BaseProxy <OffLineExpProxy> .getInstance().eqp.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    a3_BagItemData d          = enumerator.Current;
                    GameObject     gameObject = UnityEngine.Object.Instantiate <GameObject>(this.eqp_icon);
                    gameObject.SetActive(true);
                    gameObject.transform.SetParent(this.contain.transform, false);
                    gameObject.transform.FindChild("equp").GetComponent <Image>().sprite = (Resources.Load("icon/item/" + d.tpid, typeof(Sprite)) as Sprite);
                    Transform   arg_131_0 = gameObject.transform;
                    object      arg_12C_0 = "quality_bg/";
                    a3_ItemData confdata  = d.confdata;
                    arg_131_0.FindChild(arg_12C_0 + confdata.equip_level).gameObject.SetActive(true);
                    BaseButton baseButton = new BaseButton(gameObject.transform.FindChild("equp").transform, 1, 1);
                    baseButton.onClick = delegate(GameObject goo)
                    {
                        ArrayList      arrayList = new ArrayList();
                        a3_BagItemData d         = d;
                        arrayList.Add(d);
                        arrayList.Add(equip_tip_type.Comon_tip);
                        InterfaceMgr.getInstance().open(InterfaceMgr.A3_EQUIPTIP, arrayList, false);
                    };
                }
            }
            bool flag2 = BaseProxy <OffLineExpProxy> .getInstance().eqp.Count < 16;

            if (flag2)
            {
                for (int i = 0; i < 16 - BaseProxy <OffLineExpProxy> .getInstance().eqp.Count; i++)
                {
                    GameObject gameObject2 = UnityEngine.Object.Instantiate <GameObject>(this.eqp_icon);
                    gameObject2.SetActive(true);
                    gameObject2.transform.SetParent(this.contain.transform, false);
                    gameObject2.transform.FindChild("equp").gameObject.SetActive(false);
                }
            }
            else
            {
                bool flag3 = BaseProxy <OffLineExpProxy> .getInstance().eqp.Count % 2 != 0;

                if (flag3)
                {
                    GameObject gameObject3 = UnityEngine.Object.Instantiate <GameObject>(this.eqp_icon);
                    gameObject3.SetActive(true);
                    gameObject3.transform.SetParent(this.contain.transform, false);
                    gameObject3.transform.FindChild("equp").gameObject.SetActive(false);
                }
            }
            this.contain.GetComponent <RectTransform>().sizeDelta = new Vector2((this.eqp_icon.GetComponent <RectTransform>().sizeDelta.x + 2.5f) * (float)Mathf.CeilToInt((float)BaseProxy <OffLineExpProxy> .getInstance().eqp.Count / 2f), this.eqp_icon.GetComponent <RectTransform>().sizeDelta.x * 2f);
        }
Exemplo n.º 3
0
 private void OnDestroy()
 {
     BaseProxy <TeamProxy> .getInstance().removeEventListener(237u, new Action <GameEvent>(this.killNum));
 }
Exemplo n.º 4
0
        public override void init()
        {
            this.refreshExp();
            this.enterbtn  = new BaseButton(base.getTransformByPath("choiceDef/easy"), 1, 1);
            this.enterbtn1 = new BaseButton(base.getTransformByPath("choiceDef/normal"), 1, 1);
            this.enterbtn2 = new BaseButton(base.getTransformByPath("choiceDef/deffi"), 1, 1);
            this.enterbtn3 = new BaseButton(base.getTransformByPath("choiceDef/god"), 1, 1);
            this.pzhuan    = (int)ModelBase <PlayerModel> .getInstance().up_lvl;

            this.pji = (int)ModelBase <PlayerModel> .getInstance().lvl;

            this.changeSth();
            this.enterbtn.onClick = delegate(GameObject go)
            {
                base.gameObject.SetActive(false);
                bool flag = BaseProxy <TeamProxy> .getInstance().MyTeamData.itemTeamDataList.Count < 2;

                if (flag)
                {
                    Variant variant = new Variant();
                    variant["npcid"]    = 0;
                    variant["ltpid"]    = 108;
                    variant["diff_lvl"] = 1;
                    a3_counterpart.lvl  = variant["diff_lvl"];
                    BaseProxy <LevelProxy> .getInstance().sendCreate_lvl(variant);
                }
                else
                {
                    this.zhaunJi(1);
                    a3_counterpart_multi_exp.open = true;
                    bool flag2 = this.canINfb();
                    if (flag2)
                    {
                        BaseProxy <TeamProxy> .getInstance().SendReady(true, 108u, 1u);

                        a3_counterpart.instance.getTransformByPath("ready/yesorno/Text/name").GetComponent <Text>().text = "托维尔墓穴--简单";
                        a3_counterpart.instance.tenSen();
                        bool meIsCaptain = BaseProxy <TeamProxy> .getInstance().MyTeamData.meIsCaptain;

                        if (meIsCaptain)
                        {
                            a3_counterpart.instance.getTransformByPath("ready/yesorno/show/0/name").GetComponent <Text>().text = "自己";
                        }
                        a3_counterpart.instance.getGameObjectByPath("currentTeam").SetActive(true);
                        a3_counterpart.instance.getGameObjectByPath("ready").SetActive(true);
                        a3_counterpart.instance.getButtonByPath("ready/yesorno/yes").interactable = false;
                    }
                }
            };
            this.enterbtn1.onClick = delegate(GameObject go)
            {
                base.gameObject.SetActive(false);
                bool flag = BaseProxy <TeamProxy> .getInstance().MyTeamData.itemTeamDataList.Count < 2;

                if (flag)
                {
                    Variant variant = new Variant();
                    variant["npcid"]    = 0;
                    variant["ltpid"]    = 108;
                    variant["diff_lvl"] = 2;
                    a3_counterpart.lvl  = variant["diff_lvl"];
                    BaseProxy <LevelProxy> .getInstance().sendCreate_lvl(variant);
                }
                else
                {
                    this.zhaunJi(2);
                    a3_counterpart_multi_exp.open = true;
                    bool flag2 = this.canINfb();
                    if (flag2)
                    {
                        BaseProxy <TeamProxy> .getInstance().SendReady(true, 108u, 2u);

                        a3_counterpart.instance.getTransformByPath("ready/yesorno/Text/name").GetComponent <Text>().text = "托维尔墓穴--普通";
                        a3_counterpart.instance.tenSen();
                        bool meIsCaptain = BaseProxy <TeamProxy> .getInstance().MyTeamData.meIsCaptain;

                        if (meIsCaptain)
                        {
                            a3_counterpart.instance.getTransformByPath("ready/yesorno/show/0/name").GetComponent <Text>().text = "自己";
                        }
                        a3_counterpart.instance.getGameObjectByPath("currentTeam").SetActive(true);
                        a3_counterpart.instance.getGameObjectByPath("ready").SetActive(true);
                        a3_counterpart.instance.getButtonByPath("ready/yesorno/yes").interactable = false;
                    }
                }
            };
            this.enterbtn2.onClick = delegate(GameObject go)
            {
                base.gameObject.SetActive(false);
                bool flag = BaseProxy <TeamProxy> .getInstance().MyTeamData.itemTeamDataList.Count < 2;

                if (flag)
                {
                    Variant variant = new Variant();
                    variant["npcid"]    = 0;
                    variant["ltpid"]    = 108;
                    variant["diff_lvl"] = 3;
                    a3_counterpart.lvl  = variant["diff_lvl"];
                    BaseProxy <LevelProxy> .getInstance().sendCreate_lvl(variant);
                }
                else
                {
                    this.zhaunJi(3);
                    a3_counterpart_multi_exp.open = true;
                    bool flag2 = this.canINfb();
                    if (flag2)
                    {
                        BaseProxy <TeamProxy> .getInstance().SendReady(true, 108u, 3u);

                        a3_counterpart.instance.getTransformByPath("ready/yesorno/Text/name").GetComponent <Text>().text = "托维尔墓穴--困难";
                        a3_counterpart.instance.tenSen();
                        bool meIsCaptain = BaseProxy <TeamProxy> .getInstance().MyTeamData.meIsCaptain;

                        if (meIsCaptain)
                        {
                            a3_counterpart.instance.getTransformByPath("ready/yesorno/show/0/name").GetComponent <Text>().text = "自己";
                        }
                        a3_counterpart.instance.getGameObjectByPath("currentTeam").SetActive(true);
                        a3_counterpart.instance.getGameObjectByPath("ready").SetActive(true);
                        a3_counterpart.instance.getButtonByPath("ready/yesorno/yes").interactable = false;
                    }
                }
            };
            this.enterbtn3.onClick = delegate(GameObject go)
            {
                base.gameObject.SetActive(false);
                bool flag = BaseProxy <TeamProxy> .getInstance().MyTeamData.itemTeamDataList.Count < 2;

                if (flag)
                {
                    Variant variant = new Variant();
                    variant["npcid"]    = 0;
                    variant["ltpid"]    = 108;
                    variant["diff_lvl"] = 4;
                    a3_counterpart.lvl  = variant["diff_lvl"];
                    BaseProxy <LevelProxy> .getInstance().sendCreate_lvl(variant);
                }
                else
                {
                    this.zhaunJi(4);
                    a3_counterpart_multi_exp.open = true;
                    bool flag2 = this.canINfb();
                    if (flag2)
                    {
                        BaseProxy <TeamProxy> .getInstance().SendReady(true, 108u, 4u);

                        a3_counterpart.instance.getTransformByPath("ready/yesorno/Text/name").GetComponent <Text>().text = "托维尔墓穴--地狱";
                        a3_counterpart.instance.tenSen();
                        bool meIsCaptain = BaseProxy <TeamProxy> .getInstance().MyTeamData.meIsCaptain;

                        if (meIsCaptain)
                        {
                            a3_counterpart.instance.getTransformByPath("ready/yesorno/show/0/name").GetComponent <Text>().text = "自己";
                        }
                        a3_counterpart.instance.getGameObjectByPath("currentTeam").SetActive(true);
                        a3_counterpart.instance.getGameObjectByPath("ready").SetActive(true);
                        a3_counterpart.instance.getButtonByPath("ready/yesorno/yes").interactable = false;
                    }
                }
            };
        }
Exemplo n.º 5
0
        public override void onClosed()
        {
            BaseProxy <ExchangeProxy> .getInstance().removeEventListener(ExchangeProxy.EVENT_EXCHANGE_SUC, new Action <GameEvent>(this.onExchangeSuccess));

            BaseProxy <ExchangeProxy> .getInstance().removeEventListener(ExchangeProxy.EVENT_EXCHANGE_SYNC_COUNT, new Action <GameEvent>(this.onSyncCount));
        }
Exemplo n.º 6
0
 public override void onClose()
 {
     base.onClose();
     BaseProxy <A3_LegionProxy> .getInstance().removeEventListener(15u, new Action <GameEvent>(this.RefreshDiary));
 }
Exemplo n.º 7
0
        private void OnShowTaskUi()
        {
            bool isComplete = this.curTask.isComplete;

            if (isComplete)
            {
                this.ShowTask();
            }
            else
            {
                this.conIcon.gameObject.SetActive(true);
                this.OnShowAwardInfo();
                bool flag = this.curTask.targetType == TaskTargetType.VISIT;
                if (flag)
                {
                    BaseProxy <A3_TaskProxy> .getInstance().addEventListener(3u, new Action <GameEvent>(this.OnRefreshTask));

                    BaseProxy <A3_TaskProxy> .getInstance().SendTalkWithNpc(dialog.m_npc.id);
                }
                bool flag2 = this.curTask.targetType == TaskTargetType.GETEXP;
                if (flag2)
                {
                    SXML sXML  = XMLMgr.instance.GetSXML("task.Task", "id==" + this.curTask.taskId);
                    int  num   = int.Parse(sXML.getString("trigger"));
                    bool flag3 = num == 2;
                    if (flag3)
                    {
                        this.btnNext.interactable = true;
                        this.btnNext.transform.FindChild("Text").GetComponent <Text>().text = "转生";
                        this.btnNext.onClick = new Action <GameObject>(this.OnOpenZhuan);
                    }
                }
                bool flag4 = this.curTask.targetType == TaskTargetType.GET_ITEM_GIVEN;
                if (flag4)
                {
                    A3_TaskOpt.Instance.taskItemId = (uint)this.curTask.completionAim;
                    this.btnNext.transform.FindChild("Text").GetComponent <Text>().text = "上交物品";
                    BaseButton expr_17B = this.btnNext;
                    expr_17B.onClick = (Action <GameObject>) Delegate.Combine(expr_17B.onClick, new Action <GameObject>(delegate(GameObject go)
                    {
                        int num2          = this.curTask.completion - this.curTask.taskRate;
                        int itemNumByTpid = ModelBase <a3_BagModel> .getInstance().getItemNumByTpid(A3_TaskOpt.Instance.taskItemId);
                        bool flag5        = itemNumByTpid < num2;
                        if (flag5)
                        {
                            InterfaceMgr.getInstance().close(InterfaceMgr.DIALOG);
                            ArrayList arrayList = new ArrayList();
                            arrayList.Add(ModelBase <a3_BagModel> .getInstance().getItemDataById(A3_TaskOpt.Instance.taskItemId));
                            InterfaceMgr.getInstance().open(InterfaceMgr.A3_ITEMLACK, arrayList, false);
                            A3_TaskOpt.Instance.HideSubmitItem();
                        }
                        else
                        {
                            A3_TaskOpt expr_92 = A3_TaskOpt.Instance;
                            if (expr_92 != null)
                            {
                                expr_92.ShowSubmitItem();
                            }
                        }
                    }));
                }
            }
        }
Exemplo n.º 8
0
        private void OnLegion(Variant data)
        {
            int num = data["res"];

            debug.Log("军团消息" + data.dump());
            Variant variant = new Variant();

            switch (num)
            {
            case 1:
            {
                bool flag = data.ContainsKey("id");
                if (flag)
                {
                    A3_LegionData a3_LegionData = default(A3_LegionData);
                    a3_LegionData.id     = data["id"];
                    a3_LegionData.lvl    = data["lvl"];
                    a3_LegionData.clname = data["clname"];
                    a3_LegionData.name   = data["name"];
                    a3_LegionData.notice = data["notice"];
                    a3_LegionData.gold   = data["money"];
                    a3_LegionData.plycnt = data["plycnt"];
                    a3_LegionData.exp    = data["clan_pt"];
                    bool flag2 = data.ContainsKey("ol_cnt");
                    if (flag2)
                    {
                        a3_LegionData.ol_cnt = data["ol_cnt"];
                    }
                    bool flag3 = data.ContainsKey("combpt");
                    if (flag3)
                    {
                        a3_LegionData.combpt = data["combpt"];
                    }
                    bool flag4 = data.ContainsKey("rankidx");
                    if (flag4)
                    {
                        a3_LegionData.rankidx = data["rankidx"];
                    }
                    bool flag5 = data.ContainsKey("clanc");
                    if (flag5)
                    {
                        a3_LegionData.clanc = data["clanc"];
                    }
                    a3_LegionData.anabasis_tm = data["anabasis_tm"];
                    ModelBase <A3_LegionModel> .getInstance().myLegion = a3_LegionData;

                    int num2 = data["direct_join"];
                    ModelBase <A3_LegionModel> .getInstance().CanAutoApply = (num2 == 1);

                    ModelBase <A3_LegionModel> .getInstance().SetMyLegion(a3_LegionData.lvl);

                    ModelBase <A3_LegionModel> .getInstance().donate = data["donate"];

                    this.gold = a3_LegionData.gold;
                    this.lvl  = a3_LegionData.lvl;
                }
                else
                {
                    ModelBase <A3_LegionModel> .getInstance().myLegion = default(A3_LegionData);
                }
                base.dispatchEvent(GameEvent.Create(1u, this, data, false));
                break;
            }

            case 2:
                base.dispatchEvent(GameEvent.Create(2u, this, data, false));
                base.removeEventListener(24u, new Action <GameEvent>(a3_legion.mInstance.SetCheckName));
                break;

            case 3:
            {
                int num3 = data["clid"];
                base.dispatchEvent(GameEvent.Create(3u, this, data, false));
                flytxt.instance.fly("申请成功!", 0, default(Color), null);
                break;
            }

            case 4:
                base.dispatchEvent(GameEvent.Create(4u, this, data, false));
                break;

            case 5:
                ModelBase <A3_LegionModel> .getInstance().myLegion.gold = data["money"];

                ModelBase <A3_LegionModel> .getInstance().myLegion.lvl = data["lvl"];

                ModelBase <A3_LegionModel> .getInstance().myLegion.exp = 0;

                ModelBase <A3_LegionModel> .getInstance().SetMyLegion(ModelBase <A3_LegionModel> .getInstance().myLegion.lvl);

                base.dispatchEvent(GameEvent.Create(1u, this, data, false));
                flytxt.instance.fly("升级骑士团成功!", 0, default(Color), null);
                break;

            case 6:
            {
                int num4 = data["money"];
                flytxt.instance.fly("获得了" + num4 / 1000 + "点贡献度", 0, default(Color), null);
                this.SendGetInfo();
                break;
            }

            case 8:
                this.SendGetMember();
                break;

            case 9:
            {
                ModelBase <A3_LegionModel> .getInstance().myLegion = default(A3_LegionData);

                base.dispatchEvent(GameEvent.Create(9u, this, data, false));
                TaskData expr_4C9 = a3_task_auto.instance.executeTask;
                bool     flag6    = expr_4C9 != null && expr_4C9.taskT == TaskType.CLAN;
                if (flag6)
                {
                    SelfRole.fsm.Stop();
                    flytxt.instance.fly("你已退出军团无法继续进行任务", 0, default(Color), null);
                }
                else
                {
                    flytxt.instance.fly("您已成功退出骑士团!", 0, default(Color), null);
                }
                break;
            }

            case 10:
            {
                int  key   = data["cid"];
                bool flag7 = ModelBase <A3_LegionModel> .getInstance().members.ContainsKey(key);

                if (flag7)
                {
                    ModelBase <A3_LegionModel> .getInstance().members.Remove(key);
                }
                base.dispatchEvent(GameEvent.Create(14u, this, data, false));
                break;
            }

            case 11:
            {
                int num5 = data["direct_join"];
                ModelBase <A3_LegionModel> .getInstance().CanAutoApply = (num5 == 1);

                base.dispatchEvent(GameEvent.Create(11u, this, data, false));
                break;
            }

            case 12:
                base.dispatchEvent(GameEvent.Create(12u, this, data, false));
                break;

            case 14:
                variant = data["pls"];
                ModelBase <A3_LegionModel> .getInstance().members.Clear();

                foreach (Variant current in variant._arr)
                {
                    ModelBase <A3_LegionModel> .getInstance().AddMember(current);
                }
                base.dispatchEvent(GameEvent.Create(14u, this, data, false));
                break;

            case 15:
            {
                bool flag8 = data != null && data.ContainsKey("clanlog_list") && data["clanlog_list"]._arr.Count > 0;
                if (flag8)
                {
                    ModelBase <A3_LegionModel> .getInstance().AddLog(data);
                }
                base.dispatchEvent(GameEvent.Create(15u, this, data, false));
                break;
            }

            case 16:
                ModelBase <A3_LegionModel> .getInstance().RefreshApplicant(data);

                base.dispatchEvent(GameEvent.Create(16u, this, data, false));
                break;

            case 17:
                ModelBase <A3_LegionModel> .getInstance().list.Clear();

                ModelBase <A3_LegionModel> .getInstance().list2.Clear();

                variant = data["info"];
                foreach (Variant current2 in variant._arr)
                {
                    A3_LegionData item = default(A3_LegionData);
                    item.id          = current2["id"];
                    item.clname      = current2["clname"];
                    item.combpt      = current2["combpt"];
                    item.lvl         = current2["lvl"];
                    item.name        = current2["name"];
                    item.plycnt      = current2["plycnt"];
                    item.direct_join = current2["direct_join"];
                    item.huoyue      = current2["last_active"];
                    ModelBase <A3_LegionModel> .getInstance().list.Add(item);

                    ModelBase <A3_LegionModel> .getInstance().list2.Add(item);
                }
                base.dispatchEvent(GameEvent.Create(17u, this, data, false));
                break;

            case 18:
                base.dispatchEvent(GameEvent.Create(18u, this, data, false));
                break;

            case 22:
                this.SendGetInfo();
                base.dispatchEvent(GameEvent.Create(22u, this, data, false));
                flytxt.instance.fly("您已成功解散骑士团!", 0, default(Color), null);
                break;

            case 24:
                base.dispatchEvent(GameEvent.Create(24u, this, data, false));
                break;

            case 25:
                flytxt.instance.fly("军团buff提升成功", 0, default(Color), null);
                break;

            case 26:
                base.dispatchEvent(GameEvent.Create(26u, this, data, false));
                break;

            case 32:
            {
                bool flag9 = ModelBase <A3_LegionModel> .getInstance().myLegion.id != 0;

                if (flag9)
                {
                    bool flag10 = ModelBase <A3_TaskModel> .getInstance() == null || ModelBase <A3_TaskModel> .getInstance().GetClanTask() == null;

                    int taskCount;
                    if (flag10)
                    {
                        taskCount = 9;
                    }
                    else
                    {
                        taskCount = ModelBase <A3_TaskModel> .getInstance().GetClanTask().taskCount;
                    }
                    Dictionary <uint, int> clanRewardDic = ModelBase <A3_TaskModel> .getInstance().GetClanRewardDic(taskCount);

                    flytxt.instance.StopDelayFly();
                    bool flag11 = data.ContainsKey("money");
                    if (flag11)
                    {
                        bool flag12 = clanRewardDic.ContainsKey((uint)A3_TaskModel.REWARD_CLAN_MONEY);
                        if (flag12)
                        {
                            flytxt.instance.AddDelayFlytxt("军团资金+" + clanRewardDic[(uint)A3_TaskModel.REWARD_CLAN_MONEY]);
                        }
                        ModelBase <A3_LegionModel> .getInstance().myLegion.gold = data["money"]._int;
                    }
                    bool flag13 = data.ContainsKey("clan_pt");
                    if (flag13)
                    {
                        bool flag14 = clanRewardDic.ContainsKey((uint)A3_TaskModel.REWARD_CLAN_EXP);
                        if (flag14)
                        {
                            flytxt.instance.AddDelayFlytxt("军团经验+" + clanRewardDic[(uint)A3_TaskModel.REWARD_CLAN_EXP]);
                        }
                        ModelBase <A3_LegionModel> .getInstance().myLegion.clan_pt = data["clan_pt"]._int;
                    }
                    bool flag15 = data.ContainsKey("donate");
                    if (flag15)
                    {
                        bool flag16 = clanRewardDic.ContainsKey((uint)A3_TaskModel.REWARD_CLAN_DONATE);
                        if (flag16)
                        {
                            flytxt.instance.AddDelayFlytxt("军团贡献+" + clanRewardDic[(uint)A3_TaskModel.REWARD_CLAN_DONATE]);
                        }
                        ModelBase <A3_LegionModel> .getInstance().donate = data["donate"]._int;
                    }
                    bool flag17 = data.ContainsKey("active");
                    if (flag17)
                    {
                        ModelBase <A3_LegionModel> .getInstance().myLegion.huoyue = data["active"]._int;
                    }
                    flytxt.instance.StartDelayFly(0f, 0.2f);
                }
                break;
            }

            case 33:
            {
                uint   clanid = data["clanid"];
                string text   = data["name"];
                string text2  = data["clan_name"];
                int    num6   = data["clan_lvl"];
                bool   isOn   = a3_legion.mInstance.dic0.isOn;
                if (isOn)
                {
                    this.SendAcceptInvite(clanid, true);
                    flytxt.instance.fly("您已接受军团邀请!", 0, default(Color), null);
                    BaseProxy <a3_dartproxy> .getInstance().sendDartGo();

                    base.dispatchEvent(GameEvent.Create(19u, this, data, false));
                }
                else
                {
                    MsgBoxMgr.getInstance().showConfirm(string.Concat(new object[]
                        {
                            text,
                            " 邀请你加入 ",
                            num6,
                            "级骑士团 ",
                            text2
                        }), delegate
                        {
                            this.SendAcceptInvite(clanid, true);
                        }, delegate
                        {
                            this.SendAcceptInvite(clanid, false);
                        }, 0);
                }
                base.dispatchEvent(GameEvent.Create(33u, this, data, false));
                break;
            }

            case 34:
            {
                bool flag18 = data["approved"];
                bool flag19 = flag18;
                if (flag19)
                {
                    BaseProxy <A3_LegionProxy> .getInstance().SendGetInfo();
                }
                BaseProxy <a3_dartproxy> .getInstance().sendDartGo();

                base.dispatchEvent(GameEvent.Create(34u, this, data, false));
                break;
            }

            case 35:
            {
                BaseProxy <A3_LegionProxy> .getInstance().SendGetMember();

                int    num7   = data["cid"];
                int    num8   = data["clanc"];
                int    num9   = data["oldclanc"];
                string str    = data["name"];
                string str2   = string.Empty;
                bool   flag20 = num7 == (int)ModelBase <PlayerModel> .getInstance().cid;

                if (flag20)
                {
                    str = "您";
                }
                bool flag21 = num9 > num8;
                if (flag21)
                {
                    str2 = "的军团职位被降为:";
                }
                else
                {
                    str2 = "的军团职位被升为:";
                }
                flytxt.instance.fly(str + str2 + ModelBase <A3_LegionModel> .getInstance().GetClancToName(num8), 0, default(Color), null);
                break;
            }

            case 36:
            {
                BaseProxy <A3_LegionProxy> .getInstance().SendGetInfo();

                bool flag22 = a3_buff.instance != null;
                if (flag22)
                {
                    a3_buff.instance.Quited();
                }
                break;
            }

            case 37:
                flytxt.instance.fly("您已成功加入骑士团!", 0, default(Color), null);
                BaseProxy <a3_dartproxy> .getInstance().sendDartGo();

                base.dispatchEvent(GameEvent.Create(2u, this, data, false));
                break;
            }
        }
Exemplo n.º 9
0
            public void Set(ItemTeamData itd)
            {
                this.tid = itd.teamId;
                uint lv = ModelBase <PlayerModel> .getInstance().up_lvl * 100u + ModelBase <PlayerModel> .getInstance().lvl;

                this.txtCapatain.text = itd.name;
                this.txtLvl.text      = string.Concat(new object[]
                {
                    itd.zhuan,
                    "转",
                    itd.lvl.ToString(),
                    "级"
                });
                this.txtKnightage.text = itd.knightage;
                bool flag = a3_teamPanel._instance.iconSpriteDic.ContainsKey(itd.carr);

                if (flag)
                {
                    this.iconCarr_zy.transform.FindChild(string.Concat(itd.carr)).gameObject.SetActive(true);
                    this.iconCarr_head.transform.FindChild(string.Concat(itd.carr)).gameObject.SetActive(true);
                }
                this.txtMap.text       = ((SvrMapConfig.instance.getSingleMapConf(itd.mapId) == null) ? "" : SvrMapConfig.instance.getSingleMapConf(itd.mapId)["map_name"]._str);
                this.txtMembCount.text = string.Format("{0}/{1}", itd.curcnt, 5);
                bool flag2 = itd.members != null;

                if (flag2)
                {
                    for (int i = 0; i < itd.members.Count; i++)
                    {
                        this.prefab.transform.FindChild(string.Concat(new object[]
                        {
                            "team_pre/3/zy/teamer/",
                            i + 1,
                            "/",
                            itd.members[i]
                        })).gameObject.SetActive(true);
                    }
                }
                int  num   = 0;
                uint ltpid = itd.ltpid;

                switch (ltpid)
                {
                case 0u:
                    num = 5;
                    break;

                case 1u:
                    num = 4;
                    break;

                case 2u:
                    num = 3;
                    break;

                default:
                    if (ltpid != 105u)
                    {
                        if (ltpid == 108u)
                        {
                            num = 1;
                        }
                    }
                    else
                    {
                        num = 2;
                    }
                    break;
                }
                this.limited_dj = this.Set_Limited_dj(num);
                bool flag3 = this.limited_dj == 0;

                if (flag3)
                {
                    this.prefab.transform.FindChild("team_pre/3/dj").GetComponent <Text>().text = "无等级限制";
                }
                else
                {
                    this.prefab.transform.FindChild("team_pre/3/dj").GetComponent <Text>().text = string.Concat(new object[]
                    {
                        this.up_lvl,
                        "转",
                        this.lvl,
                        "级"
                    });
                }
                bool flag4 = itd.curcnt >= 5u;

                if (flag4)
                {
                    this.prefab.transform.FindChild("team_pre/4/full").gameObject.SetActive(true);
                    this.prefab.transform.FindChild("team_pre/4/apply").gameObject.SetActive(false);
                    this.prefab.transform.FindChild("team_pre/4/applyed").gameObject.SetActive(false);
                }
                bool flag5 = BaseProxy <TeamProxy> .getInstance().MyTeamData == null && itd.curcnt < 5u;

                if (flag5)
                {
                    this.prefab.transform.FindChild("team_pre/4/full").gameObject.SetActive(false);
                    this.prefab.transform.FindChild("team_pre/4/apply").gameObject.SetActive(true);
                    this.prefab.transform.FindChild("team_pre/4/applyed").gameObject.SetActive(false);
                }
                bool flag6 = itd.curcnt < 5u && !this.prefab.transform.FindChild("team_pre/4/applyed").gameObject.activeInHierarchy&& (ulong)lv >= (ulong)((long)this.limited_dj);

                if (flag6)
                {
                    this.prefab.transform.FindChild("team_pre/4/full").gameObject.SetActive(false);
                    this.prefab.transform.FindChild("team_pre/4/apply").gameObject.SetActive(true);
                    this.prefab.transform.FindChild("team_pre/4/applyed").gameObject.SetActive(false);
                    new BaseButton(this.prefab.transform.FindChild("team_pre/4/apply"), 1, 1).onClick = delegate(GameObject oo)
                    {
                        bool flag7 = BaseProxy <TeamProxy> .getInstance().MyTeamData == null && (ulong)lv >= (ulong)((long)this.limited_dj);

                        if (flag7)
                        {
                            BaseProxy <TeamProxy> .getInstance().SendApplyJoinTeam(itd.teamId);

                            this.prefab.transform.FindChild("team_pre/4/apply").gameObject.SetActive(false);
                            this.prefab.transform.FindChild("team_pre/4/applyed").gameObject.SetActive(true);
                        }
                        else
                        {
                            bool flag8 = BaseProxy <TeamProxy> .getInstance().MyTeamData != null && (ulong)lv >= (ulong)((long)this.limited_dj);

                            if (flag8)
                            {
                                flytxt.instance.fly("请先退出当前队伍", 0, default(Color), null);
                            }
                            else
                            {
                                flytxt.instance.fly("未达到队伍等级要求!", 0, default(Color), null);
                            }
                        }
                    };
                }
            }
Exemplo n.º 10
0
        public void setSelf_LockRole()
        {
            bool flag = SelfRole._inst.m_LockRole != null && SelfRole._inst.m_LockRole.isDead;

            if (flag)
            {
                SelfRole._inst.m_LockRole = null;
            }
            bool flag2 = ModelBase <PlayerModel> .getInstance().now_pkState == 0;

            if (flag2)
            {
                bool flag3 = SelfRole._inst.m_LockRole is ProfessionRole || SelfRole._inst.m_LockRole is MS0000 || SelfRole._inst.m_LockRole is MDC000;
                if (flag3)
                {
                    SelfRole._inst.m_LockRole = null;
                }
                bool flag4 = SelfRole._inst.m_LockRole is MDC000 && ((MDC000)SelfRole._inst.m_LockRole).escort_name == ModelBase <A3_LegionModel> .getInstance().myLegion.clname;

                if (flag4)
                {
                    SelfRole._inst.m_LockRole = null;
                }
                bool flag5 = SelfRole._inst.m_LockRole is MDC000;
                if (flag5)
                {
                    float num   = (float)((MDC000)SelfRole._inst.m_LockRole).curhp / (float)((MDC000)SelfRole._inst.m_LockRole).maxHp * 100f;
                    bool  flag6 = num <= 20f;
                    if (flag6)
                    {
                        SelfRole._inst.m_LockRole = null;
                    }
                }
            }
            else
            {
                bool flag7 = ModelBase <PlayerModel> .getInstance().now_pkState == 1;

                if (flag7)
                {
                    bool flag8 = SelfRole._inst.m_LockRole is MS0000 && (SelfRole._inst.m_LockRole as MS0000).masterid == ModelBase <PlayerModel> .getInstance().cid;

                    if (flag8)
                    {
                        SelfRole._inst.m_LockRole = null;
                    }
                    bool flag9 = SelfRole._inst.m_LockRole is MDC000 && ((MDC000)SelfRole._inst.m_LockRole).escort_name == ModelBase <A3_LegionModel> .getInstance().myLegion.clname;

                    if (flag9)
                    {
                        SelfRole._inst.m_LockRole = null;
                    }
                    bool flag10 = SelfRole._inst.m_LockRole is MDC000;
                    if (flag10)
                    {
                        float num2   = (float)((MDC000)SelfRole._inst.m_LockRole).curhp / (float)((MDC000)SelfRole._inst.m_LockRole).maxHp * 100f;
                        bool  flag11 = num2 <= 20f;
                        if (flag11)
                        {
                            SelfRole._inst.m_LockRole = null;
                        }
                    }
                }
                else
                {
                    bool flag12 = ModelBase <PlayerModel> .getInstance().now_pkState == 2;

                    if (flag12)
                    {
                        bool flag13 = SelfRole._inst.m_LockRole is MS0000;
                        if (flag13)
                        {
                            bool flag14 = false;
                            bool flag15 = BaseProxy <TeamProxy> .getInstance().MyTeamData != null;

                            if (flag15)
                            {
                                foreach (ItemTeamData current in BaseProxy <TeamProxy> .getInstance().MyTeamData.itemTeamDataList)
                                {
                                    bool flag16 = current.cid == (SelfRole._inst.m_LockRole as MS0000).masterid;
                                    if (flag16)
                                    {
                                        flag14 = true;
                                        break;
                                    }
                                }
                            }
                            bool flag17 = !flag14 && ModelBase <A3_LegionModel> .getInstance().members != null;

                            if (flag17)
                            {
                                foreach (A3_LegionMember current2 in ModelBase <A3_LegionModel> .getInstance().members.Values)
                                {
                                    bool flag18 = (long)current2.cid == (long)((ulong)(SelfRole._inst.m_LockRole as MS0000).masterid);
                                    if (flag18)
                                    {
                                        flag14 = true;
                                        break;
                                    }
                                }
                            }
                            bool flag19 = flag14 || (SelfRole._inst.m_LockRole as MS0000).masterid == ModelBase <PlayerModel> .getInstance().cid;

                            if (flag19)
                            {
                                SelfRole._inst.m_LockRole = null;
                            }
                        }
                        else
                        {
                            bool flag20 = SelfRole._inst.m_LockRole is MDC000;
                            if (flag20)
                            {
                                float num3   = (float)((MDC000)SelfRole._inst.m_LockRole).curhp / (float)((MDC000)SelfRole._inst.m_LockRole).maxHp * 100f;
                                bool  flag21 = ((MDC000)SelfRole._inst.m_LockRole).escort_name == ModelBase <A3_LegionModel> .getInstance().myLegion.clname;

                                if (flag21)
                                {
                                    SelfRole._inst.m_LockRole = null;
                                }
                                bool flag22 = num3 <= 20f;
                                if (flag22)
                                {
                                    SelfRole._inst.m_LockRole = null;
                                }
                            }
                            else
                            {
                                bool flag23 = SelfRole._inst.m_LockRole is ProfessionRole;
                                if (flag23)
                                {
                                    bool flag24 = false;
                                    bool flag25 = BaseProxy <TeamProxy> .getInstance().MyTeamData != null;

                                    if (flag25)
                                    {
                                        foreach (A3_LegionMember current3 in ModelBase <A3_LegionModel> .getInstance().members.Values)
                                        {
                                            bool flag26 = (long)current3.cid == (long)((ulong)SelfRole._inst.m_LockRole.m_unCID);
                                            if (flag26)
                                            {
                                                flag24 = true;
                                                break;
                                            }
                                        }
                                    }
                                    bool flag27 = !flag24 && ModelBase <A3_LegionModel> .getInstance().members != null;

                                    if (flag27)
                                    {
                                        foreach (A3_LegionMember current4 in ModelBase <A3_LegionModel> .getInstance().members.Values)
                                        {
                                            bool flag28 = (long)current4.cid == (long)((ulong)SelfRole._inst.m_LockRole.m_unCID);
                                            if (flag28)
                                            {
                                                flag24 = true;
                                                break;
                                            }
                                        }
                                    }
                                    bool flag29 = flag24;
                                    if (flag29)
                                    {
                                        SelfRole._inst.m_LockRole = null;
                                    }
                                }
                            }
                        }
                    }
                }
            }
            bool flag30 = SelfRole._inst.m_LockRole == null;

            if (flag30)
            {
                SelfRole._inst.m_LockRole = PkmodelAdmin.RefreshLockRole();
            }
            bool flag31 = SelfRole._inst.m_LockRole == null;

            if (flag31)
            {
                SelfRole._inst.m_LockRole = MonsterMgr._inst.FindNearestMonster(SelfRole._inst.m_curModel.position, null, false, PK_TYPE.PK_PEACE, false);
            }
            bool flag32 = SelfRole._inst.m_LockRole == null;

            if (flag32)
            {
                SelfRole._inst.m_LockRole = MonsterMgr._inst.FindNearestFakeMonster(SelfRole._inst.m_curModel.position);
            }
        }
Exemplo n.º 11
0
        public void onDrag(GameObject go)
        {
            this.recTransform.DOScale(this.endScale, 0.15f);
            base.transform.FindChild("click").gameObject.SetActive(true);
            base.transform.FindChild("click").GetComponent <Animator>().Play("skill_click", -1, 0f);
            base.transform.FindChild("click").GetComponent <Animator>().SetBool("isLoop", true);
            bool flag = SelfRole.fsm.Autofighting;

            if (flag)
            {
                StateInit.Instance.PlaySkillInAutoPlay(this._data.skill_id);
            }
            else
            {
                bool flag2 = this.data == null;
                if (!flag2)
                {
                    bool flag3 = !this.canUse();
                    if (!flag3)
                    {
                        bool flag4 = SelfRole._inst.isPlayingSkill && this.data.skill_id != skillbar.NORNAL_SKILL_ID;
                        if (!flag4)
                        {
                            this.m_nCurDownID = this._data.skill_id;
                            this.setSelf_LockRole();
                            bool flag5 = SelfRole._inst.m_LockRole == null;
                            if (flag5)
                            {
                                bool flag6 = this.data.skill_id == 3006 || this.data.skill_id == 5004 || this.data.skill_id == 5009 || this.data.skill_id == 3004;
                                if (flag6)
                                {
                                    bool flag7 = flytxt.instance != null;
                                    if (flag7)
                                    {
                                        flytxt.instance.fly("无锁定的目标!", 0, default(Color), null);
                                    }
                                    return;
                                }
                            }
                            else
                            {
                                bool flag8 = this.data.skill_id == 3006 || this.data.skill_id == 5004 || this.data.skill_id == 5009 || this.data.skill_id == 3004;
                                if (flag8)
                                {
                                    bool flag9 = !PkmodelAdmin.RefreshLockSkill(SelfRole._inst.m_LockRole);
                                    if (flag9)
                                    {
                                        bool flag10 = flytxt.instance != null;
                                        if (flag10)
                                        {
                                            flytxt.instance.fly("无锁定的目标!", 0, default(Color), null);
                                        }
                                        return;
                                    }
                                }
                            }
                            bool flag11 = SelfRole._inst.m_LockRole != null;
                            if (flag11)
                            {
                                SelfRole._inst.LeaveHide();
                                bool flag12 = this.data.skill_id != 3010;
                                if (flag12)
                                {
                                    SelfRole._inst.TurnToRole(SelfRole._inst.m_LockRole, true);
                                }
                                SelfRole._inst.PlaySkill(this._data.skill_id);
                                bool flag13 = !SelfRole._inst.m_LockRole.isfake;
                                if (flag13)
                                {
                                    BaseProxy <BattleProxy> .getInstance().send_cast_self_skill(SelfRole._inst.m_LockRole.m_unIID, this._data.skill_id);
                                }
                            }
                            else
                            {
                                SelfRole._inst.LeaveHide();
                                SelfRole._inst.PlaySkill(this._data.skill_id);
                                BaseProxy <BattleProxy> .getInstance().send_cast_self_skill(0u, this._data.skill_id);
                            }
                            bool flag14 = this._data.skillType == 0;
                            if (flag14)
                            {
                                BaseProxy <BattleProxy> .getInstance().sendUseSelfSkill((uint)this._data.skill_id);
                            }
                            this.doCD();
                        }
                    }
                }
            }
        }
Exemplo n.º 12
0
 public override void removeListener()
 {
     BaseProxy <A3_TaskProxy> .getInstance().removeEventListener(2u, new Action <GameEvent>(base.onHanlde));
 }
Exemplo n.º 13
0
        public static bool RefreshLockSkill(BaseRole LockRole)
        {
            bool flag = LockRole.isDead || LockRole == null;
            bool result;

            if (flag)
            {
                result = false;
            }
            else
            {
                bool flag2 = LockRole is MonsterRole;
                if (flag2)
                {
                    result = true;
                }
                else
                {
                    bool flag3 = OtherPlayerMgr._inst.m_mapOtherPlayer[LockRole.m_unIID].zhuan < 1;
                    if (flag3)
                    {
                        result = false;
                    }
                    else
                    {
                        switch (ModelBase <PlayerModel> .getInstance().pk_state)
                        {
                        case PK_TYPE.PK_PEACE:
                            result = false;
                            return(result);

                        case PK_TYPE.PK_PKALL:
                            result = true;
                            return(result);

                        case PK_TYPE.PK_TEAM:
                        {
                            bool arg_E3_0;
                            if (LockRole is ProfessionRole)
                            {
                                ItemTeamMemberData expr_C3 = BaseProxy <TeamProxy> .getInstance().MyTeamData;

                                arg_E3_0 = (expr_C3 == null || expr_C3.itemTeamDataList.Exists((ItemTeamData m) => m.cid == LockRole.m_unCID));
                            }
                            else
                            {
                                arg_E3_0 = false;
                            }
                            result = arg_E3_0;
                            return(result);
                        }

                        case PK_TYPE.PK_HERO:
                        {
                            bool flag4 = LockRole.rednm > 0;
                            result = flag4;
                            return(result);
                        }
                        }
                        result = false;
                    }
                }
            }
            return(result);
        }
Exemplo n.º 14
0
 private void lvl_pvpinfo_board_res(Variant msgData)
 {
     NetClient.instance.dispatchEvent(GameEvent.Create(237u, this, GameTools.CreateSwitchData("lvl_pvpinfo_board_msg", msgData), false));
     BaseProxy <TeamProxy> .getInstance().dispatchEvent(GameEvent.Create(237u, this, msgData, false));
 }
Exemplo n.º 15
0
 private void OnBackRespawn(GameObject go)
 {
     BaseProxy <MapProxy> .getInstance().sendRespawn(false);
 }
Exemplo n.º 16
0
 public void getItems()
 {
     BaseProxy <GiftCardProxy> .getInstance().sendFetchCard(this.code);
 }
Exemplo n.º 17
0
 private void OnStoneRespawn(GameObject go)
 {
     BaseProxy <MapProxy> .getInstance().sendRespawn(true);
 }
Exemplo n.º 18
0
        private void OnSwitch(TabControl t)
        {
            int  seletedIndex = t.getSeletedIndex();
            bool flag         = this.current != null;

            if (flag)
            {
                bool flag2 = this.currentTeam != null && this.teamList != null;
                if (flag2)
                {
                    this.currentTeam.onClose();
                    this.currentTeam.gameObject.SetActive(false);
                    this.teamList.onClose();
                    this.teamList.gameObject.SetActive(false);
                }
                this.current.onClose();
                this.current.gameObject.SetActive(false);
            }
            bool flag3 = seletedIndex == 0;

            if (flag3)
            {
                bool flag4 = this.legion == null;
                if (flag4)
                {
                    GameObject original   = Resources.Load <GameObject>("prefab/a3_legion");
                    GameObject gameObject = UnityEngine.Object.Instantiate <GameObject>(original);
                    this.legion = new a3_legion(gameObject.transform);
                    this.legion.setPerent(this.con);
                    this.legion.transform.localPosition = Vector3.zero;
                }
                this.current = this.legion;
            }
            else
            {
                bool flag5 = seletedIndex == 1;
                if (flag5)
                {
                    this.SetIndexToFriend();
                }
                else
                {
                    bool flag6 = this.currentTeam == null;
                    if (flag6)
                    {
                        GameObject original2   = Resources.Load <GameObject>("prefab/a3_currentTeamPanel");
                        GameObject gameObject2 = UnityEngine.Object.Instantiate <GameObject>(original2);
                        this.currentTeam = new a3_currentTeamPanel(gameObject2.transform);
                        this.currentTeam.setPerent(this.con);
                    }
                    bool flag7 = this.teamList == null;
                    if (flag7)
                    {
                        GameObject original3   = Resources.Load <GameObject>("prefab/a3_teamPanel");
                        GameObject gameObject3 = UnityEngine.Object.Instantiate <GameObject>(original3);
                        this.teamList = new a3_teamPanel(gameObject3.transform);
                        this.teamList.setPerent(this.con);
                    }
                    bool flag8 = BaseProxy <TeamProxy> .getInstance().joinedTeam&& BaseProxy <TeamProxy> .getInstance().MyTeamData != null;

                    if (flag8)
                    {
                        this.current = this.currentTeam;
                        this.currentTeam.gameObject.SetActive(true);
                        this.teamList.gameObject.SetActive(false);
                    }
                    else
                    {
                        this.current = this.teamList;
                        this.currentTeam.gameObject.SetActive(false);
                        this.teamList.gameObject.SetActive(true);
                    }
                    BaseProxy <TeamProxy> .getInstance().SetTeamPanelInfo();
                }
            }
            bool flag9 = this.current != null;

            if (flag9)
            {
                this.current.onShowed();
                this.current.visiable = true;
            }
        }
Exemplo n.º 19
0
 internal void <init> b__3_1(bool b)
 {
     BaseProxy <A3_LegionProxy> .getInstance().SendChangeApplyMode(b);
 }
Exemplo n.º 20
0
        public void init()
        {
            bool flag = this.isInited;

            if (!flag)
            {
                this.isInited = true;
                bool flag2 = HttpAppMgr.instance != null;
                if (flag2)
                {
                    HttpAppMgr.instance.addEventListener(HttpAppMgr.EVENT_GET_GIFT_CARD, new Action <GameEvent>(this.getGiftCard));
                    BaseProxy <E_mailProxy> .getInstance();
                }
                this.timeSmp = muNetCleint.instance.CurServerTimeStamp;
                debug.Log(this.timeSmp.ToString());
                this.perLocalStr.Clear();
                this.famLocalStr.Clear();
                string text  = FileMgr.loadString(FileMgr.TYPE_MAIL, "per");
                string text2 = "";
                text2 = FileMgr.loadString(FileMgr.TYPE_MAIL, "fam");
                bool flag3 = text != "" && text != " ";
                if (flag3)
                {
                    string[] array = text.Split(this.sep2, StringSplitOptions.None);
                    try
                    {
                        string[] array2 = array;
                        for (int i = 0; i < array2.Length; i++)
                        {
                            string   text3  = array2[i];
                            string[] array3 = text3.Split(this.sep1, StringSplitOptions.None);
                            debug.Log(array3[0] + 22);
                            bool flag4 = array3[0] != "" && array3[0] != " ";
                            if (flag4)
                            {
                                bool flag5 = int.Parse(array3[6]) + 1296000 > this.timeSmp;
                                if (flag5)
                                {
                                    mailData mailData = new mailData();
                                    mailData.frmcid  = int.Parse(array3[0]);
                                    mailData.frmsex  = int.Parse(array3[1]);
                                    mailData.cid     = int.Parse(array3[2]);
                                    mailData.time    = array3[3];
                                    mailData.frmname = array3[4];
                                    mailData.msg     = array3[5];
                                    mailData.str     = text3 + "#)#&";
                                    bool flag6 = ModelBase <E_mailModel> .getInstance().personalMailDic.ContainsKey(mailData.frmcid);

                                    if (flag6)
                                    {
                                        ModelBase <E_mailModel> .getInstance().personalMailDic[mailData.frmcid].Add(mailData);
                                    }
                                    else
                                    {
                                        List <mailData> list = new List <mailData>();
                                        list.Add(mailData);
                                        ModelBase <E_mailModel> .getInstance().personalMailDic.Add(mailData.frmcid, list);
                                    }
                                    this.perLocalStr.Add(mailData);
                                }
                            }
                        }
                        this.saveLocalData(this.perLocalStr, 4);
                    }
                    catch (Exception var_15_26F)
                    {
                        FileMgr.saveString(FileMgr.TYPE_MAIL, "per", " ");
                        FileMgr.saveString(FileMgr.TYPE_MAIL, "fam", " ");
                    }
                }
                bool flag7 = text2 != "" && text2 != " ";
                if (flag7)
                {
                    string[] array4 = text2.Split(this.sep2, StringSplitOptions.None);
                    string[] array5 = array4;
                    for (int j = 0; j < array5.Length; j++)
                    {
                        string   text4  = array5[j];
                        string[] array6 = text4.Split(this.sep1, StringSplitOptions.None);
                        bool     flag8  = array6[0] != "" && array6[0] != " ";
                        if (flag8)
                        {
                            bool flag9 = int.Parse(array6[6]) + 1296000 > this.timeSmp;
                            if (flag9)
                            {
                                mailData mailData2 = new mailData();
                                mailData2.frmcid  = int.Parse(array6[0]);
                                mailData2.frmsex  = int.Parse(array6[1]);
                                mailData2.cid     = int.Parse(array6[2]);
                                mailData2.time    = array6[3];
                                mailData2.frmname = array6[4];
                                mailData2.msg     = array6[5];
                                mailData2.clanc   = int.Parse(array6[7]);
                                mailData2.str     = text4 + "#)#&";
                                this.familyMailDic.Add(mailData2);
                                this.famLocalStr.Add(mailData2);
                            }
                        }
                    }
                    this.saveLocalData(this.famLocalStr, 3);
                }
                UIClient.instance.addEventListener(9001u, new Action <GameEvent>(this.onEndLoadItem));
            }
        }
Exemplo n.º 21
0
 private void onBtnGetClick(GameObject go)
 {
     BaseProxy <welfareProxy> .getInstance().sendWelfare(welfareProxy.ActiveType.dayRechargeAward, this.m_iwd.id);
 }
Exemplo n.º 22
0
 internal void <OnLvFinish> b__95_0(GameObject go)
 {
     BaseProxy <LevelProxy> .getInstance().sendLeave_lvl();
 }
Exemplo n.º 23
0
 private void onBtnDrawClick(GameObject go)
 {
     BaseProxy <welfareProxy> .getInstance().sendWelfare(welfareProxy.ActiveType.firstRechange, 4294967295u);
 }
Exemplo n.º 24
0
 public GiftCardsApp()
 {
     this.getRechangeCard();
     BaseProxy <GiftCardProxy> .getInstance().sendLoadItemCardInfo(null);
 }
Exemplo n.º 25
0
        private void OnClick_left()
        {
            float x    = this.eqp_icon.GetComponent <RectTransform>().sizeDelta.x;
            float y    = this.contain.GetComponent <RectTransform>().anchoredPosition.y;
            float x2   = this.contain.GetComponent <RectTransform>().anchoredPosition.x;
            float num  = this.eqp_icon.GetComponent <RectTransform>().sizeDelta.x *(float)Mathf.CeilToInt((float)BaseProxy <OffLineExpProxy> .getInstance().eqp.Count / 4f);
            bool  flag = this.contain.GetComponent <RectTransform>().anchoredPosition.x >= num - this.eqp_icon.GetComponent <RectTransform>().sizeDelta.x * 4f - 10f;

            if (!flag)
            {
                this.contain.GetComponent <RectTransform>().anchoredPosition = new Vector2(x2 + x * 8f, y);
            }
        }
Exemplo n.º 26
0
        private void TryNormalHp()
        {
            this.cdtime++;
            bool flag = ModelBase <PlayerModel> .getInstance().hp >= ModelBase <AutoPlayModel> .getInstance().NHpLower *ModelBase <PlayerModel> .getInstance().max_hp / 100;

            if (!flag)
            {
                int  normalHpID = this.GetNormalHpID();
                bool flag2      = normalHpID == -1;
                if (flag2)
                {
                    bool flag3 = ModelBase <AutoPlayModel> .getInstance().BuyDrug == 0;

                    if (!flag3)
                    {
                        SXML autoplayXml = ModelBase <AutoPlayModel> .getInstance().AutoplayXml;

                        List <SXML> nodeList = autoplayXml.GetNodeList("supply_hp", "playlimit==" + ModelBase <PlayerModel> .getInstance().up_lvl);
                        uint        num      = 0u;
                        uint        num2     = 0u;
                        foreach (SXML current in nodeList)
                        {
                            int @int = current.getInt("playerlevel");
                            num  = current.getUint("hp_id");
                            num2 = current.getUint("max_num");
                            bool flag4 = (ulong)ModelBase <PlayerModel> .getInstance().lvl < (ulong)((long)@int);

                            if (flag4)
                            {
                                break;
                            }
                        }
                        bool flag5 = num > 0u;
                        if (flag5)
                        {
                            shopDatas shopDataById = ModelBase <Shop_a3Model> .getInstance().GetShopDataById((int)num);

                            bool flag6 = shopDataById == null || shopDataById.value <= 0;
                            if (!flag6)
                            {
                                bool flag7 = (ulong)ModelBase <PlayerModel> .getInstance().money < (ulong)((long)shopDataById.value);

                                if (flag7)
                                {
                                    flytxt.instance.fly(err_string.get_Err_String(-4000), 0, default(Color), null);
                                }
                                else
                                {
                                    bool flag8 = !ModelBase <a3_BagModel> .getInstance().getHaveRoom();

                                    if (!flag8)
                                    {
                                        bool flag9 = (ulong)num2 * (ulong)((long)shopDataById.value) <= (ulong)ModelBase <PlayerModel> .getInstance().money;

                                        uint num3;
                                        if (flag9)
                                        {
                                            num3 = num2;
                                        }
                                        else
                                        {
                                            num3 = (uint)((ulong)ModelBase <PlayerModel> .getInstance().money / (ulong)((long)shopDataById.value));
                                        }
                                        bool flag10 = this.buyhptimer > 2f;
                                        if (flag10)
                                        {
                                            BaseProxy <Shop_a3Proxy> .getInstance().BuyStoreItems(num, num3);

                                            this.buyhptimer = 0f;
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
                else
                {
                    SXML        sXML        = XMLMgr.instance.GetSXML("item", "");
                    SXML        node        = sXML.GetNode("item", "id==" + (uint)normalHpID);
                    a3_ItemData a3_ItemData = default(a3_ItemData);
                    a3_ItemData.tpid    = (uint)normalHpID;
                    a3_ItemData.cd_time = node.getFloat("cd");
                    bool flag11 = this.cdtime == 0;
                    if (flag11)
                    {
                        ModelBase <a3_BagModel> .getInstance().useItemByTpid((uint)normalHpID, 1);
                    }
                    bool flag12 = (float)this.cdtime > a3_ItemData.cd_time;
                    if (flag12)
                    {
                        ModelBase <a3_BagModel> .getInstance().useItemByTpid((uint)normalHpID, 1);

                        this.cdtime = 0;
                    }
                }
            }
        }
Exemplo n.º 27
0
        private void OnClickToGetExp(int type)
        {
            A3_VipModel a3_VipModel = ModelBase <A3_VipModel> .getInstance();

            bool flag = !this.offLineModel.CanGetExp;

            if (flag)
            {
                flytxt.instance.fly(ContMgr.getCont("off_line_empty", null), 0, default(Color), null);
                InterfaceMgr.getInstance().close(InterfaceMgr.OFFLINEEXP);
                a3_expbar.instance.getGameObjectByPath("operator/LightTips/btnAuto_off_line_exp").SetActive(false);
            }
            else
            {
                this.offline_item.Clear();
                this.offline = true;
                switch (type)
                {
                case 1:
                {
                    bool isOn = this.fenjie.isOn;
                    if (isOn)
                    {
                        BaseProxy <OffLineExpProxy> .getInstance().sendType(1, true);
                    }
                    else
                    {
                        BaseProxy <OffLineExpProxy> .getInstance().sendType(1, false);
                    }
                    this.currentType = 1;
                    break;
                }

                case 2:
                {
                    bool flag2 = ModelBase <PlayerModel> .getInstance().money < ModelBase <OffLineModel> .getInstance().GetCost(2);

                    if (flag2)
                    {
                        flytxt.instance.fly(ContMgr.getCont("off_line_exp_money", null), 0, default(Color), null);
                    }
                    else
                    {
                        bool isOn2 = this.fenjie.isOn;
                        if (isOn2)
                        {
                            BaseProxy <OffLineExpProxy> .getInstance().sendType(2, true);
                        }
                        else
                        {
                            BaseProxy <OffLineExpProxy> .getInstance().sendType(2, false);
                        }
                    }
                    this.currentType = 2;
                    break;
                }

                case 3:
                {
                    bool flag3 = ModelBase <PlayerModel> .getInstance().gold < ModelBase <OffLineModel> .getInstance().GetCost(3);

                    if (flag3)
                    {
                        flytxt.instance.fly(ContMgr.getCont("off_line_exp_gold", null), 0, default(Color), null);
                    }
                    else
                    {
                        bool isOn3 = this.fenjie.isOn;
                        if (isOn3)
                        {
                            BaseProxy <OffLineExpProxy> .getInstance().sendType(3, true);
                        }
                        else
                        {
                            BaseProxy <OffLineExpProxy> .getInstance().sendType(3, false);
                        }
                    }
                    this.currentType = 3;
                    break;
                }

                case 4:
                {
                    bool flag4 = ModelBase <PlayerModel> .getInstance().gold < ModelBase <OffLineModel> .getInstance().GetCost(4);

                    if (flag4)
                    {
                        flytxt.instance.fly(ContMgr.getCont("off_line_exp_gold", null), 0, default(Color), null);
                    }
                    else
                    {
                        bool isOn4 = this.fenjie.isOn;
                        if (isOn4)
                        {
                            BaseProxy <OffLineExpProxy> .getInstance().sendType(4, true);
                        }
                        else
                        {
                            BaseProxy <OffLineExpProxy> .getInstance().sendType(4, false);
                        }
                    }
                    this.currentType = 4;
                    break;
                }
                }
            }
        }
Exemplo n.º 28
0
        private void onTab(int tag)
        {
            this.tabIdx = tag;
            this.isthis.SetActive(false);
            this.isthis.transform.SetParent(base.transform, false);
            this.rank_tabs[0].SetActive(false);
            this.rank_tabs[1].SetActive(false);
            this.rank_tabs[2].SetActive(false);
            this.rank_tabs[3].SetActive(false);
            this.rank_tabs[4].SetActive(false);
            for (int i = 0; i < this.tab.Count; i++)
            {
                this.tab[i].GetComponent <Button>().interactable = true;
            }
            this.tab[this.tabIdx].GetComponent <Button>().interactable = false;
            this.rank_tabs[this.tabIdx].SetActive(true);
            switch (this.tabIdx)
            {
            case 0:
            {
                bool zhanli_frist = ModelBase <a3_rankingModel> .getInstance().zhanli_frist;

                if (zhanli_frist)
                {
                    for (int j = 0; j < this.zhanliCon.childCount; j++)
                    {
                        UnityEngine.Object.Destroy(this.zhanliCon.GetChild(j).gameObject);
                    }
                    for (int k = 1; k <= 5; k++)
                    {
                        BaseProxy <a3_rankingProxy> .getInstance().send_Getinfo(1u, (uint)k, 1u);
                    }
                    ModelBase <a3_rankingModel> .getInstance().zhanli_frist = false;
                }
                else
                {
                    this.zhanliCon.GetComponent <RectTransform>().anchoredPosition = new Vector2(this.zhanliCon.GetComponent <RectTransform>().anchoredPosition.x, 0f);
                }
                break;
            }

            case 1:
            {
                bool lvl_frist = ModelBase <a3_rankingModel> .getInstance().lvl_frist;

                if (lvl_frist)
                {
                    for (int l = 0; l < this.lvlCon.childCount; l++)
                    {
                        UnityEngine.Object.Destroy(this.lvlCon.GetChild(l).gameObject);
                    }
                    for (int m = 1; m <= 5; m++)
                    {
                        BaseProxy <a3_rankingProxy> .getInstance().send_Getinfo(2u, (uint)m, 1u);
                    }
                    ModelBase <a3_rankingModel> .getInstance().lvl_frist = false;
                }
                else
                {
                    this.lvlCon.GetComponent <RectTransform>().anchoredPosition = new Vector2(this.lvlCon.GetComponent <RectTransform>().anchoredPosition.x, 0f);
                }
                break;
            }

            case 2:
            {
                bool chibang_frist = ModelBase <a3_rankingModel> .getInstance().chibang_frist;

                if (chibang_frist)
                {
                    for (int n = 0; n < this.chiBangCon.childCount; n++)
                    {
                        UnityEngine.Object.Destroy(this.chiBangCon.GetChild(n).gameObject);
                    }
                    for (int num = 1; num <= 5; num++)
                    {
                        BaseProxy <a3_rankingProxy> .getInstance().send_Getinfo(3u, (uint)num, 1u);
                    }
                    ModelBase <a3_rankingModel> .getInstance().chibang_frist = false;
                }
                else
                {
                    this.chiBangCon.GetComponent <RectTransform>().anchoredPosition = new Vector2(this.chiBangCon.GetComponent <RectTransform>().anchoredPosition.x, 0f);
                }
                break;
            }

            case 3:
            {
                bool juntuan_frist = ModelBase <a3_rankingModel> .getInstance().juntuan_frist;

                if (juntuan_frist)
                {
                    for (int num2 = 0; num2 < this.junTuanCon.childCount; num2++)
                    {
                        UnityEngine.Object.Destroy(this.junTuanCon.GetChild(num2).gameObject);
                    }
                    for (int num3 = 1; num3 <= 5; num3++)
                    {
                        BaseProxy <a3_rankingProxy> .getInstance().send_Getinfo(4u, (uint)num3, 1u);
                    }
                    ModelBase <a3_rankingModel> .getInstance().juntuan_frist = false;
                }
                else
                {
                    this.junTuanCon.GetComponent <RectTransform>().anchoredPosition = new Vector2(this.junTuanCon.GetComponent <RectTransform>().anchoredPosition.x, 0f);
                }
                break;
            }

            case 4:
            {
                bool summon_frist = ModelBase <a3_rankingModel> .getInstance().summon_frist;

                if (summon_frist)
                {
                    for (int num4 = 0; num4 < this.summonCon.childCount; num4++)
                    {
                        UnityEngine.Object.Destroy(this.summonCon.GetChild(num4).gameObject);
                    }
                    for (int num5 = 1; num5 <= 5; num5++)
                    {
                        BaseProxy <a3_rankingProxy> .getInstance().send_Getinfo(5u, (uint)num5, 1u);
                    }
                    ModelBase <a3_rankingModel> .getInstance().summon_frist = false;
                }
                else
                {
                    this.summonCon.GetComponent <RectTransform>().anchoredPosition = new Vector2(this.summonCon.GetComponent <RectTransform>().anchoredPosition.x, 0f);
                }
                break;
            }
            }
        }
Exemplo n.º 29
0
        public override void Execute(float delta_time)
        {
            bool flag = this.waitTick > 0;

            if (flag)
            {
                this.waitTick--;
            }
            else
            {
                bool changingMap = BaseProxy <MapProxy> .getInstance().changingMap;

                if (!changingMap)
                {
                    ProfessionRole expr_3A = SelfRole._inst;
                    bool           flag2   = ((expr_3A != null) ? expr_3A.m_moveAgent : null) == null;
                    if (!flag2)
                    {
                        this.refredshPos();
                        bool flag3 = this.waitTick > 0;
                        if (flag3)
                        {
                            this.waitTick--;
                        }
                        else
                        {
                            Animator expr_87 = SelfRole._inst.m_curAni;
                            if (expr_87 != null)
                            {
                                expr_87.SetBool(EnumAni.ANI_RUN, true);
                            }
                            bool flag4 = this.line.Count == 0;
                            if (flag4)
                            {
                                Vector3 destination       = SelfRole._inst.m_moveAgent.destination;
                                float   remainingDistance = SelfRole._inst.m_moveAgent.remainingDistance;
                                bool    flag5             = remainingDistance <= 0.3f;
                                if (flag5)
                                {
                                    ProfessionRole expr_EB = SelfRole._inst;
                                    if (expr_EB != null)
                                    {
                                        NavMeshAgent expr_F6 = expr_EB.m_moveAgent;
                                        if (expr_F6 != null)
                                        {
                                            expr_F6.ResetPath();
                                        }
                                    }
                                    ProfessionRole expr_107 = SelfRole._inst;
                                    if (expr_107 != null)
                                    {
                                        NavMeshAgent expr_112 = expr_107.m_moveAgent;
                                        if (expr_112 != null)
                                        {
                                            expr_112.Stop();
                                        }
                                    }
                                    bool flag6 = this.handle != null;
                                    if (flag6)
                                    {
                                        this.handle();
                                    }
                                    SelfRole.fsm.ChangeState(StateIdle.Instance);
                                }
                                else
                                {
                                    this.thinktime += delta_time;
                                    bool flag7 = this.thinktime > 1f;
                                    if (flag7)
                                    {
                                        this.thinktime = 0f;
                                        bool flag8 = remainingDistance < 5f;
                                        if (flag8)
                                        {
                                            bool flag9 = Quaternion.LookRotation(SelfRole._inst.m_curModel.forward - this.pos.normalized).eulerAngles.y > 10f;
                                            if (flag9)
                                            {
                                                ProfessionRole expr_1D0 = SelfRole._inst;
                                                if (expr_1D0 != null)
                                                {
                                                    expr_1D0.TurnToPos(this.pos);
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
Exemplo n.º 30
0
        public override void onClosed()
        {
            BaseProxy <A3_RankProxy> .getInstance().removeEventListener(A3_RankProxy.RANKADDLV, new Action <GameEvent>(this.onAddLvOver));

            BaseProxy <A3_RankProxy> .getInstance().removeEventListener(A3_RankProxy.RANKREFRESH, new Action <GameEvent>(this.OnRefresh));
        }