public MobStatEntry(MobStatType nType, int nSkillID, short nOption, int liDurationSeconds) { MobStatTypeID = (int)nType; rOption = nSkillID; this.nOption = nOption; nDurationSeconds = (short)liDurationSeconds; }
public void ResetByType(MobStatType type) { if (_stats.Stats.ContainsKey(type)) { _resetHistory.Stats[type] = _stats.Stats[type]; } _stats.Stats.Remove(type); }
public void Set( MobStatType type, int value, int reason, DateTime?dateExpire = null ) => Set(new MobStat { Type = type, Value = value, Reason = reason, DateExpire = dateExpire });
public IMobStat GetStat(MobStatType type) => HasStat(type) ? Stats[type] : null;
public int GetReason(MobStatType type) => HasStat(type) ? Stats[type].Reason : 0;
public int GetValue(MobStatType type) => HasStat(type) ? Stats[type].Value : 0;
public bool HasStat(MobStatType type) => Stats.ContainsKey(type);
public MobStatEntry this[MobStatType nType] => Contains((int)nType) ? this[(int)nType] : null;