protected void SetPortrait(string name) { if (this.NPC == null) throw new InvalidOperationException("NPC's race has to be set first."); this.NPC.DialogPortrait = name; }