public void Update(Player player) { SetEntityDataPacket pk = new SetEntityDataPacket(); pk.EntityRuntimeId = this.EntityID; pk.EntityData = this; player.SendPacket(pk); }
public void SendDataProperties() { SetEntityDataPacket pk = new SetEntityDataPacket(); pk.EntityRuntimeId = this.EntityID; pk.EntityData = this.DataProperties; if (this.IsPlayer) { List <Player> players = new List <Player>(this.Viewers); players.Add((Player)this); this.AsyncSendPacketPlayers(pk, players.ToArray()); } else { this.AsyncSendPacketPlayers(pk, this.Viewers); } }