Beispiel #1
0
        public Being(ThingType type)
            : base(type)
        {
            mAction=BeingAction.STAND;
            mTarget=null;
            mGender=BeingGender.GENDER_UNSPECIFIED;
            mDirection=BeingDirection.DOWN;

            Dictionary<int, List<AttributeInfoType>> attr=Program.attributeManager.getAttributeScope(ScopeType.BeingScope);
            Logger.Write(LogLevel.Debug, "Being creation: initialisation of {0} attributes.", attr.Count);

            foreach(KeyValuePair<int, List<AttributeInfoType>> pair in attr)
            {
                int debug=555; //TODO hier mal reinschauen
                //if(mAttributes.Count

                //if (mAttributes.count(it1.first))
                //    LOG_WARN("Redefinition of attribute '" << it1.first << "'!");
                //LOG_DEBUG("Attempting to create attribute '" << it1.first << "'.");
                //mAttributes.insert(std::make_pair(it1.first,
                //                                  Attribute(*it1.second)));
            }

            // TODO: Way to define default base values?
            // Should this be handled by the virtual modifiedAttribute?
            // URGENT either way

            //#if 0
            //    // Initialize element resistance to 100 (normal damage).
            //    for (i = BASE_ELEM_BEGIN; i < BASE_ELEM_END; ++i)
            //    {
            //        mAttributes[i] = Attribute(TY_ST);
            //        mAttributes[i].setBase(100);
            //    }
            //#endif
        }
Beispiel #2
0
 /** Sets the gender of the being (male or female). */
 public void setGender(BeingGender gender)
 {
     mGender=gender;
 }