예제 #1
0
		protected SpawnEditorMenu(MapEditor editor, NPCSpawnPoint spawnPoint, EditorFigurine figurine)
		{
			Editor = editor;
			SpawnPoint = spawnPoint;
			Figurine = figurine;
			KeepOpen = true;
		}
예제 #2
0
 protected SpawnEditorMenu(MapEditor editor, NPCSpawnPoint spawnPoint, EditorFigurine figurine)
 {
     this.Editor     = editor;
     this.SpawnPoint = spawnPoint;
     this.Figurine   = figurine;
     this.KeepOpen   = true;
 }
예제 #3
0
        ///// <summary>
        ///// Whether to also spawn a DO to make this Figurine appear clearer
        ///// </summary>
        //[NotVariable]
        //public static bool AddDecoMarker = true;

        public SpawnPointFigurine(MapEditor editor, NPCSpawnPoint spawnPoint)
            : base(editor, spawnPoint)
        {
            m_position = spawnPoint.Position;

            NPCFlags = NPCFlags.Gossip;
        }
예제 #4
0
파일: NPC.cs 프로젝트: 0xFh/Asda2-Project
        protected internal virtual void SetupNPC(NPCEntry entry, NPCSpawnPoint spawnPoint)
        {
            NPCSpawnEntry spawnEntry;

            if (spawnPoint != null)
            {
                // Spawn-specific information
                spawnEntry    = spawnPoint.SpawnEntry;
                m_spawnPoint  = spawnPoint;
                Phase         = spawnEntry.Phase;
                m_orientation = spawnEntry.Orientation;


                if (spawnEntry.DisplayIdOverride != 0)
                {
                    DisplayId = spawnEntry.DisplayIdOverride;
                }
            }
            else
            {
                Phase = 1;
                if (entry.SpawnEntries == null)
                {
                    entry.SpawnEntries = new List <NPCSpawnEntry>(3);
                }
                spawnEntry = entry.FirstSpawnEntry;
            }

            GenerateId(entry.Id);

            SetEntry(entry);
        }
예제 #5
0
		///// <summary>
		///// Whether to also spawn a DO to make this Figurine appear clearer
		///// </summary>
		//[NotVariable]
		//public static bool AddDecoMarker = true;

		public SpawnPointFigurine(MapEditor editor, NPCSpawnPoint spawnPoint)
			: base(editor, spawnPoint)
		{
			m_position = spawnPoint.Position;

			NPCFlags = NPCFlags.Gossip;
		}
예제 #6
0
        public NPC Create(NPCSpawnPoint spawn)
        {
            var npc = NPCCreator(GetEntry(spawn.Map.DifficultyIndex));

            npc.SetupNPC(this, spawn);
            return(npc);
        }
예제 #7
0
 protected SpawnEditorMenu(MapEditor editor, NPCSpawnPoint spawnPoint, EditorFigurine figurine)
 {
     Editor     = editor;
     SpawnPoint = spawnPoint;
     Figurine   = figurine;
     KeepOpen   = true;
 }
예제 #8
0
		public WaypointFigurine(MapEditor editor, NPCSpawnPoint spawnPoint, WaypointEntry wp)
			: base(editor, spawnPoint)
		{	
			m_Waypoint = wp;

			//GossipMenu = m_SpawnPoint.GossipMenu;
			NPCFlags = NPCFlags.Gossip;
		}
예제 #9
0
 public SpawnPointEditorMenu(MapEditor editor, NPCSpawnPoint spawnPoint, EditorFigurine figurine)
     : base(editor, spawnPoint, figurine)
 {
     this.AddItem((GossipMenuItemBase) new LocalizedGossipMenuItem(
                      (GossipActionHandler)(convo => this.MoveTo(convo.Character)),
                      RealmLangKey.EditorSpawnPointMenuMoveOverHere, new object[0]));
     this.AddQuitMenuItem(RealmLangKey.Done);
 }
예제 #10
0
 public SpawnPointEditorMenu(MapEditor editor, NPCSpawnPoint spawnPoint, EditorFigurine figurine)
     : base(editor, spawnPoint, figurine)
 {
     AddItem(new LocalizedGossipMenuItem(
                 convo => MoveTo(convo.Character),
                 RealmLangKey.EditorSpawnPointMenuMoveOverHere));
     AddQuitMenuItem(RealmLangKey.Done);
 }
