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