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(); } } }
private void onMapChange(Variant msgData) { bool flag = a3_expbar.instance != null; if (flag) { a3_expbar.instance.CloseAgainst(); } debug.Log(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>onMapChange>" + msgData.dump()); A3_BuffModel expr_38 = ModelBase <A3_BuffModel> .getInstance(); bool flag2 = ((expr_38 != null) ? expr_38.BuffCd : null) != null; if (flag2) { ModelBase <A3_BuffModel> .getInstance().BuffCd.Clear(); a3_buff expr_61 = a3_buff.instance; if (expr_61 != null) { expr_61.resh_buff(); } } bool flag3 = msgData.ContainsKey("states"); if (flag3) { Variant variant = msgData["states"]; foreach (Variant current in variant["state_par"]._arr) { Variant data = current; ModelBase <A3_BuffModel> .getInstance().addBuffList(data); } } bool flag4 = msgData.ContainsKey("pk_state"); if (flag4) { ModelBase <PlayerModel> .getInstance().now_pkState = msgData["pk_state"]; switch (ModelBase <PlayerModel> .getInstance().now_pkState) { case 0: ModelBase <PlayerModel> .getInstance().pk_state = PK_TYPE.PK_PEACE; break; case 1: ModelBase <PlayerModel> .getInstance().pk_state = PK_TYPE.PK_PKALL; ModelBase <PlayerModel> .getInstance().m_unPK_Param = ModelBase <PlayerModel> .getInstance().cid; ModelBase <PlayerModel> .getInstance().m_unPK_Param2 = ModelBase <PlayerModel> .getInstance().cid; break; case 2: ModelBase <PlayerModel> .getInstance().pk_state = PK_TYPE.PK_TEAM; ModelBase <PlayerModel> .getInstance().m_unPK_Param = ModelBase <PlayerModel> .getInstance().teamid; ModelBase <PlayerModel> .getInstance().m_unPK_Param2 = ModelBase <PlayerModel> .getInstance().clanid; break; } bool flag5 = a3_pkmodel._instance; if (flag5) { a3_pkmodel._instance.ShowThisImage(msgData["pk_state"]); } InterfaceMgr.doCommandByLua("PlayerModel:getInstance().modPkState", "model/PlayerModel", new object[] { ModelBase <PlayerModel> .getInstance().now_pkState, true }); } GRMap.loading = true; bool flag6 = a3_liteMinimap.instance; if (flag6) { a3_liteMinimap.instance.clear(); } ModelBase <PlayerModel> .getInstance().refreshByChangeMap(msgData); GRMap.curSvrMsg = msgData; NetClient.instance.dispatchEvent(GameEvent.Create(58u, this, msgData, false)); bool autofighting = SelfRole.fsm.Autofighting; if (autofighting) { SelfRole.fsm.Stop(); } bool flag7 = msgData["hp"] <= 0; if (flag7) { SelfRole._inst.onDead(true, null); InterfaceMgr.getInstance().open(InterfaceMgr.A3_RELIVE, null, false); } }
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(); } }