Aura.Channel.Scripting.Scripts.NpcScript.SetRace C# (CSharp) Метод

SetRace() защищенный Метод

Sets NPC's race.
This must be the first setup method called, since it creates the NPC with its default settings.
protected SetRace ( int raceId ) : void
raceId int
Результат void
		protected void SetRace(int raceId)
		{
			if (this.NPC != null)
				throw new InvalidOperationException("The NPC has a race already.");

			this.NPC = new NPC(raceId);
			this.NPC.State = CreatureStates.Npc | CreatureStates.NamedNpc | CreatureStates.GoodNpc;

			this.SetAi("npc_normal");
		}