// Passed in from creating via the Database, so use the guid passed in... public Monster(BaseMonster newData) { // Database information Guid = newData.Guid; Id = newData.Id; // Set the strings for the items Head = newData.Head; Feet = newData.Feet; Necklass = newData.Necklass; RightFinger = newData.RightFinger; LeftFinger = newData.LeftFinger; Feet = newData.Feet; Name = newData.Name; Description = newData.Description; ImageURI = newData.ImageURI; Alive = newData.Alive; Level = newData.Level; // Populate the Attributes Attribute = new AttributeBase(newData.AttributeString); // Scale up to the level ScaleLevel(Level); }
/// <summary> /// Crate PlayerInfoModel from Monster /// </summary> /// <param name="data"></param> public PlayerInfoModel(BaseMonster data) { SelectedForBattle = false; PlayerType = data.PlayerType; Guid = data.Guid; Alive = data.Alive; Experience = data.Experience; ExperienceRemaining = data.ExperienceRemaining; Level = data.Level; Name = data.Name; Description = data.Description; Speed = data.GetSpeed(); ImageURI = data.ImageURI; MaxHealth = data.GetMaxHealthTotal; CurrHealth = data.GetCurrentHealthTotal; MonstEnum = data.Attribute; // Set the strings for the items Head = data.Head; Feet = data.Feet; Necklass = data.Necklass; RightFinger = data.RightFinger; LeftFinger = data.LeftFinger; Feet = data.Feet; UniqueItem = data.UniqueItem; Difficulty = data.Difficulty; // Give the copy a differet quid, so it can be used in the battles as a copy Guid = System.Guid.NewGuid().ToString(); // Set amount to give to be 1 below max for that level. ExperienceRemaining = LevelTableHelper.Instance.LevelDetailsList[Level + 1].Experience - 1; }