예제 #1
0
 public MonsterFighter(GameFightMonsterInformations 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;
     MonsterTemplate = DataProvider.Instance.Get<Monster>(msg.creatureGenericId);
     MonsterGrade = MonsterTemplate.grades[msg.creatureGrade];
     Stats = new MinimalStats(msg.stats);
 }
예제 #2
0
 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);
 }
예제 #3
0
    public Fighter(GameFightFighterInformations msg, Fight fight) : this()
        {
            Id = msg.contextualId;
            Fight = fight;
            Look = msg.look;
            Map = fight.Map;
            Update(msg.disposition);
            Team = fight.GetTeam((FightTeamColor) msg.teamId);
            IsAlive = msg.alive;
            Stats = new MinimalStats(msg.stats);
            Summoned = msg.stats.summoned;
            if (Summoned)
            {
                Summoner = Fight.GetActor(msg.stats.summoner);

                if (Summoner == null)
                    logger.Error("Summoner {0} of fighter {1} not found", msg.stats.summoner, this);
            }
        }