private void OnGetAll(Variant data) { A3_MailModel instance = ModelBase <A3_MailModel> .getInstance(); Variant variant = data["ids"]; using (List <Variant> .Enumerator enumerator = variant._arr.GetEnumerator()) { while (enumerator.MoveNext()) { uint key = enumerator.Current; instance.mail_simple[key].got_itm = true; bool flag = instance.mail_details.ContainsKey(key); if (flag) { instance.mail_details[key].ms.got_itm = true; } } } bool flag2 = variant._arr.Count > 0 || data["itm"]["itm"]._arr.Count > 0; if (flag2) { flytxt.instance.fly(ContMgr.getCont("mail_hint_7", null), 0, default(Color), null); } base.dispatchEvent(GameEvent.Create(A3_MailProxy.MAIL_GET_ALL, this, null, false)); }
public void onItemCd(Variant data) { bool flag = data.ContainsKey("itemcds"); if (flag) { foreach (Variant current in data["itemcd"]._arr) { int num = current["cdtp"]; float num2 = current["cdtm"]; } } bool flag2 = data.ContainsKey("cd_type"); if (flag2) { int num3 = data["cd_type"]; float time = data["cd"]; bool flag3 = num3 == 4; if (flag3) { MediaClient.instance.PlaySoundUrl("audio/common/use_hp", false, null); } ModelBase <a3_BagModel> .getInstance().addItemCd(num3, time); } }
private void RefreshMailCnt() { this.cnt.text = ContMgr.getCont("mail_cnt", new List <string> { ModelBase <A3_MailModel> .getInstance().mail_simple.Count.ToString() }); }
private void onEquipClickShowTips(GameObject go, uint id, bool isselltrue) { bool flag = this.isquicklyChoose; if (flag) { bool flag2 = !isselltrue; if (flag2) { this.EquipsSureSell(id, 0); } else { this.EquipsNoSell(id, 0); } } else if (isselltrue) { ArrayList arrayList = new ArrayList(); arrayList.Add(ModelBase <a3_BagModel> .getInstance().getUnEquips()[id]); arrayList.Add(equip_tip_type.SellOut_tip); InterfaceMgr.getInstance().open(InterfaceMgr.A3_EQUIPTIP, arrayList, false); } else { ArrayList arrayList2 = new ArrayList(); arrayList2.Add(ModelBase <a3_BagModel> .getInstance().getUnEquips()[id]); arrayList2.Add(equip_tip_type.SellIn_tip); InterfaceMgr.getInstance().open(InterfaceMgr.A3_EQUIPTIP, arrayList2, false); } }
private void on_sprite_invisible(Variant msgData) { debug.Log("on_sprite_invisible::" + msgData.dump()); uint @uint = msgData["iid"]._uint; bool flag = msgData["invisible"] > 0; bool flag2 = @uint == SelfRole._inst.m_unIID; if (flag2) { SelfRole._inst.invisible = flag; bool flag3 = skillbar.instance != null; if (flag3) { skillbar.instance.forSkill_5008(flag); } MapProxy.isyinsh = flag; SelfRole._inst.refreshmapCount((int)ModelBase <PlayerModel> .getInstance().treasure_num); SelfRole._inst.refreshVipLvl((uint)ModelBase <A3_VipModel> .getInstance().Level); } else { ProfessionRole otherPlayer = OtherPlayerMgr._inst.GetOtherPlayer(@uint); bool flag4 = otherPlayer != null; if (flag4) { otherPlayer.invisible = flag; bool flag5 = flag && SelfRole._inst.m_LockRole == otherPlayer; if (flag5) { SelfRole._inst.m_LockRole = null; } } } }
public override void Pay(rechargeData data) { debug.Log("begin-pay"); Variant variant = new Variant(); debug.Log("serverId:" + Globle.curServerD.sid); variant["serverId"] = Globle.curServerD.sid; variant["serverName"] = Globle.curServerD.server_name; variant["serverDesc"] = Globle.curServerD.sid; variant["roleId"] = ModelBase <PlayerModel> .getInstance().cid; variant["roleName"] = ModelBase <PlayerModel> .getInstance().name; variant["productId"] = data.payid; debug.Log("rechargeData:" + ModelBase <RechargeModel> .getInstance().getRechargeDataById(data.id)); debug.Log("name:" + data.name); variant["productName"] = data.name; variant["productPrice"] = data.golden; variant["productCount"] = 1; variant["productDesc"] = "description"; variant["change_rate"] = 0; variant["roleLvl"] = ModelBase <PlayerModel> .getInstance().lvl; debug.Log("end-pay"); string jstr = JsonManager.VariantToString(variant); AnyPlotformSDK.Call_Cmd("pay", "lanPay", jstr, true); }
private void OnFeed(GameObject go) { int itemNumByTpid = ModelBase <a3_BagModel> .getInstance().getItemNumByTpid(this.feedid); bool flag = itemNumByTpid > 0; if (flag) { bool flag2 = itemNumByTpid == 1; if (flag2) { bool flag3 = !ModelBase <A3_PetModel> .getInstance().Auto_buy; if (flag3) { } } BaseProxy <A3_PetProxy> .getInstance().Feed(); } else { a3_store.itm_tpid = this.feedid; InterfaceMgr.getInstance().open(InterfaceMgr.A3_STORE, null, false); } }
public LvlUpAwardPanel(Transform trans) : base(trans) { this.root = trans; this.lvlUpAwardsDic = new Dictionary <uint, awardCenterItem4zhuan>(); this.itemsParent = this.root.FindChild("awardItems/content"); List <WelfareModel.itemWelfareData> levelReward = ModelBase <WelfareModel> .getInstance().getLevelReward(); foreach (WelfareModel.itemWelfareData current in levelReward) { WelfareModel.itemWelfareData iwd = current; iwd.desc = this.strDesc; a3_ItemData itemDataById = ModelBase <a3_BagModel> .getInstance().getItemDataById(current.itemId); GameObject gameObject = IconImageMgr.getInstance().creatItemAwardCenterIcon(itemDataById); gameObject.name = "itemWelfare"; gameObject.transform.SetParent(this.itemsParent); gameObject.transform.localScale = Vector3.one; awardCenterItem4zhuan value = new awardCenterItem4zhuan(gameObject.transform, iwd); uint id = current.itemId; new BaseButton(gameObject.transform.FindChild("icon"), 1, 1).onClick = delegate(GameObject oo) { bool flag = a3_awardCenter.instan; if (flag) { a3_awardCenter.instan.showtip(id); } }; this.lvlUpAwardsDic.Add(current.id, value); } this.itemsParent.GetComponent <RectTransform>().SetSizeWithCurrentAnchors(RectTransform.Axis.Vertical, (float)(100 * (this.lvlUpAwardsDic.Count + 2))); BaseProxy <welfareProxy> .getInstance().addEventListener(welfareProxy.UPLEVELAWARD, new Action <GameEvent>(this.onUpLevelAward)); }
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 doGetExp(GameEvent e) { off_line_exp expr_06 = off_line_exp.instance; bool flag = expr_06 != null && expr_06.offline; if (flag) { bool flag2 = off_line_exp.instance.offline_item != null; if (flag2) { foreach (a3_BagItemData current in off_line_exp.instance.offline_item) { a3_ItemData itemDataById = ModelBase <a3_BagModel> .getInstance().getItemDataById(current.tpid); GameObject showIcon = IconImageMgr.getInstance().createA3ItemIconTip(current.tpid, false, current.num, 1f, false, -1, 0, false, false, false); flytxt.instance.fly(null, 6, default(Color), showIcon); } } off_line_exp.instance.offline = false; off_line_exp.instance.offline_item.Clear(); } Variant data = e.data; int num = data["res"]; this.offLineModel.OffLineTime = 0; this.offLineModel.BaseExp = 0; debug.Log("离线经验的服务器反馈" + e.data.dump()); InterfaceMgr.getInstance().close(InterfaceMgr.OFFLINEEXP); }
private void setTotalData(Variant data) { bool flag = data.ContainsKey("total_xiaofei"); if (flag) { uint num = data["total_xiaofei"]; this.b_leijixiaofei = ModelBase <WelfareModel> .getInstance().for_leixjixiaofei(this.leijixiaofei); this.showIconLight(); } bool flag2 = data.ContainsKey("total_recharge"); if (flag2) { welfareProxy.totalRecharge = data["total_recharge"]; this.b_leijizhongzhi = ModelBase <WelfareModel> .getInstance().for_leijichongzhi(this.leijichongzhi); this.showIconLight(); } bool flag3 = data.ContainsKey("richong"); if (flag3) { uint num2 = data["richong"]; this.b_leijichongzhi_today = ModelBase <WelfareModel> .getInstance().for_jinrichongzhi(this.dailyGift); this.showIconLight(); } }
public override void onShowed() { bool flag = ModelBase <PlayerModel> .getInstance().last_time == 0 && BaseProxy <OffLineExpProxy> .getInstance().eqp.Count == 0; if (flag) { base.transform.FindChild("equp/image_con").gameObject.SetActive(true); } else { base.transform.FindChild("equp/image_con").gameObject.SetActive(false); } this.show_eqp(); for (int i = 0; i < this.lBtn.Count; i++) { this.lBtn[i].addEvent(); Text component = this.lBtn[i].transform.FindChild("Text_exp").GetComponent <Text>(); component.text = "经验+" + this.offLineModel.BaseExp * (i + 1); } base.onShowed(); this.vip_getexp_btn(); BaseProxy <OffLineExpProxy> .getInstance().addEventListener(OffLineExpProxy.EVENT_OFFLINE_EXP_GET, new Action <GameEvent>(this.doGetExp)); this.OnCostTextChange(); this.OnTitleChange(); OffLineModel expr_11B = this.offLineModel; expr_11B.OnOffLineTimeChange = (Action)Delegate.Combine(expr_11B.OnOffLineTimeChange, new Action(this.OnTitleChange)); OffLineModel expr_142 = this.offLineModel; expr_142.OnBaseExpChange = (Action)Delegate.Combine(expr_142.OnBaseExpChange, new Action(this.OnCostTextChange)); }
private void vip_getexp_btn() { bool flag = ModelBase <A3_VipModel> .getInstance().Level < this.vip_lite(3); if (flag) { this.btn3.transform.FindChild("image1").gameObject.SetActive(false); this.btn3.transform.FindChild("image2").gameObject.SetActive(true); this.btn3.transform.FindChild("image2/Text").GetComponent <Text>().text = "VIP" + this.vip_lite(3) + "开启"; } else { this.btn3.transform.FindChild("image2").gameObject.SetActive(false); this.btn3.transform.FindChild("image1").gameObject.SetActive(true); this.btn3.transform.FindChild("image1/Text").GetComponent <Text>().text = "领取"; } bool flag2 = ModelBase <A3_VipModel> .getInstance().Level < this.vip_lite(4); if (flag2) { this.btn4.transform.FindChild("image1").gameObject.SetActive(false); this.btn4.transform.FindChild("image2").gameObject.SetActive(true); this.btn4.transform.FindChild("image2/Text").GetComponent <Text>().text = "VIP" + this.vip_lite(4) + "开启"; } else { this.btn4.transform.FindChild("image2").gameObject.SetActive(false); this.btn4.transform.FindChild("image1").gameObject.SetActive(true); this.btn4.transform.FindChild("image1/Text").GetComponent <Text>().text = "领取"; } }
private void OnDeleteAll(Variant data) { A3_MailModel instance = ModelBase <A3_MailModel> .getInstance(); Variant variant = data["ids"]; using (List <Variant> .Enumerator enumerator = variant._arr.GetEnumerator()) { while (enumerator.MoveNext()) { uint key = enumerator.Current; bool flag = instance.mail_simple.ContainsKey(key); if (flag) { instance.mail_simple.Remove(key); } bool flag2 = instance.mail_details.ContainsKey(key); if (flag2) { instance.mail_details[key].ms.got_itm = true; } } } base.dispatchEvent(GameEvent.Create(A3_MailProxy.MAIL_DELETE_ALL, this, data, false)); }
public override void onShowed() { GameObject original = Resources.Load <GameObject>("prefab/a3_autoplay_skill_icon"); int num = 0; foreach (skill_a3Data current in ModelBase <Skill_a3Model> .getInstance().skilldic.Values) { bool flag = current.carr != ModelBase <PlayerModel> .getInstance().profession || current.skill_id == skillbar.NORNAL_SKILL_ID || current.now_lv == 0; if (!flag) { GameObject gameObject = UnityEngine.Object.Instantiate <GameObject>(original); bool flag2 = gameObject == null; if (!flag2) { int skid = current.skill_id; gameObject.transform.parent = this.grid.transform; gameObject.name = skid.ToString(); gameObject.transform.FindChild("bg/mask/icon").GetComponent <Image>().sprite = (Resources.Load("icon/skill/" + skid.ToString(), typeof(Sprite)) as Sprite); gameObject.transform.FindChild("bg").GetComponent <Button>().onClick.AddListener(delegate { this.onClose(null); a3_autoplay_skill.OnSkillChoose(skid, a3_autoplay_skill.SkillSeat); }); num++; } } } bool flag3 = num == 0; if (flag3) { flytxt.instance.fly("没有可以使用的技能,请学习技能", 0, default(Color), null); } }
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 override void record_quit() { bool flag = Globle.Lan != "zh_cn"; if (!flag) { Variant variant = new Variant(); variant["roleId"] = ModelBase <PlayerModel> .getInstance().cid; variant["roleName"] = ModelBase <PlayerModel> .getInstance().name; variant["roleLevel"] = ModelBase <PlayerModel> .getInstance().lvl; variant["roleGold"] = ModelBase <PlayerModel> .getInstance().gold; variant["roleleveluptime"] = ""; variant["rolecreatetime"] = ""; variant["rolevip"] = ModelBase <PlayerModel> .getInstance().vip; variant["roleYb"] = ModelBase <PlayerModel> .getInstance().money; variant["roleServerId"] = Globle.curServerD.sid; variant["roleServerName"] = Globle.curServerD.server_name; string text = JsonManager.VariantToString(variant); AnyPlotformSDK.Call_Cmd("exitPage", "lanRole", text, false); debug.Log("[record]quit:" + text); } }
private void onNumChange(float rate) { bool flag = !this.needEvent; if (flag) { this.needEvent = true; } else { this.cur_num = (int)Math.Floor((double)(rate * (float)this.item_data.num)); bool flag2 = this.cur_num == 0; if (flag2) { this.cur_num = 1; } base.transform.FindChild("info/bodyNum/donum").GetComponent <Text>().text = this.cur_num.ToString(); bool flag3 = ModelBase <A3_NPCShopModel> .getInstance().all_float.ContainsKey(this.item_data.tpid); if (flag3) { int num = (int)(ModelBase <A3_NPCShopModel> .getInstance().all_float[this.item_data.tpid] * this.recycle_price); base.transform.FindChild("info/bodyNum/value").GetComponent <Text>().text = (num * this.cur_num).ToString(); } else { base.transform.FindChild("info/bodyNum/value").GetComponent <Text>().text = (this.item_data.confdata.value * this.cur_num).ToString(); } } }
private void OnStageChange() { this.currentStage = this.petmodel.CurrentStageConf(); this.stagestep = this.currentStage.getUint("crystal_step"); Text componentByPath = base.getComponentByPath <Text>("stage"); componentByPath.text = "(" + this.petmodel.Stage.ToString() + "转)"; Text componentByPath2 = base.getComponentByPath <Text>("name"); componentByPath2.text = this.petmodel.CurrentStageConf().getString("name"); Text componentByPath3 = base.getComponentByPath <Text>("stage_con/gold/text"); componentByPath3.text = this.currentStage.getString("gold_cost"); Text componentByPath4 = base.getComponentByPath <Text>("exp_con/upgrade/text"); uint @uint = this.currentStage.getUint("crystal"); int itemNumByTpid = ModelBase <a3_BagModel> .getInstance().getItemNumByTpid(this.stageid); string arg_ED_0 = ((ulong)@uint <= (ulong)((long)itemNumByTpid)) ? "<color=#00ffff>" : "<color=#ff0000>"; componentByPath4.text = @uint.ToString(); Text componentByPath5 = base.getComponentByPath <Text>("stage_con/rate"); uint num = this.currentStage.getUint("rate") / 100u; componentByPath5.text = ContMgr.getCont("pet_succ", new List <string> { num.ToString() }); this.CheckShowLevelOrStage(); this.RefreshAvatar(); }
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 override void init() { a3_pet_skin.instan = this; this.petmodel = ModelBase <A3_PetModel> .getInstance(); this.feedid = this.petmodel.GetFeedItemTpid(); this.levelid = this.petmodel.GetLevelItemTpid(); this.stageid = this.petmodel.GetStageItemTpid(); this.currentLevel = this.petmodel.CurrentLevelConf(); this.currentStage = this.petmodel.CurrentStageConf(); this.stagestep = this.currentStage.getUint("crystal_step"); BaseButton baseButton = new BaseButton(base.getTransformByPath("exp_con/upgrade"), 1, 1); baseButton.onClick = new Action <GameObject>(this.OnUpgrade); BaseButton baseButton2 = new BaseButton(base.getTransformByPath("exp_con/onekey"), 1, 1); baseButton2.onClick = new Action <GameObject>(this.OnOnekey); BaseButton baseButton3 = new BaseButton(base.getTransformByPath("lampoil"), 1, 1); baseButton3.onClick = new Action <GameObject>(this.OnFeed); BaseButton baseButton4 = new BaseButton(base.getTransformByPath("stage_con/improve"), 1, 1); baseButton4.onClick = new Action <GameObject>(this.OnStage); BaseButton baseButton5 = new BaseButton(base.getTransformByPath("title/help"), 1, 1); baseButton5.onClick = new Action <GameObject>(this.OnHelp); BaseButton baseButton6 = new BaseButton(base.getTransformByPath("close"), 1, 1); baseButton6.onClick = new Action <GameObject>(this.onclose); this.autofeed = base.getComponentByPath <Toggle>("light_hint/toggle"); this.autofeed.onValueChanged.AddListener(new UnityAction <bool>(this.OnAutoFeedToggleChange)); this.autobuy = base.getComponentByPath <Toggle>("light_hint/toggle2"); this.autobuy.onValueChanged.AddListener(new UnityAction <bool>(this.OnAutoBuyToggleChange)); this.prefab = base.getGameObjectByPath("att/a3_pet_att"); }
private void meIsCustom() { bool b = this.cid != ModelBase <PlayerModel> .getInstance().cid; this.showCaptainIcon(false); this.showBtnInvite(b); }
private void DestroyObj(uint id, bool isOneRemove, Dictionary <uint, a3_BagItemData> dic = null, Dictionary <uint, GameObject> dic_obj = null, GameObject contain = null) { GameObject gameObject = dic_obj[id].transform.parent.gameObject; UnityEngine.Object.Destroy(gameObject); if (isOneRemove) { dic_obj.Remove(id); dic.Remove(id); } GameObject gameObject2 = UnityEngine.Object.Instantiate <GameObject>(this.grid); gameObject2.SetActive(true); gameObject2.transform.SetParent(contain.transform, false); gameObject2.transform.SetSiblingIndex(dic_obj.Count + 1); bool flag = dic == this.dic_left; if (flag) { this.showItemNum(ModelBase <a3_BagModel> .getInstance().getUnEquips()[id].tpid, false); this.left_count--; } else { this.right_count--; } }
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 = this.item_data.confdata.desc; transform.FindChild("value").GetComponent <Text>().text = this.item_data.confdata.value.ToString(); Transform transform2 = transform.FindChild("icon"); bool flag = transform2.childCount > 0; if (flag) { 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.cur_num = 1; string arg_12F_0 = this.item_data.summondata.isSpecial ? "变异*" : ""; transform.FindChild("grade").GetComponent <Text>().text = ModelBase <A3_SummonModel> .getInstance().IntGradeToStr(this.item_data.summondata.grade); transform.FindChild("type").GetComponent <Text>().text = ModelBase <A3_SummonModel> .getInstance().IntNaturalToStr(this.item_data.summondata.naturaltype); }
private void on_map_dpitem_res(Variant msg_data) { debug.Log("!!!!!!!!!!on_map_dpitem_res!" + msg_data.dump()); float x = msg_data["x"]._float / 53.333f; float z = msg_data["y"]._float / 53.333f; bool flag = msg_data.ContainsKey("owner_see"); if (flag) { bool flag2 = msg_data["owner_see"] != ModelBase <PlayerModel> .getInstance().cid; if (flag2) { return; } } Vector3 pos = new Vector3(x, 0f, z); List <Variant> arr = msg_data["itms"]._arr; List <DropItemdta> list = new List <DropItemdta>(); long curServerTimeStampMS = NetClient.instance.CurServerTimeStampMS; foreach (Variant current in arr) { DropItemdta dropItemdta = new DropItemdta(); dropItemdta.init(current, curServerTimeStampMS); list.Add(dropItemdta); } bool flag3 = BaseRoomItem.instance != null; if (flag3) { BaseRoomItem.instance.showDropItem(pos, list, false); } }
private void addlibao(a3_BagItemData data) { bool flag = (ulong)ModelBase <PlayerModel> .getInstance().up_lvl > (ulong)((long)data.confdata.use_limit); if (flag) { this.newshow_item[data.id] = data; } bool flag2 = (ulong)ModelBase <PlayerModel> .getInstance().up_lvl == (ulong)((long)data.confdata.use_limit); if (flag2) { bool flag3 = (ulong)ModelBase <PlayerModel> .getInstance().lvl >= (ulong)((long)data.confdata.use_lv); if (flag3) { this.newshow_item[data.id] = data; } } bool flag4 = a3_equipup.instance != null; if (flag4) { a3_equipup.instance.showUse(); } }
private void SortMailList() { this.sortedList.Clear(); A3_MailModel instance = ModelBase <A3_MailModel> .getInstance(); foreach (KeyValuePair <uint, A3_MailSimple> current in instance.mail_simple) { this.sortedList.Add(current.Value); } int count = this.sortedList.Count; for (int i = 0; i < count; i++) { for (int j = i + 1; j < count; j++) { bool flag = this.sortedList[i].tm < this.sortedList[j].tm; if (flag) { A3_MailSimple value = this.sortedList[i]; this.sortedList[i] = this.sortedList[j]; this.sortedList[j] = value; } } } }
private void onModeExp(Variant msgData) { ModelBase <PlayerModel> .getInstance().exp = ModelBase <PlayerModel> .getInstance().exp + msgData["mod_exp"]; debug.Log("经验增加:" + msgData["mod_exp"]); bool flag = flytxt.instance; if (flag) { flytxt.instance.fly("EXP+" + msgData["mod_exp"], 3, default(Color), null); } bool flag2 = a3_insideui_fb.instance != null; if (flag2) { a3_insideui_fb.instance.SetInfExp(msgData["mod_exp"]); } bool flag3 = GameRoomMgr.getInstance().curRoom != null; if (flag3) { GameRoomMgr.getInstance().curRoom.onAddExp(msgData["mod_exp"]); } bool flag4 = msgData.ContainsKey("cur_exp"); if (flag4) { ModelBase <PlayerModel> .getInstance().exp = msgData["cur_exp"]; } InterfaceMgr.doCommandByLua("PlayerModel:getInstance().modExp", "model/PlayerModel", new object[] { ModelBase <PlayerModel> .getInstance().exp }); base.dispatchEvent(GameEvent.Create(PlayerInfoProxy.EVENT_ON_EXP_CHANGE, this, msgData, false)); }
public void initData(Variant info) { this.viewInfo = info; int @int = info["mid"]._int; this.ownid = this.viewInfo["owner_cid"]; this.isUserOwnHero = ((long)this.ownid == (long)((ulong)ModelBase <PlayerModel> .getInstance().cid)); GRClient.instance.createHero(this); bool flag = this.viewInfo.ContainsKey("moving"); if (flag) { base.addMoving(this.viewInfo["moving"]); } bool flag2 = this.viewInfo.ContainsKey("atking"); if (flag2) { base.addAttack(this.viewInfo["atking"]["tar_iid"]._uint, null); } Variant monOriConf = this.localGeneral.GetMonOriConf(@int); bool flag3 = monOriConf != null; if (flag3) { this.viewInfo["ori"] = (float)monOriConf["octOri"]._int * 45f; } this.viewInfo["ori"] = 90f; base.dispatchEvent(GameEvent.Create(2100u, this, this.viewInfo, false)); }
private void refreshCount() { bool flag = ModelBase <A3_VipModel> .getInstance().Level > 0; int num; if (flag) { num = ModelBase <A3_VipModel> .getInstance().vip_exchange_num(3); } else { num = 10; } ExchangeModel instance = ModelBase <ExchangeModel> .getInstance(); base.getComponentByPath <Text>("diamand/Text").text = ((long)this.diamand * (long)((ulong)(instance.Count + 1u))).ToString(); bool flag2 = (long)num - (long)((ulong)instance.Count) >= 0L; if (flag2) { base.getComponentByPath <Text>("exchangeBtn/Text/leftCnt").text = string.Concat(new object[] { "(", (long)num - (long)((ulong)instance.Count), "/", num, ")" }); } }