Exemplo n.º 1
0
        public bool AddAttr(CreatureCommonAttr CAttrType, int attrValue)
        {
            MonsterAttr mAttrType = AttrMgr.GetMonsterAttr(CAttrType);

            if (attrValue < 0)
            {
                uint absValue = (uint)Math.Abs(attrValue);
                m_Attrs[(int)mAttrType] = ((m_Attrs[(int)mAttrType] > absValue) ? (m_Attrs[(int)mAttrType] - absValue) : 0);
            }
            else
            {
                m_Attrs[(int)mAttrType] = m_Attrs[(int)mAttrType] + (uint)attrValue;
            }

            return(true);
        }
Exemplo n.º 2
0
 public int GetAttrType(CreatureCommonAttr CAttrType)
 {
     return((int)AttrMgr.GetMonsterAttr(CAttrType));
 }