Mercurial > wow > bloodhound2
comparison Bloodhound2.lua @ 6:ee1d6e6a4c52 Release
Added in a function to fix the ghost rubies/arrows when in Shrine of Seven Stars
author | only1yzerman |
---|---|
date | Thu, 30 May 2013 07:07:05 -0400 |
parents | a10b7ef54e09 |
children | 8e81e24efb3f |
comparison
equal
deleted
inserted
replaced
5:a10b7ef54e09 | 6:ee1d6e6a4c52 |
---|---|
89 local c = GetCurrentMapContinent(); -- get current player position | 89 local c = GetCurrentMapContinent(); -- get current player position |
90 local z = GetCurrentMapZone(); | 90 local z = GetCurrentMapZone(); |
91 local x, y = GetPlayerMapPosition("player"); | 91 local x, y = GetPlayerMapPosition("player"); |
92 local f = GetPlayerFacing(); | 92 local f = GetPlayerFacing(); |
93 local m = Minimap:GetZoom(); | 93 local m = Minimap:GetZoom(); |
94 local ztxt = GetZoneText(); | |
95 local zstxt = GetSubZoneText(); | |
96 local badzones = { "","The Star's Bazaar", "The Emperor's Step", "The Golden Lantern", "Chamber of Reflection", "The Imperial Exchange", "Path of Serenity", "Ethereal Corridor", "The Celestial Vault", "Chamber of Enlightenment" } | |
94 SetMapZoom(cmap, zmap); | 97 SetMapZoom(cmap, zmap); |
95 | 98 |
96 if (c ~= player.C and c ~= 0 and c ~= -1) then -- reload continent data if continent has changed | 99 if (c ~= player.C and c ~= 0 and c ~= -1) then -- reload continent data if continent has changed |
97 Bloodhound2.HerbNodes, Bloodhound2.ContinentHerbs = Bloodhound2.ReloadNodes(Bloodhound2.HerbDatabase[c], Bloodhound2.ZoneDatum[c]); | 100 Bloodhound2.HerbNodes, Bloodhound2.ContinentHerbs = Bloodhound2.ReloadNodes(Bloodhound2.HerbDatabase[c], Bloodhound2.ZoneDatum[c]); |
98 Bloodhound2.OreNodes, Bloodhound2.ContinentOre = Bloodhound2.ReloadNodes(Bloodhound2.OreDatabase[c], Bloodhound2.ZoneDatum[c]); | 101 Bloodhound2.OreNodes, Bloodhound2.ContinentOre = Bloodhound2.ReloadNodes(Bloodhound2.OreDatabase[c], Bloodhound2.ZoneDatum[c]); |
99 Bloodhound2.MiscNodes, Bloodhound2.ContinentNode = Bloodhound2.ReloadNodes(Bloodhound2.MiscDatabase[c], Bloodhound2.ZoneDatum[c]); | 102 Bloodhound2.MiscNodes, Bloodhound2.ContinentNode = Bloodhound2.ReloadNodes(Bloodhound2.MiscDatabase[c], Bloodhound2.ZoneDatum[c]); |
100 end | 103 end |
104 | |
101 | 105 |
102 if (c ~= player.C or z ~= player.Z or x ~= player.X or y ~= player.Y or f ~= player.F or m ~= lastzoom) then | 106 if (c ~= player.C or z ~= player.Z or x ~= player.X or y ~= player.Y or f ~= player.F or m ~= lastzoom) then |
103 player.C = c; | 107 player.C = c; |
104 player.Z = z; | 108 player.Z = z; |
105 player.X = x; | 109 player.X = x; |
128 end | 132 end |
129 end | 133 end |
130 end | 134 end |
131 end | 135 end |
132 end | 136 end |
137 function Bloodhound2.BadZone(ztxt, zstxt, badzones) | |
138 for tbl, value in pairs(badzones) do | |
139 if (ztxt == "Shrine of Seven Stars" or zstxt == value) then return false | |
140 end | |
141 end | |
142 return true | |
143 end | |
133 | 144 |
134 function Bloodhound2.UpdateMinimap() | 145 function Bloodhound2.UpdateMinimap() |
135 local facing = 0 | 146 local facing = 0 |
136 | 147 |
137 if GetCVar("rotateMinimap") ~= "0" then | 148 if GetCVar("rotateMinimap") ~= "0" then |
280 | 291 |
281 local c = player.C; -- get player position | 292 local c = player.C; -- get player position |
282 local z = player.Z; | 293 local z = player.Z; |
283 local x = player.X; | 294 local x = player.X; |
284 local y = player.Y; | 295 local y = player.Y; |
285 | 296 local ztxt = GetZoneText(); |
297 local zstxt = GetSubZoneText(); | |
298 local badzones = { "The Star's Bazaar", "The Emperor's Step", "The Golden Lantern", "Chamber of Reflection", "The Imperial Exchange", "Path of Serenity", "Ethereal Corridor", "The Celestial Vault", "Chamber of Enlightenment" } | |
299 | |
300 if (Bloodhound2.BadZone(ztxt, zstxt, badzones) == false) then return 0,0 end -- don't draw the arrow when inside Shrine of Seven Stars | |
286 if c == 0 or z == 0 or c == -1 then return 0,0 end -- don't draw arrow if using world coordinates | 301 if c == 0 or z == 0 or c == -1 then return 0,0 end -- don't draw arrow if using world coordinates |
287 if not Bloodhound2.ZoneDatum then return 0,0 end | 302 if not Bloodhound2.ZoneDatum then return 0,0 end |
288 | 303 |
289 local datum = Bloodhound2.ZoneDatum[c][z]; -- get scale and offset for current zone map | 304 local datum = Bloodhound2.ZoneDatum[c][z]; -- get scale and offset for current zone map |
290 if datum == nil then return 0,0 end | 305 if datum == nil then return 0,0 end |