Пример #1
0
 public void FillDataFrom(GameAttributes gameattributes)
 {
     this._currentAttributeMap.Clear();
     this._changedAttributesQueue.Clear();
     foreach (var keyval in gameattributes.GetCurrentAttributeMap())
     {
         this._currentAttributeMap.Add(keyval.Key, keyval.Value);
         this._changedAttributesQueue.Enqueue(keyval.Key);
     }
 }
Пример #2
0
 protected Actor(int snoId)
     : base(Game.NewActorID)
 {
     Spawned    = false;
     Attributes = new GameAttributes(this);
     //Attributes[GameAttribute.Account_Under_Review];
     this.SNOId          = snoId;
     this.InitialLookAt  = new Vector3(0, 0, 0);
     this.TranslateSpeed = 0.1f; //default
     this.IsMoving       = false;
 }
Пример #3
0
        public InventoryItem(Int32 _sNOId)
            : base(Game.NewActorID)
        {
            this.SNOId    = _sNOId;
            this.FileData = Actor.SNOToFile[_sNOId];
            this.Data     = new ItemData();
            this.Data     = ItemData.XMLDeserialize(this.FileData + ".xml");

            this.InventorySize = this.Data.InventorySize;
            this.InventorySlot = new InventorySlot(); //hmmm nose si ponerle -1 -1 o que...
            this.Owner         = null;
            this.Attributes    = new GameAttributes(this);
            //this.Name = this.Data.Name;
            this.Attributes[GameAttributeStaticList.Level]             = RandomHelper.Next(5, 20);
            this.Attributes[GameAttributeStaticList.Defense]           = RandomHelper.Next(5, 150);
            this.Attributes[GameAttributeStaticList.Damage_Weapon_Min] = 25;
            this.Attributes[GameAttributeStaticList.Damage_Weapon_Max] = 30;
            this.Attributes[GameAttributeStaticList.Speed]             = 25;
            this.Attributes[GameAttributeStaticList.Skill]             = 2;
            this.Attributes[GameAttributeStaticList.Durability_Cur]    = 58;
            this.Attributes[GameAttributeStaticList.Durability_Max]    = 60;
            //this.CurrentState = ItemState.Normal;
        }