diff --git a/Carbonite.Notes/Locales/deDE.lua b/Carbonite.Notes/Locales/deDE.lua
index a8fb19c..3607fbe 100644
--- a/Carbonite.Notes/Locales/deDE.lua
+++ b/Carbonite.Notes/Locales/deDE.lua
@@ -44,6 +44,11 @@ L["Reset old notes data"] = "Alte Notizdaten zur\195\188cksetzen"
L["Display Handynotes On Map"] = "HandyNotes auf der Karte anzeigen"
L["If you have HandyNotes installed, allows them on the Carbonite map"] = "Falls das Addon HandyNotes installiert ist, werden sie Auf der Carbonite Karte angezeigt"
L["Handnotes Icon Size"] = "HandyNotes Symbolgr\195\182\195\159e"
+
+L["Display RareScanner icons On Map"] = true
+L["If you have RareScanner installed, allows it's icons on the Carbonite map"] = true
+L["RareScanner Icon Size"] = true
+
-- Keybinds
L["Carbonite Notes"] = "Carbonite Notizen"
L["NxTOGGLEFAV"] = "Notizen ein/ausblenden"
diff --git a/Carbonite.Notes/Locales/enUS.lua b/Carbonite.Notes/Locales/enUS.lua
index 3a4c121..d54ff04 100644
--- a/Carbonite.Notes/Locales/enUS.lua
+++ b/Carbonite.Notes/Locales/enUS.lua
@@ -41,6 +41,12 @@ L["Display Handynotes On Map"] = true
L["If you have HandyNotes installed, allows them on the Carbonite map"] = true
L["Handnotes Icon Size"] = true
+L["Display RareScanner icons On Map"] = true
+L["If you have RareScanner installed, allows it's icons on the Carbonite map"] = true
+L["RareScanner Icon Size"] = true
+
-- Keybinds
L["Carbonite Notes"] = "Carbonite Notes"
L["NxTOGGLEFAV"] = "show/hide Notes"
+
+
diff --git a/Carbonite.Notes/Locales/esES.lua b/Carbonite.Notes/Locales/esES.lua
index 9cd1a1a..fb9a22e 100644
--- a/Carbonite.Notes/Locales/esES.lua
+++ b/Carbonite.Notes/Locales/esES.lua
@@ -45,6 +45,10 @@ L["Display Handynotes On Map"] = true
L["If you have HandyNotes installed, allows them on the Carbonite map"] = true
L["Handnotes Icon Size"] = true
+L["Display RareScanner icons On Map"] = true
+L["If you have RareScanner installed, allows it's icons on the Carbonite map"] = true
+L["RareScanner Icon Size"] = true
+
-- Keybinds
L["Carbonite Notes"] = "Carbonite Notes"
L["NxTOGGLEFAV"] = "show/hide Notes"
diff --git a/Carbonite.Notes/Locales/esMX.lua b/Carbonite.Notes/Locales/esMX.lua
index 6864070..05692e0 100644
--- a/Carbonite.Notes/Locales/esMX.lua
+++ b/Carbonite.Notes/Locales/esMX.lua
@@ -45,6 +45,10 @@ L["Display Handynotes On Map"] = true
L["If you have HandyNotes installed, allows them on the Carbonite map"] = true
L["Handnotes Icon Size"] = true
+L["Display RareScanner icons On Map"] = true
+L["If you have RareScanner installed, allows it's icons on the Carbonite map"] = true
+L["RareScanner Icon Size"] = true
+
-- Keybinds
L["Carbonite Notes"] = "Carbonite Notes"
L["NxTOGGLEFAV"] = "show/hide Notes"
diff --git a/Carbonite.Notes/Locales/frFR.lua b/Carbonite.Notes/Locales/frFR.lua
index 5b1744b..899870a 100644
--- a/Carbonite.Notes/Locales/frFR.lua
+++ b/Carbonite.Notes/Locales/frFR.lua
@@ -45,6 +45,10 @@ L["Display Handynotes On Map"] = "Afficher Handynotes sur la Map"
L["If you have HandyNotes installed, allows them on the Carbonite map"] = "Si vous avez Handynotes install\195\169, autorise celui-ci \195\160 afficher sur la map Carbonite"
L["Handnotes Icon Size"] = "Taille de l'ic\195\180ne Handynotes"
+L["Display RareScanner icons On Map"] = true
+L["If you have RareScanner installed, allows it's icons on the Carbonite map"] = true
+L["RareScanner Icon Size"] = true
+
-- Keybinds
L["Carbonite Notes"] = "Carbonite Notes"
L["NxTOGGLEFAV"] = "Afficher/Cacher Notes"
diff --git a/Carbonite.Notes/Locales/itIT.lua b/Carbonite.Notes/Locales/itIT.lua
index b680e7e..09110cb 100644
--- a/Carbonite.Notes/Locales/itIT.lua
+++ b/Carbonite.Notes/Locales/itIT.lua
@@ -45,6 +45,10 @@ L["Display Handynotes On Map"] = true
L["If you have HandyNotes installed, allows them on the Carbonite map"] = true
L["Handnotes Icon Size"] = true
+L["Display RareScanner icons On Map"] = true
+L["If you have RareScanner installed, allows it's icons on the Carbonite map"] = true
+L["RareScanner Icon Size"] = true
+
-- Keybinds
L["Carbonite Notes"] = "Note Carbonite"
L["NxTOGGLEFAV"] = "mostra/nascondi Note"
diff --git a/Carbonite.Notes/Locales/koKR.lua b/Carbonite.Notes/Locales/koKR.lua
index 5717230..0e179d6 100644
--- a/Carbonite.Notes/Locales/koKR.lua
+++ b/Carbonite.Notes/Locales/koKR.lua
@@ -45,6 +45,10 @@ L["Display Handynotes On Map"] = true
L["If you have HandyNotes installed, allows them on the Carbonite map"] = true
L["Handnotes Icon Size"] = true
+L["Display RareScanner icons On Map"] = true
+L["If you have RareScanner installed, allows it's icons on the Carbonite map"] = true
+L["RareScanner Icon Size"] = true
+
-- Keybinds
L["Carbonite Notes"] = "Carbonite Notes"
L["NxTOGGLEFAV"] = "show/hide Notes"
diff --git a/Carbonite.Notes/Locales/locales.xml b/Carbonite.Notes/Locales/locales.xml
index 11a90c8..5e22d36 100644
--- a/Carbonite.Notes/Locales/locales.xml
+++ b/Carbonite.Notes/Locales/locales.xml
@@ -1,14 +1,14 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Carbonite.Notes/Locales/ptBR.lua b/Carbonite.Notes/Locales/ptBR.lua
index d180b03..0b2b0b8 100644
--- a/Carbonite.Notes/Locales/ptBR.lua
+++ b/Carbonite.Notes/Locales/ptBR.lua
@@ -45,6 +45,10 @@ L["Display Handynotes On Map"] = true
L["If you have HandyNotes installed, allows them on the Carbonite map"] = true
L["Handnotes Icon Size"] = true
+L["Display RareScanner icons On Map"] = true
+L["If you have RareScanner installed, allows it's icons on the Carbonite map"] = true
+L["RareScanner Icon Size"] = true
+
-- Keybinds
L["Carbonite Notes"] = "Carbonite Notes"
L["NxTOGGLEFAV"] = "show/hide Notes"
diff --git a/Carbonite.Notes/Locales/ruRU.lua b/Carbonite.Notes/Locales/ruRU.lua
index fff69cd..8436e2d 100644
--- a/Carbonite.Notes/Locales/ruRU.lua
+++ b/Carbonite.Notes/Locales/ruRU.lua
@@ -45,6 +45,10 @@ L["Display Handynotes On Map"] = "Показывать на карте отме
L["If you have HandyNotes installed, allows them on the Carbonite map"] = "Если у вас установлен плагин HandyNotes, то включение этого параметра отобразит иконки HandyNotes на карте"
L["Handnotes Icon Size"] = "Размер иконки HandyNotes"
+L["Display RareScanner icons On Map"] = "Показывать на карте отметки плагина RareScanner"
+L["If you have RareScanner installed, allows it's icons on the Carbonite map"] = "Если у вас установлен плагин RareScanner, то включение этого параметра отобразит иконки RareScanner на карте"
+L["RareScanner Icon Size"] = "Размер иконки RareScanner"
+
-- Keybinds
L["Carbonite Notes"] = "Заметки Carbonite"
L["NxTOGGLEFAV"] = "Показать/Скрыть Заметки"
diff --git a/Carbonite.Notes/Locales/zhCN.lua b/Carbonite.Notes/Locales/zhCN.lua
index 2d593ce..264de71 100644
--- a/Carbonite.Notes/Locales/zhCN.lua
+++ b/Carbonite.Notes/Locales/zhCN.lua
@@ -41,6 +41,10 @@ L["Display Handynotes On Map"] = "地图上显示Handynotes"
L["If you have HandyNotes installed, allows them on the Carbonite map"] = "允许Handynotes图标显示在Carbonite地图上"
L["Handnotes Icon Size"] = "Handynotes图标大小"
+L["Display RareScanner icons On Map"] = true
+L["If you have RareScanner installed, allows it's icons on the Carbonite map"] = true
+L["RareScanner Icon Size"] = true
+
-- Keybinds
L["Carbonite Notes"] = "Carbonite 标记模块"
L["NxTOGGLEFAV"] = "显示/隐藏标记"
diff --git a/Carbonite.Notes/Locales/zhTW.lua b/Carbonite.Notes/Locales/zhTW.lua
index 0c60dc6..80c267e 100644
--- a/Carbonite.Notes/Locales/zhTW.lua
+++ b/Carbonite.Notes/Locales/zhTW.lua
@@ -45,6 +45,10 @@ L["Display Handynotes On Map"] = true
L["If you have HandyNotes installed, allows them on the Carbonite map"] = true
L["Handnotes Icon Size"] = true
+L["Display RareScanner icons On Map"] = true
+L["If you have RareScanner installed, allows it's icons on the Carbonite map"] = true
+L["RareScanner Icon Size"] = true
+
-- Keybinds
L["Carbonite Notes"] = "Carbonite Notes"
L["NxTOGGLEFAV"] = "show/hide Notes"
diff --git a/Carbonite.Notes/NxFav.lua b/Carbonite.Notes/NxFav.lua
index c13efd7..81fad19 100644
--- a/Carbonite.Notes/NxFav.lua
+++ b/Carbonite.Notes/NxFav.lua
@@ -41,6 +41,8 @@ local defaults = {
ShowMap = true,
HandyNotes = true,
HandyNotesSize = 15,
+ RareScanner = true,
+ RareScannerSize = 32,
},
Addons = {
},
@@ -116,6 +118,57 @@ local function notesConfig()
return true
end,
},
+ rarescanner = {
+ order = 2,
+ type = "toggle",
+ width = "full",
+ name = L["Display RareScanner icons On Map"],
+ desc = L["If you have RareScanner installed, allows it's icons on the Carbonite map"],
+ get = function()
+ return Nx.fdb.profile.Notes.RareScanner
+ end,
+ set = function()
+ local map = Nx.Map:GetMap (1)
+ Nx.fdb.profile.Notes.RareScanner = not Nx.fdb.profile.Notes.RareScanner
+ if Nx.fdb.profile.Notes.RareScanner then
+ Nx.Notes:RareScanner(Nx.Map:GetCurrentMapAreaID())
+ else
+ map:ClearIconType("!RSR")
+ map:ClearIconType("!RSRC")
+ end
+ end,
+ disabled = function()
+ if RareScanner then
+ return false
+ end
+ return true
+ end,
+ },
+ raresize = {
+ order = 3,
+ type = "range",
+ width = "normal",
+ min = 10,
+ max = 60,
+ step = 5,
+ name = L["RareScanner Icon Size"],
+ get = function()
+ return Nx.fdb.profile.Notes.RareScannerSize
+ end,
+ set = function(input,value)
+ local map = Nx.Map:GetMap (1)
+ Nx.fdb.profile.Notes.RareScannerSize = value
+ map:ClearIconType("!RSR")
+ map:ClearIconType("!RSRC")
+ Nx.Notes:RareScanner(Nx.Map:GetCurrentMapAreaID())
+ end,
+ disabled = function()
+ if RareScanner then
+ return false
+ end
+ return true
+ end,
+ },
},
}
end
@@ -1521,6 +1574,7 @@ function Nx.Notes:UpdateIcons()
end
end
Nx.Notes:HandyNotes(mapId)
+ Nx.Notes:RareScanner(mapId)
--WorldMap_HijackTooltip(map.Frm)
GameTooltip:Hide()
end
@@ -1566,7 +1620,7 @@ function Nx.Notes:HandyNotes(mapId)
end
else
texture = iconpath
- end
+ end
local icon = CreateFrame("Frame", "HandyCarb", UIParent)
local tmpFrame = WorldMapFrame:GetCanvas()
icon:SetParent(tmpFrame)
@@ -1604,6 +1658,89 @@ function Nx.Notes:HandyNotes(mapId)
end
end
+function Nx.Notes:RareScanner(mapId)
+ local map = Nx.Map:GetMap (1)
+ if (Nx.fdb.profile.Notes.RareScanner and RareScanner) then
+ rspins = {}
+
+ local FROM_ON_SHOW = true
+ WorldMapFrame:RefreshAll(FROM_ON_SHOW)
+
+ for pin in WorldMapFrame:EnumeratePinsByTemplate("RSEntityPinTemplate") do
+ rspins[#rspins + 1] = pin
+ end
+
+ for pin in WorldMapFrame:EnumeratePinsByTemplate("RSOverlayTemplate") do
+ rspins[#rspins + 1] = pin
+ end
+
+ local level = nil
+
+ map:InitIconType ("!RSR", "WP", "", Nx.fdb.profile.Notes.RareScannerSize or 32, Nx.fdb.profile.Notes.RareScannerSize or 32)
+ map:SetIconTypeChop ("!RSR", true)
+ map:SetIconTypeLevel ("!RSR", 20)
+
+ map:InitIconType ("!RSRC", "WP", "", Nx.fdb.profile.Notes.RareScannerSize or 32, Nx.fdb.profile.Notes.RareScannerSize or 32)
+ map:SetIconTypeChop ("!RSRC", true)
+ map:SetIconTypeLevel ("!RSRC", 20)
+
+ for _,rspin in ipairs(rspins) do
+ if rspin.POI then
+ if rspin.POI.mapID == map.MapId then
+ local x = rspin.POI.x / 100
+ local y = rspin.POI.y / 100
+ local texture = rspin.POI.Texture
+ local scale = rspin.startScale
+ local wx, wy = Nx.Map:GetWorldPos(mapId,x,y)
+ local icon = CreateFrame("Button", "RSCarb", UIParent)
+ local tmpFrame = WorldMapFrame:GetCanvas()
+ icon:SetParent(tmpFrame)
+ icon:ClearAllPoints()
+ icon:SetHeight(scale)
+ icon:SetWidth(scale)
+ icon:SetPoint("CENTER", tmpFrame, "TOPLEFT", x*tmpFrame:GetWidth(), -y*tmpFrame:GetHeight())
+ local tooltip = rspin.POI.name
+ local tooltipName = "GameTooltip"
+ local rsnote = map:AddIconPt("!RSR", wx, wy, level, "FFFFFF", texture)
+ map:SetIconTip(rsnote,tooltip)
+ map:SetIconUserData(rsnote, rspin)
+ end
+ else
+ if rspin.pin.POI.mapID == map.MapId then
+ local x = rspin.normalizedX * 100
+ local y = rspin.normalizedY * 100
+ if (rspin.normalizedX ~= rspin.pin.normalizedX or rspin.normalizedY ~= rspin.pin.normalizedY) then
+ local texture = rspin.Texture:GetTexture()
+ local colr, colg, colb = rspin.Texture:GetVertexColor()
+ local color = "FFFFFF"
+ if colr and colg and colb then
+ IconColor = CreateColor(colr, colg, colb)
+ color = IconColor:GenerateHexColor()
+ end
+ if not texture then
+ texture = rspin.pin.POI.Texture
+ end
+ local scale = rspin.startScale
+ local wx, wy = Nx.Map:GetWorldPos(mapId,x,y)
+ local icon = CreateFrame("Button", "RSCarb", UIParent)
+ local tmpFrame = WorldMapFrame:GetCanvas()
+ icon:SetParent(tmpFrame)
+ icon:ClearAllPoints()
+ icon:SetHeight(scale)
+ icon:SetWidth(scale)
+ icon:SetPoint("CENTER", tmpFrame, "TOPLEFT", x*tmpFrame:GetWidth(), -y*tmpFrame:GetHeight())
+ local tooltip = rspin.pin.POI.name
+ local tooltipName = "GameTooltip"
+ local rsnote = map:AddIconPt("!RSRC", wx, wy, level, color, texture)
+ map:SetIconTip(rsnote,tooltip)
+ map:SetIconUserData(rsnote, rspin)
+ end
+ end
+ end
+ end
+ end
+end
+
---------------------------------------------------------------------------------------
function Nx.Notes:OnButToggleFav (but)
diff --git a/Carbonite/NxMap.lua b/Carbonite/NxMap.lua
index b20bc90..9d44d7c 100644
--- a/Carbonite/NxMap.lua
+++ b/Carbonite/NxMap.lua
@@ -149,6 +149,8 @@ function Nx.Map:Init()
self.Maps = {}
self.Created = false
+ self.RareScannerOverlays = {}
+
self:InitFuncs()
self:InitTables()
@@ -8601,7 +8603,6 @@ function Nx.Map:IconOnMouseDown (button)
map.ClickFrm = this
map.ClickType = this.NXType
map.ClickIcon = this.NXData
-
local shift = IsShiftKeyDown()
if button == "LeftButton" then
@@ -8638,7 +8639,13 @@ function Nx.Map:IconOnMouseDown (button)
end
else
- map.OnMouseDown (map.Frm, button)
+ if map.ClickIcon.iconType == "!RSR" and RareScanner then
+ local rspin = this.NXData.UData
+ rspin:OnMouseDown(button)
+ Nx.Notes:RareScanner(map.MapId)
+ else
+ map.OnMouseDown (map.Frm, button)
+ end
end
end