void OnLevelupClick() { if (IsCanLevelUpSkill(m_nCurSkillId)) { //MessageBoxLogic.OpenOKCancelBox("是否升级"+m_LabelCurSkillName.text, "", DoLevelUp); MessageBoxLogic.OpenOKCancelBox(StrDictionary.GetClientDictionaryString("#{2808}", m_LabelCurSkillName.text), "", DoLevelUp); } }
void ReqPvPRankList() { CG_CHALLENGERANKLIST_REQ packet = (CG_CHALLENGERANKLIST_REQ)PacketDistributed.CreatePacket(MessageID.PACKET_CG_CHALLENGERANKLIST_REQ); packet.Page = PVPData.PvPRankCurPage; packet.SendPacket(); MessageBoxLogic.OpenWaitBox(1290, GameDefines.CONNECT_TIMEOUT, 0); }
// 删除好友 public void onDeleteFriend() { //if( m_ItemType == PlayerListItemType.FriendInfo) { string dicStr = StrDictionary.GetClientDictionaryString("#{5251}"); MessageBoxLogic.OpenOKCancelBox(dicStr, "", DelFriendOK, DelFriendNO); } }
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); } }
// 全部上菜完成 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); }
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 showSendMailObj() { if (GameManager.gameManager.PlayerDataPool.FriendList.GetRelationNum() == 0) { MessageBoxLogic.OpenOKBox(11164); return; } SendMailObj.SetActive(true); }
void OnTeamTransClick() { if (m_Name == "") { return; } MessageBoxLogic.OpenOKCancelBox(StrDictionary.GetClientDictionaryString("#{10283}", m_Name), "", OnTeamTransOK); }
void DelFromShoppingCart() { if (m_Type != PresentRootLogic.TAB_INDEX.TAB_SHOPPINGCART) { return; } MessageBoxLogic.OpenOKCancelBox(StrDictionary.GetClientDictionaryString("#{4793}"), "", DelOK); }
void DeleteTitleInvestitive() { Tab_TitleData tabTitleData = TableManager.GetTitleDataByID(m_PlayerChooseID, 0); if (tabTitleData != null) { //MessageBoxLogic.OpenOKCancelBox("确定要删除称号吗?", "", DeleteTitleInvestitiveOK, DeleteTitleInvestitiveCancel); MessageBoxLogic.OpenOKCancelBox(StrDictionary.GetClientDictionaryString("#{2877}"), "", DeleteTitleInvestitiveOK, DeleteTitleInvestitiveCancel); } }
void SpecialRefreshByYuanbao() { int nSpecialYuanBao = 0; nSpecialYuanBao = m_NeedYB; string str = ""; str = StrDictionary.GetClientDictionaryString("#{5199}", nSpecialYuanBao); MessageBoxLogic.OpenOKCancelBox(str, null, OnMessageOKYuanBao, OnCancelClick); }
void SpecialRefreshByItem() { int nSpecialItem = 0; nSpecialItem = m_NeedSpecialItemCount; string str = ""; str = StrDictionary.GetClientDictionaryString("#{5200}", nSpecialItem); MessageBoxLogic.OpenOKCancelBox(str, null, OnMessageOKSpecial, OnCancelClick); }
void NormalRefreshByBindYuanbao() { int nBindYuanbao = 0; nBindYuanbao = m_NeedBindYB; string str = ""; str = StrDictionary.GetClientDictionaryString("#{1538}", nBindYuanbao); MessageBoxLogic.OpenOKCancelBox(str, null, OnMessageOKBangdedYuanBao, OnCancelClick); }
void NormalRefreshByItem() { int nNormalItem = 0; nNormalItem = m_NeedNormalItemCount; string str = ""; str = StrDictionary.GetClientDictionaryString("#{5198}", nNormalItem); MessageBoxLogic.OpenOKCancelBox(str, null, OnMessageOKNormal, OnCancelClick); }
void OnClickDismissTeamBtn() { //非队长无法解散队伍 if (false == Singleton <ObjManager> .GetInstance().MainPlayer.IsTeamLeader()) { return; } MessageBoxLogic.OpenOKCancelBox(GCGame.Table.StrDictionary.GetClientDictionaryString("#{11498}"), GCGame.Table.StrDictionary.GetClientDictionaryString("#{1315}"), LeaveClickYes, null); }
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起来后检测 } }
//=======================================================\ //点击删除关系人 public void OnClickRelationDel() { if (m_delHateList.Count <= 0) { return; } string dicStr = StrDictionary.GetClientDictionaryString("#{10837}"); MessageBoxLogic.OpenOKCancelBox(dicStr, "", DelHateOK, DelHateNO); }
void MakeShenQi_CurEquip_Ok() { if (IsNeedWaringHaveLowShenQiEquip()) { MessageBoxLogic.OpenOKCancelBox(StrDictionary.GetClientDictionaryString("#{5220}"), "", MakeItemOK, MakeItemCancel); } else { MakeItemOK(); } }
void ReqUpdateHateUserInfo() { if (null != Singleton <ObjManager> .GetInstance().MainPlayer) { CG_REQ_HATE_USERINFO packet = (CG_REQ_HATE_USERINFO)PacketDistributed.CreatePacket(MessageID.PACKET_CG_REQ_HATE_USERINFO); packet.Guid = Singleton <ObjManager> .GetInstance().MainPlayer.GUID; packet.SendPacket(); MessageBoxLogic.OpenWaitBox(1290, 1, 0); } }
void EnterNonePKValueSceneOK() { Tab_SceneClass tabSceneClass = TableManager.GetSceneClassByID(m_curShowSceneID, 0); if (null == tabSceneClass) { return; } MessageBoxLogic.OpenOKCancelBox(StrDictionary.GetClientDictionaryString("#{1644}", tabSceneClass.Name), "", DoTeleport); }
//点击 解散师门 void OnClickDissolve() { //掌门才能解散 if (GameManager.gameManager.PlayerDataPool.IsMasterChief() == false) { return; } string dicStr = StrDictionary.GetClientDictionaryString("#{3186}"); MessageBoxLogic.OpenOKCancelBox(dicStr, "", ClickDissolveOK, null); }
public static void Handler(GC_RET_MARRAGE packet) { if (packet.Type == (int)MARRY_PACKET_TYPE.MARRY_PACKET_ASKMARRY && packet.Id != GlobeVar.INVALID_GUID) { string strTarget = ""; if (GameManager.gameManager.PlayerDataPool.TeamInfo.TeamID == GlobeVar.INVALID_ID) { return; } for (int i = 0; i < GlobeVar.MAX_TEAM_MEMBER; ++i) { TeamMember tm = GameManager.gameManager.PlayerDataPool.TeamInfo.GetTeamMember(i); if (null != tm && true == tm.IsValid() && tm.Guid == packet.Id) { strTarget = tm.MemberName; } } MarryRootLogic.m_SavedGUID = packet.Id; //MessageBoxLogic.OpenOKCancelBox(StrDictionary.GetClientDictionaryString("#{1415}", strTarget),"求婚", MessageBoxLogic.OpenOKCancelBox(StrDictionary.GetClientDictionaryString("#{1415}", strTarget), StrDictionary.GetClientDictionaryString("#{2864}"), ConfirmPromise, CancelNone); } else if (packet.Type == (int)MARRY_PACKET_TYPE.MARRY_PACKET_CONFIRM && packet.Id != GlobeVar.INVALID_GUID) { string strTarget = ""; if (GameManager.gameManager.PlayerDataPool.TeamInfo.TeamID == GlobeVar.INVALID_ID) { return; } for (int i = 0; i < GlobeVar.MAX_TEAM_MEMBER; ++i) { TeamMember tm = GameManager.gameManager.PlayerDataPool.TeamInfo.GetTeamMember(i); if (null != tm && true == tm.IsValid() && tm.Guid == packet.Id) { strTarget = tm.MemberName; } } MarryRootLogic.m_SavedGUID = packet.Id; MessageBoxLogic.OpenOKCancelBox(StrDictionary.GetClientDictionaryString("#{1416}", strTarget), StrDictionary.GetClientDictionaryString("#{2864}"), RetPromiseOK, RetPromiseCancel, GlobeVar.INVALID_ID, MessageBoxLogic.PASSWORD.MARRYROOT); } else if (packet.Type == (int)MARRY_PACKET_TYPE.MARRY_PACKET_CANCEL && packet.Id != GlobeVar.INVALID_GUID) { if (MarryRootLogic.m_SavedGUID == packet.Id) { MarryRootLogic.m_SavedGUID = GlobeVar.INVALID_GUID; if (MessageBoxLogic.Instance() != null && MessageBoxLogic.Instance().EPassword == MessageBoxLogic.PASSWORD.MARRYROOT) { MessageBoxLogic.CloseBox(); } } } }
void LockTitle() { if (GameManager.gameManager.PlayerDataPool.IsLockPriorTitle == false) { MessageBoxLogic.OpenOKCancelBox(StrDictionary.GetClientDictionaryString("#{2764}"), "", LockTitleOK, LockTitleCancel); } else { LockTitleOK(); } }
public void OnExitFBClick() { string str = StrDictionary.GetClientDictionaryString("#{1847}"); if ((int)Games.GlobeDefine.GameDefine_Globe.SCENE_DEFINE.SCENE_FB_HUNDUNZHIDI == GameManager.gameManager.RunningScene) { str = StrDictionary.GetClientDictionaryString("#{2345}"); } MessageBoxLogic.OpenOKCancelBox(str, "", OnLeaveCopySceneOK, OnLEaveCopySceneNO); }
void CancelNewAttr() { if (m_bNewAttrImport) { //是否回退 MessageBoxLogic.OpenOKCancelBox(StrDictionary.GetClientDictionaryString("#{4954}"), "", GiveUpOK); } else { GiveUpOK(); } }
void SaveNewAttr() { if (m_bOldAttrImport) { //是否替换 MessageBoxLogic.OpenOKCancelBox(StrDictionary.GetClientDictionaryString("#{4953}"), "", SaveOk); } else { SaveOk(); } }
void ClickWashAgain() { if (m_bNewAttrImport) { //是否继续培养 MessageBoxLogic.OpenOKCancelBox(StrDictionary.GetClientDictionaryString("#{5201}"), "", WashAgainOK); } else { WashAgainOK(); } }
// 拉黑 public void onBlackFriend() { if (m_Guid == GlobeVar.INVALID_GUID) { return; } //string dicStr = StrDictionary.GetClientDictionaryString("#{5251}"); string dicStr = "确定设置黑名单?"; MessageBoxLogic.OpenOKCancelBox(dicStr, "", DelBlackOK, DelBlackNo); }
void ClickMessageBt() { if (m_curMessageNum > 0) { //取出消息队列的第一个并移除掉 m_curPopMessage = GameManager.gameManager.PlayerDataPool.WarPushMessaeg[0]; //弹出的MessageBox string dicStr = GetMessageBoxStr(); m_bIsWaitAnswer = true; MessageBoxLogic.OpenOKCancelBox(dicStr, "", OnAgreeEnterGuildWar, OnDisAgreeEnterGuildWar); } }