protected void SetId(long entityId) { if (this.NPC == null) throw new InvalidOperationException("NPC's race has to be set first."); this.NPC.EntityId = entityId; }