예제 #11
0
        public WaypointFigurine(MapEditor editor, NPCSpawnPoint spawnPoint, WaypointEntry wp)
            : base(editor, spawnPoint)
        {
            m_Waypoint = wp;

            //GossipMenu = m_SpawnPoint.GossipMenu;
            NPCFlags = NPCFlags.Gossip;
        }
    static void DrawHandles(NPCSpawnPoint spawnPoint, GizmoType gizmoType)
    {
        Handles.color = Color.yellow;
        Handles.DrawWireCube(spawnPoint.transform.position, new Vector2(1f, 2f));
        GUIStyle guiStyle = GUI.skin.GetStyle("Label");

        guiStyle.alignment = TextAnchor.MiddleCenter;
        Handles.Label(spawnPoint.transform.position, spawnPoint.CurrentNpcStruct.nameKor, guiStyle);
    }
예제 #13
0
		public SpawnFigurine(NPCSpawnPoint spawnPoint)
			: base(spawnPoint.SpawnEntry.Entry)
		{
			m_SpawnPoint = spawnPoint;
			m_position = spawnPoint.SpawnEntry.Position;

			//GossipMenu = m_SpawnPoint.GossipMenu;
			NPCFlags = NPCFlags.Gossip;
		}
예제 #14
0
        public SpawnPointEditorMenu(MapEditor editor, NPCSpawnPoint spawnPoint, EditorFigurine figurine)
            : base(editor, spawnPoint, figurine)
        {
            AddItem(new LocalizedGossipMenuItem(convo => MoveTo(convo.Character),
                //convo => ,
                                                RealmLangKey.EditorSpawnPointMenuMoveOverHere));

            AddQuitMenuItem();
        }
예제 #15
0
		public WaypointFigurine(NPCSpawnPoint spawnPoint, WaypointEntry wp)
			: base(spawnPoint.SpawnEntry.Entry)
		{	
			m_SpawnPoint = spawnPoint;
			m_Waypoint = wp;
			m_position = wp.Position;

			//GossipMenu = m_SpawnPoint.GossipMenu;
			NPCFlags = NPCFlags.Gossip;
		}
 void OnEnable()
 {
     data           = Resources.Load <NPCData>("Data/ScriptableObject/NPC").LoadAll().NPC;
     spawnPoint     = (NPCSpawnPoint)target;
     npcStructIndex = serializedObject.FindProperty("npcStructIndex");
     npcDir         = serializedObject.FindProperty("dir");
     spawnOnAwake   = serializedObject.FindProperty("spawnOnAwake");
     npcCategory    = data.Select(I => I.nameKor).ToArray();
     spawnPoint.tag = "NPC Spawn Point";
     selectNPCInt   = npcStructIndex.intValue;
 }
예제 #17
0
파일: Vehicle.cs 프로젝트: MeaNone/WCell
		protected internal override void SetupNPC(NPCEntry entry, NPCSpawnPoint spawnPoint)
		{
			base.SetupNPC(entry, spawnPoint);

			NPCFlags = NPCFlags.SpellClick;
			SetupSeats();

			AddMessage(() =>
			{
				// Set Level/Scale ingame:
				var level = entry.GetRandomLevel();
				Level = level;
			});
		}
예제 #18
0
        public TestBrain(NPC owner)
            : base((Unit)owner)
        {
            NPCSpawnPoint spawnPoint = owner.SpawnPoint;

            if (spawnPoint == null)
            {
                return;
            }
            NPCSpawnEntry spawnEntry = spawnPoint.SpawnEntry;

            if (spawnEntry == null)
            {
                return;
            }
            this.m_waypoints = spawnEntry.Waypoints;
        }
