Esempio n. 1
0
        public void RemoveBuff(uint id)
        {
            bool flag = !this.BuffCd.ContainsKey(id);

            if (!flag)
            {
                BUFF_TYPE buff_type = this.BuffCd[id].buff_type;
                BUFF_TYPE bUFF_TYPE = buff_type;
                if (bUFF_TYPE != BUFF_TYPE.CANT_MOVE)
                {
                    if (bUFF_TYPE != BUFF_TYPE.CANT_SKILL)
                    {
                        if (bUFF_TYPE == BUFF_TYPE.CANT_MOVE_SKILL)
                        {
                            SelfRole._inst.can_buff_move    = true;
                            SelfRole._inst.can_buff_skill   = true;
                            SelfRole._inst.can_buff_ani     = true;
                            SelfRole._inst.m_curAni.enabled = true;
                        }
                    }
                    else
                    {
                        SelfRole._inst.can_buff_skill = true;
                    }
                }
                else
                {
                    SelfRole._inst.can_buff_move = true;
                }
                bool flag2 = SelfRole._inst is P3Mage;
                if (flag2)
                {
                    XMLMgr expr_A4 = XMLMgr.instance;
                    SXML   sXML    = (expr_A4 != null) ? expr_A4.GetSXML("skill.state", "id==" + id) : null;
                    bool   flag3   = sXML.getInt("skill_id") == 3008;
                    if (flag3)
                    {
                        SelfRole._inst.PlaySkill(30081);
                    }
                }
                bool flag4 = buff_type != BUFF_TYPE.NULL && this.Buff_type_list.Contains(buff_type);
                if (flag4)
                {
                    this.Buff_type_list.Remove(this.BuffCd[id].buff_type);
                }
                this.BuffCd.Remove(id);
                a3_buff expr_138 = a3_buff.instance;
                if (expr_138 != null)
                {
                    expr_138.resh_buff();
                }
            }
        }
Esempio n. 2
0
        public override void init()
        {
            this.pre     = base.transform.FindChild("bg2/items/Image").gameObject;
            this.contain = base.transform.FindChild("bg2/items/scroll/contain");
            this.help    = base.transform.FindChild("help").gameObject;
            new BaseButton(base.transform.FindChild("bg2/hp"), 1, 1).onClick = delegate(GameObject go)
            {
                this.help.SetActive(true);
            };
            new BaseButton(base.transform.FindChild("help/panel_help/bg/closeBtn"), 1, 1).onClick = delegate(GameObject go)
            {
                this.help.SetActive(false);
            };
            XMLMgr expr_A4 = XMLMgr.instance;
            SXML   sXML    = (expr_A4 != null) ? expr_A4.GetSXML("box.box", "id==" + 1) : null;

            this.time1 = sXML.getString("time1").Split(new char[]
            {
                ','
            });
            this.time2 = sXML.getString("time2").Split(new char[]
            {
                ','
            });
            new BaseButton(base.transform.FindChild("bg2/btn_transmit"), 1, 1).onClick = delegate(GameObject go)
            {
                bool flag = !this.box_ing;
                if (flag)
                {
                    flytxt.instance.fly("未到活动开启时间!", 0, default(Color), null);
                }
                else
                {
                    a3_active.instance.map_light = true;
                    InterfaceMgr.getInstance().worldmap = true;
                    InterfaceMgr.getInstance().open(InterfaceMgr.WORLD_MAP, null, false).winItem.transform.SetAsLastSibling();
                }
            };
        }
Esempio n. 3
0
        public void addBuffList(Variant data)
        {
            BuffInfo buffInfo = new BuffInfo();

            buffInfo.id         = data["id"];
            buffInfo.par        = data["par"];
            buffInfo.start_time = data["start_tm"];
            buffInfo.end_time   = data["end_tm"];
            XMLMgr expr_64 = XMLMgr.instance;
            SXML   sXML    = (expr_64 != null) ? expr_64.GetSXML("skill.state", "id==" + buffInfo.id) : null;
            SXML   sXML2   = (sXML != null) ? sXML.GetNode("s", null) : null;
            bool   flag    = sXML2 != null;

            if (flag)
            {
                int @int = sXML2.getInt("tp");
                if (@int != 1)
                {
                    if (@int != 6)
                    {
                        if (@int != 7)
                        {
                            buffInfo.buff_type = BUFF_TYPE.NULL;
                        }
                        else
                        {
                            SelfRole._inst.can_buff_move    = false;
                            SelfRole._inst.can_buff_skill   = false;
                            SelfRole._inst.can_buff_ani     = false;
                            SelfRole._inst.m_curAni.enabled = false;
                            buffInfo.buff_type = BUFF_TYPE.CANT_MOVE_SKILL;
                        }
                    }
                    else
                    {
                        SelfRole._inst.can_buff_skill = false;
                        buffInfo.buff_type            = BUFF_TYPE.CANT_SKILL;
                    }
                }
                else
                {
                    buffInfo.buff_type           = BUFF_TYPE.CANT_MOVE;
                    SelfRole._inst.can_buff_move = false;
                }
                bool flag2 = buffInfo.buff_type != BUFF_TYPE.NULL && !this.Buff_type_list.Contains(buffInfo.buff_type);
                if (flag2)
                {
                    this.Buff_type_list.Add(buffInfo.buff_type);
                }
            }
            buffInfo.icon = ((sXML != null) ? sXML.getString("icon") : null);
            buffInfo.name = ((sXML != null) ? sXML.getString("name") : null);
            this.dele_buff(data);
            this.BuffCd[buffInfo.id] = buffInfo;
            buffInfo.doCD();
            a3_buff expr_1C7 = a3_buff.instance;

            if (expr_1C7 != null)
            {
                expr_1C7.resh_buff();
            }
        }
