예제 #1
0
 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);
 }
예제 #2
0
 public CharacterFighter(GameFightCharacterInformations msg, Map map, Fight fight)
 {
     Id = msg.contextualId;
     Fight = fight;
     Look = msg.look;
     Position = new ObjectPosition(map, msg.disposition);
     Team = fight.GetTeam((FightTeamColor) msg.teamId);
     IsAlive = msg.alive;
     Alignment = new AlignmentInformations(msg.alignmentInfos);
     Breed = DataProvider.Instance.Get<Breed>(msg.breed);
 }
예제 #3
0
        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);
        }
예제 #4
0
 public CharacterFighter(GameFightCharacterInformations msg, Fight fight)
 {
     Id = msg.contextualId;
     Fight = fight;
     Look = msg.look;
     Map = fight.Map;
     Update(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);
 }
예제 #5
0
        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);
        }
예제 #6
0
        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);
        }
예제 #7
0
        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);
        }
예제 #8
0
 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));            
 }