void OnChooseSelectFood() { if (RestaurantController.Instance() == null) { return; } if (curSelectFoodItem == null) { MessageBoxLogic.OpenOKBox(3049, 1000); return; } Tab_RestaurantFood curTabFood = TableManager.GetRestaurantFoodByID(curSelectFoodItem.FoodID, 0); if (null == curTabFood) { LogModule.ErrorLog("cur food id is not defined in table"); return; } if (curTabFood.OpenLevel > RestaurantController.Instance().CurRestaurant().m_RestaurantLevel) { // 此菜品将在等级{0}开启 MessageBoxLogic.OpenOKBox(StrDictionary.GetClientDictionaryString("#{1989}", curTabFood.OpenLevel)); return; } RestaurantController.Instance().OnChooseFoodFinish(curSelectFoodItem.FoodID); curSelectFoodItem = null; }
void InitMissionList() { List <int> nMissionIDList = GameManager.gameManager.MissionManager.GetAllNotDailyMissionList(); List <int> nCanAcceptedMissionIDList = GameManager.gameManager.MissionManager.GetAllCanAcceptedMissionList(); if (nMissionIDList.Count <= 0 && nCanAcceptedMissionIDList.Count <= 0) { MessageBoxLogic.OpenOKBox(11359); return; } for (int i = 0; i < MaxMissionNum && i < nMissionIDList.Count; i++) { GameObject go = Utils.BindObjToParent(missionItemTemplate, missionList, "MissionLogItem" + i.ToString()); if (go) { go.GetComponent <MissionLogItem>().MissionID = nMissionIDList[i]; UIEventListener.Get(go).onClick = SelectMission; } if (i == 0) { SelectMission(go); } } missionList.GetComponent <UICabalGrid>().Reposition(); missionList.GetComponent <UITopGrid>().recenterTopNow = true; }
public void OnClickItem() { int nWayId; if (!int.TryParse(gameObject.name, out nWayId)) { return; } m_curGetWay = TableManager.GetItemGetWayByID(nWayId, 0); if (null == m_curGetWay) { return; } switch (m_curGetWay.WayType) { case 1: if (UIPathData.m_DicUIName.ContainsKey(m_curGetWay.WayValue)) { UIManager.CloseUI(UIInfo.SkillInfo); UIManager.ShowUI(UIPathData.m_DicUIName[m_curGetWay.WayValue]); } break; case 2: MessageBoxLogic.OpenOKBox(StrDictionary.GetClientDictionaryString("#{" + m_curGetWay.WayValue + "}")); break; } }
void OnClickChangeChannel() { if (null == InputChannel) { LogModule.ErrorLog("InputChannel can't find "); return; } if (string.IsNullOrEmpty(InputChannel.value)) { //MessageBoxLogic.OpenOKBox(1288, 1000); MessageBoxLogic.OpenOKBox(2174, 1000); return; } int nChannelID = -1; if (!int.TryParse(InputChannel.value, out nChannelID)) { MessageBoxLogic.OpenOKBox(2174, 1000); return; } nChannelID = nChannelID - 1; if (nChannelID >= 0 && nChannelID != SceneData.SceneInst && SceneData.SceneInstList.Contains(nChannelID)) { CG_SCENE_CHANGEINST packet = (CG_SCENE_CHANGEINST)PacketDistributed.CreatePacket(MessageID.PACKET_CG_SCENE_CHANGEINST); packet.SetSceneInst(nChannelID); packet.SendPacket(); UIManager.CloseUI(UIInfo.ChannelChange); } else { MessageBoxLogic.OpenOKBox(2174, 1000); } }
void GoToWay(GameObject go) { switch (mWay.WayType) { case 1: if (UIPathData.m_DicUIName.ContainsKey(mWay.WayValue)) { UIManager.ShowUI(UIPathData.m_DicUIName[mWay.WayValue]); } break; case 2: MessageBoxLogic.OpenOKBox(StrDictionary.GetClientDictionaryString("#{" + mWay.WayValue + "}")); break; case 3: int sceneId = int.Parse(mWay.WayValue); Tab_SceneClass tabSceneClass = TableManager.GetSceneClassByID(sceneId, 0); if (tabSceneClass != null) { SceneData.RequestChangeScene((int)CG_REQ_CHANGE_SCENE.CHANGETYPE.WORLDMAP, 0, sceneId, 0); } if (closeUIHandler != null) { closeUIHandler(); } break; } }
// 全部上菜完成 void OnFinishServingAllClick() { if (!m_bSelfData) { GUIData.AddNotifyData("#{2017}"); return; } if (null == m_curRestaurant) { return; } // 超出当日完成次数上限 int nTodayFinishNum = GameManager.gameManager.PlayerDataPool.CommonData.GetCommonData((int)Games.UserCommonData.USER_COMMONDATA.CD_RESTAURANT_FINISHFOOD_NUM); if (nTodayFinishNum >= RestaurantData.FinishFoodMax) { MessageBoxLogic.OpenOKBox(1563, 1000); return; } bool bHavePreDesk = false; int nCostYuanBao = 0; for (int i = 0; i < m_curRestaurant.m_Desks.Length; i++) { if (m_curRestaurant.m_Desks[i].m_DestState != RestaurantData.DeskState.PrepareFood) { continue; } int nFoodID = m_curRestaurant.m_Desks[i].m_FoodID; Tab_RestaurantFood curTableFood = TableManager.GetRestaurantFoodByID(nFoodID, 0); if (null == curTableFood) { LogModule.ErrorLog("OnFinishServingAllClick:: curTableFood is null FoodID =" + nFoodID.ToString()); continue; } bHavePreDesk = true; int nCurDestCostYuanBao = 0; int nLeftTenMinues = m_curRestaurant.m_Desks[i].GetFoodLeftTime() / 600; if (m_curRestaurant.m_Desks[i].GetFoodLeftTime() % 600 != 0) { nLeftTenMinues = nLeftTenMinues + 1; } if (nLeftTenMinues <= 0) { nLeftTenMinues = 1; } nCurDestCostYuanBao = nLeftTenMinues * curTableFood.CostYuanBao; nCostYuanBao = nCostYuanBao + nCurDestCostYuanBao; } if (false == bHavePreDesk) { MessageBoxLogic.OpenOKBox(2381, 1000); return; } MessageBoxLogic.OpenCostBox(GCGame.Utils.GetDicByID(11362), null, GCGame.Utils.GetDicByID(11361), GCGame.Utils.GetDicByID(11363), "qian3", "X" + nCostYuanBao, OnFinishServingAll); }
public void SubmitName() { if (string.IsNullOrEmpty(m_InputName.value)) { //请输入人物名称 MessageBoxLogic.OpenOKBox(1281, 1000); return; } if (m_InputName.value.Contains("*")) { MessageBoxLogic.OpenOKBox(1278, 1000); return; } string strCurName = ""; // 过滤掉 0 非法字符 foreach (char curChar in m_InputName.value) { if ((int)curChar != 0) { strCurName += curChar; } } if (string.IsNullOrEmpty(strCurName)) { //请输入人物名称 MessageBoxLogic.OpenOKBox(1281, 1000); return; } int curCharNum = 0; // 英文算一个,中文算两个 foreach (char curChar in strCurName) { curCharNum += 2; if (char.IsWhiteSpace(curChar)) { //名字不能包含空格 MessageBoxLogic.OpenOKBox(1280, 1000); return; } } if (curCharNum > MAX_CHAR_NAME) { // 名字过长 MessageBoxLogic.OpenOKBox(1279, 1000); return; } if (null == Utils.GetStrFilter(strCurName, (int)Games.GlobeDefine.GameDefine_Globe.STRFILTER_TYPE.STRFILTER_NAME)) { SendCreateRole(); } else { // 包含非法字符 MessageBoxLogic.OpenOKBox(1278, 1000); } }
public void showSendMailObj() { if (GameManager.gameManager.PlayerDataPool.FriendList.GetRelationNum() == 0) { MessageBoxLogic.OpenOKBox(11164); return; } SendMailObj.SetActive(true); }
void FinishPrepareDesk() { if (null == RestaurantController.Instance()) { LogModule.ErrorLog("FinishPrepareDesk::RestaurantController.Instance() is null "); return; } if (!RestaurantController.Instance().SelfData) { GUIData.AddNotifyData("#{2017}"); return; } if (null == m_curDestData) { LogModule.ErrorLog("FinishPrepareDesk:: m_curDestData is null"); return; } int nTodayFinishNum = GameManager.gameManager.PlayerDataPool.CommonData.GetCommonData((int)Games.UserCommonData.USER_COMMONDATA.CD_RESTAURANT_FINISHFOOD_NUM); if (nTodayFinishNum >= RestaurantData.FinishFoodMax) { MessageBoxLogic.OpenOKBox(1563, 1000); return; } if (null == m_curDestData) { LogModule.ErrorLog("FinishPrepareDesk:: m_curDestData is null"); return; } Tab_RestaurantFood curTableFood = TableManager.GetRestaurantFoodByID(m_curDestData.m_FoodID, 0); if (null == curTableFood) { LogModule.ErrorLog("FinishPrepareDesk:: curTableFood is null"); return; } int nCostYuanBao = 0; int nLeftTenMinues = m_curDestData.GetFoodLeftTime() / 600; if (m_curDestData.GetFoodLeftTime() % 600 != 0) { nLeftTenMinues = nLeftTenMinues + 1; } if (nLeftTenMinues <= 0) { nLeftTenMinues = 1; } nCostYuanBao = nLeftTenMinues * curTableFood.CostYuanBao; //string strTip = StrDictionary.GetClientDictionaryString("#{2339}", (int)nCostYuanBao); //string strTitle = StrDictionary.GetClientDictionaryString("#{1000}"); //MessageBoxLogic.OpenOKCancelBox(strTip, strTitle, OnFinishPrepareDesk, null); MessageBoxLogic.OpenCostBox(Utils.GetDicByID(11362), null, Utils.GetDicByID(11361), Utils.GetDicByID(11363), "qian3", "X" + nCostYuanBao, OnFinishPrepareDesk); }
public void OnClickBuy(GameObject obj) { Tab_SystemShop sysShopTable = TableManager.GetSystemShopByID(WorldVoiceSysShopId, 0); if (sysShopTable != null && sysShopTable.CanBuyMulty > 0) { int ciid = sysShopTable.GetPidbyIndex(WorldVoiceIndex); string medicalName = "World Voice"; Tab_CommonItem tcitem = TableManager.GetCommonItemByID(ciid, 0); if (tcitem == null) { return; } else { medicalName = tcitem.Name; } // Tab_CommonItem buyItem = TableManager.GetCommonItemByID(WorldVoiceIndex, 0); // medicalName = buyItem.Name; string goldMoneyShopTitle = StrDictionary.GetClientDictionaryString("#{10955}", medicalName); string goldMoneyShopTotalTitle = StrDictionary.GetClientDictionaryString("#{2837}"); string oktitle = StrDictionary.GetClientDictionaryString("#{2837}"); string currencyIcon = string.Empty; int moneyType = sysShopTable.GetMoneyTypebyIndex(WorldVoiceIndex); int moneySubType = sysShopTable.GetMoneySubTypebyIndex(WorldVoiceIndex); int price = sysShopTable.GetPricebyIndex(WorldVoiceIndex); // int moneyType = 1; // int moneySubType = buyItem.SellMoneyType; // int price = buyItem.SellPrice; int stepPerClick = 1; if (moneyType == (int)Consume_Type.COIN) { currencyIcon = "qian5"; stepPerClick = 10; } else if (moneyType == (int)Consume_Type.YUANBAO) { if (moneySubType == (int)Consume_SubType.YUANBAO_NORMAL) { currencyIcon = "qian2"; } else if (moneySubType == (int)Consume_SubType.YUANBAO_BIND) { currencyIcon = "qian3"; } } NumChooseController.OpenWindow(1, 999, goldMoneyShopTitle, OnNumChoose, stepPerClick, goldMoneyShopTotalTitle, oktitle, true, "", currencyIcon, price); } else { MessageBoxLogic.OpenOKBox(1004, 1000); } }
public void ConnectLost() { if (!GameManager.gameManager.OnLineState) { return; } if (LoginUILogic.Instance() != null) { LoginUILogic.Instance().EnterServerChoose(); // 连接丢失,请重新登录 #if !UNITY_WP8 MessageBoxLogic.OpenOKBox(1292, 1000); #else if (!m_DeviceLost) { MessageBoxLogic.OpenOKBox(1292, 1000); } #endif return; } else if (MainUILogic.Instance() != null) { if (!m_bAskConnecting || null != MessageBoxLogic.Instance()) { LogModule.DebugLog("reconnecting...."); // 连接丢失,正在重新连接。。。 #if UNITY_WP8 if (!m_DeviceLost) { MessageBoxLogic.OpenOKBox(1293, 1000, OnReconnect); } else { WP8ConnectingLostLogic(); } #else MessageBoxLogic.OpenOKBox(1293, 1000, OnReconnect); #endif m_bAskConnecting = true; m_IsAskConnecting = true; if (BackCamerControll.Instance() != null && BackCamerControll.Instance().gameObject.activeInHierarchy) { BackCamerControll.Instance().gameObject.SetActive(false); } WorldMapWindow.OnDisConnect(); HuaShanPVPData.OnDisconnect(); } } else { // 有可能在loading不处理,等UI起来后检测 } }
void SendGuildMail() { if (Singleton <ObjManager> .Instance.MainPlayer == null) { return; } if (m_GuildMailInput.value == "") { return; } int nGuildJob = GameManager.gameManager.PlayerDataPool.GuildInfo.GetMemberJob(Singleton <ObjManager> .Instance.MainPlayer.GUID); if (nGuildJob != (int)Games.GlobeDefine.GameDefine_Globe.GUILD_JOB.CHIEF && nGuildJob != (int)Games.GlobeDefine.GameDefine_Globe.GUILD_JOB.VICE_CHIEF) { Singleton <ObjManager> .Instance.MainPlayer.SendNoticMsg(false, "#{3554}"); return; } int nPlayerCoin = GameManager.gameManager.PlayerDataPool.Money.GetMoney_Coin(); if (nPlayerCoin < GUILDMAIL_COSTCOIN) { Singleton <ObjManager> .Instance.MainPlayer.SendNoticMsg(false, "#{3552}"); return; } if (Encoding.UTF8.GetBytes(m_GuildMailInput.value).Length > 180) { // 邮件正文不能超过60个字符。 MessageBoxLogic.OpenOKBox(1259, 1000); return; } if (null != Utils.GetStrFilter(m_GuildMailInput.value, (int)Games.GlobeDefine.GameDefine_Globe.STRFILTER_TYPE.STRFILTER_CHAT)) { // 邮件包含非法字符 MessageBoxLogic.OpenOKBox(1278, 1000); return; } CG_SEND_GUILDMAIL pak = (CG_SEND_GUILDMAIL)PacketDistributed.CreatePacket(MessageID.PACKET_CG_SEND_GUILDMAIL); pak.TextContent = m_GuildMailInput.value; pak.SendPacket(); m_GuildMailInput.value = ""; }
void Ret_Login(GC_LOGIN_RET.LOGINRESULT result, int validateResult) { if (result == GC_LOGIN_RET.LOGINRESULT.SUCCESS) { LogModule.DebugLog("choose role...."); MessageBoxLogic.CloseBox(); MessageBoxLogic.OpenWaitBox(1366, 1, 0, OnChooseRole); } else { // 重新连接失败,点击确定返回登录界面 MessageBoxLogic.OpenOKBox(1295, 1000, EnterLoginScene); } }
// 批量购买当前选中物品 public void BuyBatchCurItem() { CloseCurItemTip(); if (null != m_curShowPage) { SysShopPage curPage = m_curShowPage.GetComponent <SysShopPage>(); if (curPage == null || curPage.GetCurHighLightItem() == null) { return; } Tab_SystemShop sysShopTable = TableManager.GetSystemShopByID(m_curShopID, 0); if (sysShopTable != null && sysShopTable.CanBuyMulty > 0) { string medicalName = curPage.GetCurHighLightItem().LabelName.text; string goldMoneyShopTitle = StrDictionary.GetClientDictionaryString("#{10955}", medicalName); string goldMoneyShopTotalTitle = StrDictionary.GetClientDictionaryString("#{2837}"); string oktitle = StrDictionary.GetClientDictionaryString("#{2837}"); int index = int.Parse(curPage.GetCurHighLightItem().gameObject.name); string currencyIcon = string.Empty; int moneyType = sysShopTable.GetMoneyTypebyIndex(index); int moneySubType = sysShopTable.GetMoneySubTypebyIndex(index); int stepPerClick = 1; if (moneyType == (int)Consume_Type.COIN) { currencyIcon = "qian5"; stepPerClick = 10; } else if (moneyType == (int)Consume_Type.YUANBAO) { if (moneySubType == (int)Consume_SubType.YUANBAO_NORMAL) { currencyIcon = "qian2"; } else if (moneySubType == (int)Consume_SubType.YUANBAO_BIND) { currencyIcon = "qian3"; } } NumChooseController.OpenWindow(ITEMCOUNT_MIN, ITEMCOUNT_MAX, goldMoneyShopTitle, OnNumChoose, stepPerClick, goldMoneyShopTotalTitle, oktitle, true, "", currencyIcon, sysShopTable.GetPricebyIndex(index)); } else { MessageBoxLogic.OpenOKBox(1004, 1000); } } }
void Ret_Reconnect(bool bSuccess, string strResult) { if (bSuccess) { // 重新登录 LogModule.DebugLog("relogining...."); NetManager.SendUserLogin(Ret_Login, true, true); //NetManager.SendUserLogin(PlayerPreferenceData.LastAccount, PlayerPreferenceData.LastPsw, Ret_Login); } else { // 重连失败,点击确定重新登录 MessageBoxLogic.OpenOKBox(1295, 1000, EnterLoginScene); } }
/*public void UpdateGuildReserveRemindNum() * { * if (null == m_GuildReserveRemind || null == m_GuildReserveRemindNum) * { * return; * } * * if (Singleton<ObjManager>.GetInstance().MainPlayer) * { * UInt64 myGuid = Singleton<ObjManager>.GetInstance().MainPlayer.GUID; * if ( ! GameManager.gameManager.PlayerDataPool.IsGuildChief() && * ! GameManager.gameManager.PlayerDataPool.IsGuildViceChief(myGuid)) * { * m_GuildReserveRemind.SetActive(false); * return; * } * } * * if (GameManager.gameManager.PlayerDataPool.GuildInfo.GetGuildReserveMemberCount() > 0) * { * m_GuildReserveRemind.SetActive(true); * m_GuildReserveRemindNum.text = GameManager.gameManager.PlayerDataPool.GuildInfo.GetGuildReserveMemberCount().ToString(); * } * else * { * m_GuildReserveRemind.SetActive(false); * } * }*/ public void OnClickRecruitment() { //目前只有帮主可以执行招募功能 if (!GameManager.gameManager.PlayerDataPool.IsGuildChief()) { MessageBoxLogic.OpenOKBox(StrDictionary.GetClientDictionaryString("#{3109}"), ""); return; } // 发世界聊天消息 if (GameManager.gameManager.PlayerDataPool.GuildInfo.GuildGuid != GlobeVar.INVALID_GUID) { ShareTargetChooseLogic.InitGuildShare(GameManager.gameManager.PlayerDataPool.GuildInfo.GuildGuid); } }
/// <summary> /// /// </summary> public void OnClickExchange() { int nSize = (GameManager.gameManager.PlayerDataPool != null)?GameManager.gameManager.PlayerDataPool.SwordsManBackPack.GetEmptyContainerSize():0; if (nSize <= 0) { MessageBoxLogic.OpenOKBox(2488, 1000); return; } //string str = "确定要花费"+m_nPrice.ToString()+"积分对话侠客"+m_strName; string str = StrDictionary.GetClientDictionaryString("#{2656}", m_nPrice, m_strName); MessageBoxLogic.OpenOKCancelBox(str, "", ExchangeSwordsmanOK); }
public uint Execute(PacketDistributed ipacket) { GC_USERTIP packet = (GC_USERTIP)ipacket; if (null == packet) { return((uint)PACKET_EXE.PACKET_EXE_ERROR); } if (packet.Tip == (int)GC_USERTIP.TipType.TIP_YUANBAO_NOTENOUGH) { MessageBoxLogic.OpenOKBox(1406, 1000); } return((uint)PACKET_EXE.PACKET_EXE_CONTINUE); }
public void OnCloseFliterWindow() { int nFoodNum = FilterFood(); if (nFoodNum <= 0) { MessageBoxLogic.OpenOKBox(2350, 1000); return; } if (m_FoodFilterPanel != null) { m_FoodFilterPanel.SetActive(false); } m_nCurPage = 0; LoadFoodItem(); }
private void OnReConnectCheckResVersion(UpdateHelper.CheckVersionResult result) { if (result == UpdateHelper.CheckVersionResult.NEEDUPDATE) { // 请重启客户端完成更新 MessageBoxLogic.OpenOKBox(4647, 1000, OnQuitGameClick); } else if (result == UpdateHelper.CheckVersionResult.NONEEDUPDATE) { DoReconnect(); } else { // 连接失败,点解确定重连 MessageBoxLogic.OpenOKBox(4655, 1000, OnReconnect); } }
/// <summary> /// 卸载侠客 /// </summary> void OnUnEquipSwordsMan() { if (null == m_SwordsMan) { LogModule.ErrorLog("OnUnEquipSwordsMan::m_SwordsMan is null"); return; } int nSize = GameManager.gameManager.PlayerDataPool.SwordsManBackPack.GetEmptyContainerSize(); if (nSize <= 0) { MessageBoxLogic.OpenOKBox(2488, 1000); return; } //MessageBoxLogic.OpenOKCancelBox(2487,1000, UnEquipSwordsManOK); UnEquipSwordsManOK(); }
// 删除当前邮件 void OnClickDelCur() { MailData.UserMail curMail = GetMailByItem(m_curSelectItem); if (null == curMail) { return; } if (curMail.itemID > 0 || curMail.moneyCount > 0) { //仍有未提取的附件或钱币,无法删除? MessageBoxLogic.OpenOKBox(1135, 1000); return; } DoDeleteCurMail(); }
void OnBtnOkClick() { //GameEvent gameEvent = new GameEvent(Games.GlobeDefine.GameDefine_Globe.EVENT_DEFINE.EVENT_TOUCH_UI); // Singleton<EventSystem>.GetInstance().PushEvent(gameEvent); PlatformHelper.SendUserAction(UserBehaviorDefine.ServerChoose_Enter); LoginData.ServerListData curServerListData = LoginData.GetServerListDataByID(PlayerPreferenceData.LastServer); if (null != curServerListData) { ServerChooseController.Instance().ConnectToServer(curServerListData.m_ip, curServerListData.m_port); } else { // 提示,无法找到服务器信息 MessageBoxLogic.OpenOKBox(1002, 1000); } }
private void OnConnectCheckResVersion(UpdateHelper.CheckVersionResult result) { if (result == UpdateHelper.CheckVersionResult.NEEDUPDATE) { MessageBoxLogic.OpenOKBox(4647, 1000, OnQuitGameClick); } else if (result == UpdateHelper.CheckVersionResult.NONEEDUPDATE) { DoConnectToServer(); } else { if (null != m_delConnect) { m_delConnect(false, "request res fail"); } } }
void OnClickBuy() { if (null == m_SelectShopSwordsManItem) { //MessageBoxLogic.OpenOKBox("请先选择想要购买的侠客", ""); MessageBoxLogic.OpenOKBox(StrDictionary.GetClientDictionaryString("#{2810}"), ""); return; } int nSiize = GameManager.gameManager.PlayerDataPool.SwordsManBackPack.GetEmptyContainerSize(); if (nSiize <= 0) { MessageBoxLogic.OpenOKBox(2488, 1000); } CG_BUY_SWORDSMAN packet = (CG_BUY_SWORDSMAN)PacketDistributed.CreatePacket(MessageID.PACKET_CG_BUY_SWORDSMAN); packet.Swordsmanid = m_SelectShopSwordsManItem.SwordsManDataID; packet.SendPacket(); }
/// <summary> /// 装备侠客 /// </summary> void OnEquipSwordsMan() { int nSiize = GameManager.gameManager.PlayerDataPool.SwordsManEquipPack.GetEmptyContainerSize(); if (nSiize <= 0) { MessageBoxLogic.OpenOKBox(2556, 1000); return; } if (null == m_SwordsMan) { LogModule.ErrorLog("OnEquipSwordsMan::m_SwordsMan is null"); return; } CG_EQUIP_SWORDSMAN packet = (CG_EQUIP_SWORDSMAN)PacketDistributed.CreatePacket(MessageID.PACKET_CG_EQUIP_SWORDSMAN); packet.Swordsmanguid = m_SwordsMan.Guid; packet.SendPacket(); CloseWindow(); }
IEnumerator RequestServerState(int serverID) { string sNoticeUrl = "http://mrd.changyou.com/tianlong3D/conf/notice/"; string urlNotice = sNoticeUrl + serverID.ToString() + ".txt"; WWW wwwData = null; yield return(StartCoroutine(DownloadHelper.GetCDNWWW(urlNotice, value => wwwData = value))); if (string.IsNullOrEmpty(wwwData.error) && wwwData.text != "None") { MessageBoxLogic.OpenOKBox(wwwData.text); LogModule.DebugLog(wwwData.text); } else { LogModule.ErrorLog(wwwData.error); //提示: 无法连接服务器 MessageBoxLogic.OpenOKBox(1005, 1000); } }
void DealWithVipLimit(bool isVipSupplyBeforeDays = false) { if (!isVipSupplyBeforeDays) { if (currentSelectedItem.vipLimit > 0) { if (VipData.GetVipLv() >= currentSelectedItem.vipLimit) { // 弹提示,您的VIP等级满足要求,会获得双倍奖励,然后让签 MessageBoxLogic.OpenOKBox(StrDictionary.GetClientDictionaryString("#{4702}"), "", SendGetAwardMessage); } else // vip 等级不满足,不让签 { if (currentSelectedItem.ItemStatus == (int)DaySignInStates.NOTSIGNEN) { // 弹是否提升vip等级的提示,点确定只领取单倍奖励 MessageBoxLogic.OpenOKBox(StrDictionary.GetClientDictionaryString("#{4644}"), "", SendGetAwardMessage); } else if (currentSelectedItem.ItemStatus == (int)DaySignInStates.VIPSIGNEDHALF) { // 临时屏蔽充值 //MessageBoxLogic.OpenOKCancelBox(StrDictionary.GetClientDictionaryString("#{4656}"), "", DoPay, CancelPay); MessageBoxLogic.OpenOKCancelBox(StrDictionary.GetClientDictionaryString("#{4656}"), "", DoPay, CancelPay); } } } else { SendGetAwardMessage(); } } else { // 弹提示,您的vip等级不足,点击充值,可以提升vip等级,点击确定没有奖励 //4656 // 临时屏蔽充值 //MessageBoxLogic.OpenOKCancelBox(StrDictionary.GetClientDictionaryString("#{4656}"), "", DoPay, CancelPay); MessageBoxLogic.OpenOKCancelBox(StrDictionary.GetClientDictionaryString("#{1817}"), "", DoPay, CancelPay); } }
void OnSendMailClick() { if (string.IsNullOrEmpty(labelReceiverName.text) || m_curReceiver <= 0) { // 请输入收件人姓名。 MessageBoxLogic.OpenOKBox(1138, 1000); return; } if (string.IsNullOrEmpty(inputText.value)) { // 请输入收件人姓名。 MessageBoxLogic.OpenOKBox(1141, 1000); return; } if (Encoding.UTF8.GetBytes(inputText.value).Length > 180) { // 邮件正文不能超过60个字符。 MessageBoxLogic.OpenOKBox(1259, 1000); return; } if (null != Utils.GetStrFilter(inputText.value, (int)Games.GlobeDefine.GameDefine_Globe.STRFILTER_TYPE.STRFILTER_CHAT)) { // 邮件包含非法字符 MessageBoxLogic.OpenOKBox(1278, 1000); return; } CG_MAIL_SEND packetSendMail = (CG_MAIL_SEND)PacketDistributed.CreatePacket(MessageID.PACKET_CG_MAIL_SEND); packetSendMail.SetReceiverGuid(m_curReceiver); packetSendMail.SetTextContent(inputText.value); packetSendMail.SendPacket(); CleanData(); }
void OnBtnNextClick() { PlatformHelper.SendUserAction(UserBehaviorDefine.ServerChoose_Enter); int curSelectServerID = 0; if (!int.TryParse(m_curSelectItemName, out curSelectServerID)) { return; } LoginData.ServerListData curData = LoginData.GetServerListDataByID(curSelectServerID); if (null != curData) { PlayerPreferenceData.LastServer = curSelectServerID; ServerChooseController.Instance().ConnectToServer(curData.m_ip, curData.m_port); } else { // 错误:当前服务器未配置 MessageBoxLogic.OpenOKBox(1002, 1001); } }