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); }
public int GetAttrType(CreatureCommonAttr CAttrType) { return((int)AttrMgr.GetMonsterAttr(CAttrType)); }