Ejemplo n.º 1
0
        public NPC SpawnAt(IWorldZoneLocation loc, bool hugGround = false)
        {
            var npc = Create(loc.Map.DifficultyIndex);

            npc.Zone = loc.GetZone();
            var pos = loc.Position;

            if (hugGround && InhabitType == InhabitType.Ground)
            {
                pos.Z = loc.Map.Terrain.GetGroundHeightUnderneath(pos);
            }
            loc.Map.AddObject(npc, pos);
            return(npc);
        }
Ejemplo n.º 2
0
        public NPC SpawnAt(IWorldZoneLocation loc, bool hugGround = false)
        {
            NPC npc = this.Create(loc.Map.DifficultyIndex);

            npc.Zone = loc.GetZone();
            Vector3 position = loc.Position;

            if (hugGround && this.InhabitType == InhabitType.Ground)
            {
                position.Z = loc.Map.Terrain.GetGroundHeightUnderneath(position);
            }
            loc.Map.AddObject((WorldObject)npc, position);
            return(npc);
        }
Ejemplo n.º 3
0
		public NPC SpawnAt(IWorldZoneLocation loc, bool hugGround = false)
		{
			var npc = Create(loc.Map.DifficultyIndex);
			npc.Zone = loc.GetZone();
			var pos = loc.Position;
			if (hugGround && InhabitType == InhabitType.Ground)
			{
				pos.Z = loc.Map.Terrain.GetGroundHeightUnderneath(pos);
			}
			loc.Map.AddObject(npc, pos);
			return npc;
		}
Ejemplo n.º 4
0
		public NPC Create(IWorldZoneLocation loc)
		{
			var npc = NPCCreator(this);
			npc.SetupNPC(this, null);
			npc.Zone = loc.GetZone();
			loc.Region.AddObject(npc, loc.Position);
			return npc;
		}
Ejemplo n.º 5
0
		public NPC SpawnAt(IWorldZoneLocation loc)
		{
			var npc = Create(loc.Region.DifficultyIndex);
			npc.SetupNPC(this, null);
			npc.Zone = loc.GetZone();
			loc.Region.AddObject(npc, loc.Position);
			return npc;
		}
Ejemplo n.º 6
0
		public NPC SpawnAt(IWorldZoneLocation loc)
		{
			var npc = Create(loc.Map.DifficultyIndex);
			npc.Zone = loc.GetZone();
			loc.Map.AddObject(npc, loc.Position);
			return npc;
		}