Esempio n. 4
0
        private void Set_Line(Transform go, BuffInfo v)
        {
            XMLMgr expr_06 = XMLMgr.instance;
            SXML   sXML    = (expr_06 != null) ? expr_06.GetSXML("skill.state", "id==" + v.id) : null;
            bool   flag    = v.id == 10001u;

            if (flag)
            {
                this.exp_pos  = go.transform.FindChild("item_text");
                this.name_exp = sXML.getString("name");
                bool flag2 = base.IsInvoking("do_expCD");
                if (flag2)
                {
                    this.exp_pos   = go.transform.FindChild("item_text");
                    this.endCD_exp = (long)((ulong)((v.end_time - v.start_time) / 1000u));
                    base.CancelInvoke("do_expCD");
                }
                else
                {
                    this.endCD_exp = (long)((ulong)((v.end_time - v.start_time) / 1000u));
                }
                base.InvokeRepeating("do_expCD", 0f, 1f);
                go.transform.FindChild("Text").GetComponent <Text>().text = sXML.getString("desc");
            }
            else
            {
                bool flag3 = v.id == 99996u || v.id == 99997u || v.id == 99998u || v.id == 99999u;
                if (flag3)
                {
                    go.transform.FindChild("item_text").GetComponent <Text>().text = sXML.getString("name");
                    go.transform.FindChild("Text").GetComponent <Text>().text      = sXML.getString("desc");
                }
                else
                {
                    bool flag4 = v.id == 10000u;
                    if (flag4)
                    {
                        this.bless_pos  = go.transform.FindChild("item_text");
                        this.name_bless = sXML.getString("name");
                        bool flag5 = base.IsInvoking("do_blessCD");
                        if (flag5)
                        {
                            this.bless_pos = go.transform.FindChild("item_text");
                            base.CancelInvoke("do_blessCD");
                        }
                        else
                        {
                            this.endCD_bless = (long)((ulong)((v.end_time - v.start_time) / 1000u));
                        }
                        base.InvokeRepeating("do_blessCD", 0f, 1f);
                        go.transform.FindChild("Text").GetComponent <Text>().text = sXML.getString("desc");
                    }
                    else
                    {
                        bool flag6 = (v.id > 0u && v.id < 203u) || (v.id > 3000u && v.id < 3101u);
                        if (flag6)
                        {
                            this.fuwen_pos  = go.transform.FindChild("item_text");
                            this.name_fuwen = sXML.getString("name");
                            bool flag7 = base.IsInvoking("do_fuwenCD");
                            if (flag7)
                            {
                                this.fuwen_pos = go.transform.FindChild("item_text");
                                base.CancelInvoke("do_fuwenCD");
                            }
                            else
                            {
                                this.endCD_fuwen = (long)((ulong)((v.end_time - v.start_time) / 1000u));
                            }
                            base.InvokeRepeating("do_fuwenCD", 0f, 1f);
                            go.transform.FindChild("Text").GetComponent <Text>().text = sXML.getString("desc");
                        }
                        else
                        {
                            bool flag8 = v.id >= 300u && v.id < 6050u;
                            if (flag8)
                            {
                                XMLMgr      expr_39F = XMLMgr.instance;
                                SXML        sXML2    = (expr_39F != null) ? expr_39F.GetSXML("skill.skill", "id==" + sXML.getInt("skill_id")) : null;
                                List <SXML> nodeList = sXML2.GetNodeList("skill_att", "");
                                for (int i = 0; i < nodeList.Count; i++)
                                {
                                    SXML node  = nodeList[i].GetNode("sres", "");
                                    bool flag9 = node == null;
                                    if (flag9)
                                    {
                                        node = nodeList[i].GetNode("tres", "");
                                        bool flag10 = (long)node.getInt("tar_state") == (long)((ulong)v.id);
                                        if (flag10)
                                        {
                                            go.transform.FindChild("Text").GetComponent <Text>().text = nodeList[i].getString("descr3");
                                        }
                                    }
                                    else
                                    {
                                        bool flag11 = (long)node.getInt("tar_state") == (long)((ulong)v.id);
                                        if (flag11)
                                        {
                                            go.transform.FindChild("Text").GetComponent <Text>().text = nodeList[i].getString("descr2");
                                        }
                                    }
                                }
                                int @int = sXML.getInt("skill_id");
                                if (@int <= 2010)
                                {
                                    if (@int == 2005)
                                    {
                                        this.skill_id[1]   = v.id;
                                        this.skill_pos[1]  = go.transform.FindChild("item_text");
                                        this.name_skill[1] = sXML.getString("name");
                                        bool flag12 = base.IsInvoking("do_skillCD_1");
                                        if (flag12)
                                        {
                                            this.skill_pos[1] = go.transform.FindChild("item_text");
                                            base.CancelInvoke("do_skillCD_1");
                                        }
                                        else
                                        {
                                            this.endCD_skill[1] = (long)((ulong)((v.end_time - v.start_time) / 1000u));
                                        }
                                        base.InvokeRepeating("do_skillCD_1", 0f, 1f);
                                        goto IL_D13;
                                    }
                                    if (@int == 2008)
                                    {
                                        this.skill_id[8]   = v.id;
                                        this.skill_pos[8]  = go.transform.FindChild("item_text");
                                        this.name_skill[8] = sXML.getString("name");
                                        bool flag13 = base.IsInvoking("do_skillCD_8");
                                        if (flag13)
                                        {
                                            this.skill_pos[8] = go.transform.FindChild("item_text");
                                            base.CancelInvoke("do_skillCD_8");
                                        }
                                        else
                                        {
                                            this.endCD_skill[8] = (long)((ulong)((v.end_time - v.start_time) / 1000u));
                                        }
                                        base.InvokeRepeating("do_skillCD_8", 0f, 1f);
                                        goto IL_D13;
                                    }
                                    if (@int == 2010)
                                    {
                                        this.skill_id[2]   = v.id;
                                        this.skill_pos[2]  = go.transform.FindChild("item_text");
                                        this.name_skill[2] = sXML.getString("name");
                                        bool flag14 = base.IsInvoking("do_skillCD_2");
                                        if (flag14)
                                        {
                                            this.skill_pos[2] = go.transform.FindChild("item_text");
                                            base.CancelInvoke("do_skillCD_2");
                                        }
                                        else
                                        {
                                            this.endCD_skill[2] = (long)((ulong)((v.end_time - v.start_time) / 1000u));
                                        }
                                        base.InvokeRepeating("do_skillCD_2", 0f, 1f);
                                        goto IL_D13;
                                    }
                                }
                                else
                                {
                                    switch (@int)
                                    {
                                    case 3008:
                                    {
                                        this.skill_id[3]   = v.id;
                                        this.skill_pos[3]  = go.transform.FindChild("item_text");
                                        this.name_skill[3] = sXML.getString("name");
                                        bool flag15 = base.IsInvoking("do_skillCD_3");
                                        if (flag15)
                                        {
                                            this.skill_pos[3] = go.transform.FindChild("item_text");
                                            base.CancelInvoke("do_skillCD_3");
                                        }
                                        else
                                        {
                                            this.endCD_skill[3] = (long)((ulong)((v.end_time - v.start_time) / 1000u));
                                        }
                                        base.InvokeRepeating("do_skillCD_3", 0f, 1f);
                                        goto IL_D13;
                                    }

                                    case 3009:
                                    {
                                        this.skill_id[9]   = v.id;
                                        this.skill_pos[9]  = go.transform.FindChild("item_text");
                                        this.name_skill[9] = sXML.getString("name");
                                        bool flag16 = base.IsInvoking("do_skillCD_9");
                                        if (flag16)
                                        {
                                            this.skill_pos[3] = go.transform.FindChild("item_text");
                                            base.CancelInvoke("do_skillCD_9");
                                        }
                                        else
                                        {
                                            this.endCD_skill[9] = (long)((ulong)((v.end_time - v.start_time) / 1000u));
                                        }
                                        base.InvokeRepeating("do_skillCD_9", 0f, 1f);
                                        goto IL_D13;
                                    }

                                    case 3010:
                                    {
                                        this.skill_id[4]   = v.id;
                                        this.skill_pos[4]  = go.transform.FindChild("item_text");
                                        this.name_skill[4] = sXML.getString("name");
                                        bool flag17 = base.IsInvoking("do_skillCD_4");
                                        if (flag17)
                                        {
                                            this.skill_pos[4] = go.transform.FindChild("item_text");
                                            base.CancelInvoke("do_skillCD_4");
                                        }
                                        else
                                        {
                                            this.endCD_skill[4] = (long)((ulong)((v.end_time - v.start_time) / 1000u));
                                        }
                                        base.InvokeRepeating("do_skillCD_4", 0f, 1f);
                                        goto IL_D13;
                                    }

                                    default:
                                        switch (@int)
                                        {
                                        case 5005:
                                        {
                                            this.skill_id[5]   = v.id;
                                            this.skill_pos[5]  = go.transform.FindChild("item_text");
                                            this.name_skill[5] = sXML.getString("name");
                                            bool flag18 = base.IsInvoking("do_skillCD_5");
                                            if (flag18)
                                            {
                                                this.skill_pos[5] = go.transform.FindChild("item_text");
                                                base.CancelInvoke("do_skillCD_5");
                                            }
                                            else
                                            {
                                                this.endCD_skill[5] = (long)((ulong)((v.end_time - v.start_time) / 1000u));
                                            }
                                            base.InvokeRepeating("do_skillCD_5", 0f, 1f);
                                            goto IL_D13;
                                        }

                                        case 5006:
                                        case 5007:
                                            break;

                                        case 5008:
                                        {
                                            this.skill_id[0]   = v.id;
                                            this.skill_pos[0]  = go.transform.FindChild("item_text");
                                            this.name_skill[0] = sXML.getString("name");
                                            bool flag19 = base.IsInvoking("do_skillCD_0");
                                            if (flag19)
                                            {
                                                this.skill_pos[0] = go.transform.FindChild("item_text");
                                                base.CancelInvoke("do_skillCD_0");
                                            }
                                            else
                                            {
                                                this.endCD_skill[0] = (long)((ulong)((v.end_time - v.start_time) / 1000u));
                                            }
                                            base.InvokeRepeating("do_skillCD_0", 0f, 1f);
                                            goto IL_D13;
                                        }

                                        case 5009:
                                        {
                                            this.skill_id[6]   = v.id;
                                            this.skill_pos[6]  = go.transform.FindChild("item_text");
                                            this.name_skill[6] = sXML.getString("name");
                                            bool flag20 = base.IsInvoking("do_skillCD_6");
                                            if (flag20)
                                            {
                                                this.skill_pos[6] = go.transform.FindChild("item_text");
                                                base.CancelInvoke("do_skillCD_6");
                                            }
                                            else
                                            {
                                                this.endCD_skill[6] = (long)((ulong)((v.end_time - v.start_time) / 1000u));
                                            }
                                            base.InvokeRepeating("do_skillCD_6", 0f, 1f);
                                            goto IL_D13;
                                        }

                                        case 5010:
                                        {
                                            this.skill_id[7]   = v.id;
                                            this.skill_pos[7]  = go.transform.FindChild("item_text");
                                            this.name_skill[7] = sXML.getString("name");
                                            bool flag21 = base.IsInvoking("do_skillCD_7");
                                            if (flag21)
                                            {
                                                this.skill_pos[7] = go.transform.FindChild("item_text");
                                                base.CancelInvoke("do_skillCD_7");
                                            }
                                            else
                                            {
                                                this.endCD_skill[7] = (long)((ulong)((v.end_time - v.start_time) / 1000u));
                                            }
                                            base.InvokeRepeating("do_skillCD_7", 0f, 1f);
                                            goto IL_D13;
                                        }

                                        default:
                                            if (@int == 6053)
                                            {
                                                this.skill_id[10]   = v.id;
                                                this.skill_pos[10]  = go.transform.FindChild("item_text");
                                                this.name_skill[10] = sXML.getString("name");
                                                bool flag22 = base.IsInvoking("do_skillCD_10");
                                                if (flag22)
                                                {
                                                    this.skill_pos[10] = go.transform.FindChild("item_text");
                                                    base.CancelInvoke("do_skillCD_10");
                                                }
                                                else
                                                {
                                                    this.endCD_skill[10] = (long)((ulong)((v.end_time - v.start_time) / 1000u));
                                                }
                                                base.InvokeRepeating("do_skillCD_10", 0f, 1f);
                                                goto IL_D13;
                                            }
                                            break;
                                        }
                                        break;
                                    }
                                }
                                go.transform.FindChild("item_text").GetComponent <Text>().text = "额外buff";
                                go.transform.FindChild("Text").GetComponent <Text>().text      = "额外的buff属性,提供攻击防御属性";
                                IL_D13 :;
                            }
                            else
                            {
                                go.transform.FindChild("item_text").GetComponent <Text>().text = "额外buff";
                                go.transform.FindChild("Text").GetComponent <Text>().text      = "额外的buff属性,提供攻击防御属性";
                            }
                        }
                    }
                }
            }
        }