public abstract void Affects(CharacterModel character);
/// <summary> /// Create PlayerInfoModel from character /// </summary> /// <param name="data"></param> public PlayerInfoModel(CharacterModel data) { PlayerType = data.PlayerType; Guid = data.Guid; Alive = data.Alive; ExperienceTotal = data.ExperienceTotal; ExperienceRemaining = data.ExperienceRemaining; Level = data.Level; Name = data.Name; Description = data.Description; // Set the Base Attributes Speed = data.Speed; Range = data.Range; Defense = data.Defense; Attack = data.Attack; MaxHealth = data.MaxHealth; CurrentHealth = data.CurrentHealth; ImageURI = data.ImageURI; // Set the strings for the items Head = data.Head; Necklass = data.Necklass; PrimaryHand = data.PrimaryHand; OffHand = data.OffHand; RightFinger = data.RightFinger; LeftFinger = data.LeftFinger; Feet = data.Feet; UniqueItem = data.UniqueItem; Difficulty = data.Difficulty; Job = data.Job; // Give the copy a differet quid, so it can be used in the battles as a copy Guid = System.Guid.NewGuid().ToString(); // Set current experience to be 1 above minimum. ExperienceTotal = LevelTableHelper.LevelDetailsList[Level - 1].Experience + 1; // TODO: Mike, Refactor this, so it is in a helper, and call it on level up as well. switch (Job) { case CharacterJobEnum.Cleric: foreach (var item in AbilityEnumHelper.GetListCleric) { AbilityTracker.Add(AbilityEnumHelper.ConvertStringToEnum(item), Level); } break; case CharacterJobEnum.Fighter: foreach (var item in AbilityEnumHelper.GetListFighter) { AbilityTracker.Add(AbilityEnumHelper.ConvertStringToEnum(item), Level); } break; default: foreach (var item in AbilityEnumHelper.GetListOthers) { AbilityTracker.Add(AbilityEnumHelper.ConvertStringToEnum(item), Level); } break; } }