private void RemoveBuff(IBuff buff) { int buffId = buff.GetBuffId(); this.OnBuffEventDispatch(BuffActionType.RemoveBuff); buff.Release(); this.buffMap.Remove(buffId); }
private bool IsBuffActionType(IBuff buff, BuffActionType type, out int actionId) { actionId = 0; if (buff == null) { return(false); } int buffId = buff.GetBuffId(); return(IsBuffActionType(buffId, type, out actionId)); }
private void RefreshTimerLife(IBuff buff) { int buffId = buff.GetBuffId(); if (buffTimerMap.ContainsKey(buffId)) { int timerId = GetTimerId(buffId, true); float life = buff.GetDuringTime(); timerService.RefreshTimerLife(timerId, life); } }