예제 #19
0
 protected internal override void SetupNPC(NPCEntry entry, NPCSpawnPoint spawnPoint)
 {
     base.SetupNPC(entry, spawnPoint);
     NPCFlags = NPCFlags.SpellClick;
     SetupSeats();
     SetupMoveFlags();
     AddMessage(() =>
     {
         Level     = entry.GetRandomLevel();
         PowerType = PowerType.Energy;
         MaxPower  = entry.VehicleEntry.PowerType == VehiclePowerType.Pyrite ? 50 : 100;
         Power     = MaxPower;
         if (entry.Spells != null)
         {
             return;
         }
         PowerType = PowerType.End;
     });
 }
    public bool SetNpoId(int npo_id)
    {
        if (!_initialized)
        {
            return(false);
        }

        SpawnDataSource sds = PeCustomScene.Self.spawnData;

        if (sds.ContainMonster(npo_id))
        {
            MonsterSpawnPoint msp = sds.GetMonster(npo_id);
            if (msp.agent != null && msp.agent.entity != null)
            {
                npoEntity = msp.agent.entity;
            }
        }
        else if (sds.ContainNpc(npo_id))
        {
            NPCSpawnPoint nsp = sds.GetNpc(npo_id);
            if (nsp.agent != null && nsp.agent.entity != null)
            {
                npoEntity = nsp.agent.entity;
            }
        }

        if (npoEntity != null)
        {
            npoId = npo_id;

            npcSpeechBox.SetNpcInfo(npoEntity.ExtGetName(), npoEntity.ExtGetFaceIconBig());

            return(true);
        }
        else
        {
            npoId = -1;
            npcSpeechBox.SetNpcInfo("", "Null");
        }

        return(false);
    }
예제 #21
0
		protected EditorFigurine(MapEditor editor, NPCSpawnPoint spawnPoint)
		{
			if (_sharedAuras == null)
			{
				_sharedAuras = new AuraCollection(this);
			}

			m_auras = _sharedAuras;
			Editor = editor;
			m_SpawnPoint = spawnPoint;

			var entry = m_SpawnPoint.SpawnEntry.Entry;
			GenerateId(entry.Id);

			UnitFlags = UnitFlags.SelectableNotAttackable | UnitFlags.Possessed;
			DynamicFlags = UnitDynamicFlags.TrackUnit;
			EmoteState = EmoteType.StateDead;
			NPCFlags |= NPCFlags.Gossip;
			Model = entry.GetRandomModel();
			EntryId = entry.Id;

			// speed must be > 0
			// because of the way the client works
			const float speed = 1f;
			m_runSpeed = speed;
			m_swimSpeed = speed;
			m_swimBackSpeed = speed;
			m_walkSpeed = speed;
			m_walkBackSpeed = speed;
			m_flightSpeed = speed;
			m_flightBackSpeed = speed;

			SetInt32(UnitFields.MAXHEALTH, int.MaxValue);
			SetInt32(UnitFields.BASE_HEALTH, int.MaxValue);
			SetInt32(UnitFields.HEALTH, int.MaxValue);

			// just make a smaller version of the creature to be spawned
			SetFloat(ObjectFields.SCALE_X, entry.Scale * DefaultScale);

			m_evades = true;
		}
예제 #22
0
파일: Vehicle.cs 프로젝트: KroneckerX/WCell
		protected internal override void SetupNPC(NPCEntry entry, NPCSpawnPoint spawnPoint)
		{
			base.SetupNPC(entry, spawnPoint);

			NPCFlags = NPCFlags.SpellClick;
			SetupSeats();

			SetupMoveFlags();

			AddMessage(() =>
			{
				// Set Level/Scale ingame:
				var level = entry.GetRandomLevel();
				Level = level;
				PowerType = PowerType.Energy;
				MaxPower = entry.VehicleEntry.PowerType == VehiclePowerType.Pyrite ? 50 : 100;
				Power = MaxPower;
				if (entry.Spells == null)
					PowerType = PowerType.End;
			});
		}
    public bool SetNpoId(int npo_id)
    {
        SpawnDataSource sds = PeCustomScene.Self.spawnData;

        if (sds.ContainMonster(npo_id))
        {
            MonsterSpawnPoint msp = sds.GetMonster(npo_id);
            if (msp.agent != null && msp.agent.entity != null)
            {
                npoEntity = msp.agent.entity;
            }
        }
        else if (sds.ContainNpc(npo_id))
        {
            NPCSpawnPoint nsp = sds.GetNpc(npo_id);
            if (nsp.agent != null && nsp.agent.entity != null)
            {
                npoEntity = nsp.agent.entity;
            }
        }

        if (npoEntity != null)
        {
            npoId = npo_id;

            npcDialogWnd.SetNPCInfo(npoEntity.ExtGetName(), npoEntity.ExtGetFaceIcon());

            refreshQuestsNow = true;

            return(true);
        }
        else
        {
            npoId = -1;
            npcDialogWnd.SetNPCInfo("", "Null");
        }

        return(false);
    }
