public uint Execute(PacketDistributed ipacket) { CG_WISHINGWELL_WISH packet = (CG_WISHINGWELL_WISH )ipacket; if (null == packet) { return((uint)PACKET_EXE.PACKET_EXE_ERROR); } //enter your logic return((uint)PACKET_EXE.PACKET_EXE_CONTINUE); }
void OnClickWish() { int right = GameManager.gameManager.PlayerDataPool.CommonData.GetCommonData((int)Games.UserCommonData.USER_COMMONDATA.CD_WISHINGWELL_RIGHT); if (right != (int)WISHINGWELL_RIGHTS.WISHINGWELL_GET) { if (right == (int)WISHINGWELL_RIGHTS.WISHINGWELL_NORIGHT) { int limits = GameManager.gameManager.PlayerDataPool.WishingWell_Limit; //modified by zhang dongai [tt12776] 2015-1-17 //各个渠道版本不应该区分字典号,直接使用一个字典号,对内容本地化即可 //因为已经区分了字典号,那么大陆使用3977字典号。其他渠道全部使用4719字典号,不能再新增字典号了。 string dicTip = "#{3977}"; //如果不是大陆版本,使用4719字典号 if (!PlatformHelper.IsChannelMainland()) { dicTip = "#{4719}"; } string notice = StrDictionary.GetClientDictionaryString(dicTip, limits); GUIData.AddNotifyData2Client(false, notice); } if (right == (int)WISHINGWELL_RIGHTS.WISHINGWELL_OVER) { GUIData.AddNotifyData2Client(false, "#{3978}"); } return; } if (m_InputContent.value.Length > 0) { CG_WISHINGWELL_WISH Pack = (CG_WISHINGWELL_WISH)PacketDistributed.CreatePacket(MessageID.PACKET_CG_WISHINGWELL_WISH); Pack.SetMessage(m_InputContent.value); Pack.SendPacket(); return; } else { if (Singleton <ObjManager> .GetInstance().MainPlayer != null) { Singleton <ObjManager> .GetInstance().MainPlayer.SendNoticMsg(false, "#{3979}"); } return; } }