2.0.2 - add fishing
This commit is contained in:
@@ -1,10 +1,10 @@
|
|||||||
## Interface: 11200
|
## Interface: 11200
|
||||||
## Title: LevelRange [|cff3fcf26Turtle|r]
|
## Title: LevelRange [|cff3fcf26Turtle|r]
|
||||||
## Version: 1.0.0
|
## Version: 2.0.2
|
||||||
## Author: Bull3t
|
## Author: Bull3t, Tenyar97, rado-boy
|
||||||
## Notes: Shows the zone level range on the World Map. Now with 100% more turtles!
|
## Notes: Shows the zone level range on the World Map. Now with 100% more turtles!
|
||||||
## eMail: bull3t@ntlworld.com
|
## eMail: bob@example.com
|
||||||
## URL: http://bull3t.blogspot.com
|
## URL: https://github.com/Tenyar97/LevelRange-Turtle
|
||||||
## DefaultState: Enabled
|
## DefaultState: Enabled
|
||||||
## LoadOnDemand: 0
|
## LoadOnDemand: 0
|
||||||
## OptionalDeps: myAddOns
|
## OptionalDeps: myAddOns
|
||||||
|
|||||||
+112
-9
@@ -20,23 +20,23 @@
|
|||||||
LEVELRANGE_NAME = "LevelRange"
|
LEVELRANGE_NAME = "LevelRange"
|
||||||
|
|
||||||
-- Version Number
|
-- Version Number
|
||||||
LEVELRANGE_VERSION = "2.0.1";
|
LEVELRANGE_VERSION = "2.0.2";
|
||||||
|
|
||||||
-- Details
|
-- Details
|
||||||
Details = {
|
Details = {
|
||||||
name = LEVELRANGE_NAME,
|
name = LEVELRANGE_NAME,
|
||||||
version = LEVELRANGE_VERSION,
|
version = LEVELRANGE_VERSION,
|
||||||
releaseDate = "June 30, 2023",
|
releaseDate = "Aug 8, 2023",
|
||||||
author = "Bull3t, Tenyar97",
|
author = "Bull3t, Tenyar97, rado-boy",
|
||||||
email = "",
|
email = "",
|
||||||
website = "https://github.com/Tenyar97/LevelRange-Turtle",
|
website = "https://github.com/Tenyar97/LevelRange-Turtle",
|
||||||
category = MYADDONS_CATEGORY_MAP,
|
category = MYADDONS_CATEGORY_MAP,
|
||||||
optionsframe = "LevelRangeOptionsFrame"
|
optionsframe = "LevelRangeOptionsFrame"
|
||||||
};
|
};
|
||||||
|
|
||||||
-- Help
|
-- Help
|
||||||
Help = {
|
Help = {
|
||||||
[1] = LEVELRANGE_HELP0 .. "\n" .. LEVELRANGE_HELP1 .. "\n" .. LEVELRANGE_HELP2 .. "\n" .. LEVELRANGE_HELP3 .. "\n" .. LEVELRANGE_HELP4 .. "\n" .. LEVELRANGE_HELP5,
|
[1] = LEVELRANGE_HELP0 .. "\n" .. LEVELRANGE_HELP1 .. "\n" .. LEVELRANGE_HELP2 .. "\n" .. LEVELRANGE_HELP3 .. "\n" .. LEVELRANGE_HELP4 .. "\n" .. LEVELRANGE_HELP5 .. "\n" .. LEVELRANGE_HELP6,
|
||||||
};
|
};
|
||||||
|
|
||||||
-- Player Info
|
-- Player Info
|
||||||
@@ -120,6 +120,61 @@ LEVELRANGE_RANGES = {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
-- Fishing Level Requirements
|
||||||
|
LEVELRANGE_FISHING = {
|
||||||
|
[LEVELRANGE_ELWYNN] = {25},
|
||||||
|
[LEVELRANGE_DUNMOROGH] = {25},
|
||||||
|
[LEVELRANGE_TIRISFAL] = {25},
|
||||||
|
[LEVELRANGE_LOCHMODAN] = {75},
|
||||||
|
[LEVELRANGE_SILVERPINE] = {75},
|
||||||
|
[LEVELRANGE_WESTFALL] = {75},
|
||||||
|
[LEVELRANGE_REDRIDGE] = {150},
|
||||||
|
[LEVELRANGE_DUSKWOOD] = {150},
|
||||||
|
[LEVELRANGE_HILLSBRAD] = {150},
|
||||||
|
[LEVELRANGE_WETLANDS] = {150},
|
||||||
|
[LEVELRANGE_ALTERAC] = {225},
|
||||||
|
[LEVELRANGE_ARATHI] = {225},
|
||||||
|
[LEVELRANGE_STRANGLETHORN] = {225},
|
||||||
|
[LEVELRANGE_BADLANDS] = {35},
|
||||||
|
[LEVELRANGE_SORROWS] = {225},
|
||||||
|
[LEVELRANGE_HINTERLANDS] = {300},
|
||||||
|
--[LEVELRANGE_SEARINGGORGE] = {0},
|
||||||
|
--[LEVELRANGE_BLASTEDLANDS] = {0},
|
||||||
|
--[LEVELRANGE_BURNINGSTEPPE] = {0},
|
||||||
|
[LEVELRANGE_WESTERNPLAGUE] = {300},
|
||||||
|
--[LEVELRANGE_EASTERNPLAGUE] = {0},
|
||||||
|
--[LEVELRANGE_DEADWINDPASS] = {0},
|
||||||
|
|
||||||
|
[LEVELRANGE_DUROTAR] = {25},
|
||||||
|
[LEVELRANGE_MULGORE] = {25},
|
||||||
|
[LEVELRANGE_DARKSHORE] = {75},
|
||||||
|
[LEVELRANGE_BARRENS] = {75},
|
||||||
|
[LEVELRANGE_STONETALON] = {150},
|
||||||
|
[LEVELRANGE_ASHENVALE] = {150},
|
||||||
|
[LEVELRANGE_1KNEEDLES] = {225},
|
||||||
|
[LEVELRANGE_DESOLACE] = {225},
|
||||||
|
[LEVELRANGE_DUSTWALLOW] = {225},
|
||||||
|
[LEVELRANGE_FERALAS] = {300},
|
||||||
|
[LEVELRANGE_TANARIS] = {300},
|
||||||
|
[LEVELRANGE_AZSHARA] = {300},
|
||||||
|
[LEVELRANGE_FELWOOD] = {300},
|
||||||
|
[LEVELRANGE_UNGOROCRATER] = {300},
|
||||||
|
--[LEVELRANGE_SILITHUS] = {0},
|
||||||
|
--[LEVELRANGE_WINTERSPRING] = {0},
|
||||||
|
|
||||||
|
[LEVELRANGE_MOONGLADE] = {300},
|
||||||
|
|
||||||
|
[LEVELRANGE_TELDRASSIL] = {25},
|
||||||
|
|
||||||
|
--Turtle WoW Zones
|
||||||
|
|
||||||
|
--[LEVELRANGE_GILNEAS] = {0},
|
||||||
|
--[LEVELRANGE_GILLIJIM] = {0},
|
||||||
|
--[LEVELRANGE_LAPIDIS] = {0},
|
||||||
|
--[LEVELRANGE_TELABIM] = {0},
|
||||||
|
--[LEVELRANGE_HYJAL] = {0},
|
||||||
|
};
|
||||||
|
|
||||||
-- Instances
|
-- Instances
|
||||||
LEVELRANGE_INSTANCES = {
|
LEVELRANGE_INSTANCES = {
|
||||||
[LEVELRANGE_WESTFALL] = {LEVELRANGE_DEADMINES, " (17-26)"},
|
[LEVELRANGE_WESTFALL] = {LEVELRANGE_DEADMINES, " (17-26)"},
|
||||||
@@ -222,6 +277,7 @@ local function lUpdateTooltip(zoneName)
|
|||||||
|
|
||||||
local levels = nil;
|
local levels = nil;
|
||||||
local actualside = nil;
|
local actualside = nil;
|
||||||
|
local flevel = nil;
|
||||||
|
|
||||||
if (LEVELRANGE_RANGES[zoneName]) then
|
if (LEVELRANGE_RANGES[zoneName]) then
|
||||||
local _, faction = UnitFactionGroup("player");
|
local _, faction = UnitFactionGroup("player");
|
||||||
@@ -244,6 +300,12 @@ local function lUpdateTooltip(zoneName)
|
|||||||
levels = string.format(LEVELRANGE_LEVELS, min, max);
|
levels = string.format(LEVELRANGE_LEVELS, min, max);
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Determine fishing level Requirement
|
||||||
|
if (LEVELRANGE_FISHING[zoneName]) then
|
||||||
|
local fmin = LEVELRANGE_FISHING[zoneName][1];
|
||||||
|
flevel = string.format(LEVELRANGE_FLEVEL, fmin);
|
||||||
|
end
|
||||||
|
|
||||||
-- Start making the Tooltip
|
-- Start making the Tooltip
|
||||||
|
|
||||||
-- Show the zone title and add level range if known
|
-- Show the zone title and add level range if known
|
||||||
@@ -251,6 +313,13 @@ local function lUpdateTooltip(zoneName)
|
|||||||
if levels then
|
if levels then
|
||||||
LevelRangeTooltip:AddLine(levels, levelscol.r, levelscol.g, levelscol.b);
|
LevelRangeTooltip:AddLine(levels, levelscol.r, levelscol.g, levelscol.b);
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Show fishing level requirement if desired
|
||||||
|
if (LevelRangeSettings[LEVELRANGE_REALMPLAYERNAME].showFishing == true) then
|
||||||
|
if flevel then
|
||||||
|
LevelRangeTooltip:AddLine(flevel, levelscol.r, levelscol.g, levelscol.b);
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- Show diplomacy if known and if wanted
|
-- Show diplomacy if known and if wanted
|
||||||
if (LevelRangeSettings[LEVELRANGE_REALMPLAYERNAME].showPvP == true) then
|
if (LevelRangeSettings[LEVELRANGE_REALMPLAYERNAME].showPvP == true) then
|
||||||
@@ -380,6 +449,10 @@ function LevelRange_SlashHandler(msg)
|
|||||||
elseif (Cmd == "instances") then
|
elseif (Cmd == "instances") then
|
||||||
toggleInstances();
|
toggleInstances();
|
||||||
|
|
||||||
|
-- Toggle fishing level requirement on tooltip
|
||||||
|
elseif (Cmd == "fishing") then
|
||||||
|
toggleFishing();
|
||||||
|
|
||||||
elseif (Cmd == "") then
|
elseif (Cmd == "") then
|
||||||
if (LevelRangeOptionsFrame:IsVisible()) then
|
if (LevelRangeOptionsFrame:IsVisible()) then
|
||||||
HideUIPanel(LevelRangeOptionsFrame);
|
HideUIPanel(LevelRangeOptionsFrame);
|
||||||
@@ -451,7 +524,15 @@ function togglePvP()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function toggleFishing()
|
||||||
|
if (LevelRangeSettings[LEVELRANGE_REALMPLAYERNAME].showFishing == false) then
|
||||||
|
LevelRangeSettings[LEVELRANGE_REALMPLAYERNAME].showFishing = true;
|
||||||
|
printOPTION(LEVELRANGE_TOGGLEFISHING, LEVELRANGE_ON);
|
||||||
|
else
|
||||||
|
LevelRangeSettings[LEVELRANGE_REALMPLAYERNAME].showFishing = false;
|
||||||
|
printOPTION(LEVELRANGE_TOGGLEFISHING, LEVELRANGE_OFF);
|
||||||
|
end
|
||||||
|
end
|
||||||
--------------------------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------------------------
|
||||||
-- Instance and Raid Information
|
-- Instance and Raid Information
|
||||||
--------------------------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------------------------
|
||||||
@@ -540,6 +621,8 @@ function LevelRangeOptionsCheckButton_OnClick()
|
|||||||
toggleRaids();
|
toggleRaids();
|
||||||
elseif (this.option == "showPvP") then
|
elseif (this.option == "showPvP") then
|
||||||
togglePvP();
|
togglePvP();
|
||||||
|
elseif (this.option == "showFishing") then
|
||||||
|
toggleFishing();
|
||||||
end
|
end
|
||||||
|
|
||||||
if (this:GetChecked()) then
|
if (this:GetChecked()) then
|
||||||
@@ -615,6 +698,20 @@ function loadSettings()
|
|||||||
optionButton:SetChecked(false);
|
optionButton:SetChecked(false);
|
||||||
LevelRange.Opts["showPvP"] = false;
|
LevelRange.Opts["showPvP"] = false;
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if (LevelRangeSettings[LEVELRANGE_REALMPLAYERNAME].showFishing == true) then
|
||||||
|
local optionButton = getglobal("LevelRangeOptionsFrame" .. "Opt5");
|
||||||
|
|
||||||
|
optionButton:SetChecked(true);
|
||||||
|
LevelRange.Opts["showFishing"] = true;
|
||||||
|
|
||||||
|
elseif (LevelRangeSettings[LEVELRANGE_REALMPLAYERNAME].showFishing == false) then
|
||||||
|
local optionButton = getglobal("LevelRangeOptionsFrame" .. "Opt5");
|
||||||
|
|
||||||
|
optionButton:SetChecked(false);
|
||||||
|
LevelRange.Opts["showFishing"] = false;
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
@@ -674,6 +771,12 @@ function LevelRange_Initialize()
|
|||||||
if (LevelRangeSettings[LEVELRANGE_REALMPLAYERNAME].showPvP == nil) then
|
if (LevelRangeSettings[LEVELRANGE_REALMPLAYERNAME].showPvP == nil) then
|
||||||
LevelRangeSettings[LEVELRANGE_REALMPLAYERNAME].showPvP = DEFAULT_LEVELRANGE_SHOWPVP;
|
LevelRangeSettings[LEVELRANGE_REALMPLAYERNAME].showPvP = DEFAULT_LEVELRANGE_SHOWPVP;
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- fishing Toggle
|
||||||
|
if (LevelRangeSettings[LEVELRANGE_REALMPLAYERNAME].showFishing == nil) then
|
||||||
|
LevelRangeSettings[LEVELRANGE_REALMPLAYERNAME].showFishing = DEFAULT_LEVELRANGE_SHOWFISHING;
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function LevelRange_OnEvent(event)
|
function LevelRange_OnEvent(event)
|
||||||
|
|||||||
+13
-1
@@ -66,7 +66,7 @@
|
|||||||
movable="true" enableMouse="true" hidden="true" parent="UIParent"
|
movable="true" enableMouse="true" hidden="true" parent="UIParent"
|
||||||
enableKeyboard="true">
|
enableKeyboard="true">
|
||||||
<Size>
|
<Size>
|
||||||
<AbsDimension x="350" y="195"/>
|
<AbsDimension x="350" y="250"/>
|
||||||
</Size>
|
</Size>
|
||||||
<Anchors>
|
<Anchors>
|
||||||
<Anchor point="CENTER"/>
|
<Anchor point="CENTER"/>
|
||||||
@@ -160,6 +160,18 @@
|
|||||||
</Anchors>
|
</Anchors>
|
||||||
</CheckButton>
|
</CheckButton>
|
||||||
|
|
||||||
|
<!-- Option #5; row 5, column 1 -->
|
||||||
|
<CheckButton name="$parentOpt5"
|
||||||
|
inherits="LevelRangeOptionsCheckButtonTemplate">
|
||||||
|
<Anchors>
|
||||||
|
<Anchor point="TOPLEFT">
|
||||||
|
<Offset>
|
||||||
|
<AbsDimension x="45" y="-145"/>
|
||||||
|
</Offset>
|
||||||
|
</Anchor>
|
||||||
|
</Anchors>
|
||||||
|
</CheckButton>
|
||||||
|
|
||||||
<Button name="LevelRangeOptionsFrameClose"
|
<Button name="LevelRangeOptionsFrameClose"
|
||||||
inherits="OptionsButtonTemplate" text="Close">
|
inherits="OptionsButtonTemplate" text="Close">
|
||||||
<Anchors>
|
<Anchors>
|
||||||
|
|||||||
+7
-3
@@ -1,6 +1,7 @@
|
|||||||
--
|
--
|
||||||
-- LevelRange :: Readme
|
-- LevelRange :: Readme
|
||||||
-- Copyright (c) 2006 Philip Hughes (Bull3t)
|
-- Copyright (c) 2006 Philip Hughes (Bull3t)
|
||||||
|
-- http://bull3t.blogspot.com
|
||||||
--
|
--
|
||||||
|
|
||||||
----------------------
|
----------------------
|
||||||
@@ -8,9 +9,9 @@ Details
|
|||||||
----------------------
|
----------------------
|
||||||
Title: LevelRange
|
Title: LevelRange
|
||||||
Interface: 11200
|
Interface: 11200
|
||||||
Version: 2.0.1
|
Version: 2.0.2
|
||||||
|
|
||||||
Author: Bull3t, Tenyar97
|
Author: Bull3t, Tenyar97, rado-boy
|
||||||
Addon Website: https://github.com/Tenyar97/LevelRange-Turtle
|
Addon Website: https://github.com/Tenyar97/LevelRange-Turtle
|
||||||
|
|
||||||
Current Features:
|
Current Features:
|
||||||
@@ -21,6 +22,9 @@ Current Features:
|
|||||||
----------------------
|
----------------------
|
||||||
Change Log
|
Change Log
|
||||||
----------------------
|
----------------------
|
||||||
|
2.0.2 - Update (rado-boy)
|
||||||
|
[*] Added togglable option to show fishing level requirement on tooltip. Not all zones are complete currently.
|
||||||
|
|
||||||
2.0.1 - Update
|
2.0.1 - Update
|
||||||
[*] Updated outdated refrences.
|
[*] Updated outdated refrences.
|
||||||
[*] Improved localization.
|
[*] Improved localization.
|
||||||
|
|||||||
+13
-4
@@ -127,6 +127,7 @@ LEVELRANGE_RAIDSTEXT = "Raids:";
|
|||||||
|
|
||||||
-- General Strings
|
-- General Strings
|
||||||
LEVELRANGE_LEVELS = "Levels %d - %d";
|
LEVELRANGE_LEVELS = "Levels %d - %d";
|
||||||
|
LEVELRANGE_FLEVEL = "Fishing Level %d";
|
||||||
|
|
||||||
-- Message Strings
|
-- Message Strings
|
||||||
LEVELRANGE_LOADEDPREFIX = "LevelRange version "
|
LEVELRANGE_LOADEDPREFIX = "LevelRange version "
|
||||||
@@ -160,7 +161,8 @@ LEVELRANGE_HELP1 = "/lr >> Open LevelRange options frame."
|
|||||||
LEVELRANGE_HELP2 = "/lr toggle >> Toggle showing of the LevelRange tooltip."
|
LEVELRANGE_HELP2 = "/lr toggle >> Toggle showing of the LevelRange tooltip."
|
||||||
LEVELRANGE_HELP3 = "/lr instances >> Toggle showing of instances on the tooltip."
|
LEVELRANGE_HELP3 = "/lr instances >> Toggle showing of instances on the tooltip."
|
||||||
LEVELRANGE_HELP4 = "/lr pvp >> Toggle showing of PvP diplomacy on the tooltip."
|
LEVELRANGE_HELP4 = "/lr pvp >> Toggle showing of PvP diplomacy on the tooltip."
|
||||||
LEVELRANGE_HELP5 = "Long Command: /levelrange can also be used inplace of /lr."
|
LEVELRANGE_HELP5 = "/lr fishing >> Toggle display of minimum fishing level requirement on tooltip."
|
||||||
|
LEVELRANGE_HELP6 = "Long Command: /levelrange can also be used inplace of /lr."
|
||||||
|
|
||||||
-- Toggle Message Strings
|
-- Toggle Message Strings
|
||||||
LEVELRANGE_ON = "ON"
|
LEVELRANGE_ON = "ON"
|
||||||
@@ -173,6 +175,7 @@ LEVELRANGE_TOGGLESHOW = "LevelRange Tooltip"
|
|||||||
LEVELRANGE_TOGGLEINSTANCES = "Display LevelRange Instances"
|
LEVELRANGE_TOGGLEINSTANCES = "Display LevelRange Instances"
|
||||||
LEVELRANGE_TOGGLERAIDS = "Display LevelRange Raids"
|
LEVELRANGE_TOGGLERAIDS = "Display LevelRange Raids"
|
||||||
LEVELRANGE_TOGGLEPVP = "Display LevelRange PvP Diplomacy"
|
LEVELRANGE_TOGGLEPVP = "Display LevelRange PvP Diplomacy"
|
||||||
|
LEVELRANGE_TOGGLEFISHING = "Display Minimum fishing level requirement"
|
||||||
|
|
||||||
-- Options Frame Strings
|
-- Options Frame Strings
|
||||||
LEVELRANGE_OPTIONS_CLOSE = "Close"
|
LEVELRANGE_OPTIONS_CLOSE = "Close"
|
||||||
@@ -200,9 +203,15 @@ LEVELRANGE_OPTIONS[4] = { -- Option 4
|
|||||||
option = "showPvP",
|
option = "showPvP",
|
||||||
tooltip = "Show/hide PvP Diplomacy on tooltip",
|
tooltip = "Show/hide PvP Diplomacy on tooltip",
|
||||||
};
|
};
|
||||||
|
LEVELRANGE_OPTIONS[5] = { -- Option 5
|
||||||
|
label = "Show Fishing level requirement",
|
||||||
|
option = "showFishing",
|
||||||
|
tooltip = "Show/hide Fishing level requirement on tooltip",
|
||||||
|
};
|
||||||
|
|
||||||
LEVELRANGE_DEFAULT_OPTS = {
|
LEVELRANGE_DEFAULT_OPTS = {
|
||||||
["showLevelRange"] = true,
|
["showLevelRange"] = true,
|
||||||
["showInstances"] = true,
|
["showInstances"] = true,
|
||||||
["showPvP"] = true,
|
["showPvP"] = true,
|
||||||
|
["showFishing"] = true,
|
||||||
};
|
};
|
||||||
Reference in New Issue
Block a user