예제 #24
0
파일: NPC.cs 프로젝트: ebakkedahl/WCell
        protected internal virtual void SetupNPC(NPCEntry entry, NPCSpawnPoint spawnPoint)
        {
            NPCSpawnEntry spawnEntry;
            if (spawnPoint != null)
            {
                // Spawn-specific information
                spawnEntry = spawnPoint.SpawnEntry;
                m_spawnPoint = spawnPoint;
                Phase = spawnEntry.Phase;
                m_orientation = spawnEntry.Orientation;

                if (spawnEntry.DisplayIdOverride != 0)
                {
                    DisplayId = spawnEntry.DisplayIdOverride;
                }
            }
            else
            {
                Phase = 1;
                spawnEntry = entry.FirstSpawnEntry;
            }

            GenerateId(entry.Id);

            SetEntry(entry);
        }
예제 #25
0
 protected EditorFigurine(MapEditor editor, NPCSpawnPoint spawnPoint) :
     base(spawnPoint.SpawnEntry.Entry.NPCId)
 {
     Editor = editor;
     m_SpawnPoint = spawnPoint;
 }
예제 #26
0
		public NPC Create(NPCSpawnPoint spawn)
		{
			var npc = NPCCreator(GetEntry(spawn.Map.DifficultyIndex));
			npc.SetupNPC(this, spawn);
			return npc;
		}
예제 #27
0
 private void SpawnNPC(NPCSpawnPoint destination)
 {
     GameObject ship = Instantiate(shipPrefabs[Random.Range(0, shipPrefabs.Length - 1)], transform.position, transform.rotation) as GameObject;
     AINavigator shipNav = ship.GetComponent<AINavigator>();
 }
예제 #28
0
 public WaypointFigurine(MapEditor editor, NPCSpawnPoint spawnPoint, WaypointEntry wp)
     : base(editor, spawnPoint)
 {
     this.m_Waypoint = wp;
     this.NPCFlags   = NPCFlags.Gossip;
 }
예제 #29
0
 public WaypointEditorMenu(MapEditor editor, NPCSpawnPoint spawnPoint, EditorFigurine figurine)
     : base(editor, spawnPoint, figurine)
 {
 }
예제 #30
0
 private void SpawnNPC(NPCSpawnPoint destination)
 {
     GameObject  ship    = Instantiate(shipPrefabs[Random.Range(0, shipPrefabs.Length - 1)], transform.position, transform.rotation) as GameObject;
     AINavigator shipNav = ship.GetComponent <AINavigator>();
 }
