public ServerClient(NetConnection conn, ServerChampion champion) { Connection = conn; Champion = champion; ActionsPackage = new List<PlayerAction>(); LastAcknowledgedActionID = IDGenerator.NO_ID; AnimData = new ChampionAnimData(); ChampStats = new ChampionStats(100f); //TODO: depend on champion }
static void FillChampionInfo(NetBuffer msg, ICharacter champion, ChampionStats stats) { ulong id = champion.ID; float x = champion.Position.X; float y = champion.Position.Y; byte type = (byte)champion.Type; bool team = champion.Team == Teams.Left; float maxhp = stats.MaxHealth; float hp = stats.Health; msg.Write(id); msg.Write(x); msg.Write(y); msg.Write(type); msg.Write(team); msg.Write(maxhp); msg.Write(hp); }