public void GetNobleMoneySuccess(stNobleGiveDayFreeCoinPropertyUserCmd_CS cmd) { if (NobleDic.ContainsKey(cmd.noble_id)) { NobleDic[cmd.noble_id].freeWenqian = cmd.Coin_num; } else { NobleDic.Add(cmd.noble_id, new NobleParam { freeWenqian = cmd.Coin_num, } ); } if (NobleID < cmd.noble_id) { NobleID = cmd.noble_id; } stNobleTempIndex index = new stNobleTempIndex() { nobleID = cmd.noble_id }; Engine.Utility.EventEngine.Instance().DispatchEvent((int)Client.GameEventID.GETNOBLEMONEYSUCCESS, index); HasNobleWarning(); }
public void OnBuyNobel(stBuyNoblePropertyUserCmd_CS cmd) { Remain_Time = cmd.protected_time; NobleDataBase table = GameTableManager.Instance.GetTableItem <NobleDataBase>(cmd.noble_id); TipsManager.Instance.ShowTips(string.Format(DataManager.Manager <TextManager>().GetLocalFormatText(LocalTextType.Noble_Commond_1, table.name))); if (NobleDic.ContainsKey(cmd.noble_id)) { NobleDic[cmd.noble_id].time = cmd.protected_time; } else { NobleDic.Add(cmd.noble_id, new NobleParam { time = cmd.protected_time, freeWenqian = 0, } ); } if (NobleID < cmd.noble_id) { NobleID = cmd.noble_id; } stNobleTempIndex index = new stNobleTempIndex() { nobleID = cmd.noble_id }; Engine.Utility.EventEngine.Instance().DispatchEvent((int)Client.GameEventID.BUYNOBLESUCCESS, index); HasNobleWarning(); }
/// <summary> /// /// </summary> /// <param name="eventid"></param> /// <param name="data"></param> public void GlobalEventHandler(int eventid, object data) { switch (eventid) { case (int)Client.GameEventID.RECONNECT_SUCESS: { //刷新面板 } break; case (int)Client.GameEventID.ISFIRSTRECHARGE: { m_blockGridCreator.UpdateActiveGrid(); } break; case (int)Client.GameEventID.BUYNOBLESUCCESS: { stNobleTempIndex dat = (stNobleTempIndex)data; RefreshNobleGrid(dat.nobleID); } break; case (int)Client.GameEventID.GETNOBLEMONEYSUCCESS: { stNobleTempIndex dat = (stNobleTempIndex)data; RefreshNobleGrid(dat.nobleID); } break; case (int)Client.GameEventID.MAINPANEL_SHOWREDWARING: { stShowMainPanelRedPoint st = (stShowMainPanelRedPoint)data; WarningDirection direction = (WarningDirection)st.direction; WarningEnum model = (WarningEnum)st.modelID; if (model == WarningEnum.Noble) { mShowNobleRedPoint = st.bShowRed; UpdateApplyRedPoint(); } } break; } }