invertika_game.Game.Character.Character C# (CSharp) Method

Character() public method

public Character ( ISL.Server.Network.MessageIn msg ) : System
msg ISL.Server.Network.MessageIn
return System
        public Character(MessageIn msg)
            : base(ThingType.OBJECT_CHARACTER)
        {
            //mTransactionHandler(NULL),
            mDatabaseID=-1;
            mLevel=1;
            mRecalculateLevel=true;
            mTransaction=TransactionType.TRANS_NONE;

            mExperience=new Dictionary<int, int>();

            Dictionary<int, List<AttributeInfoType>> attr=Program.attributeManager.getAttributeScope(ScopeType.CharacterScope);

            Logger.Write(LogLevel.Debug, "Character creation: initialisation of {0}  attributes.", attr.Count);
            foreach(KeyValuePair<int, List<AttributeInfoType>> pair in attr)
            {
                mAttributes.Add((uint)pair.Key, new Attribute(pair.Value));
            }

            // Get character data.
            mDatabaseID=msg.readInt32();
            setName(msg.readString());
            deserializeCharacterData(msg);
            mOld=getPosition();

            //TODO Ermitteln was hier eigentlich passieren sollte
            //Inventory(this).initialize();

            modifiedAllAttribute();
            setSize(16);

            // Give the character some specials for testing.
            //TODO: Get from quest vars and equipment
            giveSpecial(1);
            giveSpecial(2);
            giveSpecial(3);
        }