public CharacterFighter(GameFightCharacterInformations msg, Fight fight) { Id = msg.contextualId; Fight = fight; Look = msg.look; Position = new ObjectPosition(Fight.Map, msg.disposition); Team = fight.GetTeam((FightTeamColor)msg.teamId); IsAlive = msg.alive; Alignment = new AlignmentInformations(msg.alignmentInfos); Breed = DataProvider.Instance.Get <Breed>(msg.breed); Stats = new MinimalStats(msg.stats); }
public void Update(GameFightCharacterInformations msg) { if (msg == null) { throw new ArgumentNullException("msg"); } Id = msg.contextualId; Look = msg.look; Position.Update(msg.disposition); IsAlive = msg.alive; Alignment = new AlignmentInformations(msg.alignmentInfos); Breed = DataProvider.Instance.Get <Breed>(msg.breed); Stats.Update(msg.stats); }
public Character(GameRolePlayCharacterInformations characterInformations, Map map) : base(characterInformations.humanoidInfo) { if (characterInformations == null) { throw new ArgumentNullException("characterInformations"); } if (map == null) { throw new ArgumentNullException("map"); } // do not care about this warnings, this ctor is never called by his inheriter Id = characterInformations.contextualId; Look = characterInformations.look; Position = new ObjectPosition(map, characterInformations.disposition); Name = characterInformations.name; Alignement = new AlignmentInformations(characterInformations.alignmentInfos); }
public void Update(GameRolePlayCharacterInformations msg) { if (msg == null) { throw new ArgumentNullException("msg"); } Position = new ObjectPosition(Map, Map.Cells[msg.disposition.cellId], (DirectionsEnum)msg.disposition.direction); Update(msg.humanoidInfo); Name = msg.name; Look = msg.look; if (Alignement == null) { Alignement = new AlignmentInformations(msg.alignmentInfos); } else { Alignement.Update(msg.alignmentInfos); } }
public void Update(GameRolePlayCharacterInformations msg) { if (msg == null) { throw new ArgumentNullException("msg"); } Update(msg.disposition); Update(msg.humanoidInfo); Name = msg.name; Look = msg.look; if (Alignement == null) { Alignement = new AlignmentInformations(msg.alignmentInfos); } else { Alignement.Update(msg.alignmentInfos); } }
public void Update(GameFightCharacterInformations msg) { if (msg == null) { throw new ArgumentNullException("msg"); } //Id = msg.contextualId; //Look = msg.look; //Map = Fight.Map; //Update(msg.disposition); //IsAlive = msg.alive; Alignment = new AlignmentInformations(msg.alignmentInfos); Name = msg.name; Level = msg.level; if (Breed == null || Breed.Id != msg.breed) { Breed = new Breeds.Breed(ObjectDataManager.Instance.Get <Breed>(msg.breed, true)); } Stats.Update(msg.stats); }
public CharacterFighter(GameFightCharacterInformations msg, Fight fight) : base(msg, fight) { Alignment = new AlignmentInformations(msg.alignmentInfos); Breed = new Breeds.Breed(ObjectDataManager.Instance.Get <Breed>(msg.breed, true)); }