Thread Tools Display Modes
Prev Previous Post   Next Post Next
10/22/14, 09:14 PM   #1
SnowmanDK
 
SnowmanDK's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 161
Destinations custom pin problem

I guess I have been staring at this problem for too long as I can't see the problem. Hope some here can help

I am trying to add a custom pin for unknown wayshrines with a nearby guild trader using this code:
Lua Code:
  1. -- insert custom pin for wayshrines
  2.                         local data = GuildTraderDataStore[GetCurrentMapZoneIndex()]
  3.                         if not data then return end
  4.                         for _, pinData in ipairs(data) do
  5.                             local WAYSHRINE = pinData[GuildTraderDataIndex.WAYSHRINE]
  6.                             if WAYSHRINE == objectiveName then
  7.                                 table.insert(pinTag, 3, zo_strformat("|c666666<<t:1>>|r", GetString(POITYPE_GUILDTRADERS)))
  8.                                 LMP:SetLayoutKey(pinType, "texture", pinTextures.unknownrealpins[15])
  9.                                 LMP:CreatePin(pinType, pinTag, normalizedX, normalizedY)
  10.                                 break
  11.                             else
  12.                                 LMP:SetLayoutKey(pinType, "texture", pinTextures.unknownrealpins[1])
  13.                                 LMP:CreatePin(pinType, pinTag, normalizedX, normalizedY)
  14.                                 break
  15.                             end
  16.                         end
using these data (example):
Lua Code:
  1. ----Deshaan
  2.     [11] = {
  3.         {"Muth Gnaar Hills Wayshrine"},
  4.         {"Tal'Deic Grounds Wayshrine"},
  5.     },
For some reason it only returns the FIRST wayshrine on my list. It's the same on all maps. Only the first is returned, as if "GuildTraderDataIndex.WAYSHRINE" only reads the first, BUT it reads it as many times as there are wayshrines on the list, so the Deshaan example are returned twice, hence the "Break" command which makes it return only once.
What am I doing wrong?

Last edited by SnowmanDK : 10/22/14 at 09:16 PM.
  Reply With Quote
 

ESOUI » Developer Discussions » Lua/XML Help » Destinations custom pin problem


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off