private bool HasRespawnStone() { int itemNumByTpid = ModelBase <a3_BagModel> .getInstance().getItemNumByTpid(1508u); return(itemNumByTpid >= 1); }
public bool CheckRuneLevelupAvailable() { bool flag = this.runedic == null; if (flag) { this.ReadRuneRequire(null); } List <int> list = new List <int>(this.runeReqDic.Keys); bool result; for (int i = 0; i < list.Count; i++) { int now_lv = this.runedic[list[i]].now_lv; bool flag2 = now_lv == this.runeReqDic[list[i]].Count; if (!flag2) { RuneRequire runeRequire = this.runeReqDic[list[i]][now_lv + 1]; bool flag3 = (ulong)ModelBase <PlayerModel> .getInstance().lvl >= (ulong)((long)runeRequire.req_role_lvl) && (ulong)ModelBase <PlayerModel> .getInstance().up_lvl >= (ulong)((long)runeRequire.req_role_zhuan); if (flag3) { result = true; return(result); } } } result = false; return(result); }
public void SetInfo(ItemTeamData itd = null, bool meIsCaptain = false) { bool flag = itd != null; if (flag) { this.itemTeamData = itd; this.cid = itd.cid; this.txtName.text = itd.name; this.txtLvl.text = string.Concat(new object[] { itd.zhuan, "转", itd.lvl, "级" }); this.txtCombat.text = itd.combpt.ToString(); uint num = itd.carr; bool flag2 = num == 0u; if (flag2) { num = (uint)ModelBase <PlayerModel> .getInstance().profession; } bool flag3 = a3_currentTeamPanel._instance.carrSpriteDic.ContainsKey(num); if (flag3) { this.iconHead.sprite = a3_currentTeamPanel._instance.carrSpriteDic[num]; this.iconHead.SetNativeSize(); } bool online = itd.online; if (online) { this.iconHead.gameObject.GetComponent <Image>().material = null; this.iconCaptain.gameObject.GetComponent <Image>().material = null; this.txtName.transform.parent.GetComponent <Image>().material = null; this.txtLvl.transform.parent.GetComponent <Image>().material = null; this.txtCombat.transform.parent.GetComponent <Image>().material = null; } else { this.iconHead.gameObject.GetComponent <Image>().material = a3_currentTeamPanel._instance.materialGrey; this.iconCaptain.gameObject.GetComponent <Image>().material = a3_currentTeamPanel._instance.materialGrey; this.txtName.transform.parent.GetComponent <Image>().material = a3_currentTeamPanel._instance.materialGrey; this.txtLvl.transform.parent.GetComponent <Image>().material = a3_currentTeamPanel._instance.materialGrey; this.txtCombat.transform.parent.GetComponent <Image>().material = a3_currentTeamPanel._instance.materialGrey; } this.noEmpty.gameObject.SetActive(true); this.empty.gameObject.SetActive(false); this.iconCaptain.gameObject.SetActive(itd.isCaptain); bool flag4 = meIsCaptain && this.cid != ModelBase <PlayerModel> .getInstance().cid; if (flag4) { this.btnRemoveTeam.gameObject.SetActive(true); } else { this.btnRemoveTeam.gameObject.SetActive(false); } } else { this.empty.gameObject.SetActive(true); this.noEmpty.gameObject.SetActive(false); } }
public override void record_login() { Variant variant = new Variant(); variant["roleId"] = ModelBase <PlayerModel> .getInstance().cid; variant["roleName"] = ModelBase <PlayerModel> .getInstance().name; variant["roleLevel"] = this.getlv(ModelBase <PlayerModel> .getInstance().up_lvl, ModelBase <PlayerModel> .getInstance().lvl); variant["roleGold"] = ModelBase <PlayerModel> .getInstance().money; variant["roleYb"] = ModelBase <PlayerModel> .getInstance().gold; variant["roleCreateTime"] = ModelBase <PlayerModel> .getInstance().crttm; variant["roleServerId"] = Globle.curServerD.sid; variant["roleServerName"] = Globle.curServerD.server_name; variant["rolevip"] = ModelBase <PlayerModel> .getInstance().vip; variant["rolePartyName"] = ""; variant["rolePartyId"] = ModelBase <PlayerModel> .getInstance().clanid; variant["rolePower"] = ModelBase <PlayerModel> .getInstance().combpt; variant["rolePartyRoleId"] = ""; variant["rolePartyRoleName"] = ""; variant["roleProfessionId"] = ModelBase <PlayerModel> .getInstance().profession; variant["roleProfession"] = ""; variant["roleFriendlist"] = ""; string text = JsonManager.VariantToString(variant); AnyPlotformSDK.Call_Cmd("enterGame", "lanRole", text, false); debug.Log("[record]login:" + text); }
public int GetCheckCount(int defaultValue = 10) { List <SXML> nodeList = XMLMgr.instance.GetSXML("skill.skill_check", "").GetNodeList("skill_check", ""); int result; for (int i = 0; i < nodeList.Count; i++) { bool flag = (long)nodeList[i].getInt("check_zhuan") > (long)((ulong)ModelBase <PlayerModel> .getInstance().up_lvl) || ((long)nodeList[i].getInt("check_zhuan") == (long)((ulong)ModelBase <PlayerModel> .getInstance().up_lvl) && (long)nodeList[i].getInt("check_lv") >= (long)((ulong)ModelBase <PlayerModel> .getInstance().lvl)); if (flag) { result = nodeList[i].getInt("check_count"); return(result); } } result = defaultValue; return(result); }
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; } } } }
public void setTxt_jjc(bool b) { this.cs_jjc.text = string.Concat(new object[] { "(", ModelBase <A3_ActiveModel> .getInstance().callenge_cnt - ModelBase <A3_ActiveModel> .getInstance().pvpCount + ModelBase <A3_ActiveModel> .getInstance().buyCount, "/", ModelBase <A3_ActiveModel> .getInstance().callenge_cnt, ")" }); if (b) { bool flag = ModelBase <A3_ActiveModel> .getInstance().callenge_cnt - ModelBase <A3_ActiveModel> .getInstance().pvpCount + ModelBase <A3_ActiveModel> .getInstance().buyCount <= 0; if (flag) { this.jjc_bt.gameObject.GetComponent <Button>().interactable = false; } else { this.jjc_bt.gameObject.GetComponent <Button>().interactable = true; } } else { this.jjc_bt.gameObject.GetComponent <Button>().interactable = false; } }
private void onVip(Variant data) { ModelBase <PlayerModel> .getInstance().vipChange(data); base.dispatchEvent(GameEvent.Create(VipProxy.EVENT_ON_VIP_CHANGE, this, data, false)); }
public a3_ygyiwuModel() { SXML sXML = XMLMgr.instance.GetSXML("accent_relic.relic", "carr==" + ModelBase <PlayerModel> .getInstance().profession); List <SXML> nodeList = sXML.GetNodeList("relic_god", ""); for (int i = 0; i < nodeList.Count; i++) { yiwuInfo yiwuInfo = new yiwuInfo(); yiwuInfo.id = nodeList[i].getInt("id"); yiwuInfo.need_zdl = nodeList[i].getInt("zdl"); yiwuInfo.isGod = true; yiwuInfo.name = nodeList[i].getString("name"); yiwuInfo.des = nodeList[i].getString("des"); yiwuInfo.needexp = nodeList[i].getInt("exp"); yiwuInfo.place = nodeList[i].getString("place"); yiwuInfo.awardName = nodeList[i].getString("des1"); yiwuInfo.awardDesc = nodeList[i].getString("des2"); yiwuInfo.iconid = nodeList[i].getInt("icon"); yiwuInfo.awardId = nodeList[i].GetNode("award", "").getInt("id"); yiwuInfo.awardType = nodeList[i].GetNode("award", "").getInt("type"); yiwuInfo.eff = nodeList[i].getString("eff"); yiwuInfo.fbBox_title = nodeList[i].getString("title"); yiwuInfo.fbBox_dec = nodeList[i].getString("desc"); this.Allywlist_God[yiwuInfo.id] = yiwuInfo; } List <SXML> sXMLList = XMLMgr.instance.GetSXMLList("accent_relic.relic", "type==" + 2); SXML sXML2 = null; foreach (SXML current in sXMLList) { bool flag = current.getInt("carr") == ModelBase <PlayerModel> .getInstance().profession; if (flag) { sXML2 = current; } } List <SXML> nodeList2 = sXML2.GetNodeList("relic_god", ""); for (int j = 0; j < nodeList2.Count; j++) { yiwuInfo yiwuInfo2 = new yiwuInfo(); yiwuInfo2.id = nodeList2[j].getInt("id"); yiwuInfo2.need_zdl = nodeList2[j].getInt("zdl"); yiwuInfo2.isGod = false; yiwuInfo2.name = nodeList2[j].getString("name"); yiwuInfo2.des = nodeList2[j].getString("des"); yiwuInfo2.place = nodeList2[j].getString("place"); yiwuInfo2.awardName = nodeList2[j].getString("des1"); yiwuInfo2.awardDesc = nodeList2[j].getString("des2"); yiwuInfo2.iconid = nodeList2[j].getInt("icon"); yiwuInfo2.awardId = nodeList2[j].GetNode("award", "").getInt("id"); yiwuInfo2.awardType = nodeList2[j].GetNode("award", "").getInt("type"); yiwuInfo2.fbBox_title = nodeList2[j].getString("title"); yiwuInfo2.fbBox_dec = nodeList2[j].getString("desc"); yiwuInfo2.eff = nodeList2[j].getString("eff"); yiwuInfo2.needuplvl = nodeList2[j].getInt("zhuan"); yiwuInfo2.needlvl = nodeList2[j].getInt("level"); this.Allywlist_Pre[yiwuInfo2.id] = yiwuInfo2; } }
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(); } } })); } } }
private void OnShowAwardInfo() { this.bg_task.gameObject.SetActive(true); this.conOption.parent.gameObject.SetActive(false); TaskData curTask = this.curTask; TaskType taskT = curTask.taskT; Dictionary <uint, int> dictionary; if (taskT != TaskType.CLAN) { dictionary = this.tkModel.GetValueReward(curTask.taskId); } else { dictionary = this.tkModel.GetClanRewardDic(curTask.taskCount); } Dictionary <uint, int> itemReward = this.tkModel.GetItemReward(curTask.taskId); List <a3_BagItemData> equipReward = this.tkModel.GetEquipReward(curTask.taskId); bool guide = curTask.guide; if (guide) { this.btnNext.transform.FindChild("guide_task_info").gameObject.SetActive(true); } else { this.btnNext.transform.FindChild("guide_task_info").gameObject.SetActive(false); } bool flag = dictionary != null; if (flag) { bool flag2 = this.conIcon.childCount > 0; if (flag2) { for (int i = 0; i < this.conIcon.childCount; i++) { UnityEngine.Object.Destroy(this.conIcon.GetChild(i).gameObject); } } foreach (uint current in dictionary.Keys) { a3_ItemData itemDataById = ModelBase <a3_BagModel> .getInstance().getItemDataById(current); TaskType taskT2 = curTask.taskT; if (taskT2 != TaskType.CLAN) { itemDataById.file = "icon/comm/0x" + current; } else { itemDataById.file = "icon/comm/1x" + current; } GameObject gameObject = IconImageMgr.getInstance().createA3ItemIcon(itemDataById, false, dictionary[current], 0.8f, false, -1, 0, false, false, false, -1, false, false); Transform transform = gameObject.transform.FindChild("iconbor"); bool flag3 = transform != null; if (flag3) { transform.gameObject.SetActive(false); } GameObject gameObject2 = UnityEngine.Object.Instantiate <GameObject>(this.iconTemp); gameObject.transform.SetParent(gameObject2.transform.FindChild("icon"), false); gameObject2.transform.SetParent(this.conIcon, false); gameObject2.name = itemDataById.tpid.ToString(); gameObject2.SetActive(true); Image component = gameObject.GetComponent <Image>(); bool flag4 = component != null; if (flag4) { component.enabled = false; } } } bool flag5 = equipReward != null; if (flag5) { foreach (a3_BagItemData current2 in equipReward) { bool flag6 = !current2.isEquip; if (!flag6) { GameObject gameObject3 = IconImageMgr.getInstance().createA3ItemIcon(current2.id, false, -1, 0.8f, false, -1, 0, false, false, false, false); Transform transform2 = gameObject3.transform.FindChild("iconborder"); bool flag7 = transform2 != null; if (flag7) { transform2.gameObject.SetActive(false); } GameObject gameObject4 = UnityEngine.Object.Instantiate <GameObject>(this.iconTemp); gameObject3.transform.SetParent(gameObject4.transform.FindChild("icon"), false); gameObject4.transform.SetParent(this.conIcon, false); UnityEngine.Object arg_375_0 = gameObject4; uint tpid = current2.tpid; arg_375_0.name = tpid.ToString(); gameObject4.SetActive(true); Image component2 = gameObject3.GetComponent <Image>(); bool flag8 = component2 != null; if (flag8) { component2.enabled = false; } } } } bool flag9 = itemReward != null; if (flag9) { foreach (uint current3 in itemReward.Keys) { int num = itemReward[current3]; GameObject gameObject5 = IconImageMgr.getInstance().createA3ItemIcon(current3, true, num, 0.8f, false, -1, 0, false, false, false, false); Transform transform3 = gameObject5.transform.FindChild("iconborder"); bool flag10 = transform3 != null; if (flag10) { transform3.gameObject.SetActive(false); } GameObject gameObject6 = UnityEngine.Object.Instantiate <GameObject>(this.iconTemp); gameObject5.transform.SetParent(gameObject6.transform.FindChild("icon"), false); gameObject6.transform.SetParent(this.conIcon, false); gameObject6.name = current3.ToString(); gameObject6.SetActive(true); Image component3 = gameObject5.GetComponent <Image>(); bool flag11 = component3 != null; if (flag11) { component3.enabled = false; } } } }
public bool CheckTitleLevelupAvailable() { return(FunctionOpenMgr.instance.Check(FunctionOpenMgr.ACHIEVEMENT, false) && this.dicrankinfo.ContainsKey(a3_RankModel.now_id + 1) && (ulong)ModelBase <PlayerModel> .getInstance().ach_point > (ulong)((long)this.dicrankinfo[a3_RankModel.now_id + 1].rankexp)); }
private void SummonOP(Variant data) { debug.Log("召唤兽信息" + data.dump()); int num = -1; Variant variant = new Variant(); uint num2 = 0u; bool flag = data.ContainsKey("tp"); if (flag) { num = data["tp"]; bool flag2 = num < 0; if (flag2) { Globle.err_output(num); return; } } bool flag3 = data.ContainsKey("summon"); if (flag3) { } switch (num) { case 0: { variant = data["summons"]; bool flag4 = variant != null; if (flag4) { foreach (Variant current in variant._arr) { ModelBase <A3_SummonModel> .getInstance().AddSummon(current); } } bool flag5 = data.ContainsKey("summon_on"); if (flag5) { Variant variant2 = data["summon_on"]; ModelBase <A3_SummonModel> .getInstance().nowShowAttackID = variant2["id"]; ModelBase <A3_SummonModel> .getInstance().nowShowAttackModel = variant2["att_type"]; } ModelBase <A3_SummonModel> .getInstance().SortSummon(); break; } case 1: { bool flag6 = data.ContainsKey("summons"); if (flag6) { variant = data["summons"]; foreach (Variant current2 in variant._arr) { ModelBase <A3_SummonModel> .getInstance().AddSummon(current2); } ModelBase <A3_SummonModel> .getInstance().SortSummon(); } base.dispatchEvent(GameEvent.Create(A3_SummonProxy.EVENT_SHOWIDENTIFYANSWER, this, data, false)); break; } case 2: { int id = data["summon_id"]; ModelBase <A3_SummonModel> .getInstance().RemoveSummon(id); base.dispatchEvent(GameEvent.Create(A3_SummonProxy.EVENT_PUTSUMMONINBAG, this, data, false)); break; } case 3: variant = data["summon"]; ModelBase <A3_SummonModel> .getInstance().AddSummon(variant); ModelBase <A3_SummonModel> .getInstance().SortSummon(); base.dispatchEvent(GameEvent.Create(A3_SummonProxy.EVENT_USESUMMONFROMBAG, this, data, false)); break; case 4: { num2 = data["summon_id"]; bool flag7 = ModelBase <A3_SummonModel> .getInstance().GetSummons().ContainsKey(num2); if (flag7) { ModelBase <A3_SummonModel> .getInstance().GetSummons().Remove(num2); } bool flag8 = data.ContainsKey("summon"); if (flag8) { variant = data["summon"]; uint key = variant["id"]; bool flag9 = ModelBase <A3_SummonModel> .getInstance().GetSummons().ContainsKey(key); if (flag9) { ModelBase <A3_SummonModel> .getInstance().GetSummons().Remove(key); } ModelBase <A3_SummonModel> .getInstance().AddSummon(variant); ModelBase <A3_SummonModel> .getInstance().SortSummon(); } base.dispatchEvent(GameEvent.Create(A3_SummonProxy.EVENT_INTEGRATION, this, data, false)); break; } case 5: { bool flag10 = data.ContainsKey("summon_id"); if (flag10) { num2 = data["summon_id"]; bool flag11 = ModelBase <A3_SummonModel> .getInstance().GetSummons().ContainsKey(num2); if (flag11) { bool flag12 = data.ContainsKey("add_exp"); if (flag12) { int currentexp = data["add_exp"]; a3_BagItemData value = ModelBase <A3_SummonModel> .getInstance().GetSummons()[num2]; value.summondata.currentexp = currentexp; ModelBase <A3_SummonModel> .getInstance().GetSummons().Remove(num2); ModelBase <A3_SummonModel> .getInstance().GetSummons()[num2] = value; ModelBase <A3_SummonModel> .getInstance().SortSummon(); } } } else { bool flag13 = data.ContainsKey("summon"); if (flag13) { variant = data["summon"]; uint key2 = variant["id"]; bool flag14 = ModelBase <A3_SummonModel> .getInstance().GetSummons().ContainsKey(key2); if (flag14) { ModelBase <A3_SummonModel> .getInstance().GetSummons().Remove(key2); } ModelBase <A3_SummonModel> .getInstance().AddSummon(variant); ModelBase <A3_SummonModel> .getInstance().SortSummon(); } } base.dispatchEvent(GameEvent.Create(A3_SummonProxy.EVENT_FEEDEXP, this, data, false)); bool flag15 = a3_summon.instan; if (flag15) { a3_summon.instan.Event_UIFeedEXPClicked(null); } break; } case 6: { bool flag16 = data.ContainsKey("summon_id"); if (flag16) { num2 = data["summon_id"]; bool flag17 = ModelBase <A3_SummonModel> .getInstance().GetSummons().ContainsKey(num2); if (flag17) { bool flag18 = data.ContainsKey("summon_life"); if (flag18) { int lifespan = data["summon_life"]; a3_BagItemData value2 = ModelBase <A3_SummonModel> .getInstance().GetSummons()[num2]; value2.summondata.lifespan = lifespan; ModelBase <A3_SummonModel> .getInstance().GetSummons().Remove(num2); ModelBase <A3_SummonModel> .getInstance().GetSummons()[num2] = value2; ModelBase <A3_SummonModel> .getInstance().SortSummon(); } } base.dispatchEvent(GameEvent.Create(A3_SummonProxy.EVENT_FEEDSM, this, data, false)); bool flag19 = a3_summon.instan; if (flag19) { a3_summon.instan.Event_UIFeedSMClicked(null); } bool flag20 = data["summon_id"] == ModelBase <A3_SummonModel> .getInstance().nowShowAttackID || data["summon_id"] == ModelBase <A3_SummonModel> .getInstance().lastatkID; if (flag20) { bool flag21 = a3_herohead.instance; if (flag21) { a3_herohead.instance.refresh_sumbar(); } } } break; } case 7: { bool flag22 = data.ContainsKey("summon_id"); if (flag22) { num2 = data["summon_id"]; } bool flag23 = ModelBase <A3_SummonModel> .getInstance().GetSummons().ContainsKey(num2); if (flag23) { int value3 = data["skill_id"]; int key3 = data["index"]; a3_BagItemData a3_BagItemData = ModelBase <A3_SummonModel> .getInstance().GetSummons()[num2]; bool flag24 = a3_BagItemData.summondata.skills.ContainsKey(key3); if (flag24) { a3_BagItemData.summondata.skills.Remove(key3); } else { a3_BagItemData.summondata.skills[key3] = value3; } ModelBase <A3_SummonModel> .getInstance().GetSummons().Remove(num2); ModelBase <A3_SummonModel> .getInstance().GetSummons()[num2] = a3_BagItemData; ModelBase <A3_SummonModel> .getInstance().SortSummon(); } base.dispatchEvent(GameEvent.Create(A3_SummonProxy.EVENT_FORGET, this, data, false)); break; } case 8: { bool flag25 = data["skill_id"] == 0; if (flag25) { flytxt.instance.fly("学习失败!", 0, default(Color), null); bool flag26 = a3_summon.instan; if (flag26) { a3_summon.instan.ShowSkillBooks(); } } else { bool flag27 = data.ContainsKey("summon_id"); if (flag27) { num2 = data["summon_id"]; } bool flag28 = ModelBase <A3_SummonModel> .getInstance().GetSummons().ContainsKey(num2); if (flag28) { int value4 = data["skill_id"]; int key4 = data["index"]; a3_BagItemData a3_BagItemData2 = ModelBase <A3_SummonModel> .getInstance().GetSummons()[num2]; bool flag29 = a3_BagItemData2.summondata.skills.ContainsKey(key4); if (flag29) { a3_BagItemData2.summondata.skills.Remove(key4); } else { a3_BagItemData2.summondata.skills[key4] = value4; } ModelBase <A3_SummonModel> .getInstance().GetSummons().Remove(num2); ModelBase <A3_SummonModel> .getInstance().GetSummons()[num2] = a3_BagItemData2; ModelBase <A3_SummonModel> .getInstance().SortSummon(); } base.dispatchEvent(GameEvent.Create(A3_SummonProxy.EVENT_XUEXI, this, data, false)); } break; } case 9: { num2 = data["summon_id"]; ModelBase <A3_SummonModel> .getInstance().nowShowAttackID = num2; bool flag30 = ModelBase <A3_SummonModel> .getInstance().GetSummons().ContainsKey(num2); if (flag30) { ModelBase <A3_SummonModel> .getInstance().GetSummons()[num2].summondata.status = 1; } flytxt.instance.fly("召唤兽已出战", 0, default(Color), null); bool flag31 = a3_herohead.instance; if (flag31) { a3_herohead.instance.refresh_sumbar(); } base.dispatchEvent(GameEvent.Create(A3_SummonProxy.EVENT_CHUZHAN, this, data, false)); break; } case 10: { num2 = data["summon_id"]; ModelBase <A3_SummonModel> .getInstance().nowShowAttackID = 0u; bool flag32 = ModelBase <A3_SummonModel> .getInstance().GetSummons().ContainsKey(num2); if (flag32) { ModelBase <A3_SummonModel> .getInstance().GetSummons()[num2].summondata.status = 0; } bool flag33 = data.ContainsKey("summon_life"); if (flag33) { bool flag34 = ModelBase <A3_SummonModel> .getInstance().GetSummons().ContainsKey(num2); if (flag34) { a3_BagItemData a3_BagItemData3 = ModelBase <A3_SummonModel> .getInstance().GetSummons()[num2]; int lifespan2 = a3_BagItemData3.summondata.lifespan; a3_BagItemData3.summondata.lifespan = data["summon_life"]; ModelBase <A3_SummonModel> .getInstance().GetSummons().Remove(num2); ModelBase <A3_SummonModel> .getInstance().GetSummons()[num2] = a3_BagItemData3; ModelBase <A3_SummonModel> .getInstance().SortSummon(); bool flag35 = lifespan2 > data["summon_life"] && data.ContainsKey("die_timelist"); if (flag35) { ModelBase <A3_SummonModel> .getInstance().addSumCD((int)num2, (float)(data["die_timelist"][0]._int - muNetCleint.instance.CurServerTimeStamp)); debug.Log("time" + (data["die_timelist"][0]._int - muNetCleint.instance.CurServerTimeStamp)); bool flag36 = a3_herohead.instance; if (flag36) { ModelBase <A3_SummonModel> .getInstance().lastatkID = num2; a3_herohead.instance.refresh_sumbar(); a3_herohead.instance.refresh_sumHp(0, 1); } } } } else { bool flag37 = a3_herohead.instance; if (flag37) { ModelBase <A3_SummonModel> .getInstance().lastatkID = 0u; a3_herohead.instance.refresh_sumbar(); a3_herohead.instance.refresh_sumHp(0, 1); } } bool flag38 = !data.ContainsKey("summon_life") || data["summon_life"] > 0; if (flag38) { flytxt.instance.fly("召唤兽已休息", 0, default(Color), null); } base.dispatchEvent(GameEvent.Create(A3_SummonProxy.EVENT_XIUXI, this, data, false)); break; } case 11: base.dispatchEvent(GameEvent.Create(A3_SummonProxy.EVENT_SUMINFO, this, data, false)); break; } }
private void RefreshDiary(GameEvent e) { GameObject gameObjectByPath = base.getGameObjectByPath("cells/scroll/0"); Transform transformByPath = base.getTransformByPath("cells/scroll/content"); Transform[] componentsInChildren = transformByPath.GetComponentsInChildren <Transform>(true); for (int i = 0; i < componentsInChildren.Length; i++) { Transform transform = componentsInChildren[i]; bool flag = transform.parent == transformByPath; if (flag) { UnityEngine.Object.Destroy(transform.gameObject); } } Variant logdata = ModelBase <A3_LegionModel> .getInstance().logdata; bool flag2 = logdata == null || !logdata.ContainsKey("clanlog_list"); if (!flag2) { Variant variant = logdata["clanlog_list"]; List <Variant> list = new List <Variant>(variant._arr); list.Reverse(); foreach (Variant current in list) { GameObject gameObject = UnityEngine.Object.Instantiate <GameObject>(gameObjectByPath); gameObject.SetActive(true); gameObject.transform.SetParent(transformByPath); gameObject.transform.localPosition = Vector3.zero; gameObject.transform.localScale = Vector3.one; Text component = gameObject.transform.FindChild("text").GetComponent <Text>(); int num = current["logtp"]; Variant variant2 = current["log"]; string item = string.Empty; string item2 = string.Empty; string item3 = string.Empty; int num2 = 0; int num3 = 0; int num4 = 0; int num5 = 0; int num6 = 0; int num7 = 0; bool flag3 = variant2.ContainsKey("name"); if (flag3) { item = variant2["name"]; } bool flag4 = variant2.ContainsKey("tar_name"); if (flag4) { item3 = variant2["tar_name"]; } bool flag5 = variant2.ContainsKey("clanc"); if (flag5) { num4 = variant2["clanc"]; } bool flag6 = variant2.ContainsKey("oldclanc"); if (flag6) { num3 = variant2["oldclanc"]; } bool flag7 = variant2.ContainsKey("money"); if (flag7) { num5 = variant2["money"]; } bool flag8 = variant2.ContainsKey("name"); if (flag8) { item2 = variant2["name"]; } bool flag9 = variant2.ContainsKey("guard_time"); if (flag9) { num2 = variant2["guard_time"]; } bool flag10 = variant2.ContainsKey("repair_cost"); if (flag10) { num7 = variant2["repair_cost"]; } bool flag11 = variant2.ContainsKey("clan_lvl"); if (flag11) { num6 = variant2["clan_lvl"]; } switch (num) { case 1: { string item4 = string.Empty; bool flag12 = num4 < num3; if (flag12) { item4 = "降级"; } else { item4 = "升级"; } component.text = ContMgr.getCont("clan_log_" + num, new List <string> { item3, item, item4, ModelBase <A3_LegionModel> .getInstance().GetClancToName(num4) }); break; } case 2: component.text = ContMgr.getCont("clan_log_" + num, new List <string> { item, ModelBase <A3_LegionModel> .getInstance().myLegion.lvl.ToString() }); break; case 3: component.text = ContMgr.getCont("clan_log_" + num, new List <string> { A3_LegionModel.GetCarr(ModelBase <PlayerModel> .getInstance().profession), item, num5.ToString() }); break; case 4: component.text = ContMgr.getCont("clan_log_" + num, new List <string> { item2 }); break; case 5: component.text = ContMgr.getCont("clan_log_" + num, new List <string> { item2 }); break; case 6: component.text = ContMgr.getCont("clan_log_" + num, new List <string> { item3, item }); break; case 7: component.text = ContMgr.getCont("clan_log_" + num, new List <string> { item }); break; case 8: component.text = ContMgr.getCont("clan_log_" + num, new List <string> { item }); break; case 9: component.text = ContMgr.getCont("clan_log_" + num, new List <string> { item3, item }); break; case 10: component.text = ContMgr.getCont("clan_log_" + num, new List <string> { item, item3 }); break; case 11: { bool flag13 = num6 <= 1; if (flag13) { component.text = ContMgr.getCont("clan_log_" + num, new List <string> { (4 - num2).ToString() }); } else { component.text = ContMgr.getCont("clan_log_12", new List <string> { (4 - num2).ToString(), (num6 - 1).ToString() }); } break; } case 12: component.text = ContMgr.getCont("clan_log_14", new List <string> { num6.ToString() }); break; case 13: component.text = ContMgr.getCont("clan_log_" + num, new List <string> { num7.ToString() }); break; } } transformByPath.GetComponent <RectTransform>().sizeDelta = new Vector2(0f, transformByPath.GetComponent <GridLayoutGroup>().cellSize.y *(float)variant._arr.Count); } }
private void OnGetOneMail(Variant data) { A3_MailModel instance = ModelBase <A3_MailModel> .getInstance(); uint num = data["id"]; bool flag = instance.mail_details.ContainsKey(num); if (flag) { instance.mail_details.Remove(num); } A3_MailDetail a3_MailDetail = new A3_MailDetail(); a3_MailDetail.ms = instance.mail_simple[num]; a3_MailDetail.ms.id = num; a3_MailDetail.ms.tp = ContMgr.getCont("mail_type_" + data["tp"], null); a3_MailDetail.ms.tm = data["tm"]; a3_MailDetail.ms.got_itm = data["got_itm"]; a3_MailDetail.ms.flag = true; a3_MailDetail.msg = this.ConvertString(data["msg"], "mail_content_"); a3_MailDetail.itms = new List <a3_BagItemData>(); bool flag2 = data.ContainsKey("itm"); if (flag2) { Variant variant = data["itm"]; bool flag3 = variant.ContainsKey("money"); if (flag3) { a3_MailDetail.money = variant["money"]; } bool flag4 = variant.ContainsKey("yb"); if (flag4) { a3_MailDetail.yb = variant["yb"]; } bool flag5 = variant.ContainsKey("bndyb"); if (flag5) { a3_MailDetail.bndyb = variant["bndyb"]; } bool flag6 = variant.ContainsKey("itm"); if (flag6) { Variant variant2 = variant["itm"]; foreach (Variant current in variant2._arr) { a3_BagItemData a3_BagItemData = default(a3_BagItemData); a3_BagItemData.tpid = current["tpid"]; a3_BagItemData.num = current["cnt"]; a3_BagItemData.confdata = ModelBase <a3_BagModel> .getInstance().getItemDataById(a3_BagItemData.tpid); a3_MailDetail.itms.Add(a3_BagItemData); } } bool flag7 = variant.ContainsKey("eqp"); if (flag7) { Variant variant3 = variant["eqp"]; foreach (Variant current2 in variant3._arr) { a3_BagItemData a3_BagItemData2 = default(a3_BagItemData); bool flag8 = current2.ContainsKey("tpid"); if (flag8) { a3_BagItemData2.tpid = current2["tpid"]; } bool flag9 = current2.ContainsKey("bnd"); if (flag9) { a3_BagItemData2.bnd = current2["bnd"]; } a3_BagItemData2 = ModelBase <a3_EquipModel> .getInstance().equipData_read(a3_BagItemData2, current2); a3_BagItemData2.confdata = ModelBase <a3_BagModel> .getInstance().getItemDataById(a3_BagItemData2.tpid); a3_MailDetail.itms.Add(a3_BagItemData2); } } } instance.mail_details[num] = a3_MailDetail; base.dispatchEvent(GameEvent.Create(A3_MailProxy.MAIL_NEW_MAIL_CONTENT, this, num, false)); }
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; } } }; }
private int vip_lite(int type) { SXML node = ModelBase <OffLineModel> .getInstance().OffLineXML.GetNode("rate_type", "type==" + type.ToString()); return(node.getInt("vip_level")); }
public bool CheckLevelupAvailable() { return((this.stage < this.GetXmlMaxStage() && this.level == this.GetStageMaxLevel(this.stage)) ? ((ulong)ModelBase <PlayerModel> .getInstance().money >= (ulong)((long)this.GetStageUpCost(this.stage + 1)) && (long)ModelBase <a3_BagModel> .getInstance().getItemNumByTpid(this.wingUpItem["stageItemId"]) >= (long)((ulong)this.GetStageUpCostItemSum(this.stage + 1))) : (this.level < this.GetStageMaxLevel(this.stage) && (ulong)ModelBase <PlayerModel> .getInstance().money >= (ulong)((long)this.GetLevelUpCost(this.stage, this.level + 1)) && (long)ModelBase <a3_BagModel> .getInstance().getItemNumByTpid(this.wingUpItem["levelItemId"]) >= (long)((ulong)this.GetLevelUpCostItemSum(this.stage, this.level + 1)))); }
public void show_mhMark(INameObj role, bool show) { this.mhPlayerName.text = string.Format("{0}\n{1}", (role as MonsterRole).roleName, ModelBase <PlayerModel> .getInstance().name); this.mhPlayerName.transform.parent.gameObject.SetActive(!show); this.monsterHunter.SetActive(!show); }
public void show(INameObj avatar) { bool flag = this.dItem.ContainsKey(avatar); if (!flag) { bool flag2 = this.lPool.Count == 0; PlayerNameItem playerNameItem; if (flag2) { GameObject original = Resources.Load("prefab/name_user") as GameObject; GameObject gameObject = UnityEngine.Object.Instantiate <GameObject>(original); gameObject.transform.SetParent(this.playerNameLayer, false); playerNameItem = new PlayerNameItem(gameObject.transform); } else { playerNameItem = this.lPool[0]; playerNameItem.visiable = true; this.lPool.RemoveAt(0); } playerNameItem.refresh(avatar); this.lItem.Add(playerNameItem); this.dItem[avatar] = playerNameItem; bool flag3 = avatar is MonsterRole; if (flag3) { bool flag4 = ModelBase <A3_ActiveModel> .getInstance() != null; if (flag4) { bool flag5 = ModelBase <A3_ActiveModel> .getInstance().mwlr_target_monId == 0 || (avatar as MonsterRole).monsterid != ModelBase <A3_ActiveModel> .getInstance().mwlr_target_monId; if (flag5) { playerNameItem.mhPlayerName.transform.parent.gameObject.SetActive(false); } else { playerNameItem.mhPlayerName.transform.parent.gameObject.SetActive(true); } } else { playerNameItem.mhPlayerName.transform.parent.gameObject.SetActive(false); } } else { playerNameItem.mhPlayerName.transform.parent.gameObject.SetActive(false); } bool flag6 = avatar is MDC000; if (flag6) { this.carObj = avatar; playerNameItem.setHP(((float)(avatar.curhp / avatar.maxHp) * 100f).ToString(), false); this.carItem = playerNameItem; playerNameItem.refreshHp(avatar.curhp, avatar.maxHp, avatar); } else { playerNameItem.cartxt.gameObject.SetActive(false); playerNameItem.refreshHp(avatar.curhp, avatar.maxHp, null); } playerNameItem.refreicon(); playerNameItem.refreshVipLv(0u); bool flag7 = avatar is ProfessionRole; if (flag7) { bool isMain = (avatar as ProfessionRole).m_isMain; if (isMain) { bool istitleActive = ModelBase <PlayerModel> .getInstance().istitleActive; if (istitleActive) { playerNameItem.refreshTitle(a3_RankModel.now_id); } playerNameItem.refresNameColor(ModelBase <PlayerModel> .getInstance().now_nameState); playerNameItem.refresHitback((int)ModelBase <PlayerModel> .getInstance().hitBack, false); playerNameItem.refreshVipLv((uint)ModelBase <A3_VipModel> .getInstance().Level); } else { playerNameItem.refreshTitle(avatar.title_id); playerNameItem.refresNameColor(avatar.rednm); playerNameItem.refresHitback((int)avatar.hidbacktime, false); } } else { playerNameItem.refreshTitle(avatar.title_id); } } }
private void refresh() { bool flag = FunctionOpenMgr.instance.Check(FunctionOpenMgr.DEVIL_HUNTER, false); if (flag) { bool flag2 = ModelBase <A3_ActiveModel> .getInstance().mwlr_charges <= 0; if (flag2) { this.mwlr_bt.gameObject.GetComponent <Button>().interactable = false; } else { this.mwlr_bt.gameObject.GetComponent <Button>().interactable = true; } this.cs_mwlr.text = string.Concat(new object[] { "(", ModelBase <A3_ActiveModel> .getInstance().mwlr_charges, "/", 10, ")" }); } else { base.transform.FindChild("cells/scroll/content/mwlr").gameObject.SetActive(false); } bool flag3 = FunctionOpenMgr.instance.Check(FunctionOpenMgr.PVP_DUNGEON, false); if (flag3) { this.cs_jjc.text = string.Concat(new object[] { "(", ModelBase <A3_ActiveModel> .getInstance().callenge_cnt - ModelBase <A3_ActiveModel> .getInstance().pvpCount + ModelBase <A3_ActiveModel> .getInstance().buyCount, "/", ModelBase <A3_ActiveModel> .getInstance().callenge_cnt, ")" }); bool flag4 = ModelBase <A3_ActiveModel> .getInstance().callenge_cnt - ModelBase <A3_ActiveModel> .getInstance().pvpCount + ModelBase <A3_ActiveModel> .getInstance().buyCount <= 0; if (flag4) { this.jjc_bt.gameObject.GetComponent <Button>().interactable = false; } else { this.jjc_bt.gameObject.GetComponent <Button>().interactable = true; } } else { base.transform.FindChild("cells/scroll/content/jjc").gameObject.SetActive(false); } bool flag5 = FunctionOpenMgr.instance.Check(FunctionOpenMgr.GLOBA_BOSS, false); if (flag5) { this.cs_dgsl.text = ""; } else { base.transform.FindChild("cells/scroll/content/dgsl").gameObject.SetActive(false); } }
public int GetSkillCanUse() { bool flag = this.PreferedSkill != -1; int result; if (flag) { long curServerTimeStampMS = muNetCleint.instance.CurServerTimeStampMS; bool flag2 = curServerTimeStampMS - this.releaseTime >= 2000L; if (flag2) { this.PreferedSkill = -1; } else { skill_a3Data skill_a3Data = ModelBase <Skill_a3Model> .getInstance().skilldic[this.PreferedSkill]; bool flag3 = skill_a3Data.mp <= ModelBase <PlayerModel> .getInstance().mp&& skill_a3Data.cdTime <= 0; if (flag3) { result = this.PreferedSkill; return(result); } } } List <int> list = ModelBase <AutoPlayModel> .getInstance().Skills.ToList <int>(); foreach (skill_a3Data current in ModelBase <Skill_a3Model> .getInstance().skilldic.Values) { bool flag4 = current.carr == ModelBase <PlayerModel> .getInstance().profession&& current.skill_id != skillbar.NORNAL_SKILL_ID && current.now_lv != 0 && current.skillType2 == 1 && current.mp <= ModelBase <PlayerModel> .getInstance().mp&& current.cdTime <= 0; if (flag4) { result = current.skill_id; return(result); } } for (int i = 0; i < list.Count; i++) { for (int j = i; j < list.Count; j++) { bool flag5 = ModelBase <Skill_a3Model> .getInstance().skilldic.ContainsKey(list[i]) && ModelBase <Skill_a3Model> .getInstance().skilldic.ContainsKey(list[j]); if (flag5) { bool flag6 = ModelBase <Skill_a3Model> .getInstance().skilldic[list[i]].cd > ModelBase <Skill_a3Model> .getInstance().skilldic[list[j]].cd; if (flag6) { int value = list[i]; list[i] = list[j]; list[j] = value; } } } } for (int k = list.Count - 1; k >= 0; k--) { bool flag7 = list[k] == 0; if (!flag7) { int num = list[k]; skill_a3Data skill_a3Data2 = ModelBase <Skill_a3Model> .getInstance().skilldic[num]; bool flag8 = skill_a3Data2.mp > ModelBase <PlayerModel> .getInstance().mp || skill_a3Data2.cdTime > 0; if (!flag8) { result = num; return(result); } } } result = skillbar.NORNAL_SKILL_ID; return(result); }
private void initItemInfo() { Transform transform = base.transform.FindChild("info"); transform.FindChild("name").GetComponent <Text>().text = this.item_data.confdata.item_name; transform.FindChild("name").GetComponent <Text>().color = Globle.getColorByQuality(this.item_data.confdata.quality); transform.FindChild("desc").GetComponent <Text>().text = StringUtils.formatText(this.item_data.confdata.desc); bool flag = this.item_data.confdata.use_limit > 0; if (flag) { transform.FindChild("lv").GetComponent <Text>().text = string.Concat(new object[] { this.item_data.confdata.use_limit, "转", this.item_data.confdata.use_lv, "级" }); } else { transform.FindChild("lv").GetComponent <Text>().text = "无限制"; } Transform transform2 = transform.FindChild("icon"); bool flag2 = transform2.childCount > 0; if (flag2) { UnityEngine.Object.Destroy(transform2.GetChild(0).gameObject); } GameObject gameObject = IconImageMgr.getInstance().createA3ItemIcon(this.item_data, false, -1, 1f, false); gameObject.transform.SetParent(transform2, false); this.num_bar.value = 0f; this.cur_num = 1; bool flag3 = this.item_data.confdata.use_type > 0; if (flag3) { bool flag4 = this.item_data.confdata.use_type != 21; if (flag4) { base.transform.FindChild("info/use").GetComponent <Button>().interactable = true; } else { bool flag5 = this.item_data.confdata.use_sum_require <= ModelBase <a3_BagModel> .getInstance().getItemNumByTpid(this.item_data.confdata.tpid); if (flag5) { base.transform.FindChild("info/use").GetComponent <Button>().interactable = true; } else { base.transform.FindChild("info/use").GetComponent <Button>().interactable = false; } } } else { base.transform.FindChild("info/use").GetComponent <Button>().interactable = false; } this.onNumChange(0f); }
private void onItemCardInfo(Variant d) { bool flag = d.ContainsKey("tp"); if (flag) { HttpAppMgr.instance.onGetRewardItems(d["tp"]); } else { bool flag2 = d.ContainsKey("tpchange"); if (flag2) { int random = ConfigUtil.getRandom(0, 20); DelayDoManager.singleton.AddDelayDo(delegate { this.sendLoadItemCardInfo(null); }, random, 0u); debug.Log("兑换码后台发生变!!!间隔发送请求礼品卡:" + random); } else { bool flag3 = d.ContainsKey("card_fetch"); if (flag3) { Variant variant = d["card_fetch"]; int num = variant["tp"]; string text = variant["cardid"]; Variant variant2 = variant["reward"]; bool flag4 = variant2.ContainsKey("money"); if (flag4) { flytxt.instance.fly("金币+ " + variant2["money"], 0, default(Color), null); } bool flag5 = variant2.ContainsKey("yb"); if (flag5) { flytxt.instance.fly("钻石+ " + variant2["yb"], 0, default(Color), null); } bool flag6 = variant2.ContainsKey("bndyb"); if (flag6) { flytxt.instance.fly("绑定钻石+ " + variant2["bndyb"], 0, default(Color), null); } bool flag7 = variant2.ContainsKey("itm"); if (flag7) { List <Variant> arr = variant2["itm"]._arr; for (int i = 0; i < arr.Count; i++) { a3_ItemData itemDataById = ModelBase <a3_BagModel> .getInstance().getItemDataById(arr[i]["tpid"]); string colorStrByQuality = Globle.getColorStrByQuality(itemDataById.item_name, itemDataById.quality); flytxt.instance.fly("获得" + colorStrByQuality + "+" + arr[i]["cnt"], 0, default(Color), null); } } } bool flag8 = d.ContainsKey("cards"); if (flag8) { List <Variant> arr2 = d["cards"]._arr; for (int j = 0; j < arr2.Count; j++) { int num2 = arr2[j]["tp"]; string text2 = arr2[j]["cardid"]; bool flag9 = num2 == 4; if (flag9) { } } } bool flag10 = d.ContainsKey("tpawds"); if (flag10) { List <Variant> arr3 = d["tpawds"]._arr; for (int k = 0; k < arr3.Count; k++) { GiftCardType giftCardType = new GiftCardType(); giftCardType.init(arr3[k]); HttpAppMgr.instance.giftCard.addGiftType(giftCardType); } } HttpAppMgr.instance.giftCard.getAllCode(); } } }
public bool CheckSkillLevelupAvailable() { int num = 0; List <int> list = new List <int>(this.skilldic.Keys); for (int i = 0; i < list.Count; i++) { bool flag = this.skilldic[list[i]].now_lv <= 0; if (!flag) { bool flag2 = this.skilldic[list[i]].now_lv < this.skilldic[list[i]].max_lvl; if (flag2) { num = Mathf.Max(num, this.skilldic[list[i]].max_lvl - this.skilldic[list[i]].now_lv); } } } int num2 = Mathf.Min(this.GetCheckCount(10), num); bool result; for (int j = 0; j < list.Count; j++) { int num3 = 0; int num4 = 0; bool flag3 = false; int k; for (k = 0; k < num2; k++) { skill_a3Data expr_10B = this.skilldic[list[j]]; bool flag4 = ((expr_10B != null) ? expr_10B.xml : null) == null || this.skilldic[list[j]].xml.m_dAtttr.ContainsKey("normal_skill"); if (flag4) { break; } bool flag5 = ModelBase <PlayerModel> .getInstance().profession == this.skilldic[list[j]].carr; if (flag5) { bool flag6 = this.skilldic[list[j]].now_lv <= 0; if (flag6) { break; } bool flag7 = this.skilldic[list[j]].now_lv + k < this.skilldic[list[j]].max_lvl; if (!flag7) { break; } int @int = this.skilldic[list[j]].xml.GetNode("skill_att", "skill_lv==" + (this.skilldic[list[j]].now_lv + 1 + k)).getInt("open_zhuan"); bool flag8 = (ulong)ModelBase <PlayerModel> .getInstance().up_lvl >= (ulong)((long)@int); if (!flag8) { break; } int int2 = this.skilldic[list[j]].xml.GetNode("skill_att", "skill_lv==" + (this.skilldic[list[j]].now_lv + 1 + k)).getInt("open_lvl"); bool flag9 = (ulong)ModelBase <PlayerModel> .getInstance().lvl >= (ulong)((long)int2); if (!flag9) { break; } num3 += this.skilldic[list[j]].xml.GetNode("skill_att", "skill_lv==" + (this.skilldic[list[j]].now_lv + 1 + k)).getInt("money"); num4 += this.skilldic[list[j]].xml.GetNode("skill_att", "skill_lv==" + (this.skilldic[list[j]].now_lv + 1 + k)).getInt("item_num"); flag3 = (ModelBase <a3_BagModel> .getInstance().getItemNumByTpid(skill_a3Data.itemId) >= num4 && (ulong)ModelBase <PlayerModel> .getInstance().money >= (ulong)((long)num3)); } } bool flag10 = k == num2 & flag3; if (flag10) { result = true; return(result); } } result = false; return(result); }
private void onloadE_mail(Variant data) { this.isApplied = true; debug.Log("获取邮件列表"); debug.Log(data.dump()); foreach (Variant current in data["mails"]._arr) { mailData mailData = new mailData(); mailData.type = current["tp"]; mailData.id = current["id"]; mailData.time = this.getTime(current["tm"]); mailData.seconds = current["tm"]._int32; mailData.flag = current["flag"]; mailData.msg = KeyWord.filter(current["msg"]); this.loadMailItems(current, mailData); switch (mailData.type) { case 1: ModelBase <E_mailModel> .getInstance().systemMailDic.Add(mailData); break; case 2: ModelBase <E_mailModel> .getInstance().gameMailDic.Add(mailData); break; case 3: { bool flag = current["frmpinfo"].ContainsKey("cid"); if (flag) { mailData.frmcid = current["frmpinfo"]["cid"]; } bool flag2 = current["frmpinfo"].ContainsKey("name"); if (flag2) { mailData.frmname = current["frmpinfo"]["name"]; } bool flag3 = current["frmpinfo"].ContainsKey("sex"); if (flag3) { mailData.frmsex = current["frmpinfo"]["sex"]; } bool flag4 = current["frmpinfo"].ContainsKey("clanc"); if (flag4) { mailData.clanc = current["frmpinfo"]["clanc"]; } ModelBase <E_mailModel> .getInstance().familyMailDic.Add(mailData); bool flag5 = false; foreach (int current2 in this.newType) { bool flag6 = current2 == 3; if (flag6) { flag5 = true; break; } } bool flag7 = !flag5; if (flag7) { this.newType.Add(3); } string str = string.Concat(new object[] { mailData.frmcid.ToString(), "#!#&", mailData.frmsex.ToString(), "#!#&", mailData.cid.ToString(), "#!#&", mailData.time, "#!#&", mailData.frmname, "#!#&", mailData.msg, "#!#&", mailData.seconds, "#!#&", mailData.clanc, "#)#&" }); mailData.str = str; ModelBase <E_mailModel> .getInstance().famLocalStr.Add(mailData); break; } case 4: { bool flag8 = current["frmpinfo"].ContainsKey("cid"); if (flag8) { mailData.frmcid = current["frmpinfo"]["cid"]; } bool flag9 = current["frmpinfo"].ContainsKey("name"); if (flag9) { mailData.frmname = current["frmpinfo"]["name"]; } bool flag10 = current["frmpinfo"].ContainsKey("sex"); if (flag10) { mailData.frmsex = current["frmpinfo"]["sex"]; } bool flag11 = current["frmpinfo"].ContainsKey("clanc"); if (flag11) { mailData.clanc = current["frmpinfo"]["clanc"]; } bool flag12 = ModelBase <E_mailModel> .getInstance().personalMailDic.ContainsKey(mailData.frmcid); if (flag12) { 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); base.dispatchEvent(GameEvent.Create(E_mailProxy.lis_get_new_mail, this, null, false)); } bool flag13 = false; foreach (int current3 in this.newType) { bool flag14 = current3 == mailData.frmcid; if (flag14) { flag13 = true; break; } } bool flag15 = !flag13; if (flag15) { this.newType.Add(mailData.frmcid); } string str2 = string.Concat(new object[] { mailData.frmcid.ToString(), "#!#&", mailData.frmsex.ToString(), "#!#&", mailData.cid.ToString(), "#!#&", mailData.time, "#!#&", mailData.frmname, "#!#&", mailData.msg, "#!#&", mailData.seconds, "#!#&", mailData.clanc, "#)#&" }); mailData.str = str2; ModelBase <E_mailModel> .getInstance().perLocalStr.Add(mailData); break; } } } ModelBase <E_mailModel> .getInstance().saveLocalData(ModelBase <E_mailModel> .getInstance().famLocalStr, 3); ModelBase <E_mailModel> .getInstance().saveLocalData(ModelBase <E_mailModel> .getInstance().perLocalStr, 4); }
private void RefreshEliteMonInfo(Variant data) { Dictionary <uint, EliteMonsterInfo> dicEMonInfo = ModelBase <A3_EliteMonsterModel> .getInstance().dicEMonInfo; bool flag = data.ContainsKey("elite_mon"); if (flag) { List <Variant> arr = data["elite_mon"]._arr; for (int i = 0; i < arr.Count; i++) { uint @uint = arr[i]["mid"]._uint; bool flag2 = !dicEMonInfo.ContainsKey(@uint); if (flag2) { ModelBase <A3_EliteMonsterModel> .getInstance().AddData(arr[i]); } else { dicEMonInfo[@uint] = new EliteMonsterInfo(arr[i].ContainsKey("kill_tm") ? arr[i]["kill_tm"]._uint : 0u, arr[i].ContainsKey("respawntm") ? arr[i]["respawntm"]._uint : 0u, arr[i].ContainsKey("killer_name") ? arr[i]["killer_name"]._str : null, arr[i].ContainsKey("mapid") ? arr[i]["mapid"]._int : 0, (arr[i].ContainsKey("mon_x") && arr[i].ContainsKey("mon_y")) ? new Vector2((float)arr[i]["mon_x"]._int, (float)arr[i]["mon_y"]._int) : default(Vector2), arr[i]["mid"]._uint); } } uint up_lvl = ModelBase <PlayerModel> .getInstance().up_lvl; uint lvl = ModelBase <PlayerModel> .getInstance().lvl; int num = 30001; List <int> list = new List <int>(); bool flag3 = data.ContainsKey("elite_mon"); if (flag3) { arr = data["elite_mon"]._arr; for (int j = 0; j < arr.Count; j++) { list.Add(arr[j]["mid"]._int); } } list.Sort(); for (int k = 0; k < list.Count; k++) { bool flag4 = up_lvl > XMLMgr.instance.GetSXML("monsters.monsters", "id==" + list[k]).getUint("zhuan"); if (flag4) { num = list[k]; } else { bool flag5 = up_lvl == XMLMgr.instance.GetSXML("monsters.monsters", "id==" + list[k]).getUint("zhuan"); if (!flag5) { break; } bool flag6 = lvl >= XMLMgr.instance.GetSXML("monsters.monsters", "id==" + list[k]).getUint("zhuan"); if (!flag6) { num = list[k]; break; } num = list[k]; } } List <uint> list2 = new List <uint>(); for (int l = 0; l < list.Count; l++) { bool flag7 = list[l] <= num; if (flag7) { foreach (Variant current in arr) { bool flag8 = current["mid"] == list[l]; if (flag8) { bool flag9 = current["kill_tm"] == 0; if (flag9) { IconAddLightMgr.getInstance().showOrHideFires("Open_Light_enterElite", null); break; } IconAddLightMgr.getInstance().showOrHideFires("jingyingguai_Light_enterElite", null); } } } } } }
private void getNewMail(Variant data) { bool flag = !this.isApplied; if (!flag) { debug.Log("获取新邮件"); debug.Log(data.dump()); Variant variant = new Variant(); variant["tp"] = data["mail"]["tp"]; bool flag2 = variant["tp"] == 4; if (flag2) { variant["secondType"] = data["mail"]["frmpinfo"]["cid"]; } base.dispatchEvent(GameEvent.Create(E_mailProxy.lis_unreadType, this, variant, false)); mailData mailData = new mailData(); mailData.type = data["mail"]["tp"]; mailData.id = data["mail"]["id"]; mailData.time = this.getTime(data["mail"]["tm"]); mailData.seconds = data["mail"]["tm"]._int32; mailData.msg = KeyWord.filter(data["mail"]["msg"]); bool flag3 = data["mail"]["frmpinfo"].ContainsKey("cid"); if (flag3) { mailData.frmcid = data["mail"]["frmpinfo"]["cid"]; } bool flag4 = data["mail"]["frmpinfo"].ContainsKey("name"); if (flag4) { mailData.frmname = data["mail"]["frmpinfo"]["name"]; bool flag5 = mailData.type == 3 && (long)mailData.frmcid == (long)((ulong)ModelBase <PlayerModel> .getInstance().cid); if (flag5) { base.dispatchEvent(GameEvent.Create(E_mailProxy.lis_sendMail_res, this, variant, false)); } } bool flag6 = data["mail"]["frmpinfo"].ContainsKey("sex"); if (flag6) { mailData.frmsex = data["mail"]["frmpinfo"]["sex"]; } bool flag7 = data["mail"]["frmpinfo"].ContainsKey("clanc"); if (flag7) { mailData.clanc = data["mail"]["frmpinfo"]["clanc"]; } this.loadMailItems(data["mail"], mailData); switch (mailData.type) { case 1: { ModelBase <E_mailModel> .getInstance().systemMailDic.Add(mailData); bool flag8 = !this.isNotice; if (flag8) { this.isNotice = true; } break; } case 2: { bool flag9 = false; foreach (int current in this.newType) { bool flag10 = current == 2; if (flag10) { flag9 = true; break; } } bool flag11 = !flag9; if (flag11) { this.newType.Add(2); } ModelBase <E_mailModel> .getInstance().gameMailDic.Add(mailData); bool flag12 = !this.isNotice; if (flag12) { this.isNotice = true; } break; } case 3: { ModelBase <E_mailModel> .getInstance().familyMailDic.Add(mailData); string str = string.Concat(new object[] { mailData.frmcid.ToString(), "#!#&", mailData.frmsex.ToString(), "#!#&", mailData.cid.ToString(), "#!#&", mailData.time, "#!#&", mailData.frmname, "#!#&", mailData.msg, "#!#&", mailData.seconds, "#!#&", mailData.clanc, "#)#&" }); mailData.str = str; ModelBase <E_mailModel> .getInstance().famLocalStr.Add(mailData); ModelBase <E_mailModel> .getInstance().saveLocalData(ModelBase <E_mailModel> .getInstance().famLocalStr, 3); bool flag13 = false; foreach (int current2 in this.newType) { bool flag14 = current2 == 3; if (flag14) { flag13 = true; break; } } bool flag15 = !flag13; if (flag15) { this.newType.Add(3); } bool flag16 = !this.isNotice; if (flag16) { this.isNotice = true; } break; } case 4: { bool flag17 = ModelBase <E_mailModel> .getInstance().personalMailDic.ContainsKey(mailData.frmcid); if (flag17) { 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); base.dispatchEvent(GameEvent.Create(E_mailProxy.lis_get_new_mail, this, null, false)); } bool flag18 = false; foreach (int current3 in this.newType) { bool flag19 = current3 == mailData.frmcid; if (flag19) { flag18 = true; break; } } bool flag20 = !flag18; if (flag20) { this.newType.Add(mailData.frmcid); } bool flag21 = !this.isNotice; if (flag21) { this.isNotice = true; } string str2 = string.Concat(new object[] { mailData.frmcid.ToString(), "#!#&", mailData.frmsex.ToString(), "#!#&", mailData.cid.ToString(), "#!#&", mailData.time, "#!#&", mailData.frmname, "#!#&", mailData.msg, mailData.seconds, "#!#&", mailData.clanc, "#)#&" }); mailData.str = str2; ModelBase <E_mailModel> .getInstance().perLocalStr.Add(mailData); ModelBase <E_mailModel> .getInstance().saveLocalData(ModelBase <E_mailModel> .getInstance().perLocalStr, 4); break; } } } }
public override void removeListener() { ModelBase <PlayerModel> .getInstance().removeEventListener(PlayerModel.ON_LEVEL_CHANGED, new Action <GameEvent>(base.onHanlde)); }
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; } } }