public override void Update(GameFightFighterInformations informations)
        {
            if (informations == null) throw new ArgumentNullException("informations");

            if (informations is GameFightCharacterInformations)
            {
                Update(informations as GameFightCharacterInformations);
            }
            else
            {
                logger.Error("Cannot update a {0} with a {1} instance", GetType(), informations.GetType());
                base.Update(informations);
            }
        }
Example #2
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);
            }
        }
Example #3
0
 public virtual void Update(GameFightFighterInformations informations)
 {
     IsAlive = informations.alive;
     Stats.Update(informations.stats);
     Update(informations.disposition);
 }