예제 #31
0
		//private readonly NPCSpawnPoint m_point;

		//public WaypointEditorMenu(NPCSpawnPoint point)
		//    : base(point.SpawnEntry.Entry.NameGossipId)
		//{
		//    m_point = point;

		//    KeepOpen = true;

		//    AddItem(new GossipMenuItem("Go to Spawn", HandleTeleport));
		//    AddItem(new GossipMenuItem("Remove Spawn", HandleRemove,
		//        "This will remove the Spawn with all its Waypoints (" + m_point.SpawnEntry.Entry + ")"));

		//    AddItem(new GossipMenuItem("Waypoint List", WPMenu = CreateWaypointMenu()));
		//    AddItem(new GossipMenuItem("Add new Wapyoint", HandleAddWP));

		//    AddQuitMenuItem();
		//}

		///// <summary>
		///// The Waypoint-submenu
		///// </summary>
		//public GossipMenu WPMenu
		//{
		//    get;
		//    internal set;
		//}

		///// <summary>
		///// Returns the GossipMenuItem of the given Waypoint from this menu
		///// </summary>
		///// <param name="wp"></param>
		//public void RemoveWPItem(WaypointEntry wp)
		//{
		//    foreach (var item in WPMenu.GossipItems)
		//    {
		//        if (item is WPItem && ((WPItem)item).Wp == wp)
		//        {
		//            WPMenu.GossipItems.Remove(item);
		//            return;
		//        }
		//    }
		//}

		///// <summary>
		///// Creates and returns the sub-menu for Waypoints
		///// </summary>
		///// <returns></returns>
		//private GossipMenu CreateWaypointMenu()
		//{
		//    var menu = new GossipMenu(m_point.SpawnEntry.Entry.NameGossipId);

		//    menu.AddGoBackItem("Go back...");
		//    foreach (var wp in m_point.SpawnEntry.Waypoints)
		//    {
		//        menu.AddItem(new WPItem(m_point, wp));
		//    }
		//    menu.AddQuitMenuItem();
		//    return menu;
		//}

		///// <summary>
		///// Handle what happens when clicking on the Teleport option
		///// </summary>
		//void HandleTeleport(GossipConversation convo)
		//{
		//    convo.Character.TeleportTo(m_point);
		//}

		///// <summary>
		///// Handle what happens when clicking on the Remove option
		///// </summary>
		//private void HandleRemove(GossipConversation convo)
		//{
		//    m_point.RemoveSpawnLater();
		//}

		///// <summary>
		///// Handle what happens when clicking on the Add WP button
		///// </summary>
		//private void HandleAddWP(GossipConversation convo)
		//{
		//    var chr = convo.Character;
		//    m_point.InsertAfter(null, chr.Position, chr.Orientation);
		//}

		//public NPCSpawnPoint Point
		//{
		//    get { return m_point; }
		//}

		///// <summary>
		///// A GossipMenuItem for each Waypoint
		///// </summary>
		//public class WPItem : GossipMenuItem
		//{
		//    private readonly NPCSpawnPoint m_Point;
		//    private WaypointEntry m_wp;

		//    public WPItem(NPCSpawnPoint point, WaypointEntry wp)
		//    {
		//        m_Point = point;
		//        m_wp = wp;
		//        Text = "WP #" + wp.Id;

		//        SubMenu = new GossipMenu(point.SpawnEntry.Entry.NameGossipId);
		//        SubMenu.AddGoBackItem();
		//        SubMenu.AddRange(
		//            new GossipMenuItem("Go to Point" + Text, HandleGoto),
		//            new GossipMenuItem("Remove", HandleRemove),
		//            new GossipMenuItem("Move Point here", HandleMoveOver),
		//            new GossipMenuItem("Insert New", HandleInsert));
		//    }

		//    public WaypointEntry Wp
		//    {
		//        get { return m_wp; }
		//    }

		//    public NPCSpawnPoint Point
		//    {
		//        get { return m_Point; }
		//    }

		//    /// <summary>
		//    /// Go to the WP
		//    /// </summary>
		//    void HandleGoto(GossipConversation convo)
		//    {
		//        convo.Character.TeleportTo(m_Point.Map, m_wp.Position);
		//    }

		//    /// <summary>
		//    /// Remove the WP
		//    /// </summary>
		//    void HandleRemove(GossipConversation convo)
		//    {
		//        m_Point.RemoveWP(m_wp);

		//        // the WP is now gone, so let's send the Menu again (without this Item in it)
		//        convo.Invalidate();
		//    }

		//    /// <summary>
		//    /// Move the Waypoint over to the Character
		//    /// </summary>
		//    void HandleMoveOver(GossipConversation convo)
		//    {
		//        m_Point.MoveWP(m_wp, convo.Character.Position);
		//    }

		//    /// <summary>
		//    /// Insert a new WP
		//    /// </summary>
		//    void HandleInsert(GossipConversation convo)
		//    {
		//        m_Point.InsertAfter(m_wp, convo.Character.Position, convo.Character.Orientation);
		//    }
		//}
		public WaypointEditorMenu(MapEditor editor, NPCSpawnPoint spawnPoint, EditorFigurine figurine) : base(editor, spawnPoint, figurine)
		{
		}
예제 #32
0
 protected EditorFigurine(MapEditor editor, NPCSpawnPoint spawnPoint)
     : base(spawnPoint.SpawnEntry.Entry.NPCId)
 {
     this.Editor       = editor;
     this.m_SpawnPoint = spawnPoint;
 }