示例#1
0
文件: Being.cs 项目: Invertika/server
        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
        }
示例#2
0
文件: Being.cs 项目: Invertika/server
        void setAction(BeingAction action)
        {
            //// Stops the auto-attacks when changing action
            //if (mAction == ATTACK && action != ATTACK)
            //    mAutoAttacks.stop();

            //mAction = action;
            //if (action != ATTACK && // The players are informed about these actions
            //    action != WALK)     // by other messages
            //{
            //    raiseUpdateFlags(UPDATEFLAG_ACTIONCHANGE);
            //}
        }