예제 #1
0
        private void Increase(CharacterPropertyEnum id, long delta)
        {
            long val = Get(id);

            val += delta;
            Set(id, val);
        }
예제 #2
0
 private void InitProperty(CharacterPropertyEnum id, int val)
 {
     if (val != 0)
     {
         BaseProperty.SetInt(id, val);
     }
 }
예제 #3
0
        internal bool HaveState(CharacterPropertyEnum id)
        {
            long val     = GetState(id);
            bool disable = IsStateDisable(val);
            long ct      = GetStateCount(val);

            return(ct > 0 && !disable);
        }
예제 #4
0
 private void SetState(CharacterPropertyEnum id, long val)
 {
     if (IsState(id))
     {
         int idVal = (int)id;
         m_Values[idVal] = val;
     }
 }
예제 #5
0
        private long Get(CharacterPropertyEnum id)
        {
            long val   = 0;
            int  idVal = (int)id;

            m_Values.TryGetValue(idVal, out val);
            return(val);
        }
예제 #6
0
        internal void RemoveState(CharacterPropertyEnum id)
        {
            long val     = GetState(id);
            long disable = GetStateDisable(val);
            long ct      = GetStateCount(val);

            val = (ct > 0 ? ct - 1 : 0) | disable;
            SetState(id, val);
        }
예제 #7
0
        internal void AddState(CharacterPropertyEnum id)
        {
            long val     = GetState(id);
            long disable = GetStateDisable(val);
            long ct      = GetStateCount(val);

            val = (ct + 1) | disable;
            SetState(id, val);
        }
예제 #8
0
        internal void DisableState(CharacterPropertyEnum id)
        {
            long val = GetState(id);
            long ct  = GetStateCount(val);

            if (ct <= 0)
            {
                return;
            }
            val = ct | c_StateDisableFlag;
            SetState(id, val);
        }
예제 #9
0
 public float GetFloat(CharacterPropertyEnum id)
 {
     return(Get(id) / 1000.0f);
 }
예제 #10
0
 public void IncreaseLong(CharacterPropertyEnum id, long delta)
 {
     Increase(id, delta);
 }
예제 #11
0
 public void SetLong(CharacterPropertyEnum id, long val)
 {
     Set(id, val);
 }
예제 #12
0
 public long GetLong(CharacterPropertyEnum id)
 {
     return(Get(id));
 }
예제 #13
0
 public void IncreaseInt(CharacterPropertyEnum id, int delta)
 {
     Increase(id, delta);
 }
예제 #14
0
 public void SetInt(CharacterPropertyEnum id, int val)
 {
     Set(id, val);
 }
예제 #15
0
 public void DisableState(CharacterPropertyEnum id)
 {
     BaseProperty.DisableState(id);
     ActualProperty.DisableState(id);
 }
예제 #16
0
 public void AddState(CharacterPropertyEnum id)
 {
     BaseProperty.AddState(id);
     ActualProperty.AddState(id);
 }
예제 #17
0
 private static bool IsState(CharacterPropertyEnum id)
 {
     return(id >= CharacterPropertyEnum.x3001_眩晕 && id < CharacterPropertyEnum.x4001_职业);
 }
예제 #18
0
        private void Set(CharacterPropertyEnum id, long val)
        {
            int idVal = (int)id;

            m_Values[idVal] = val;
        }
예제 #19
0
 internal void ClearState(CharacterPropertyEnum id)
 {
     SetState(id, 0);
 }
예제 #20
0
 public bool HaveState(CharacterPropertyEnum id)
 {
     return(ActualProperty.HaveState(id));
 }
예제 #21
0
 public void SetFloat(CharacterPropertyEnum id, float val)
 {
     Set(id, (long)(val * 1000.0f));
 }
예제 #22
0
 public void RemoveState(CharacterPropertyEnum id)
 {
     BaseProperty.RemoveState(id);
     ActualProperty.RemoveState(id);
 }
예제 #23
0
 public void IncreaseFloat(CharacterPropertyEnum id, float delta)
 {
     Increase(id, (long)(delta * 1000.0f));
 }
예제 #24
0
 public void ClearState(CharacterPropertyEnum id)
 {
     BaseProperty.ClearState(id);
     ActualProperty.ClearState(id);
 }
예제 #25
0
 public int GetInt(CharacterPropertyEnum id)
 {
     return((int)Get(id));
 }