Ejemplo n.º 1
0
		public EOChatBubble(NPCRenderer following)
			: base(EOGame.Instance)
		{
			m_ref = following;
			m_isChar = false;
			DrawOrder = following.NPC.Index + (int)ControlDrawLayer.BaseLayer + 1; //use index for draw order
			_initLabel();
			Visible = false;
			EOGame.Instance.Components.Add(this);
		}
Ejemplo n.º 2
0
		public static void Show(PacketAPI api, NPCRenderer shopKeeper)
		{
			if (Instance != null)
				return;

			Instance = new ShopDialog(api, shopKeeper.NPC.Data.ID);

			//request from server is based on the map index
			if (!api.RequestShop(shopKeeper.NPC.Index))
			{
				Instance.Close();
				Instance = null;
				EOGame.Instance.DoShowLostConnectionDialogAndReturnToMainMenu();
			}
		}
Ejemplo n.º 3
0
		public EONPCSpriteSheet(INativeGraphicsManager gfxManager, NPCRenderer npcToWatch)
		{
			_gfxManager = gfxManager;
			_npcRenderer = npcToWatch;
		}
Ejemplo n.º 4
0
		public void AddOtherNPC(NPCData data)
		{
			lock (_npcListLock)
			{
				var fileData = World.Instance.ENF.GetNPCRecordByID(data.ID);
				NPCRenderer newNpcRenderer = new NPCRenderer(new NPC(data, fileData));
				newNpcRenderer.Initialize();
				newNpcRenderer.Visible = true;
				_npcRenderers.Add(newNpcRenderer);
			}
		}
Ejemplo n.º 5
0
		private void _renderSpellOnNPC(short spellID, NPCRenderer renderer)
		{
			if (spellID < 1) return;

			var spellInfo = World.Instance.ESF.GetSpellRecordByID(spellID);
			renderer.ShowSpellAnimation(spellInfo.Graphic);
		}