Пример #1
0
		public static void CreateTeleportNPC(NPCId id, Vector3 location, MapId regionId)
		{
			var spawn = new SpawnEntry
			{
				EntryId = id
			};
			spawn.FinalizeDataHolder();

			spawn.Spawned += npc =>
			{
				npc.Invulnerable++;
				npc.GossipMenu = WorldLocationMgr.CreateTeleMenu();
			};
		}
Пример #2
0
		/// <summary>
		/// Creates but doesn't add the SpawnEntry
		/// </summary>
		public SpawnEntry CreateSpawnEntry(Vector3 location, int amount, int minRespawnSeconds, int maxRespawnSeconds, bool autoSpawn)
		{
			var entry = new SpawnEntry
			{
				EntryId = NPCId,
				Entry = this,
				MaxAmount = amount,
				RespawnSecondsMin = minRespawnSeconds,
				RespawnSecondsMax = maxRespawnSeconds,
				AutoSpawn = autoSpawn
			};

			entry.FinalizeDataHolder();
			return entry;
		}