void DoGameEvent(int EventId, object param) { if ((int)Client.GameEventID.UIEVENT_USEITEMCD == EventId && !Empty) { Client.stUseItemCD useItemCD = (Client.stUseItemCD)param; ItemManager.CDData cdData; if (DataManager.Manager <ItemManager>().TryGetItemCDByBaseId(data.BaseId, out cdData)) { Engine.Utility.TimerAxis.Instance().KillTimer(ITEMCD_TIMERID, this); Engine.Utility.TimerAxis.Instance().SetTimer(ITEMCD_TIMERID, ITEMCD_GAP_TIME, this); } } else { Engine.Utility.TimerAxis.Instance().KillTimer(ITEMCD_TIMERID, this); SetCDStatus(false); } }
void DoGameEvent(int EventId, object param) { if ((int)Client.GameEventID.UIEVENT_USEITEMCD == EventId) { if (this.item == null) { Engine.Utility.Log.Error("item 数据为 null "); return; } Client.stUseItemCD useItemCD = (Client.stUseItemCD)param; ItemManager.CDData cdData; if (DataManager.Manager <ItemManager>().TryGetItemCDByBaseId(this.item.itemid, out cdData)) { TimerAxis.Instance().KillTimer(ITEMCD_TIMERID, this); TimerAxis.Instance().SetTimer(ITEMCD_TIMERID, 30, this); } } }