public void addBuffList(Variant data) { BuffInfo buff = new BuffInfo(); buff.id = data["id"]; buff.par = data["par"]; buff.start_time = data["start_tm"]; buff.end_time = data["end_tm"]; #region SXML xml = XMLMgr.instance?.GetSXML("skill.state", "id==" + buff.id); SXML xml_node = xml?.GetNode("s", null); if (xml_node != null) { switch (xml_node.getInt("tp")) { case 1: buff.buff_type = BUFF_TYPE.CANT_MOVE; SelfRole._inst.can_buff_move = false; break; case 6: SelfRole._inst.can_buff_skill = false; buff.buff_type = BUFF_TYPE.CANT_SKILL; break; case 7: SelfRole._inst.can_buff_move = false; SelfRole._inst.can_buff_skill = false; SelfRole._inst.can_buff_ani = false; SelfRole._inst.m_curAni.enabled = false; buff.buff_type = BUFF_TYPE.CANT_MOVE_SKILL; break; default: buff.buff_type = BUFF_TYPE.NULL; break; } if (buff.buff_type != BUFF_TYPE.NULL && !Buff_type_list.Contains(buff.buff_type)) { Buff_type_list.Add(buff.buff_type); } } buff.icon = xml?.getString("icon"); buff.name = xml?.getString("name"); #endregion dele_buff(data); BuffCd[buff.id] = buff; buff.doCD(); //if (buff.id >= 300 && buff.id < 2952) // a3_buff.instance.skillList.Add(buff.id); a3_buff.instance?.resh_buff(); }
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(); } }