initial commit
@@ -0,0 +1,42 @@
|
||||
<Bindings>
|
||||
<!-- window commands -->
|
||||
<Binding name="FISHINGBUDDY_TOGGLE" header="FISHINGBUDDY_BINDINGS">
|
||||
if ( keystate == "down" ) then
|
||||
FishingBuddy.Command("");
|
||||
end
|
||||
</Binding>
|
||||
<Binding name="TOGGLEFISHINGBUDDY_LOC">
|
||||
if ( keystate == "down" ) then
|
||||
ToggleFishingBuddyFrame("FishingLocationsFrame");
|
||||
end
|
||||
</Binding>
|
||||
<Binding name="TOGGLEFISHINGBUDDY_OUT">
|
||||
if ( keystate == "down" ) then
|
||||
ToggleFishingBuddyFrame("FishingOutfitFrame");
|
||||
end
|
||||
</Binding>
|
||||
<Binding name="TOGGLEFISHINGBUDDY_TRK">
|
||||
if ( keystate == "down" ) then
|
||||
ToggleFishingBuddyFrame("FishingTrackingFrame");
|
||||
end
|
||||
</Binding>
|
||||
<Binding name="TOGGLEFISHINGBUDDY_OPT">
|
||||
if ( keystate == "down" ) then
|
||||
ToggleFishingBuddyFrame("FishingOptionsFrame");
|
||||
end
|
||||
</Binding>
|
||||
<!-- commands -->
|
||||
<Binding name="FISHINGBUDDY_SWITCH">
|
||||
if ( keystate == "down" ) then
|
||||
FishingBuddy.Command(FishingBuddy.SWITCH);
|
||||
end
|
||||
</Binding>
|
||||
<!-- Hidden bindings -->
|
||||
<Binding name="FISHINGBUDDY_PERFORMCAST" runOnUp="true" hidden="true">
|
||||
if ( keystate == "up" ) then
|
||||
FishingBuddy.PerformCast();
|
||||
else
|
||||
FishingBuddy.UpdateBindings(false);
|
||||
end
|
||||
</Binding>
|
||||
</Bindings>
|
||||
@@ -0,0 +1,24 @@
|
||||
## Interface: 11000
|
||||
## Title: FishingBuddy v0.8.6h
|
||||
## Notes: Help with fishing related tasks -- clothing, fish information
|
||||
## Notes-deDE: Erleichtert das Angeln - Ausr\195\188stung und Fish-Infos
|
||||
## Author: Sutorix-Windrunner
|
||||
## OptionalDeps: OutfitDisplayFrame, Outfitter, myAddOns, Titan, InfoBar, ButtonHole
|
||||
## SavedVariables: FishingBuddy_Info
|
||||
## SavedVariablesPerCharacter: FishingBuddy_Player
|
||||
## ModWatcherID: 104
|
||||
## ModWatcherVersion: 11
|
||||
FishingBuddy.xml
|
||||
FishingBuddyFrame.xml
|
||||
FishingOptionsFrame.xml
|
||||
FishingLocationsFrame.xml
|
||||
FishingOutfitFrame.xml
|
||||
FishingOutfitManager.xml
|
||||
FishingBuddyTitan.xml
|
||||
FishingBuddyMinimap.xml
|
||||
FishingBuddyInfoBar.xml
|
||||
FishingExtravaganza.xml
|
||||
FishingWatcher.xml
|
||||
GraphHandler.xml
|
||||
FishingTrackingFrame.xml
|
||||
FishingDebugging.lua
|
||||
@@ -0,0 +1,28 @@
|
||||
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
|
||||
..\FrameXML\UI.xsd">
|
||||
<Script file="localization.lua"/>
|
||||
<Script file="localization.de.lua"/>
|
||||
<Script file="localization.fr.lua"/>
|
||||
<Script file="FishingSetup.lua"/>
|
||||
<Script file="FishingBuddy.lua"/>
|
||||
<Script file="FishingInit.lua"/>
|
||||
<!-- Frame to handle all core events -->
|
||||
<Frame name="FishingBuddyRoot" toplevel="true" enableMouse="false" movable="true" parent="UIParent" hidden="true">
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
FishingBuddy.OnLoad();
|
||||
</OnLoad>
|
||||
<OnEvent>
|
||||
FishingBuddy.OnEvent();
|
||||
</OnEvent>
|
||||
</Scripts>
|
||||
</Frame>
|
||||
|
||||
<Frame name="FishingBuddy_RecastUpdateFrame" hidden="true">
|
||||
<Scripts>
|
||||
<OnUpdate>
|
||||
-- FishingBuddy_RecastOnUpdate(arg1);
|
||||
</OnUpdate>
|
||||
</Scripts>
|
||||
</Frame>
|
||||
</Ui>
|
||||
@@ -0,0 +1,130 @@
|
||||
local SUBFRAMES = {
|
||||
["FishingLocationsFrame"] = {
|
||||
["name"] = FishingBuddy.LOCATIONS_TAB,
|
||||
["tooltip"] = FishingBuddy.LOCATIONS_INFO,
|
||||
["toggle"] = "_LOC",
|
||||
["id"] = "1",
|
||||
},
|
||||
["FishingOutfitFrame"] = {
|
||||
["name"] = FishingBuddy.OUTFITS_TAB,
|
||||
["tooltip"] = FishingBuddy.OUTFITS_INFO,
|
||||
["toggle"] = "_OUT",
|
||||
["id"] = "2",
|
||||
},
|
||||
["FishingTrackingFrame"] = {
|
||||
["name"] = FishingBuddy.TRACKING_TAB,
|
||||
["tooltip"] = FishingBuddy.TRACKING_INFO,
|
||||
["toggle"] = "_TRK",
|
||||
["id"] = "3",
|
||||
},
|
||||
["FishingOptionsFrame"] = {
|
||||
["name"] = FishingBuddy.OPTIONS_TAB,
|
||||
["tooltip"] = FishingBuddy.OPTIONS_INFO,
|
||||
["toggle"] = "_OPT",
|
||||
["id"] = "4",
|
||||
}
|
||||
};
|
||||
|
||||
local function DisableSubFrame(frameName)
|
||||
for value,info in SUBFRAMES do
|
||||
if ( value == frameName ) then
|
||||
local id = info.id;
|
||||
local hideframe = string.format("FishingBuddyFrameTab%d", id);
|
||||
local f = getglobal(hideframe);
|
||||
if ( f ) then
|
||||
f:Hide();
|
||||
end
|
||||
id = id + 1;
|
||||
f = getglobal("FishingBuddyFrameTab"..id);
|
||||
if ( f ) then
|
||||
f:SetPoint("LEFT", hideframe, "LEFT", 0, 0)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
FishingBuddy.DisableSubFrame = DisableSubFrame;
|
||||
|
||||
local function ShowSubFrame(frameName)
|
||||
for value,_ in SUBFRAMES do
|
||||
local frame = getglobal(value);
|
||||
if ( frame ) then
|
||||
if ( value == frameName ) then
|
||||
frame:Show()
|
||||
else
|
||||
frame:Hide();
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function ToggleFishingBuddyFrame(tab)
|
||||
if ( tab == "FishingOutfitFrame" and not OutfitDisplayFrame_OnLoad and not FishingOutfitFrame:IsVisible() ) then
|
||||
return;
|
||||
end
|
||||
local subFrame = getglobal(tab);
|
||||
if ( subFrame ) then
|
||||
local id = subFrame:GetID();
|
||||
PanelTemplates_SetTab(FishingBuddyFrame, id);
|
||||
if ( FishingBuddyFrame:IsVisible() ) then
|
||||
if ( subFrame:IsVisible() ) then
|
||||
HideUIPanel(FishingBuddyFrame);
|
||||
else
|
||||
ShowSubFrame(tab);
|
||||
end
|
||||
else
|
||||
ShowUIPanel(FishingBuddyFrame);
|
||||
ShowSubFrame(tab);
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local TABFRAMES = {};
|
||||
function FishingBuddyFrameTab_OnClick()
|
||||
ToggleFishingBuddyFrame(TABFRAMES[this:GetName()]);
|
||||
PlaySound("igCharacterInfoTab");
|
||||
end
|
||||
|
||||
function FishingBuddyFrame_OnLoad()
|
||||
-- Act like Blizzard windows
|
||||
UIPanelWindows["FishingBuddyFrame"] = { area = "left", pushable = 999 };
|
||||
-- Close with escape key
|
||||
tinsert(UISpecialFrames, "FishingBuddyFrame");
|
||||
|
||||
-- Tab Handling code
|
||||
PanelTemplates_SetNumTabs(this, 4);
|
||||
PanelTemplates_SetTab(this, 1);
|
||||
|
||||
this:RegisterEvent("VARIABLES_LOADED");
|
||||
end
|
||||
|
||||
function FishingBuddyFrame_OnEvent(event)
|
||||
if ( event == "VARIABLES_LOADED" ) then
|
||||
-- set up mappings
|
||||
for frame,info in SUBFRAMES do
|
||||
local f = getglobal(frame);
|
||||
if ( f ) then
|
||||
f:SetID(info.id);
|
||||
|
||||
local tabname = "FishingBuddyFrameTab"..info.id;
|
||||
TABFRAMES[tabname] = frame;
|
||||
local tab = getglobal(tabname);
|
||||
tab:SetText(info.name);
|
||||
tab.tooltip = info.tooltip;
|
||||
tab.toggle = "TOGGLEFISHINGBUDDY"..info.toggle;
|
||||
else
|
||||
DisableSubFrame(frame);
|
||||
end
|
||||
end
|
||||
ToggleFishingBuddyFrame("FishingLocationsFrame");
|
||||
end
|
||||
end
|
||||
|
||||
function FishingBuddyFrame_OnShow()
|
||||
FishingBuddyFramePortrait:SetTexture("Interface\\LootFrame\\FishingLoot-Icon");
|
||||
FishingBuddyNameText:SetText(FishingBuddy.WINDOW_TITLE);
|
||||
UpdateMicroButtons();
|
||||
end
|
||||
|
||||
function FishingBuddyFrame_OnHide()
|
||||
UpdateMicroButtons();
|
||||
end
|
||||
@@ -0,0 +1,316 @@
|
||||
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
|
||||
..\FrameXML\UI.xsd">
|
||||
<Script file="FishingBuddyFrame.lua"/>
|
||||
<Button name="FishingBuddyTabButtonTemplate" virtual="true">
|
||||
<Size>
|
||||
<AbsDimension x="115" y="32"/>
|
||||
</Size>
|
||||
<Layers>
|
||||
<Layer level="BACKGROUND">
|
||||
<Texture name="$parentLeftDisabled" file="Interface\PaperDollInfoFrame\UI-Character-ActiveTab">
|
||||
<Size>
|
||||
<AbsDimension x="20" y="32"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="5"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<TexCoords left="0" right="0.15625" top="0" bottom="1.0"/>
|
||||
</Texture>
|
||||
<Texture name="$parentMiddleDisabled" file="Interface\PaperDollInfoFrame\UI-Character-ActiveTab">
|
||||
<Size>
|
||||
<AbsDimension x="88" y="32"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="LEFT" relativeTo="$parentLeftDisabled" relativePoint="RIGHT"/>
|
||||
</Anchors>
|
||||
<TexCoords left="0.15625" right="0.84375" top="0" bottom="1.0"/>
|
||||
</Texture>
|
||||
<Texture name="$parentRightDisabled" file="Interface\PaperDollInfoFrame\UI-Character-ActiveTab">
|
||||
<Size>
|
||||
<AbsDimension x="20" y="32"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="LEFT" relativeTo="$parentMiddleDisabled" relativePoint="RIGHT"/>
|
||||
</Anchors>
|
||||
<TexCoords left="0.84375" right="1.0" top="0" bottom="1.0"/>
|
||||
</Texture>
|
||||
<Texture name="$parentLeft" file="Interface\PaperDollInfoFrame\UI-Character-InActiveTab">
|
||||
<Size>
|
||||
<AbsDimension x="20" y="32"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT"/>
|
||||
</Anchors>
|
||||
<TexCoords left="0" right="0.15625" top="0" bottom="1.0"/>
|
||||
</Texture>
|
||||
<Texture name="$parentMiddle" file="Interface\PaperDollInfoFrame\UI-Character-InActiveTab">
|
||||
<Size>
|
||||
<AbsDimension x="88" y="32"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="LEFT" relativeTo="$parentLeft" relativePoint="RIGHT"/>
|
||||
</Anchors>
|
||||
<TexCoords left="0.15625" right="0.84375" top="0" bottom="1.0"/>
|
||||
</Texture>
|
||||
<Texture name="$parentRight" file="Interface\PaperDollInfoFrame\UI-Character-InActiveTab">
|
||||
<Size>
|
||||
<AbsDimension x="20" y="32"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="LEFT" relativeTo="$parentMiddle" relativePoint="RIGHT"/>
|
||||
</Anchors>
|
||||
<TexCoords left="0.84375" right="1.0" top="0" bottom="1.0"/>
|
||||
</Texture>
|
||||
</Layer>
|
||||
</Layers>
|
||||
<NormalText name="$parentText" inherits="GameFontNormalSmall">
|
||||
<Anchors>
|
||||
<Anchor point="CENTER">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="2"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</NormalText>
|
||||
<HighlightText name="$parentHighlightText" inherits="GameFontHighlightSmall">
|
||||
<Anchors>
|
||||
<Anchor point="CENTER">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="2"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</HighlightText>
|
||||
<DisabledText name="$parentDisabledText" inherits="GameFontHighlightSmall">
|
||||
<Anchors>
|
||||
<Anchor point="CENTER">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="2"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</DisabledText>
|
||||
<HighlightTexture name="$parentHighlightTexture" file="Interface\PaperDollInfoFrame\UI-Character-Tab-Highlight" alphaMode="ADD">
|
||||
<Anchors>
|
||||
<Anchor point="LEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="10" y="2"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
<Anchor point="RIGHT">
|
||||
<Offset>
|
||||
<AbsDimension x="-10" y="2"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</HighlightTexture>
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
this:SetFrameLevel(this:GetFrameLevel() + 4);
|
||||
</OnLoad>
|
||||
<OnClick>
|
||||
PanelTemplates_Tab_OnClick(FishingBuddyFrame);
|
||||
FishingBuddyFrameTab_OnClick();
|
||||
</OnClick>
|
||||
<OnShow>
|
||||
PanelTemplates_TabResize(0);
|
||||
getglobal(this:GetName().."HighlightTexture"):SetWidth(this:GetTextWidth() + 30);
|
||||
</OnShow>
|
||||
<OnEnter>
|
||||
GameTooltip:SetOwner(this, "ANCHOR_RIGHT");
|
||||
GameTooltip:SetText(MicroButtonTooltipText(TEXT(this.tooltip), this.toggle),
|
||||
1.0,1.0,1.0 );
|
||||
</OnEnter>
|
||||
<OnLeave>
|
||||
GameTooltip:Hide();
|
||||
</OnLeave>
|
||||
</Scripts>
|
||||
</Button>
|
||||
|
||||
<Frame name="FishingBuddySmallHeaderTemplate" virtual="true">
|
||||
<Layers>
|
||||
<Layer level="BACKGROUND">
|
||||
<Texture file="Interface\PaperDollInfoFrame\UI-Character-General-TopLeft">
|
||||
<Size>
|
||||
<AbsDimension x="256" y="256"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="2" y="-1"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Texture>
|
||||
<Texture file="Interface\PaperDollInfoFrame\UI-Character-General-TopRight">
|
||||
<Size>
|
||||
<AbsDimension x="128" y="256"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="258" y="-1"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Texture>
|
||||
<Texture file="Interface\PaperDollInfoFrame\UI-Character-General-BottomLeft">
|
||||
<Size>
|
||||
<AbsDimension x="256" y="256"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="2" y="-257"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Texture>
|
||||
<Texture file="Interface\PaperDollInfoFrame\UI-Character-General-BottomRight">
|
||||
<Size>
|
||||
<AbsDimension x="128" y="256"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="258" y="-257"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Texture>
|
||||
</Layer>
|
||||
</Layers>
|
||||
</Frame>
|
||||
|
||||
<Frame name="FishingBuddyFrame" toplevel="true" movable="true" enableMouse="true" parent="UIParent" hidden="true">
|
||||
<Size>
|
||||
<AbsDimension x="384" y="512"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="-104"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<HitRectInsets>
|
||||
<AbsInset left="0" right="30" top="0" bottom="45"/>
|
||||
</HitRectInsets>
|
||||
<Layers>
|
||||
<Layer level="ARTWORK">
|
||||
<Texture name="FishingBuddyFramePortrait">
|
||||
<Size>
|
||||
<AbsDimension x="58" y="58"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="9" y="-7"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Texture>
|
||||
</Layer>
|
||||
</Layers>
|
||||
<Frames>
|
||||
<Frame name="FishingBuddyNameFrame">
|
||||
<Size>
|
||||
<AbsDimension x="109" y="12"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="CENTER">
|
||||
<Offset>
|
||||
<AbsDimension x="6" y="232"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Layers>
|
||||
<Layer>
|
||||
<FontString name="FishingBuddyNameText" inherits="GameFontNormal" text="NAME">
|
||||
<Size>
|
||||
<AbsDimension x="300" y="12"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="CENTER"/>
|
||||
</Anchors>
|
||||
<Color r="1.0" g="1.0" b="1.0"/>
|
||||
</FontString>
|
||||
</Layer>
|
||||
</Layers>
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
this:SetFrameLevel(this:GetFrameLevel() + 1);
|
||||
</OnLoad>
|
||||
</Scripts>
|
||||
</Frame>
|
||||
<Button name="FishingBuddyCloseButton" inherits="UIPanelCloseButton">
|
||||
<Anchors>
|
||||
<Anchor point="CENTER" relativeTo="FishingBuddyFrame" relativePoint="TOPRIGHT">
|
||||
<Offset>
|
||||
<AbsDimension x="-44" y="-26"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
this:SetFrameLevel(this:GetFrameLevel() + 4);
|
||||
</OnLoad>
|
||||
</Scripts>
|
||||
</Button>
|
||||
<Button name="FishingBuddyFrameTab1" inherits="FishingBuddyTabButtonTemplate" id="1">
|
||||
<Anchors>
|
||||
<Anchor point="CENTER" relativePoint="BOTTOMLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="55" y="60"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Button>
|
||||
<Button name="FishingBuddyFrameTab2" inherits="FishingBuddyTabButtonTemplate" id="2">
|
||||
<Anchors>
|
||||
<Anchor point="LEFT" relativeTo="FishingBuddyFrameTab1" relativePoint="RIGHT">
|
||||
<Offset>
|
||||
<AbsDimension x="-18" y="0"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Button>
|
||||
<Button name="FishingBuddyFrameTab3" inherits="FishingBuddyTabButtonTemplate" id="3">
|
||||
<Anchors>
|
||||
<Anchor point="LEFT" relativeTo="FishingBuddyFrameTab2" relativePoint="RIGHT">
|
||||
<Offset>
|
||||
<AbsDimension x="-18" y="0"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Button>
|
||||
<Button name="FishingBuddyFrameTab4" inherits="FishingBuddyTabButtonTemplate" id="4">
|
||||
<Anchors>
|
||||
<Anchor point="LEFT" relativeTo="FishingBuddyFrameTab3" relativePoint="RIGHT">
|
||||
<Offset>
|
||||
<AbsDimension x="-18" y="0"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Button>
|
||||
</Frames>
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
FishingBuddyFrame_OnLoad();
|
||||
</OnLoad>
|
||||
<OnEvent>
|
||||
FishingBuddyFrame_OnEvent(event);
|
||||
</OnEvent>
|
||||
<OnShow>
|
||||
FishingBuddyFrame_OnShow();
|
||||
</OnShow>
|
||||
<OnHide>
|
||||
FishingBuddyFrame_OnHide();
|
||||
</OnHide>
|
||||
</Scripts>
|
||||
</Frame>
|
||||
</Ui>
|
||||
@@ -0,0 +1,54 @@
|
||||
-- InfoBar support
|
||||
|
||||
FishingBuddy.InfoBar = {};
|
||||
|
||||
FishingBuddy.InfoBar.OnLoad = function()
|
||||
if ( not InfoBarFrame ) then
|
||||
return;
|
||||
end
|
||||
|
||||
this:RegisterForClicks("LeftButtonUp", "RightButtonUp");
|
||||
|
||||
this.info = {
|
||||
name = FishingBuddy.NAME,
|
||||
version = FishingBuddy.CURRENTVERSION/100,
|
||||
tooltip = FishingBuddy.InfoBar.Tooltip,
|
||||
};
|
||||
end
|
||||
|
||||
FishingBuddy.InfoBar.OnClick = function(button)
|
||||
if (button == "LeftButton") then
|
||||
if (FishingBuddy.GetSetting("InfoBarClickToSwitch") == 1) then
|
||||
FishingBuddy.Command(FishingBuddy.SWITCH);
|
||||
else
|
||||
FishingBuddy.Command("");
|
||||
end
|
||||
else
|
||||
-- Toggle menu
|
||||
local menu = getglobal("FishingBuddyInfoBarMenu");
|
||||
menu.point = "TOPRIGHT";
|
||||
menu.relativePoint = "CENTER";
|
||||
local level = 1;
|
||||
ToggleDropDownMenu(level, nil, menu, "IB_FishingBuddy", 0, 0);
|
||||
end
|
||||
end
|
||||
|
||||
FishingBuddy.InfoBar.OnEvent = function()
|
||||
end
|
||||
|
||||
FishingBuddy.InfoBar.Tooltip = function()
|
||||
local text = FishingBuddy.DESCRIPTION1.."\n"..FishingBuddy.DESCRIPTION2.."\n";
|
||||
text = text.."|c"..FishingBuddy.Colors.GREEN;
|
||||
if (FishingBuddy.GetSetting("InfoBarClickToSwitch") == 1) then
|
||||
text = text..FishingBuddy.TOOLTIP_HINTSWITCH;
|
||||
else
|
||||
text = text..FishingBuddy.TOOLTIP_HINTTOGGLE;
|
||||
end
|
||||
text = text.."|r";
|
||||
return text;
|
||||
end
|
||||
|
||||
FishingBuddy.InfoBar.Menu_Initialize = function()
|
||||
FishingBuddy.MakeDropDown(FishingBuddy.TITAN_CLICKTOSWITCH_ONOFF,
|
||||
"InfoBarClickToSwitch");
|
||||
end
|
||||
@@ -0,0 +1,43 @@
|
||||
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
|
||||
..\FrameXML\UI.xsd">
|
||||
<Script file="FishingBuddyInfoBar.lua"/>
|
||||
<!-- InfoBar support -->
|
||||
<Button name="IB_FishingBuddy" inherits="IB_BaseFrame" parent="InfoBarFrame">
|
||||
<Size>
|
||||
<AbsDimension x="16" y="16" />
|
||||
</Size>
|
||||
<Layers>
|
||||
<Layer level="ARTWORK">
|
||||
<Texture name="$parentIcon" file="Interface\AddOns\FishingBuddy\Icons\Fishing-Icon">
|
||||
<Size>
|
||||
<AbsDimension x="16" y="16"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="LEFT" />
|
||||
</Anchors>
|
||||
</Texture>
|
||||
</Layer>
|
||||
</Layers>
|
||||
<Frames>
|
||||
<Frame name="FishingBuddyInfoBarMenu" inherits="UIDropDownMenuTemplate">
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
this:SetFrameLevel(0);
|
||||
UIDropDownMenu_SetWidth(180);
|
||||
</OnLoad>
|
||||
<OnShow>
|
||||
UIDropDownMenu_Initialize(this, FishingBuddy.InfoBar.Menu_Initialize, "MENU");
|
||||
</OnShow>
|
||||
</Scripts>
|
||||
</Frame>
|
||||
</Frames>
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
FishingBuddy.InfoBar.OnLoad();
|
||||
</OnLoad>
|
||||
<OnClick>
|
||||
FishingBuddy.InfoBar.OnClick(arg1);
|
||||
</OnClick>
|
||||
</Scripts>
|
||||
</Button>
|
||||
</Ui>
|
||||
@@ -0,0 +1,112 @@
|
||||
-- Minimap Button Handling
|
||||
|
||||
FishingBuddy.UseButtonHole = function()
|
||||
if ( ButtonHole and FishingBuddy.GetSetting("UseButtonHole") == 1 ) then
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
end
|
||||
end
|
||||
|
||||
FishingBuddy.Minimap = {};
|
||||
|
||||
FishingBuddy.Minimap.OnLoad = function()
|
||||
this:RegisterEvent("VARIABLES_LOADED");
|
||||
end
|
||||
|
||||
FishingBuddy.Minimap.OnEvent = function()
|
||||
if ( FishingBuddy.UseButtonHole() ) then
|
||||
local info = {};
|
||||
info.id=FishingBuddy.ID;
|
||||
info.name=FishingBuddy.NAME;
|
||||
info.tooltip=FishingBuddy.DESCRIPTION;
|
||||
info.buttonFrame="FishingBuddyMinimapFrame";
|
||||
info.updateFunction="FishingBuddyMinimapButton_MoveButton";
|
||||
ButtonHole.application.RegisterMod(info);
|
||||
elseif ( ButtonHole ) then
|
||||
-- hack, hack, hack
|
||||
local playerName = UnitName("player");
|
||||
if ( ButtonHoleConfig[playerName] and
|
||||
ButtonHoleConfig[playerName].visibleMod == FishingBuddy.ID ) then
|
||||
ButtonHoleConfig[playerName].visibleMod = nil;
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
FishingBuddy.Minimap.Button_OnLoad = function()
|
||||
this:SetFrameLevel(this:GetFrameLevel()+1)
|
||||
this:RegisterForClicks("LeftButtonDown", "RightButtonDown");
|
||||
this:RegisterEvent("VARIABLES_LOADED");
|
||||
end
|
||||
|
||||
FishingBuddy.Minimap.Button_OnClick = function(button)
|
||||
if ( button == "RightButton" ) then
|
||||
-- Toggle menu
|
||||
local menu = getglobal("FishingBuddyMinimapMenu");
|
||||
menu.point = "TOPRIGHT";
|
||||
menu.relativePoint = "CENTER";
|
||||
local level = 1;
|
||||
ToggleDropDownMenu(level, nil, menu, "FishingBuddyMinimapButton", 0, 0);
|
||||
elseif ( FishingBuddy.GetSetting("MinimapClickToSwitch") == 1 ) then
|
||||
FishingBuddy.Command(FishingBuddy.SWITCH);
|
||||
else
|
||||
FishingBuddy.Command("");
|
||||
end
|
||||
end
|
||||
|
||||
FishingBuddyMinimapButton_MoveButton = function()
|
||||
if ( FishingBuddy.IsLoaded() ) then
|
||||
local where = FishingBuddy.GetSetting("MinimapButtonPosition");
|
||||
FishingBuddyMinimapFrame:ClearAllPoints();
|
||||
FishingBuddyMinimapFrame:SetPoint("TOPLEFT", "Minimap", "TOPLEFT",
|
||||
52 - (80 * cos(where)),
|
||||
(80 * sin(where)) - 52);
|
||||
end
|
||||
end
|
||||
|
||||
FishingBuddy.UpdateMinimap = function()
|
||||
FishingBuddyMinimapButton_MoveButton();
|
||||
if ( FishingBuddy.GetSetting("MinimapButtonVisible") == 1 and
|
||||
Minimap:IsVisible() ) then
|
||||
FishingBuddyMinimapButton:EnableMouse(true);
|
||||
FishingBuddyMinimapButton:Show();
|
||||
FishingBuddyMinimapFrame:Show();
|
||||
else
|
||||
FishingBuddyMinimapButton:EnableMouse(false);
|
||||
FishingBuddyMinimapButton:Hide();
|
||||
FishingBuddyMinimapFrame:Hide();
|
||||
end
|
||||
end
|
||||
|
||||
FishingBuddy.Minimap.Button_OnEvent = function()
|
||||
FishingBuddy.UpdateMinimap();
|
||||
end
|
||||
|
||||
FishingBuddy.Minimap.Button_OnEnter = function()
|
||||
if ( GameTooltip.finished ) then
|
||||
return;
|
||||
end
|
||||
if ( FishingBuddy.GetSetting("UseButtonHole") == 0 ) then
|
||||
GameTooltip.finished = 1;
|
||||
GameTooltip:SetOwner(FishingBuddyMinimapFrame, "ANCHOR_LEFT");
|
||||
GameTooltip:AddLine(FishingBuddy.NAME);
|
||||
GameTooltip:AddLine(FishingBuddy.DESCRIPTION,.8,.8,.8,1);
|
||||
GameTooltip:Show();
|
||||
end
|
||||
end
|
||||
|
||||
FishingBuddy.Minimap.Button_OnLeave = function()
|
||||
GameTooltip:Hide();
|
||||
GameTooltip.finished = nil;
|
||||
end
|
||||
|
||||
function FishingBuddy_ToggleMinimap()
|
||||
FishingBuddy.SavedToggleMinimap();
|
||||
FishingBuddy.UpdateMinimap();
|
||||
end
|
||||
|
||||
FishingBuddy.Minimap.Menu_Initialize = function()
|
||||
FishingBuddy.MakeDropDown(FishingBuddy.TITAN_CLICKTOSWITCH_ONOFF,
|
||||
"MinimapClickToSwitch");
|
||||
end
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
|
||||
..\FrameXML\UI.xsd">
|
||||
<Script file="FishingBuddyMinimap.lua"/>
|
||||
<Frame name="FishingBuddyMinimapFrame" parent="Minimap" enableMouse="false" frameStrata="MEDIUM" hidden="true">
|
||||
<Size>
|
||||
<AbsDimension x="33" y="33"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="CENTER" relativeTo="Minimap" relativePoint="CENTER"/>
|
||||
</Anchors>
|
||||
<Frames>
|
||||
<Frame name="FishingBuddyMinimapMenu" inherits="UIDropDownMenuTemplate">
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
this:SetFrameLevel(0);
|
||||
UIDropDownMenu_SetWidth(180);
|
||||
</OnLoad>
|
||||
<OnShow>
|
||||
UIDropDownMenu_Initialize(this, FishingBuddy.Minimap.Menu_Initialize, "MENU");
|
||||
</OnShow>
|
||||
</Scripts>
|
||||
</Frame>
|
||||
<Button name="FishingBuddyMinimapButton">
|
||||
<Size>
|
||||
<AbsDimension x="33" y="33"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="CENTER"/>
|
||||
</Anchors>
|
||||
<Layers>
|
||||
<Layer level="ARTWORK">
|
||||
<Texture name="FishingBuddyMinimapIcon" file="Interface\LootFrame\FishingLoot-Icon">
|
||||
<Size>
|
||||
<AbsDimension x="18" y="18"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="7" y="-6"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Texture>
|
||||
</Layer>
|
||||
<Layer level="OVERLAY">
|
||||
<Texture file="Interface\Minimap\MiniMap-TrackingBorder">
|
||||
<Size>
|
||||
<AbsDimension x="52" y="52"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT"/>
|
||||
</Anchors>
|
||||
</Texture>
|
||||
</Layer>
|
||||
</Layers>
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
FishingBuddy.Minimap.Button_OnLoad();
|
||||
</OnLoad>
|
||||
<OnClick>
|
||||
FishingBuddy.Minimap.Button_OnClick(arg1);
|
||||
</OnClick>
|
||||
<OnEvent>
|
||||
FishingBuddy.Minimap.Button_OnEvent();
|
||||
</OnEvent>
|
||||
<OnEnter>
|
||||
FishingBuddy.Minimap.Button_OnEnter();
|
||||
</OnEnter>
|
||||
<OnLeave>
|
||||
FishingBuddy.Minimap.Button_OnLeave();
|
||||
</OnLeave>
|
||||
</Scripts>
|
||||
</Button>
|
||||
</Frames>
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
FishingBuddy.Minimap.OnLoad();
|
||||
</OnLoad>
|
||||
<OnEvent>
|
||||
FishingBuddy.Minimap.OnEvent();
|
||||
</OnEvent>
|
||||
</Scripts>
|
||||
</Frame>
|
||||
|
||||
</Ui>
|
||||
@@ -0,0 +1,64 @@
|
||||
-- Titan Panel support
|
||||
|
||||
FishingBuddy.Titan = {};
|
||||
|
||||
FishingBuddy.Titan.OnLoad = function()
|
||||
if not TitanPanelButton_UpdateButton then
|
||||
return;
|
||||
end
|
||||
|
||||
this.registry = {
|
||||
id = FishingBuddy.ID,
|
||||
menuText = FishingBuddy.NAME,
|
||||
version = FishingBuddy.VERSION,
|
||||
category = "Profession",
|
||||
icon = "Interface\\AddOns\\FishingBuddy\\Icons\\Fishing-Icon",
|
||||
iconWidth = 16,
|
||||
tooltipTitle = FishingBuddy.NAME,
|
||||
tooltipTextFunction = "TitanPanelFishingBuddyButton_GetTooltipText",
|
||||
savedVariables = {
|
||||
ShowIcon = 1,
|
||||
}
|
||||
};
|
||||
|
||||
this:RegisterEvent("PLAYER_ENTERING_WORLD");
|
||||
end
|
||||
|
||||
FishingBuddy.Titan.OnClick = function(button)
|
||||
if (button == "LeftButton") then
|
||||
if (FishingBuddy.GetSetting("TitanClickToSwitch") == 1) then
|
||||
FishingBuddy.Command(FishingBuddy.SWITCH);
|
||||
else
|
||||
FishingBuddy.Command("");
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
FishingBuddy.Titan.OnEvent = function()
|
||||
if TitanPanelButton_UpdateButton then
|
||||
TitanPanelButton_UpdateButton(FishingBuddy.ID);
|
||||
TitanPanelButton_UpdateTooltip();
|
||||
end
|
||||
end
|
||||
|
||||
function TitanPanelFishingBuddyButton_GetTooltipText()
|
||||
local text = FishingBuddy.DESCRIPTION1.."\n"..FishingBuddy.DESCRIPTION2.."\n";
|
||||
if (FishingBuddy.GetSetting("TitanClickToSwitch") == 1) then
|
||||
text = text..TitanUtils_GetGreenText(FishingBuddy.TOOLTIP_HINTSWITCH);
|
||||
else
|
||||
text = text..TitanUtils_GetGreenText(FishingBuddy.TOOLTIP_HINTTOGGLE);
|
||||
end
|
||||
return text;
|
||||
end
|
||||
|
||||
function TitanPanelRightClickMenu_PrepareFishingBuddyMenu()
|
||||
TitanPanelRightClickMenu_AddTitle(TitanPlugins[FishingBuddy.ID].menuText);
|
||||
|
||||
FishingBuddy.MakeDropDown(FishingBuddy.TITAN_CLICKTOSWITCH_ONOFF, "TitanClickToSwitch");
|
||||
|
||||
TitanPanelRightClickMenu_AddSpacer();
|
||||
TitanPanelRightClickMenu_AddCommand(TITAN_PANEL_MENU_HIDE,
|
||||
FishingBuddy.ID,
|
||||
TITAN_PANEL_MENU_FUNC_HIDE);
|
||||
end
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
|
||||
..\FrameXML\UI.xsd">
|
||||
<Script file="FishingBuddyTitan.lua"/>
|
||||
<!-- Titan Panel support -->
|
||||
<Frame parent="UIParent">
|
||||
<Frames>
|
||||
<Button name="TitanPanelFishingBuddyButton" inherits="TitanPanelIconTemplate" frameStrata="FULLSCREEN" toplevel="true">
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
if TitanPanelButton_OnLoad then
|
||||
FishingBuddy.Titan.OnLoad();
|
||||
TitanPanelButton_OnLoad();
|
||||
end
|
||||
</OnLoad>
|
||||
<OnEvent>
|
||||
FishingBuddy.Titan.OnEvent();
|
||||
</OnEvent>
|
||||
<OnClick>
|
||||
FishingBuddy.Titan.OnClick(arg1);
|
||||
TitanPanelButton_OnClick(arg1);
|
||||
</OnClick>
|
||||
</Scripts>
|
||||
</Button>
|
||||
</Frames>
|
||||
</Frame>
|
||||
|
||||
</Ui>
|
||||
@@ -0,0 +1,71 @@
|
||||
-- outfit debugging functions
|
||||
FishingBuddy.Commands["outfit"] = {};
|
||||
FishingBuddy.Commands["outfit"].func =
|
||||
function(what)
|
||||
if ( what ) then
|
||||
if ( what == FishingBuddy.RESET ) then
|
||||
FishingBuddy.SetWasWearing(nil);
|
||||
elseif ( what == "dump" ) then
|
||||
FishingBuddy.Debug("Outfit");
|
||||
FishingBuddy.Dump(FishingBuddy.GetOutfit());
|
||||
FishingBuddy.Debug("Was Wearing");
|
||||
FishingBuddy.Dump(FishingBuddy.GetWasWearing());
|
||||
end
|
||||
end
|
||||
return true;
|
||||
end;
|
||||
|
||||
-- test the extravaganze school marking functions
|
||||
-- need to expand this for 1.9 if we can tell automatically
|
||||
FishingBuddy.Commands["mark"] = {};
|
||||
FishingBuddy.Commands["mark"].func =
|
||||
function(what)
|
||||
if ( what == "reset" ) then
|
||||
FishingBuddy_Info["Schools"] = nil;
|
||||
elseif ( what == "debug" ) then
|
||||
local hour,_ = GetGameTime();
|
||||
local day = date("%w");
|
||||
FishingBuddy.Extravaganza.Debug(day, hour, GetRealZoneText());
|
||||
elseif ( what == "dump" ) then
|
||||
FishingBuddy.Extravaganza.Dump();
|
||||
else
|
||||
FishingBuddy.Extravaganza.MarkSchool();
|
||||
end
|
||||
return true;
|
||||
end;
|
||||
|
||||
-- random debugging code, likely out of date
|
||||
FishingBuddy.Commands["debug"] = {};
|
||||
FishingBuddy.Commands["debug"].func =
|
||||
function(what)
|
||||
if ( what ) then
|
||||
if ( what == "on" ) then
|
||||
FishingBuddy_Debugging = 1;
|
||||
elseif ( what == "reset" ) then
|
||||
FishingBuddy_Info["Testing"] = nil;
|
||||
elseif ( what == "test" ) then
|
||||
local STVInfo = { scale = 0.18128603034401, xoffset = 0.39145470225916, yoffset = 0.79412224886668 };
|
||||
local xscale = 10448.3;
|
||||
local yscale = 7072.7;
|
||||
local playerX, playerY = GetPlayerMapPosition("player");
|
||||
local x = playerX * STVInfo.scale + STVInfo.xoffset;
|
||||
local y = playerY * STVInfo.scale + STVInfo.yoffset;
|
||||
FishingBuddy.Print("PlayerMap: %f, %f", x, y);
|
||||
for idx=1,10 do
|
||||
playerY = playerY + 0.01;
|
||||
local dx = playerX * STVInfo.scale + STVInfo.xoffset;
|
||||
local dy = playerY * STVInfo.scale + STVInfo.yoffset;
|
||||
local dist = math.sqrt((dx*xscale*dx*xscale)+(dy*yscale*dy*yscale));
|
||||
FishingBuddy.Print("PlayerMap: %f, %f - %f", dx, dy, dist);
|
||||
end
|
||||
else
|
||||
local func = getglobal("FishingBuddy_Localize_"..what);
|
||||
if ( func ) then
|
||||
func();
|
||||
else
|
||||
FishingBuddy_Debugging = 0;
|
||||
end
|
||||
end
|
||||
end
|
||||
return true;
|
||||
end;
|
||||
@@ -0,0 +1,398 @@
|
||||
-- Support for the Extravaganza
|
||||
--
|
||||
-- Map support liberally borrowed from GuildMap, by Bru on Blackhand
|
||||
|
||||
FishingBuddy.Extravaganza = {};
|
||||
|
||||
local NUMMINIPOIS = 10;
|
||||
local ICONPATH = "Interface\\AddOns\\FishingBuddy\\Icons\\";
|
||||
local CLOSEENOUGH = 10.0;
|
||||
|
||||
-- the actual names don't matter, except to help make sure I've got 'em all
|
||||
local ExtravaganzaFish = {};
|
||||
ExtravaganzaFish[19807] = "Speckled Tastyfish";
|
||||
ExtravaganzaFish[19806] = "Dezian Queenfish";
|
||||
ExtravaganzaFish[19805] = "Keefer's Angelfish";
|
||||
-- makes you wonder what item 19804 is, doesn't it...
|
||||
ExtravaganzaFish[19803] = "Brownell's Blue Striped Racer";
|
||||
|
||||
local UPDATETIME_SCHOOLS = 0.1;
|
||||
local UPDATETIME_COUNTER = 60.0;
|
||||
local STVUpdateTimer = 0;
|
||||
local numCaught = 0;
|
||||
local tastyfish_id = 19807;
|
||||
local tastyfish;
|
||||
|
||||
-- convert zone coords into minimap coords
|
||||
local STVInfo = { scale = 0.18128603034401,
|
||||
xoffset = 0.39145470225916, yoffset = 0.79412224886668 };
|
||||
|
||||
local ZoomScale = {};
|
||||
ZoomScale[0] = { xscale = 10448.3, yscale = 7072.7 };
|
||||
ZoomScale[1] = { xscale = 12160.5, yscale = 8197.8 };
|
||||
ZoomScale[2] = { xscale = 14703.1, yscale = 9825.0 };
|
||||
ZoomScale[3] = { xscale = 18568.7, yscale = 12472.2 };
|
||||
ZoomScale[4] = { xscale = 24390.3, yscale = 15628.5 };
|
||||
ZoomScale[5] = { xscale = 37012.2, yscale = 25130.6 };
|
||||
|
||||
local function GetSTVPosition()
|
||||
local x, y = GetPlayerMapPosition("player");
|
||||
x = (x * STVInfo.scale) + STVInfo.xoffset;
|
||||
y = (y * STVInfo.scale) + STVInfo.yoffset;
|
||||
return x, y;
|
||||
end
|
||||
|
||||
-- stolen directly from GuildMap
|
||||
local function GetAngleIcon(x, y)
|
||||
local angle = asin(x / 57);
|
||||
if (x <= 0 and y <= 0) then
|
||||
angle = 180 - angle;
|
||||
elseif (x <= 0 and y > 0) then
|
||||
angle = 360 + angle;
|
||||
elseif (x > 0 and y >= 0) then
|
||||
angle = angle;
|
||||
else
|
||||
angle = 180 - angle;
|
||||
end
|
||||
local fileNumber = math.floor((angle / 10) + 0.5) * 10;
|
||||
if (fileNumber == 360) then
|
||||
fileNumber = 0;
|
||||
end
|
||||
return ICONPATH.."MiniMapArrow"..fileNumber;
|
||||
end
|
||||
|
||||
local function PlotPOI(index, x, y)
|
||||
local poi = getglobal("FishingExtravaganzaMini"..index);
|
||||
if ( poi ) then
|
||||
if ( x and y ) then
|
||||
local tex = getglobal("FishingExtravaganzaMini"..index.."Texture");
|
||||
local zoom = ZoomScale[Minimap:GetZoom()];
|
||||
x = x * zoom.xscale;
|
||||
y = y * zoom.yscale;
|
||||
local dist = math.sqrt(x*x + y*y);
|
||||
if ( dist > 56.5 ) then
|
||||
x = x * 57 / dist;
|
||||
y = y * 57 / dist;
|
||||
tex:SetTexture(GetAngleIcon(x, y));
|
||||
tex:SetTexCoord(0.0, 1.0, 0.0, 1.0);
|
||||
else
|
||||
tex:SetTexture("Interface\\Minimap\\ObjectIcons");
|
||||
tex:SetTexCoord(0.0, 0.25, 0.25, 0.5);
|
||||
end
|
||||
poi:SetPoint("CENTER", "MinimapCluster", "TOPLEFT", 107 + x, y - 92);
|
||||
poi:Show();
|
||||
return true;
|
||||
else
|
||||
poi:Hide();
|
||||
end
|
||||
end
|
||||
return false;
|
||||
end
|
||||
|
||||
local function CloseEnough(x1, y1, x2, y2)
|
||||
local zoom = Minimap:GetZoom();
|
||||
local x = (x1 - x2) * ZoomScale[zoom].xscale;
|
||||
local y = (y1 - y2) * ZoomScale[zoom].yscale;
|
||||
if (sqrt( (x * x) + (y * y) ) > 56.5) then
|
||||
return; -- false
|
||||
end
|
||||
return true;
|
||||
end
|
||||
|
||||
local function GetMinimapDistance(x1, y1, x2, y2)
|
||||
local zoom = ZoomScale[Minimap:GetZoom()];
|
||||
local dx = (x1 - x2) * zoom.xscale;
|
||||
local dy = (y1 - y2) * zoom.yscale;
|
||||
return math.sqrt(dx*dx+dy*dy);
|
||||
end
|
||||
|
||||
local function FindClosest(row, x, y)
|
||||
local dist;
|
||||
local didx;
|
||||
for idx=1,table.getn(row) do
|
||||
local t = row[idx];
|
||||
local dx = (t.x - x);
|
||||
local dy = (t.y - y);
|
||||
local d = dx*dx + dy*dy;
|
||||
if ( not dist ) then
|
||||
dist = d;
|
||||
didx = idx;
|
||||
elseif ( d < dist ) then
|
||||
dist = d;
|
||||
didx = idx;
|
||||
end
|
||||
end
|
||||
if ( dist and didx ) then
|
||||
local t = row[didx];
|
||||
dist = GetMinimapDistance(t.x, t.y, x, y);
|
||||
end
|
||||
return didx, dist;
|
||||
end
|
||||
|
||||
local function GetNearestTen(x, y, dir)
|
||||
local r = math.floor(y * 100);
|
||||
local found = 1;
|
||||
local limit = 10;
|
||||
local locations = {};
|
||||
if ( FishingBuddy_Info["Schools"] ) then
|
||||
while ( r >=0 and r <100 ) do
|
||||
local iy = string.format("%d", r);
|
||||
local dist;
|
||||
local row = FishingBuddy_Info["Schools"][iy];
|
||||
if ( row ) then
|
||||
local rowsize = table.getn(row);
|
||||
if ( rowsize > 5 and limit < 11 ) then
|
||||
limit = limit + rowsize - 5;
|
||||
end
|
||||
for idx=1,rowsize do
|
||||
local t = row[idx];
|
||||
local dist = GetMinimapDistance(t.x, t.y, x, y);
|
||||
tinsert(locations, { dist = dist, x = t.x, y = t.y });
|
||||
found = found + 1;
|
||||
if ( found >= limit ) then
|
||||
return locations;
|
||||
end
|
||||
end
|
||||
end
|
||||
r = r + dir;
|
||||
end
|
||||
end
|
||||
return locations;
|
||||
end
|
||||
|
||||
-- save a school location
|
||||
local function MarkSchool()
|
||||
if ( not FishingBuddy_Info["Schools"] ) then
|
||||
FishingBuddy_Info["Schools"] = {};
|
||||
end
|
||||
local x, y = GetSTVPosition();
|
||||
local iy = string.format("%d", y * 100);
|
||||
if ( not FishingBuddy_Info["Schools"][iy] ) then
|
||||
FishingBuddy_Info["Schools"][iy] = { { x = x, y = y } };
|
||||
else
|
||||
local idx, dist = FindClosest(FishingBuddy_Info["Schools"][iy], x, y);
|
||||
if ( dist > CLOSEENOUGH ) then
|
||||
tinsert(FishingBuddy_Info["Schools"][iy], { x = x, y = y });
|
||||
STVUpdateTimer = 0;
|
||||
else
|
||||
-- average something? that will cascade, which might be okay
|
||||
-- or do we store them all during the contest and average later?
|
||||
-- i.e. store 'close ones' in a separate place and then clean up
|
||||
-- later
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- let an external entity forcibly mark a school
|
||||
FishingBuddy.Extravaganza.MarkSchool = function()
|
||||
local zone, subzone = FishingBuddy.GetZoneInfo();
|
||||
if ( zone == FishingBuddy.STVZONENAME ) then
|
||||
MarkSchool();
|
||||
end
|
||||
end
|
||||
|
||||
-- Sunday, 2pm
|
||||
local STVDay = "0";
|
||||
local STVStartHour = 14;
|
||||
|
||||
-- Should we display the extravaganza message?
|
||||
local function IsTime(activate)
|
||||
local showit = false;
|
||||
if ( FishingBuddy.IsLoaded() ) then
|
||||
if ( FishingBuddy.GetSetting("STVTimer") == 1 ) then
|
||||
local mhour = date("%H");
|
||||
local hour,minute = GetGameTime();
|
||||
local day = date("%w");
|
||||
-- Is it Sunday?
|
||||
if ( day == STVDay and
|
||||
(hour >= (STVStartHour-2) and hour <(STVStartHour+2))) then
|
||||
showit = true;
|
||||
end
|
||||
end
|
||||
end
|
||||
if ( showit ) then
|
||||
if ( activate ) then
|
||||
FishingExtravaganzaFrame:Show();
|
||||
end
|
||||
elseif ( FishingExtravaganzaFrame:IsVisible() or
|
||||
FishingExtravaganzaMini1:IsVisible() ) then
|
||||
FishingExtravaganzaFrame:Hide();
|
||||
for idx=1,NUMMINIPOIS do
|
||||
PlotPOI(idx);
|
||||
end
|
||||
end
|
||||
return showit;
|
||||
end
|
||||
FishingBuddy.Extravaganza.IsTime = IsTime;
|
||||
|
||||
local function UpdatePOI()
|
||||
local x, y = GetSTVPosition();
|
||||
local loc1 = GetNearestTen(x, y, -1);
|
||||
local loc2 = GetNearestTen(x, y+0.01, 1);
|
||||
local func = function(a, b) return a.dist < b.dist; end;
|
||||
for idx=1,table.getn(loc2) do
|
||||
tinsert(loc1, loc2[idx]);
|
||||
end
|
||||
table.sort(loc1, func);
|
||||
for idx=1,NUMMINIPOIS do
|
||||
local t = loc1[idx];
|
||||
if ( t ) then
|
||||
PlotPOI(idx, t.x - x, y - t.y);
|
||||
else
|
||||
PlotPOI(idx);
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- Check for mouse down event for dragging frame.
|
||||
FishingBuddy.Extravaganza.OnDragStart = function(arg1)
|
||||
if (arg1 == "LeftButton") then
|
||||
FishingExtravaganzaFrame:StartMoving();
|
||||
FishingExtravaganzaFrame.isMoving = true;
|
||||
end
|
||||
end
|
||||
|
||||
-- Check for drag stop event to stop dragging.
|
||||
FishingBuddy.Extravaganza.OnDragStop = function(arg1)
|
||||
if (arg1 == "LeftButton") then
|
||||
FishingExtravaganzaFrame:StopMovingOrSizing();
|
||||
FishingExtravaganzaFrame.isMoving = false;
|
||||
end
|
||||
end
|
||||
|
||||
-- Handle watching the loot
|
||||
FishingBuddy.Extravaganza.OnLoad = function()
|
||||
this:RegisterEvent("PLAYER_LOGIN");
|
||||
this:RegisterEvent("ZONE_CHANGED_NEW_AREA");
|
||||
this:RegisterEvent("VARIABLES_LOADED");
|
||||
|
||||
this:RegisterForDrag("LeftButton");
|
||||
this:Hide();
|
||||
end
|
||||
|
||||
FishingBuddy.Extravaganza.OnEvent = function()
|
||||
local zone, subzone = FishingBuddy.GetZoneInfo();
|
||||
if ( event == "ZONE_CHANGED_NEW_AREA" or event == "PLAYER_LOGIN" ) then
|
||||
if ( zone == FishingBuddy.STVZONENAME and IsTime() ) then
|
||||
this:RegisterEvent("LOOT_OPENED");
|
||||
this:RegisterEvent("MINIMAP_UPDATE_ZOOM");
|
||||
else
|
||||
this:UnregisterEvent("LOOT_OPENED");
|
||||
this:UnregisterEvent("MINIMAP_UPDATE_ZOOM");
|
||||
end
|
||||
elseif ( event == "LOOT_OPENED" ) then
|
||||
if ( IsFishingLoot()) then
|
||||
for index = 1, GetNumLootItems(), 1 do
|
||||
if (LootSlotIsItem(index)) then
|
||||
local fishlink = GetLootSlotLink(index);
|
||||
local _, id, _ = FishingBuddy.SplitFishLink(fishlink);
|
||||
if ( ExtravaganzaFish[id] ) then
|
||||
MarkSchool();
|
||||
STVUpdateTimer = 0;
|
||||
if ( id == tastyfish_id ) then
|
||||
numCaught = numCaught + 1;
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
elseif ( event == "MINIMAP_UPDATE_ZOOM" ) then
|
||||
if ( zone == FishingBuddy.STVZONENAME ) then
|
||||
if ( FishingBuddy.GetSetting("STVTimer") == 1 ) then
|
||||
UpdatePOI();
|
||||
end
|
||||
end
|
||||
elseif ( event == "VARIABLES_LOADED" ) then
|
||||
local _,_,_,_,_,n = FishingBuddy.GetFishie(tastyfish_id);
|
||||
if ( n ) then
|
||||
tastyfish = n;
|
||||
else
|
||||
tastyfish = FISH;
|
||||
end
|
||||
IsTime(true);
|
||||
this:UnregisterEvent("VARIABLES_LOADED");
|
||||
end
|
||||
end
|
||||
|
||||
FishingBuddy.Extravaganza.OnUpdate = function(elapsed)
|
||||
if ( IsTime() ) then
|
||||
if ( not FishingExtravaganzaFrame:IsVisible() ) then
|
||||
FishingExtravaganzaFrame:Show();
|
||||
end
|
||||
STVUpdateTimer = STVUpdateTimer - elapsed;
|
||||
if ( STVUpdateTimer < 0 ) then
|
||||
local hour,minute = GetGameTime();
|
||||
local minleft;
|
||||
local checkhour = STVStartHour;
|
||||
local line;
|
||||
if ( hour >= STVStartHour ) then
|
||||
line = FishingBuddy.TIMELEFT;
|
||||
checkhour = checkhour + 2;
|
||||
else
|
||||
line = FishingBuddy.TIMETOGO;
|
||||
end
|
||||
minleft = (checkhour - hour)*60 - minute;
|
||||
if ( minleft > 0 ) then
|
||||
FishingExtravaganzaFrameButtonText:SetTextColor(0.1, 1.0, 0.1);
|
||||
if ( minleft < 10 ) then
|
||||
FishingExtravaganzaFrameButtonText:SetTextColor(1.0, 0.1, 0.1);
|
||||
end
|
||||
line = string.format(line, minleft/60, math.mod(minleft, 60),
|
||||
numCaught, tastyfish);
|
||||
FishingExtravaganzaFrameButtonText:SetText(line);
|
||||
local width = FishingExtravaganzaFrameButtonText:GetWidth();
|
||||
FishingExtravaganzaFrame:SetWidth(width + 16);
|
||||
UpdatePOI();
|
||||
if ( FishingBuddy_Info["Schools"] ) then
|
||||
STVUpdateTimer = UPDATETIME_SCHOOLS;
|
||||
else
|
||||
STVUpdateTimer = UPDATETIME_COUNTER;
|
||||
end
|
||||
end
|
||||
end
|
||||
else
|
||||
FishingExtravaganzaFrame:Hide();
|
||||
end
|
||||
end
|
||||
|
||||
local function GetObjectCoords(poi, index, numcolumns, texturewidth)
|
||||
local width = poi:GetWidth();
|
||||
local xCoord1, xCoord2, yCoord1, yCoord2;
|
||||
local coordIncrement = width / texturewidth;
|
||||
xCoord1 = mod(index , numcolumns) * coordIncrement;
|
||||
xCoord2 = xCoord1 + coordIncrement;
|
||||
yCoord1 = floor(index / numcolumns) * coordIncrement;
|
||||
yCoord2 = yCoord1 + coordIncrement;
|
||||
return xCoord1, xCoord2, yCoord1, yCoord2;
|
||||
end
|
||||
|
||||
local start = 0;
|
||||
-- debugging routines
|
||||
FishingBuddy.Extravaganza.Debug = function(day, hour, zone)
|
||||
STVDay = day;
|
||||
STVStartHour = hour;
|
||||
if ( zone ) then
|
||||
FishingBuddy.STVZONENAME = zone;
|
||||
end
|
||||
IsTime(true);
|
||||
end
|
||||
|
||||
FishingBuddy.Extravaganza.Dump = function()
|
||||
local x, y = GetSTVPosition();
|
||||
local iy = string.format("%d", y * 100);
|
||||
|
||||
FishingBuddy.Print("Current location: %d - %f, %f", iy, x, y);
|
||||
|
||||
if ( FishingBuddy_Info["Schools"][iy] ) then
|
||||
for idx=1,table.getn(FishingBuddy_Info["Schools"][iy]) do
|
||||
local t = FishingBuddy_Info["Schools"][iy][idx];
|
||||
local dist = GetMinimapDistance(t.x, t.y, x, y);
|
||||
FishingBuddy.Print("Distance: %f", dist);
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- eventually, display what fish you caught here
|
||||
FishingBuddy.Extravaganza.MiniMap_OnEnter = function()
|
||||
end
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
|
||||
..\FrameXML\UI.xsd">
|
||||
<Script file="FishingExtravaganza.lua"/>
|
||||
|
||||
<Button name="FishingExtravaganzaMiniTemplate" hidden="true" virtual="true">
|
||||
<Size>
|
||||
<AbsDimension x="8" y="8"/>
|
||||
</Size>
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
this:SetFrameLevel(this:GetFrameLevel() + 1);
|
||||
</OnLoad>
|
||||
<OnEnter>
|
||||
FishingBuddy.Extravaganza.MiniMap_OnEnter();
|
||||
</OnEnter>
|
||||
<OnLeave>
|
||||
GameTooltip:Hide();
|
||||
</OnLeave>
|
||||
</Scripts>
|
||||
<NormalTexture name="$parentTexture" file="Interface\AddOns\FishingBuddy\Icons\minimaptargetgreen"/>
|
||||
</Button>
|
||||
<Button name="FishingExtravaganzaMini1" inherits="FishingExtravaganzaMiniTemplate" id="1" hidden="false" parent="Minimap" toplevel="true"/>
|
||||
<Button name="FishingExtravaganzaMini2" inherits="FishingExtravaganzaMiniTemplate" id="2" hidden="false" parent="Minimap" toplevel="true"/>
|
||||
<Button name="FishingExtravaganzaMini3" inherits="FishingExtravaganzaMiniTemplate" id="3" hidden="false" parent="Minimap" toplevel="true"/>
|
||||
<Button name="FishingExtravaganzaMini4" inherits="FishingExtravaganzaMiniTemplate" id="4" hidden="false" parent="Minimap" toplevel="true"/>
|
||||
<Button name="FishingExtravaganzaMini5" inherits="FishingExtravaganzaMiniTemplate" id="5" hidden="false" parent="Minimap" toplevel="true"/>
|
||||
<Button name="FishingExtravaganzaMini6" inherits="FishingExtravaganzaMiniTemplate" id="6" hidden="false" parent="Minimap" toplevel="true"/>
|
||||
<Button name="FishingExtravaganzaMini7" inherits="FishingExtravaganzaMiniTemplate" id="7" hidden="false" parent="Minimap" toplevel="true"/>
|
||||
<Button name="FishingExtravaganzaMini8" inherits="FishingExtravaganzaMiniTemplate" id="8" hidden="false" parent="Minimap" toplevel="true"/>
|
||||
<Button name="FishingExtravaganzaMini9" inherits="FishingExtravaganzaMiniTemplate" id="9" hidden="false" parent="Minimap" toplevel="true"/>
|
||||
<Button name="FishingExtravaganzaMini10" inherits="FishingExtravaganzaMiniTemplate" id="10" hidden="false" parent="Minimap" toplevel="true"/>
|
||||
|
||||
<Frame name="FishingExtravaganzaFrame" frameStrata="BACKGROUND" toplevel="true" enableMouse="true" movable="true" parent="UIParent">
|
||||
<Size>
|
||||
<AbsDimension x="150" y="25"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="CENTER"/>
|
||||
</Anchors>
|
||||
<TitleRegion setAllPoints="true"/>
|
||||
<Backdrop name="$parentBackdrop" bgFile="Interface\TutorialFrame\TutorialFrameBackground" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
|
||||
<EdgeSize>
|
||||
<AbsValue val="16"/>
|
||||
</EdgeSize>
|
||||
<TileSize>
|
||||
<AbsValue val="16"/>
|
||||
</TileSize>
|
||||
<BackgroundInsets>
|
||||
<AbsInset left="3" right="5" top="3" bottom="3"/>
|
||||
</BackgroundInsets>
|
||||
</Backdrop>
|
||||
<Frames>
|
||||
<Button name="$parentButton">
|
||||
<Size>
|
||||
<AbsDimension x="150" y="25"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="CENTER">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="0"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Layers>
|
||||
<Layer level="BACKGROUND">
|
||||
<FontString name="$parentText" inherits="GameFontNormal" wraponspaces="true">
|
||||
<Anchors>
|
||||
<Anchor point="CENTER">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="0"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</FontString>
|
||||
</Layer>
|
||||
</Layers>
|
||||
<Scripts>
|
||||
<OnMouseDown>
|
||||
FishingBuddy.Extravaganza.OnDragStart(arg1);
|
||||
</OnMouseDown>
|
||||
<OnMouseUp>
|
||||
FishingBuddy.Extravaganza.OnDragStop(arg1);
|
||||
</OnMouseUp>
|
||||
<OnDragStart>
|
||||
FishingBuddy.Extravaganza.OnDragStart(arg1);
|
||||
</OnDragStart>
|
||||
<OnDragStop>
|
||||
FishingBuddy.Extravaganza.OnDragStop(arg1);
|
||||
</OnDragStop>
|
||||
</Scripts>
|
||||
</Button>
|
||||
</Frames>
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
FishingBuddy.Extravaganza.OnLoad();
|
||||
</OnLoad>
|
||||
<OnEvent>
|
||||
FishingBuddy.Extravaganza.OnEvent();
|
||||
</OnEvent>
|
||||
<OnUpdate>
|
||||
FishingBuddy.Extravaganza.OnUpdate(arg1);
|
||||
</OnUpdate>
|
||||
</Scripts>
|
||||
</Frame>
|
||||
|
||||
</Ui>
|
||||
@@ -0,0 +1,43 @@
|
||||
-- Support for Fishing Holes
|
||||
|
||||
FishingBuddy.FishingHoles = {};
|
||||
|
||||
-- Let's store fishing holes like this
|
||||
-- FishingBuddy_Info["FishingHoles"][ZONE]
|
||||
-- Store everything to two digits?
|
||||
|
||||
local function IsFishingHole()
|
||||
if ( GameTooltip:IsVisible() ) then
|
||||
local text = getglobal("GameTooltipTextLeft1");
|
||||
if ( text ) then
|
||||
text = text:GetText();
|
||||
-- let a partial match work (for translations)
|
||||
if ( string.find(text, FishingBuddy.SCHOOL_OF) ) then
|
||||
local s,e = string.find(text, FishingBuddy.SCHOOL_OF.." ");
|
||||
if ( s ) then
|
||||
if ( s > 1 ) then
|
||||
text = string.sub(text, 1, s-1)..string.sub(fishie, e+1);
|
||||
else
|
||||
text = string.sub(text, e+1);
|
||||
end
|
||||
else
|
||||
s,e = string.find(text, " "..FishingBuddy.SCHOOL_OF);
|
||||
if ( s ) then
|
||||
text = string.sub(text, 1, s-1)..string.sub(text, e+1);
|
||||
end
|
||||
end
|
||||
return text;
|
||||
end
|
||||
end
|
||||
end
|
||||
return nil;
|
||||
end
|
||||
|
||||
FishingBuddy.FishingHoles.CheckFishingHole = function()
|
||||
local holename = IsFishingHole();
|
||||
if ( holename ) then
|
||||
-- find the name of the fish in our database if we can
|
||||
-- if not, we can find it later, when we catch one
|
||||
-- need translations for the other kinds of fishing holes
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,468 @@
|
||||
-- FishingBuddy
|
||||
--
|
||||
-- Everything you wanted support for in your fishing endeavors
|
||||
|
||||
local gotSetupDone = false;
|
||||
local playerName;
|
||||
local realmName;
|
||||
|
||||
local DEFAULT_MINIMAP_POSITION = 256;
|
||||
|
||||
FishingBuddy.IsLoaded = function()
|
||||
return gotSetupDone;
|
||||
end
|
||||
|
||||
-- if the old information is still there, then we might not have per
|
||||
-- character saved info, so let's save it away just in case. It'll go
|
||||
-- away the second time we load the add-on
|
||||
FishingBuddy.SavePlayerInfo = function()
|
||||
if ( FishingBuddy_Info[realmName] and
|
||||
FishingBuddy_Info[realmName]["Settings"] and
|
||||
FishingBuddy_Info[realmName]["Settings"][playerName] ) then
|
||||
local tabs = { "Settings", "Outfit", "WasWearing" };
|
||||
for _,tab in tabs do
|
||||
for k,v in FishingBuddy_Player[tab] do
|
||||
FishingBuddy_Info[realmName][tab][playerName][k] = v;
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local Setup = {};
|
||||
Setup.CheckPlayerInfo = function()
|
||||
local tabs = { "Settings", "Outfit", "WasWearing" };
|
||||
if ( not FishingBuddy_Player ) then
|
||||
FishingBuddy_Player = {};
|
||||
for _,tab in tabs do
|
||||
FishingBuddy_Player[tab] = { };
|
||||
end
|
||||
if ( FishingBuddy_Info[realmName] and
|
||||
FishingBuddy_Info[realmName]["Settings"] and
|
||||
FishingBuddy_Info[realmName]["Settings"][playerName] ) then
|
||||
for _,tab in tabs do
|
||||
if ( FishingBuddy_Info[realmName][tab] and
|
||||
FishingBuddy_Info[realmName][tab][playerName] ) then
|
||||
for k,v in FishingBuddy_Info[realmName][tab][playerName] do
|
||||
FishingBuddy_Player[tab][k] = v;
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
elseif ( FishingBuddy_Info[realmName] and
|
||||
FishingBuddy_Info[realmName]["Settings"] ) then
|
||||
-- the saved information is there, kill the old stuff
|
||||
for _,tab in tabs do
|
||||
if ( FishingBuddy_Info[realmName][tab] ) then
|
||||
FishingBuddy_Info[realmName][tab][playerName] = nil;
|
||||
-- Duh, table.getn doesn't work because there
|
||||
-- aren't any integer keys in this table
|
||||
if ( next(FishingBuddy_Info[realmName][tab]) == nil ) then
|
||||
FishingBuddy_Info[realmName][tab] = nil;
|
||||
end
|
||||
end
|
||||
end
|
||||
if ( next(FishingBuddy_Info[realmName]) == nil ) then
|
||||
FishingBuddy_Info[realmName] = nil;
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Setup.CheckPlayerSetting = function(setting, defaultvalue)
|
||||
if ( not FishingBuddy_Player["Settings"] ) then
|
||||
FishingBuddy_Player["Settings"] = { };
|
||||
end
|
||||
if ( not FishingBuddy_Player["Settings"][setting] ) then
|
||||
FishingBuddy_Player["Settings"][setting] = defaultvalue;
|
||||
end
|
||||
end
|
||||
|
||||
Setup.CheckGlobalSetting = function(setting, defaultvalue)
|
||||
if ( not FishingBuddy_Info[setting] ) then
|
||||
if ( not defaultvalue ) then
|
||||
FishingBuddy_Info[setting] = {};
|
||||
else
|
||||
FishingBuddy_Info[setting] = defaultvalue;
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Setup.CheckRealm = function()
|
||||
local tabs = { "Settings", "Outfit", "WasWearing" };
|
||||
for _,tab in tabs do
|
||||
if ( FishingBuddy_Info[tab] ) then
|
||||
local old = FishingBuddy_Info[tab][playerName];
|
||||
if ( old ) then
|
||||
if ( not FishingBuddy_Info[realmName] ) then
|
||||
FishingBuddy_Info[realmName] = { };
|
||||
for _,tab in tabs do
|
||||
FishingBuddy_Info[realmName][tab] = { };
|
||||
end
|
||||
end
|
||||
|
||||
FishingBuddy_Info[realmName][tab][playerName] = { };
|
||||
for k, v in old do
|
||||
FishingBuddy_Info[realmName][tab][playerName][k] = v;
|
||||
end
|
||||
FishingBuddy_Info[tab][playerName] = nil;
|
||||
end
|
||||
|
||||
-- clean out cruft, if we have some
|
||||
FishingBuddy_Info[tab][UNKNOWNOBJECT] = nil;
|
||||
FishingBuddy_Info[tab][UKNOWNBEING] = nil;
|
||||
|
||||
-- Duh, table.getn doesn't work because there
|
||||
-- aren't any integer keys in this table
|
||||
if ( next(FishingBuddy_Info[tab]) == nil ) then
|
||||
FishingBuddy_Info[tab] = nil;
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Setup.UpdateFishingDB1 = function()
|
||||
local version = FishingBuddy_Info["Version"];
|
||||
if ( not version ) then
|
||||
version = 7700; -- be really old
|
||||
end
|
||||
|
||||
if ( FishingBuddy_Info["FishingHoles"] ) then
|
||||
if ( version < 8300 ) then
|
||||
-- handle a beta bug where we missed that GetSubZoneText() returns "" and not nil
|
||||
for zone in FishingBuddy_Info["FishingHoles"] do
|
||||
if ( FishingBuddy_Info["FishingHoles"][zone][""] ) then
|
||||
if ( not FishingBuddy_Info["FishingHoles"][zone][zone] ) then
|
||||
FishingBuddy_Info["FishingHoles"][zone][zone] = { };
|
||||
end
|
||||
for k,v in FishingBuddy_Info["FishingHoles"][zone][""] do
|
||||
FishingBuddy_Info["FishingHoles"][zone][zone][k] = v;
|
||||
end
|
||||
FishingBuddy_Info["FishingHoles"][zone][""] = nil;
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if ( version < 8503 ) then
|
||||
local fh = FishingBuddy_Info["FishingHoles"];
|
||||
local ff = FishingBuddy_Info["Fishies"];
|
||||
for zone in fh do
|
||||
for subzone in fh[zone] do
|
||||
local crap = {};
|
||||
for fishie in fh[zone][subzone] do
|
||||
if ( type(fishie) == "string" ) then
|
||||
tinsert(crap, fishie);
|
||||
end
|
||||
end
|
||||
for _,fishie in crap do
|
||||
if ( ff[fishie] ) then
|
||||
local item = ff[fishie].item;
|
||||
if ( item ) then
|
||||
local _,_,id = string.find(item, "^(%d+):");
|
||||
id = id + 0;
|
||||
fh[zone][subzone][id] = fh[zone][subzone][fishie];
|
||||
fh[zone][subzone][fishie] = nil;
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
local fishes = {};
|
||||
for fishie in ff do
|
||||
if ( type(fishie) == "string" ) then
|
||||
tinsert(fishes, fishie);
|
||||
end
|
||||
end
|
||||
for _,fishie in fishes do
|
||||
local item = ff[fishie].item;
|
||||
if ( item ) then
|
||||
local _,_,id = string.find(item, "^(%d+):");
|
||||
id = id + 0;
|
||||
ff[id] = {};
|
||||
ff[id].name = fishie;
|
||||
for k,v in ff[fishie] do
|
||||
if ( k ~= "item" ) then
|
||||
ff[id][k] = v;
|
||||
end
|
||||
end
|
||||
ff[fishie] = nil;
|
||||
end
|
||||
end
|
||||
-- tracking information
|
||||
local ft = FishingBuddy_Info["FishTracking"];
|
||||
for how in ft do
|
||||
local fishes = {};
|
||||
for item in ft[how] do
|
||||
if ( type(item) == "string" ) then
|
||||
tinsert(fishes, item);
|
||||
end
|
||||
end
|
||||
for _,item in fishes do
|
||||
local _,_,id = string.find(item, "^(%d+):");
|
||||
id = tonumber(id);
|
||||
ft[how][id] = {};
|
||||
for k,v in ft[how][item] do
|
||||
ft[how][id][k] = v;
|
||||
end
|
||||
if ( ft[how][id].count ) then
|
||||
ft[how][id].data = {};
|
||||
for k,v in ft[how][id].count do
|
||||
ft[how][id].data[k] = v;
|
||||
end
|
||||
ft[how][id].count = nil;
|
||||
end
|
||||
end
|
||||
for _,item in fishes do
|
||||
ft[how][item] = nil;
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if ( version < 8504 ) then
|
||||
-- Let's not store default colors for things
|
||||
local ff = FishingBuddy_Info["Fishies"];
|
||||
if ( ff ) then
|
||||
for id in ff do
|
||||
if ( ff[id].color and ff[id].color == "ffffffff" ) then
|
||||
ff[id].color = nil;
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if ( version < 8509 and FishingBuddy_Info["FishTracking"] ) then
|
||||
local ft = FishingBuddy_Info["FishTracking"]["WEEKLY"];
|
||||
for id,what in ft do
|
||||
if ( not ft[id].data[52] ) then
|
||||
ft[id].data[52] = 0;
|
||||
table.setn(ft[id].data, 53);
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if ( not FishingBuddy_Info["Locations"] ) then
|
||||
return;
|
||||
end
|
||||
|
||||
-- Duh, table.getn doesn't work because there aren't any integer
|
||||
-- keys in this table
|
||||
if ( next(FishingBuddy_Info["Locations"]) == nil ) then
|
||||
FishingBuddy_Info["Locations"] = nil;
|
||||
return;
|
||||
end
|
||||
|
||||
FishingBuddy_Info["FishingHoles"] = { };
|
||||
FishingBuddy_Info["FishingHoles"][FishingBuddy.UNKNOWN] = { };
|
||||
for zone in FishingBuddy_Info["Locations"] do
|
||||
FishingBuddy_Info["FishingHoles"][FishingBuddy.UNKNOWN][zone] = { };
|
||||
local tab = FishingBuddy_Info["FishingHoles"][FishingBuddy.UNKNOWN][zone];
|
||||
for k,v in FishingBuddy_Info["Locations"][zone] do
|
||||
tab[k] = v;
|
||||
end
|
||||
end
|
||||
FishingBuddy_Info["Locations"] = nil;
|
||||
end
|
||||
|
||||
Setup.UpdateFishingDB2 = function()
|
||||
local version = FishingBuddy_Info["Version"];
|
||||
if ( not version ) then
|
||||
version = 7700; -- be really old
|
||||
end
|
||||
|
||||
-- track the weekly fish that got missed at the end of the year
|
||||
if ( version < 8509 ) then
|
||||
local ft = FishingBuddy_Info["FishTracking"]["WEEKLY"];
|
||||
for id,what in ft do
|
||||
if ( FishingBuddy.ByFishie[id] ) then
|
||||
local total = 0;
|
||||
for subzone,count in FishingBuddy.ByFishie[id] do
|
||||
total = total + count;
|
||||
end
|
||||
local tracked = 0;
|
||||
local limit = table.getn(what.data)-1;
|
||||
for i=0,limit do
|
||||
tracked = tracked + what.data[i];
|
||||
end
|
||||
local diff = total - tracked;
|
||||
if ( diff > 0 ) then
|
||||
ft[id].data[52] = ft[id].data[52] + diff;
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
FishingBuddy_Info["Version"] = FishingBuddy.CURRENTVERSION;
|
||||
end
|
||||
|
||||
-- Based on code in QuickMountEquip
|
||||
Setup.HookFunction = function(func, newfunc)
|
||||
local oldValue = getglobal(func);
|
||||
if ( oldValue ~= getglobal(newfunc) ) then
|
||||
setglobal(func, getglobal(newfunc));
|
||||
return true;
|
||||
end
|
||||
return false;
|
||||
end
|
||||
|
||||
-- set up alternate view of fish data. do this as startup to
|
||||
-- lower overall dynamic hit when loading the window
|
||||
Setup.SetupByFishie = function()
|
||||
if ( not FishingBuddy.ByFishie ) then
|
||||
local fh = FishingBuddy_Info["FishingHoles"];
|
||||
local ff = FishingBuddy_Info["Fishies"];
|
||||
FishingBuddy.ByFishie = { };
|
||||
FishingBuddy.SortedFishies = { };
|
||||
for zone in fh do
|
||||
for subzone in fh[zone] do
|
||||
for id in fh[zone][subzone] do
|
||||
local quantity = fh[zone][subzone][id];
|
||||
if ( not FishingBuddy.ByFishie[id] ) then
|
||||
FishingBuddy.ByFishie[id] = { };
|
||||
tinsert(FishingBuddy.SortedFishies,
|
||||
{ text = ff[id].name, id = id });
|
||||
end
|
||||
if ( not FishingBuddy.ByFishie[id][subzone] ) then
|
||||
FishingBuddy.ByFishie[id][subzone] = quantity;
|
||||
else
|
||||
FishingBuddy.ByFishie[id][subzone] = FishingBuddy.ByFishie[id][subzone] + quantity;
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
FishingBuddy.FishSort(FishingBuddy.SortedFishies, true);
|
||||
end
|
||||
end
|
||||
|
||||
Setup.InitSortHelpers = function()
|
||||
local fh = FishingBuddy_Info["FishingHoles"];
|
||||
FishingBuddy.SortedZones = {};
|
||||
FishingBuddy.SortedByZone = {};
|
||||
FishingBuddy.SortedSubZones = {};
|
||||
for zone in fh do
|
||||
tinsert(FishingBuddy.SortedZones, zone);
|
||||
FishingBuddy.SortedByZone[zone] = {};
|
||||
for subzone in fh[zone] do
|
||||
tinsert(FishingBuddy.SortedByZone[zone], subzone);
|
||||
tinsert(FishingBuddy.SortedSubZones, subzone);
|
||||
end
|
||||
table.sort(FishingBuddy.SortedByZone[zone]);
|
||||
end
|
||||
table.sort(FishingBuddy.SortedZones);
|
||||
table.sort(FishingBuddy.SortedSubZones);
|
||||
end
|
||||
|
||||
Setup.EnhanceSoundDefaults = function()
|
||||
Setup.CheckPlayerSetting("EnhanceSoundSoundVolume", 1.0);
|
||||
Setup.CheckPlayerSetting("EnhanceSoundMusicVolume", 0.0);
|
||||
Setup.CheckPlayerSetting("EnhanceSoundAmbienceVolume", 0.0);
|
||||
end
|
||||
|
||||
Setup.InitSettings = function()
|
||||
if( not FishingBuddy_Info ) then
|
||||
FishingBuddy_Info = { };
|
||||
end
|
||||
-- global stuff
|
||||
Setup.UpdateFishingDB1();
|
||||
Setup.CheckRealm();
|
||||
|
||||
Setup.CheckGlobalSetting("ImppDBLoaded", 0);
|
||||
Setup.CheckGlobalSetting("FishInfo2", 0);
|
||||
Setup.CheckGlobalSetting("DataFish", 0);
|
||||
Setup.CheckGlobalSetting("FishingHoles");
|
||||
Setup.CheckGlobalSetting("FishingSkill");
|
||||
Setup.CheckGlobalSetting("Fishies");
|
||||
|
||||
Setup.CheckPlayerInfo();
|
||||
|
||||
-- per user stuff
|
||||
for _,option in FishingBuddy.OPTIONS do
|
||||
local setting = option.default;
|
||||
if ( option.check and option.checkfail ) then
|
||||
if ( not option.check() ) then
|
||||
setting = option.checkfail;
|
||||
end
|
||||
end
|
||||
Setup.CheckPlayerSetting(option.name, setting);
|
||||
end
|
||||
|
||||
-- setting not on option pane (or not checkboxes)
|
||||
Setup.CheckPlayerSetting("ShowLocationZones", 1);
|
||||
Setup.CheckPlayerSetting("GroupByLocation", 1);
|
||||
|
||||
-- titan panel support
|
||||
Setup.CheckPlayerSetting("TitanClickToSwitch", 1);
|
||||
-- InfoBar support
|
||||
Setup.CheckPlayerSetting("InfoBarClickToSwitch", 1);
|
||||
-- minimap button support
|
||||
Setup.CheckPlayerSetting("MinimapClickToSwitch", 1);
|
||||
Setup.CheckPlayerSetting("MinimapButtonPosition", DEFAULT_MINIMAP_POSITION);
|
||||
|
||||
-- Option key casting
|
||||
Setup.CheckPlayerSetting("EasyCastKeys", FishingBuddy.KEYS_NONE);
|
||||
Setup.CheckPlayerSetting("SuitUpKeys", FishingBuddy.KEYS_NONE);
|
||||
|
||||
Setup.EnhanceSoundDefaults();
|
||||
|
||||
if ( FishingBuddy.InitTracking ) then
|
||||
FishingBuddy.InitTracking();
|
||||
end
|
||||
Setup.SetupByFishie();
|
||||
Setup.UpdateFishingDB2();
|
||||
Setup.InitSortHelpers();
|
||||
end
|
||||
|
||||
Setup.RegisterMyAddOn = function()
|
||||
-- Register the addon in myAddOns
|
||||
if (myAddOnsFrame_Register) then
|
||||
local details = {
|
||||
name = FishingBuddy.ID,
|
||||
description = FishingBuddy.DESCRIPTION,
|
||||
version = FishingBuddy.VERSION,
|
||||
releaseDate = 'July 21, 2005',
|
||||
author = 'Sutorix',
|
||||
email = 'Windrunner',
|
||||
category = MYADDONS_CATEGORY_PROFESSIONS,
|
||||
frame = "FishingBuddy",
|
||||
optionsframe = "FishingBuddyFrame",
|
||||
};
|
||||
local help = "";
|
||||
for _,line in FishingBuddy.HELPMSG do
|
||||
if ( type(line) == "table" ) then
|
||||
for _,l in line do
|
||||
help = help.."\n"..l;
|
||||
end
|
||||
else
|
||||
help = help.."\n"..line;
|
||||
end
|
||||
end
|
||||
myAddOnsFrame_Register(details, { help });
|
||||
end
|
||||
end
|
||||
|
||||
Setup.RegisterHandlers = function()
|
||||
temp = ToggleMinimap;
|
||||
if ( Setup.HookFunction("ToggleMinimap", "FishingBuddy_ToggleMinimap") ) then
|
||||
FishingBuddy.SavedToggleMinimap = temp;
|
||||
end
|
||||
FishingBuddy.TrapWorldMouse()
|
||||
end
|
||||
|
||||
FishingBuddy.Initialize = function()
|
||||
-- Set everything up, then dump the code we don't need anymore
|
||||
playerName, realmName = FishingBuddy.SetupNameInfo();
|
||||
if ( Setup ) then
|
||||
if ( GetBuildInfo ) then
|
||||
local version, buildnum, builddate = GetBuildInfo();
|
||||
else
|
||||
FishingBuddy.Is10900 = true;
|
||||
end
|
||||
Setup.RegisterHandlers();
|
||||
Setup.InitSettings();
|
||||
-- register with myAddOn
|
||||
Setup.RegisterMyAddOn();
|
||||
|
||||
gotSetupDone = true;
|
||||
FishingBuddy.WatchUpdate();
|
||||
-- we don't need these functions anymore, gc 'em
|
||||
Setup = nil;
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,527 @@
|
||||
-- Handle displaying all the fish in their habitats
|
||||
|
||||
FishingBuddy.Locations = {};
|
||||
|
||||
local NUM_THINGIES_DISPLAYED = 20;
|
||||
FishingBuddy.Locations.FRAME_THINGIEHEIGHT = 16;
|
||||
|
||||
local Collapsed = false;
|
||||
local LocationLineSelected = 0;
|
||||
local LocationLines = {};
|
||||
local LocationLastLine = 1;
|
||||
|
||||
local function MakeInfo(line, level, collapsible, expanded, hasicon, text, extra, index, id)
|
||||
if ( not LocationLines[line] ) then
|
||||
LocationLines[line] = {};
|
||||
end
|
||||
LocationLines[line].level = level;
|
||||
LocationLines[line].collapsible = collapsible;
|
||||
LocationLines[line].expanded = expanded;
|
||||
LocationLines[line].hasicon = hasicon;
|
||||
LocationLines[line].text = text;
|
||||
LocationLines[line].extra = extra;
|
||||
if ( index ) then
|
||||
LocationLines[line].index = index;
|
||||
else
|
||||
LocationLines[line].index = text;
|
||||
end
|
||||
LocationLines[line].id = id;
|
||||
LocationLines[line].valid = true;
|
||||
end
|
||||
|
||||
local function CountLocationLines()
|
||||
local linecount = 0;
|
||||
local j = 1;
|
||||
local limit = LocationLastLine;
|
||||
while ( j <= limit ) do
|
||||
local info = LocationLines[j];
|
||||
j = j + 1;
|
||||
if ( info and info.valid ) then
|
||||
linecount = linecount + 1;
|
||||
if ( info.collapsible and not info.expanded ) then
|
||||
local i2 = LocationLines[j];
|
||||
while ( i2 and (i2.level > info.level) ) do
|
||||
j = j + 1;
|
||||
i2 = LocationLines[j];
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
-- there's a zero-based vs. one-based bug here, somewhere
|
||||
if ( linecount > NUM_THINGIES_DISPLAYED and
|
||||
limit >= table.getn(LocationLines)) then
|
||||
linecount = linecount + 1;
|
||||
end
|
||||
-- FishingBuddy.Debug("Count "..linecount.." limit "..limit);
|
||||
return linecount;
|
||||
end
|
||||
|
||||
local function FishiesChanged()
|
||||
local fh = FishingBuddy_Info["FishingHoles"];
|
||||
local ff = FishingBuddy_Info["Fishies"];
|
||||
local line = 1
|
||||
local fishcount = table.getn(FishingBuddy.SortedFishies);
|
||||
local zonetotals = {};
|
||||
|
||||
for i=1,fishcount,1 do
|
||||
local fishid = FishingBuddy.SortedFishies[i].id;
|
||||
local fishname = ff[fishid].name;
|
||||
local locsort = {};
|
||||
local total = 0;
|
||||
for zone in FishingBuddy.ByFishie[fishid] do
|
||||
if ( not zonetotals[zone] ) then
|
||||
local fi = nil;
|
||||
for z in fh do
|
||||
if ( fh[z][zone] ) then
|
||||
fi = fh[z][zone];
|
||||
break;
|
||||
end
|
||||
end
|
||||
if ( fi ) then
|
||||
local tot = 0;
|
||||
for f in fi do
|
||||
tot = tot + fi[f];
|
||||
end
|
||||
zonetotals[zone] = tot;
|
||||
end
|
||||
end
|
||||
local count = FishingBuddy.ByFishie[fishid][zone];
|
||||
local info = {};
|
||||
info.text = zone;
|
||||
info.count = count;
|
||||
info.total = zonetotals[zone];
|
||||
if ( not info.total or info.total == 0) then
|
||||
info.total = 1;
|
||||
end
|
||||
tinsert(locsort, info);
|
||||
total = total + count;
|
||||
end
|
||||
local extra = " ("..total.." total";
|
||||
if ( ff[fishid].level ) then
|
||||
extra = extra..", "..ff[fishid].level;
|
||||
end
|
||||
extra = extra..")";
|
||||
MakeInfo(line, 0, true, true, true, fishname, extra, nil, fishid);
|
||||
line = line + 1;
|
||||
FishingBuddy.FishSort(locsort);
|
||||
for j=1,table.getn(locsort),1 do
|
||||
local zone = locsort[j].text;
|
||||
local amount = locsort[j].count;
|
||||
local total = locsort[j].total;
|
||||
local percent = format("%.1f", ( amount / total ) * 100);
|
||||
MakeInfo(line, 1, false, false, false, zone, " ("..amount..", "..percent.."%)");
|
||||
line = line + 1;
|
||||
end
|
||||
end
|
||||
LocationLastLine = line;
|
||||
end
|
||||
|
||||
local function BothLocationsChanged()
|
||||
local fh = FishingBuddy_Info["FishingHoles"];
|
||||
local ff = FishingBuddy_Info["Fishies"];
|
||||
local sorted = FishingBuddy.SortedZones;
|
||||
local line = 1;
|
||||
local zonecount = table.getn(sorted);
|
||||
for i=1,zonecount,1 do
|
||||
local zone = sorted[i];
|
||||
local where = zone;
|
||||
MakeInfo(line, 0, true, true, false, zone, nil, where);
|
||||
line = line + 1;
|
||||
local subsorted = FishingBuddy.SortedByZone[zone];
|
||||
local subcount = table.getn(subsorted);
|
||||
for s=1,subcount,1 do
|
||||
local subzone = subsorted[s];
|
||||
local count, total = FishingBuddy.FishCount(zone, subzone);
|
||||
where = zone.."."..subzone;
|
||||
local extra = " ("..count.." types, "..total.." total)";
|
||||
if ( FishingBuddy_Info["FishingSkill"][zone] and FishingBuddy_Info["FishingSkill"][zone][subzone] ) then
|
||||
extra = extra.." ["..FishingBuddy_Info["FishingSkill"][zone][subzone].."]";
|
||||
end
|
||||
if ( fh[zone][subzone] ) then
|
||||
MakeInfo(line, 1, true, true, false, subzone, extra, where);
|
||||
line = line + 1;
|
||||
local fishsort = {};
|
||||
for fishid in fh[zone][subzone] do
|
||||
local info = {};
|
||||
info.id = fishid;
|
||||
info.text = ff[fishid].name;
|
||||
info.count = fh[zone][subzone][fishid];
|
||||
tinsert(fishsort, info);
|
||||
end
|
||||
FishingBuddy.FishSort(fishsort);
|
||||
for j=1,table.getn(fishsort),1 do
|
||||
local fishie = fishsort[j].text;
|
||||
local id = fishsort[j].id;
|
||||
local amount = fishsort[j].count;
|
||||
local percent = format("%.1f", ( amount / total ) * 100);
|
||||
MakeInfo(line, 2, false, false, true, fishie, " ("..percent.."%)", nil, id);
|
||||
line = line + 1;
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
LocationLastLine = line;
|
||||
end
|
||||
|
||||
local function SubZonesChanged()
|
||||
local fh = FishingBuddy_Info["FishingHoles"];
|
||||
local ff = FishingBuddy_Info["Fishies"];
|
||||
local mapping = {};
|
||||
for zone in fh do
|
||||
for subzone in fh[zone] do
|
||||
mapping[subzone] = zone;
|
||||
end
|
||||
end
|
||||
local line = 1;
|
||||
local zonecount = table.getn(FishingBuddy.SortedSubZones);
|
||||
for i=1,zonecount,1 do
|
||||
local subzone = FishingBuddy.SortedSubZones[i];
|
||||
local zone = mapping[subzone];
|
||||
local extra = nil;
|
||||
if ( FishingBuddy_Info["FishingSkill"][zone] and FishingBuddy_Info["FishingSkill"][zone][subzone] ) then
|
||||
extra = " ["..FishingBuddy_Info["FishingSkill"][zone][subzone].."]";
|
||||
end
|
||||
MakeInfo(line, 0, true, true, false, subzone, extra);
|
||||
line = line + 1;
|
||||
local zone = mapping[subzone];
|
||||
local count, total = FishingBuddy.FishCount(zone, subzone);
|
||||
local fishsort = {};
|
||||
for fishid in fh[zone][subzone] do
|
||||
local info = {};
|
||||
info.id = fishid;
|
||||
info.text = ff[fishid].name;
|
||||
info.count = fh[zone][subzone][fishid];
|
||||
tinsert(fishsort, info);
|
||||
end
|
||||
FishingBuddy.FishSort(fishsort);
|
||||
for j=1,table.getn(fishsort),1 do
|
||||
local id = fishsort[j].id;
|
||||
local fishie = fishsort[j].text;
|
||||
local amount = fishsort[j].count;
|
||||
local percent = format("%.1f", ( amount / total ) * 100);
|
||||
MakeInfo(line, 1, false, false, true, fishie, " ("..percent.."%)", nil, id);
|
||||
line = line + 1;
|
||||
end
|
||||
end
|
||||
LocationLastLine = line;
|
||||
end
|
||||
|
||||
local function LinesChanged()
|
||||
if ( FishingBuddy.GetSetting("GroupByLocation") == 1 ) then
|
||||
if ( FishingBuddy.GetSetting("ShowLocationZones") == 1 ) then
|
||||
BothLocationsChanged();
|
||||
else
|
||||
SubZonesChanged();
|
||||
end
|
||||
else
|
||||
FishiesChanged();
|
||||
end
|
||||
for i=LocationLastLine,table.getn(LocationLines) do
|
||||
local info = LocationLines[i];
|
||||
if ( info ) then
|
||||
info.valid = false;
|
||||
end
|
||||
end
|
||||
FishingLocationsFrame.valid = true;
|
||||
end
|
||||
|
||||
-- local MOUSEWHEEL_DELAY = 0.1;
|
||||
-- local lastScrollTime = nil;
|
||||
-- function FishingLocationsFrame_OnMouseWheel(value)
|
||||
-- local now = GetTime();
|
||||
-- if ( not lastScrollTime ) then
|
||||
-- lastScrollTime = now - 0.2;
|
||||
-- end
|
||||
-- if ( (now - lastScrollTime) > MOUSEWHEEL_DELAY ) then
|
||||
-- -- call the old mouse wheel function somehow?
|
||||
-- end
|
||||
-- end
|
||||
|
||||
function FishingLocationsFrame_SetSelection(id, line)
|
||||
local info = LocationLines[line];
|
||||
FishingLocationHighlightFrame:Hide();
|
||||
if info then
|
||||
if ( info.collapsible ) then
|
||||
info.expanded = not info.expanded;
|
||||
else
|
||||
LocationLineSelected = line;
|
||||
FishingLocationHighlightFrame:SetPoint ( "TOPLEFT" , getglobal("FishingLocations"..id):GetName() , "TOPLEFT" , 5 , 0 )
|
||||
FishingLocationHighlightFrame:Show()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function FishingLocationsFrame_MoveButtonText(i, what)
|
||||
local relativeTo = "FishingLocations"..i..what;
|
||||
local textfield = getglobal("FishingLocations"..i.."Text");
|
||||
textfield:SetPoint("LEFT", relativeTo, "RIGHT", 2, 0);
|
||||
textfield = getglobal("FishingLocations"..i.."HighlightText");
|
||||
textfield:SetPoint("LEFT", relativeTo, "RIGHT", 2, 0);
|
||||
end
|
||||
|
||||
FishingBuddy.Locations.Update = function(forced)
|
||||
if ( not FishingLocationsFrame:IsVisible() ) then
|
||||
return;
|
||||
end
|
||||
|
||||
if ( forced or not FishingLocationsFrame.valid ) then
|
||||
LinesChanged();
|
||||
end
|
||||
|
||||
local offset = FauxScrollFrame_GetOffset(FishingLocsScrollFrame);
|
||||
FauxScrollFrame_Update( FishingLocsScrollFrame, CountLocationLines(),
|
||||
NUM_THINGIES_DISPLAYED,
|
||||
FishingBuddy.Locations.FRAME_THINGIEHEIGHT );
|
||||
|
||||
local lastlevel = 0;
|
||||
FishingLocationHighlightFrame:Hide();
|
||||
local j = 1;
|
||||
local o = 1;
|
||||
while ( o < offset ) do
|
||||
local info = LocationLines[j];
|
||||
if ( info ) then
|
||||
j = j + 1;
|
||||
o = o + 1;
|
||||
if ( info.collapsible and not info.expanded ) then
|
||||
local i2 = LocationLines[j];
|
||||
while ( i2 and i2.level > info.level ) do
|
||||
j = j + 1;
|
||||
i2 = LocationLines[j];
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
for i = 1,NUM_THINGIES_DISPLAYED,1 do
|
||||
local locButton = getglobal ( "FishingLocations"..i );
|
||||
if ( LocationLines[j] ) then
|
||||
local icon = getglobal("FishingLocations"..i.."Icon");
|
||||
local icontex = getglobal("FishingLocations"..i.."IconTexture");
|
||||
local info = LocationLines[j];
|
||||
locButton.id = i;
|
||||
locButton.line = j;
|
||||
|
||||
local leveloffset = (info.level - lastlevel)*16;
|
||||
if ( i == 1 ) then
|
||||
locButton:SetPoint("TOPRIGHT", "FishingLocsScrollFrame", "TOPLEFT", leveloffset, 0);
|
||||
else
|
||||
local t = i - 1;
|
||||
locButton:SetPoint("TOPLEFT", "FishingLocations"..t, "BOTTOMLEFT", leveloffset, 0);
|
||||
end
|
||||
lastlevel = info.level;
|
||||
|
||||
local text = info.text;
|
||||
if text and info.extra then
|
||||
text = text .. info.extra;
|
||||
end
|
||||
|
||||
locButton:SetText( text );
|
||||
icon:ClearAllPoints();
|
||||
if ( info.collapsible ) then
|
||||
icon:SetPoint("LEFT", "FishingLocations"..i, "LEFT", 21, 0);
|
||||
locButton:SetTextColor( 1, 0.82, 0 );
|
||||
if ( info.expanded ) then
|
||||
locButton:SetNormalTexture("Interface\\Buttons\\UI-MinusButton-Up");
|
||||
else
|
||||
locButton:SetNormalTexture("Interface\\Buttons\\UI-PlusButton-Up");
|
||||
end
|
||||
getglobal("FishingLocations"..i.."Highlight"):SetTexture("Interface\\Buttons\\UI-PlusButton-Hilight");
|
||||
getglobal("FishingLocations"..i):UnlockHighlight();
|
||||
else
|
||||
icon:SetPoint("LEFT", "FishingLocations"..i, "LEFT", 3, 0);
|
||||
locButton:SetTextColor( .5, .5, .5 );
|
||||
locButton:SetNormalTexture("");
|
||||
getglobal("FishingLocations"..i.."Highlight"):SetTexture("");
|
||||
-- Place the highlight and lock the highlight state
|
||||
if ( LocationLineSelected == j ) then
|
||||
FishingLocationHighlightFrame:SetPoint("TOPLEFT", "FishingLocations"..i, "TOPLEFT", 21, 0);
|
||||
FishingLocationHighlightFrame:Show();
|
||||
locButton:LockHighlight();
|
||||
else
|
||||
locButton:UnlockHighlight();
|
||||
end
|
||||
end
|
||||
|
||||
locButton.tooltip = nil;
|
||||
if ( info.hasicon ) then
|
||||
local item, texture, _, _, _ = FishingBuddy.GetFishie(info.id);
|
||||
locButton.item = item;
|
||||
locButton.name = info.text;
|
||||
if( texture ) then
|
||||
icontex:SetTexture(texture);
|
||||
icon:Show();
|
||||
icontex:Show();
|
||||
end
|
||||
FishingLocationsFrame_MoveButtonText(i, "Icon");
|
||||
else
|
||||
locButton.item = nil;
|
||||
locButton.name = nil;
|
||||
icontex:SetTexture("");
|
||||
icontex:Hide();
|
||||
icon:Hide();
|
||||
FishingLocationsFrame_MoveButtonText(i, "Highlight");
|
||||
end
|
||||
locButton:Show();
|
||||
j = j + 1;
|
||||
if ( info.collapsible and not info.expanded ) then
|
||||
local i2 = LocationLines[j];
|
||||
while ( i2 and (i2.level > info.level) ) do
|
||||
j = j + 1;
|
||||
i2 = LocationLines[j];
|
||||
end
|
||||
end
|
||||
else
|
||||
locButton:Hide();
|
||||
locButton.id = nil;
|
||||
locButton.line = nil;
|
||||
end
|
||||
end
|
||||
|
||||
if LocationLines then
|
||||
-- Set the expand/collapse all button texture
|
||||
local numHeaders = 0;
|
||||
local notExpanded = 0;
|
||||
for i=1,table.getn(LocationLines),1 do
|
||||
local j = i + offset;
|
||||
local info = LocationLines[j];
|
||||
if ( info and info.collapsible ) then
|
||||
numHeaders = numHeaders + 1;
|
||||
if ( not info.expanded ) then
|
||||
notExpanded = notExpanded + 1;
|
||||
end
|
||||
end
|
||||
end
|
||||
FishingLocationsCollapseAllButton:Show();
|
||||
-- If all headers are not expanded then show collapse button, otherwise show the expand button
|
||||
if ( notExpanded ~= numHeaders ) then
|
||||
Collapsed = false;
|
||||
FishingLocationsCollapseAllButton:SetNormalTexture("Interface\\Buttons\\UI-MinusButton-Up");
|
||||
else
|
||||
Collapsed = true;
|
||||
FishingLocationsCollapseAllButton:SetNormalTexture("Interface\\Buttons\\UI-PlusButton-Up");
|
||||
end
|
||||
else
|
||||
FishingLocationsCollapseAllButton:Hide();
|
||||
end
|
||||
end
|
||||
|
||||
FishingBuddy.Locations.Button_OnClick = function(button)
|
||||
if ( button == "LeftButton" ) then
|
||||
if( IsShiftKeyDown() and this.item ) then
|
||||
FishingBuddy.ChatLink(this.item, this.name, this.color);
|
||||
elseif ( this.id and this.line ) then
|
||||
FishingLocationsFrame_SetSelection(this.id, this.line);
|
||||
FishingBuddy.Locations.Update();
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function FishingLocationsCollapseAllButton_OnClick()
|
||||
if not Collapsed then
|
||||
FishingLocsScrollFrameScrollBar:SetValue(0);
|
||||
LocationLineSelected = 1;
|
||||
end
|
||||
for _,info in LocationLines do
|
||||
info.expanded = Collapsed;
|
||||
end
|
||||
Collapsed = not Collapsed;
|
||||
FishingBuddy.Locations.Update();
|
||||
end
|
||||
|
||||
FishingBuddy.Locations.Button_OnEnter = function()
|
||||
if( GameTooltip.finished ) then
|
||||
return;
|
||||
end
|
||||
if( this.item or this.tooltip ) then
|
||||
GameTooltip:SetOwner(this, "ANCHOR_RIGHT");
|
||||
if ( this.item and this.item ~= "" ) then
|
||||
local link = "item:"..this.item;
|
||||
local n,l,_,_,_,_,_,_ = GetItemInfo(link);
|
||||
if ( n and l ) then
|
||||
GameTooltip:SetHyperlink(link);
|
||||
else
|
||||
this.tooltip = {}
|
||||
this.tooltip[1] = { ["text"] = this.name };
|
||||
this.tooltip[2] = { ["text"] = FishingBuddy.NOTLINKABLE, ["r"] = 1.0, ["g"] = 0, ["b"] = 0 };
|
||||
FishingBuddy.AddTooltip(this.tooltip);
|
||||
this.item = nil;
|
||||
end
|
||||
elseif ( this.tooltip ) then
|
||||
FishingBuddy.AddTooltip(this.tooltip, 1, 1, 1);
|
||||
end
|
||||
GameTooltip.finished = 1;
|
||||
GameTooltip:Show();
|
||||
end
|
||||
end
|
||||
|
||||
FishingBuddy.Locations.Button_OnLeave = function()
|
||||
GameTooltip.finished = nil;
|
||||
if( this.item or this.tooltip ) then
|
||||
GameTooltip:Hide();
|
||||
end
|
||||
end
|
||||
|
||||
FishingBuddy.Locations.DisplayChanged = function()
|
||||
FishingLocsScrollFrameScrollBar:SetValue(0);
|
||||
LocationLineSelected = 1;
|
||||
FishingBuddy.Locations.Update(true);
|
||||
end
|
||||
|
||||
FishingBuddy.Locations.SwitchDisplay = function()
|
||||
-- backwards logic check, we're about to change...
|
||||
if ( FishingBuddy.GetSetting("GroupByLocation") == 1 ) then
|
||||
FishingLocationsSwitchButton:SetText(FishingBuddy.SHOWLOCATIONS);
|
||||
FishingBuddyOptionSLZ:Hide();
|
||||
FishingBuddy.SetSetting("GroupByLocation", 0);
|
||||
else
|
||||
FishingLocationsSwitchButton:SetText(FishingBuddy.SHOWFISHIES);
|
||||
FishingBuddyOptionSLZ:Show();
|
||||
FishingBuddy.SetSetting("GroupByLocation", 1);
|
||||
end
|
||||
FishingBuddy.Locations.DisplayChanged();
|
||||
end
|
||||
|
||||
FishingBuddy.Locations.SwitchButton_OnEnter = function()
|
||||
if ( FishingBuddy.GetSetting("GroupByLocation") == 1 ) then
|
||||
GameTooltip:SetText(FishingBuddy.SHOWFISHIES_INFO);
|
||||
else
|
||||
GameTooltip:SetText(FishingBuddy.SHOWLOCATIONS_INFO);
|
||||
end
|
||||
GameTooltip:Show();
|
||||
end
|
||||
|
||||
FishingBuddy.Locations.OnLoad = function()
|
||||
this:RegisterEvent("VARIABLES_LOADED");
|
||||
FishingLocationsSwitchButton:SetText(FishingBuddy.SHOWFISHIES);
|
||||
-- Set up checkbox
|
||||
FishingBuddyOptionSLZ.name = "ShowLocationZones";
|
||||
FishingBuddyOptionSLZ.text = FishingBuddy.CONFIG_SHOWLOCATIONZONES_ONOFF;
|
||||
FishingBuddyOptionSLZ.tooltip = FishingBuddy.CONFIG_SHOWLOCATIONZONES_INFO;
|
||||
end
|
||||
|
||||
FishingBuddy.Locations.OnShow = function()
|
||||
if ( FishingBuddy.IsLoaded() ) then
|
||||
FishingBuddy.Locations.Update();
|
||||
end
|
||||
end
|
||||
|
||||
FishingBuddy.Locations.OnEvent = function()
|
||||
-- this crashes the client when enabled
|
||||
-- this:EnableMouseWheel(0);
|
||||
end
|
||||
|
||||
FishingBuddy.FishCount = function(zone, subzone)
|
||||
local count = 0;
|
||||
local total = 0;
|
||||
local fh = FishingBuddy_Info["FishingHoles"];
|
||||
if( fh[zone] and fh[zone][subzone] ) then
|
||||
for fishie in fh[zone][subzone] do
|
||||
count = count + 1;
|
||||
total = total + fh[zone][subzone][fishie];
|
||||
end
|
||||
end
|
||||
return count, total;
|
||||
end
|
||||
|
||||
FishingBuddy.Locations.DataChanged = function(zone, subzone, fishie)
|
||||
FishingLocationsFrame.valid = false;
|
||||
end
|
||||
@@ -0,0 +1,625 @@
|
||||
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
|
||||
..\FrameXML\UI.xsd">
|
||||
<Script file="FishingLocationsFrame.lua"/>
|
||||
<Button name="FishingBuddyCollpaseAllTemplate" hidden="true" virtual="true">
|
||||
<Size>
|
||||
<AbsDimension x="293" y="16"/>
|
||||
</Size>
|
||||
<Layers>
|
||||
<Layer level="BACKGROUND">
|
||||
<FontString name="$parentSubText" inherits="GameFontNormalSmall" justifyH="LEFT"/>
|
||||
</Layer>
|
||||
</Layers>
|
||||
<NormalTexture file="Interface\Buttons\UI-MinusButton-UP">
|
||||
<Size>
|
||||
<AbsDimension x="16" y="16"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="LEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="3" y="0"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</NormalTexture>
|
||||
<HighlightTexture name="$parentHighlight" file="Interface\Buttons\UI-PlusButton-Hilight" alphaMode="ADD">
|
||||
<Size>
|
||||
<AbsDimension x="16" y="16"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="LEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="3" y="0"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</HighlightTexture>
|
||||
<DisabledTexture file="Interface\Buttons\UI-PlusButton-Disabled">
|
||||
<Size>
|
||||
<AbsDimension x="16" y="16"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="LEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="3" y="0"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</DisabledTexture>
|
||||
<NormalText name="$parentText" inherits="GameFontNormal" justifyH="LEFT">
|
||||
<Size>
|
||||
<AbsDimension x="0" y="0"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="LEFT" relativeTo="$parentHighlight" relativePoint="RIGHT">
|
||||
<Offset>
|
||||
<AbsDimension x="2" y="1"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</NormalText>
|
||||
<HighlightText name="$parentHighlightText" inherits="GameFontHighlight" justifyH="LEFT">
|
||||
<Size>
|
||||
<AbsDimension x="0" y="0"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="LEFT" relativeTo="$parentHighlight" relativePoint="RIGHT">
|
||||
<Offset>
|
||||
<AbsDimension x="2" y="1"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</HighlightText>
|
||||
<DisabledText name="$parentDisabledText" inherits="GameFontDisable" justifyH="LEFT">
|
||||
<Size>
|
||||
<AbsDimension x="0" y="0"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="LEFT" relativeTo="$parentHighlight" relativePoint="RIGHT">
|
||||
<Offset>
|
||||
<AbsDimension x="2" y="1"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</DisabledText>
|
||||
</Button>
|
||||
|
||||
<Button name="FishingLocationButtonTemplate" hidden="false" virtual="true">
|
||||
<Size>
|
||||
<AbsDimension x="263" y="16"/>
|
||||
</Size>
|
||||
<NormalTexture file="Interface\Buttons\UI-MinusButton-UP">
|
||||
<Size>
|
||||
<AbsDimension x="16" y="16"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="LEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="3" y="0"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</NormalTexture>
|
||||
<HighlightTexture name="$parentHighlight" file="Interface\Buttons\UI-PlusButton-Hilight" alphaMode="ADD">
|
||||
<Size>
|
||||
<AbsDimension x="16" y="16"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="LEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="3" y="0"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</HighlightTexture>
|
||||
<DisabledTexture file="Interface\Buttons\UI-PlusButton-Disabled">
|
||||
<Size>
|
||||
<AbsDimension x="16" y="16"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="LEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="3" y="0"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</DisabledTexture>
|
||||
<NormalText name="$parentText" inherits="GameFontNormal" justifyH="LEFT">
|
||||
<Size>
|
||||
<AbsDimension x="0" y="0"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="LEFT" relativeTo="$parentHighlight" relativePoint="RIGHT">
|
||||
<Offset>
|
||||
<AbsDimension x="2" y="1"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</NormalText>
|
||||
<HighlightText name="$parentHighlightText" inherits="GameFontHighlight" justifyH="LEFT">
|
||||
<Size>
|
||||
<AbsDimension x="0" y="0"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="LEFT" relativeTo="$parentHighlight" relativePoint="RIGHT">
|
||||
<Offset>
|
||||
<AbsDimension x="2" y="1"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</HighlightText>
|
||||
<DisabledText name="$parentDisabledText" inherits="GameFontDisable" justifyH="LEFT">
|
||||
<Size>
|
||||
<AbsDimension x="0" y="0"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="LEFT" relativeTo="$parentHighlight" relativePoint="RIGHT">
|
||||
<Offset>
|
||||
<AbsDimension x="2" y="1"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</DisabledText>
|
||||
<Frames>
|
||||
<Button name="$parentIcon" hidden="true">
|
||||
<Size>
|
||||
<AbsDimension x="16" y="16"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="LEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="21" y="1"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Layers>
|
||||
<Layer level="BORDER">
|
||||
<Texture name="$parentTexture"/>
|
||||
</Layer>
|
||||
</Layers>
|
||||
</Button>
|
||||
</Frames>
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
this:SetFrameLevel(this:GetFrameLevel() + 1);
|
||||
</OnLoad>
|
||||
<OnEnter>
|
||||
FishingBuddy.Locations.Button_OnEnter();
|
||||
</OnEnter>
|
||||
<OnLeave>
|
||||
FishingBuddy.Locations.Button_OnLeave();
|
||||
</OnLeave>
|
||||
<OnClick>
|
||||
FishingBuddy.Locations.Button_OnClick(arg1);
|
||||
</OnClick>
|
||||
</Scripts>
|
||||
</Button>
|
||||
|
||||
<Frame name="FishingLocationsFrame" setAllPoints="true" enableMouse="true" parent="FishingBuddyFrame" hidden="true">
|
||||
<HitRectInsets>
|
||||
<AbsInset left="0" right="30" top="0" bottom="75"/>
|
||||
</HitRectInsets>
|
||||
<Layers>
|
||||
<Layer level="BACKGROUND">
|
||||
<Texture file="Interface\ClassTrainerFrame\UI-ClassTrainer-TopLeft">
|
||||
<Size>
|
||||
<AbsDimension x="256" y="256"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="2" y="-1"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Texture>
|
||||
<Texture file="Interface\ClassTrainerFrame\UI-ClassTrainer-TopRight">
|
||||
<Size>
|
||||
<AbsDimension x="128" y="256"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="258" y="-1"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Texture>
|
||||
<Texture file="Interface\PaperDollInfoFrame\UI-Character-General-BottomLeft">
|
||||
<Size>
|
||||
<AbsDimension x="256" y="256"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="2" y="-257"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Texture>
|
||||
<Texture file="Interface\PaperDollInfoFrame\UI-Character-General-BottomRight">
|
||||
<Size>
|
||||
<AbsDimension x="128" y="256"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="258" y="-257"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Texture>
|
||||
</Layer>
|
||||
</Layers>
|
||||
<Frames>
|
||||
<Button name="FishingLocationsSwitchButton" inherits="UIPanelButtonTemplate" text="" hidden="false">
|
||||
<Size>
|
||||
<AbsDimension x="160" y="21"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOP" relativeTo="FishingLocationsFrame" relativePoint="TOP">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="-48"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnClick>
|
||||
FishingBuddy.Locations.SwitchDisplay();
|
||||
</OnClick>
|
||||
<OnEnter>
|
||||
FishingBuddy.Locations.SwitchButton_OnEnter();
|
||||
</OnEnter>
|
||||
<OnLeave>
|
||||
GameTooltip:Hide();
|
||||
</OnLeave>
|
||||
</Scripts>
|
||||
</Button>
|
||||
<CheckButton name="FishingBuddyOptionSLZ" inherits="FishingBuddyCheckButtonTemplate">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="FishingLocationsSwitchButton" relativePoint="BOTTOMLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="4"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnClick>
|
||||
FishingBuddy.CheckButton_OnClick();
|
||||
FishingBuddy.Locations.DisplayChanged();
|
||||
</OnClick>
|
||||
</Scripts>
|
||||
</CheckButton>
|
||||
<Frame name="FishingLocationExpandButtonFrame">
|
||||
<Size>
|
||||
<AbsDimension x="54" y="32"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="15" y="-71"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Layers>
|
||||
<Layer level="BACKGROUND">
|
||||
<Texture name="FishingLocationExpandTabLeft" file="Interface\ClassTrainerFrame\UI-ClassTrainer-ExpandTab-Left">
|
||||
<Size>
|
||||
<AbsDimension x="10" y="32"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT"/>
|
||||
</Anchors>
|
||||
</Texture>
|
||||
<Texture name="FishingLocationExpandTabMiddle" file="Interface\QuestFrame\UI-QuestLogSortTab-Middle">
|
||||
<Size>
|
||||
<AbsDimension x="38" y="32"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="LEFT" relativeTo="FishingLocationExpandTabLeft" relativePoint="RIGHT">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="6"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Texture>
|
||||
<Texture name="FishingLocationExpandTabRight" file="Interface\QuestFrame\UI-QuestLogSortTab-Right">
|
||||
<Size>
|
||||
<AbsDimension x="8" y="32"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="LEFT" relativeTo="FishingLocationExpandTabMiddle" relativePoint="RIGHT"/>
|
||||
</Anchors>
|
||||
</Texture>
|
||||
</Layer>
|
||||
</Layers>
|
||||
<Frames>
|
||||
<Button name="FishingLocationsCollapseAllButton" hidden="false" inherits="FishingBuddyCollpaseAllTemplate">
|
||||
<Size>
|
||||
<AbsDimension x="40" y="22"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="LEFT" relativeTo="FishingLocationExpandTabLeft" relativePoint="RIGHT">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="3"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
this:SetFrameLevel(this:GetFrameLevel() + 1);
|
||||
getglobal(this:GetName()):SetText(ALL);
|
||||
</OnLoad>
|
||||
<OnClick>
|
||||
FishingLocationsCollapseAllButton_OnClick();
|
||||
</OnClick>
|
||||
</Scripts>
|
||||
</Button>
|
||||
</Frames>
|
||||
</Frame>
|
||||
|
||||
<ScrollFrame name="FishingLocsScrollFrame" inherits="FauxScrollFrameTemplate">
|
||||
<Size>
|
||||
<AbsDimension x="30" y="332"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPRIGHT">
|
||||
<Offset>
|
||||
<AbsDimension x="-66" y="-98"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnVerticalScroll>
|
||||
FauxScrollFrame_OnVerticalScroll(FishingBuddy.Locations.FRAME_THINGIEHEIGHT, FishingBuddy.Locations.Update);
|
||||
</OnVerticalScroll>
|
||||
</Scripts>
|
||||
<Layers>
|
||||
<Layer level="BACKGROUND">
|
||||
<Texture name="FishingLocationsScrollBarTop" file="Interface\PaperDollInfoFrame\UI-Character-ScrollBar">
|
||||
<Size>
|
||||
<AbsDimension x="31" y="256"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativePoint="TOPRIGHT">
|
||||
<Offset>
|
||||
<AbsDimension x="-2" y="5"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<TexCoords left="0" right="0.484375" top="0" bottom="1.0"/>
|
||||
</Texture>
|
||||
<Texture file="Interface\PaperDollInfoFrame\UI-Character-ScrollBar">
|
||||
<Size>
|
||||
<AbsDimension x="31" y="108"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="BOTTOMLEFT" relativePoint="BOTTOMRIGHT">
|
||||
<Offset>
|
||||
<AbsDimension x="-2" y="-2"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<TexCoords left="0.515625" right="1.0" top="0" bottom="0.4140625"/>
|
||||
</Texture>
|
||||
</Layer>
|
||||
</Layers>
|
||||
</ScrollFrame>
|
||||
|
||||
<Frame name="FishingLocationHighlightFrame" hidden="true">
|
||||
<Size>
|
||||
<AbsDimension x="230" y="16"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT"/>
|
||||
</Anchors>
|
||||
<Layers>
|
||||
<Layer level="ARTWORK">
|
||||
<Texture name="FishingLocationHighlight" file="Interface\Buttons\UI-Listbox-Highlight2"/>
|
||||
</Layer>
|
||||
</Layers>
|
||||
</Frame>
|
||||
|
||||
<Button name="FishingLocations1" inherits="FishingLocationButtonTemplate" hidden="true" id="1">
|
||||
<Anchors>
|
||||
<Anchor point="TOPRIGHT" relativeTo="FishingLocsScrollFrame" relativePoint="TOPLEFT" />
|
||||
</Anchors>
|
||||
</Button>
|
||||
<Button name="FishingLocations2" inherits="FishingLocationButtonTemplate" hidden="true" id="2">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="FishingLocations1" relativePoint="BOTTOMLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="0"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Button>
|
||||
<Button name="FishingLocations3" inherits="FishingLocationButtonTemplate" hidden="true" id="3">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="FishingLocations2" relativePoint="BOTTOMLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="0"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Button>
|
||||
<Button name="FishingLocations4" inherits="FishingLocationButtonTemplate" hidden="true" id="4">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="FishingLocations3" relativePoint="BOTTOMLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="0"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Button>
|
||||
<Button name="FishingLocations5" inherits="FishingLocationButtonTemplate" hidden="true" id="5">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="FishingLocations4" relativePoint="BOTTOMLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="0"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Button>
|
||||
<Button name="FishingLocations6" inherits="FishingLocationButtonTemplate" hidden="true" id="6">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="FishingLocations5" relativePoint="BOTTOMLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="0"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Button>
|
||||
<Button name="FishingLocations7" inherits="FishingLocationButtonTemplate" hidden="true" id="7">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="FishingLocations6" relativePoint="BOTTOMLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="0"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Button>
|
||||
<Button name="FishingLocations8" inherits="FishingLocationButtonTemplate" hidden="true" id="8">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="FishingLocations7" relativePoint="BOTTOMLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="0"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Button>
|
||||
<Button name="FishingLocations9" inherits="FishingLocationButtonTemplate" hidden="true" id="9">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="FishingLocations8" relativePoint="BOTTOMLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="0"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Button>
|
||||
<Button name="FishingLocations10" inherits="FishingLocationButtonTemplate" hidden="true" id="10">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="FishingLocations9" relativePoint="BOTTOMLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="0"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Button>
|
||||
<Button name="FishingLocations11" inherits="FishingLocationButtonTemplate" hidden="true" id="11">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="FishingLocations10" relativePoint="BOTTOMLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="0"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Button>
|
||||
<Button name="FishingLocations12" inherits="FishingLocationButtonTemplate" hidden="true" id="12">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="FishingLocations11" relativePoint="BOTTOMLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="0"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Button>
|
||||
<Button name="FishingLocations13" inherits="FishingLocationButtonTemplate" hidden="true" id="13">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="FishingLocations12" relativePoint="BOTTOMLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="0"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Button>
|
||||
<Button name="FishingLocations14" inherits="FishingLocationButtonTemplate" hidden="true" id="14">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="FishingLocations13" relativePoint="BOTTOMLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="0"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Button>
|
||||
<Button name="FishingLocations15" inherits="FishingLocationButtonTemplate" hidden="true" id="15">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="FishingLocations14" relativePoint="BOTTOMLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="0"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Button>
|
||||
<Button name="FishingLocations16" inherits="FishingLocationButtonTemplate" hidden="true" id="16">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="FishingLocations15" relativePoint="BOTTOMLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="0"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Button>
|
||||
<Button name="FishingLocations17" inherits="FishingLocationButtonTemplate" hidden="true" id="17">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="FishingLocations16" relativePoint="BOTTOMLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="0"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Button>
|
||||
<Button name="FishingLocations18" inherits="FishingLocationButtonTemplate" hidden="true" id="18">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="FishingLocations17" relativePoint="BOTTOMLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="0"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Button>
|
||||
<Button name="FishingLocations19" inherits="FishingLocationButtonTemplate" hidden="true" id="19">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="FishingLocations18" relativePoint="BOTTOMLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="0"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Button>
|
||||
<Button name="FishingLocations20" inherits="FishingLocationButtonTemplate" hidden="true" id="20">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="FishingLocations19" relativePoint="BOTTOMLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="0"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Button>
|
||||
<Button name="FishingLocations21" inherits="FishingLocationButtonTemplate" hidden="true" id="21">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="FishingLocations20" relativePoint="BOTTOMLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="0"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Button>
|
||||
</Frames>
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
FishingBuddy.Locations.OnLoad();
|
||||
</OnLoad>
|
||||
<OnEvent>
|
||||
FishingBuddy.Locations.OnEvent();
|
||||
</OnEvent>
|
||||
<OnShow>
|
||||
FishingBuddy.Locations.OnShow();
|
||||
</OnShow>
|
||||
<OnMouseWheel>
|
||||
-- FishingLocationsFrame_OnMouseWheel(arg1);
|
||||
return;
|
||||
</OnMouseWheel>
|
||||
</Scripts>
|
||||
</Frame>
|
||||
</Ui>
|
||||
@@ -0,0 +1,96 @@
|
||||
-- Handle all the option settings
|
||||
|
||||
FishingBuddy.OptionsFrame = {};
|
||||
|
||||
FishingBuddy.CheckButton_OnShow = function()
|
||||
this:SetChecked(FishingBuddy.GetSetting(this.name));
|
||||
getglobal(this:GetName().."Text"):SetText(this.text);
|
||||
end
|
||||
|
||||
FishingBuddy.CheckButton_OnClick = function()
|
||||
local value = 0;
|
||||
if ( this:GetChecked() ) then
|
||||
PlaySound("igMainMenuOptionCheckBoxOff");
|
||||
value = 1;
|
||||
else
|
||||
PlaySound("igMainMenuOptionCheckBoxOn");
|
||||
end
|
||||
FishingBuddy.SetSetting(this.name, value);
|
||||
end
|
||||
|
||||
FishingBuddy.CheckButton_OnEnter = function()
|
||||
local tooltip = this.tooltip;
|
||||
if ( tooltip ) then
|
||||
GameTooltip:SetOwner(this, "ANCHOR_RIGHT");
|
||||
GameTooltip:SetText(tooltip, nil, nil, nil, nil, 1);
|
||||
GameTooltip:Show();
|
||||
end
|
||||
end
|
||||
|
||||
FishingBuddy.CheckButton_OnLeave = function()
|
||||
GameTooltip:Hide();
|
||||
end
|
||||
|
||||
FishingBuddy.OptionsFrame.Setup = function()
|
||||
for _, option in FishingBuddy.OPTIONS do
|
||||
local button = getglobal("FishingBuddyOption_"..option.name);
|
||||
if (button) then
|
||||
local showthis = true;
|
||||
if ( option.check ) then
|
||||
showthis = option.check();
|
||||
end
|
||||
if ( showthis ) then
|
||||
button:Show();
|
||||
button.name = option.name;
|
||||
button.text = option.text;
|
||||
button.tooltip = option.tooltip;
|
||||
else
|
||||
button:Hide();
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if ( FishingBuddy.UseButtonHole() ) then
|
||||
FishingBuddyMinimapPosSlider:Hide();
|
||||
end
|
||||
local gs = FishingBuddy.GetSetting;
|
||||
FishingBuddy.OptionsFrame.SetKeyValue("EasyCastKeys", gs("EasyCastKeys"));
|
||||
end
|
||||
|
||||
FishingBuddy.OptionsFrame.SetKeyValue = function(what, value)
|
||||
local show = FishingBuddy.Keys[value];
|
||||
FishingBuddy.SetSetting(what, value);
|
||||
local menu = getglobal("FishingBuddyOption_"..what);
|
||||
if ( menu ) then
|
||||
local label = getglobal("FishingBuddyOption_"..what.."Label");
|
||||
UIDropDownMenu_SetWidth(90, menu);
|
||||
UIDropDownMenu_SetSelectedValue(menu, show);
|
||||
UIDropDownMenu_SetText(show, menu);
|
||||
label:SetText(FishingBuddy.KEYS_LABEL_TEXT);
|
||||
end
|
||||
end
|
||||
|
||||
FishingBuddy.OptionsFrame.LoadKeyMenu = function(what)
|
||||
local info = {};
|
||||
local setting = FishingBuddy.GetSetting(what);
|
||||
for value,label in FishingBuddy.Keys do
|
||||
local v = value;
|
||||
local w = what;
|
||||
info.text = label;
|
||||
info.func = function() FishingBuddy.OptionsFrame.SetKeyValue(w, v); end;
|
||||
if ( setting == value ) then
|
||||
info.checked = true;
|
||||
else
|
||||
info.checked = false;
|
||||
end
|
||||
UIDropDownMenu_AddButton(info);
|
||||
end
|
||||
end
|
||||
|
||||
FishingBuddy.OptionsFrame.MenuSetup = function(what)
|
||||
UIDropDownMenu_Initialize(this,
|
||||
function()
|
||||
local w = what;
|
||||
FishingBuddy.OptionsFrame.LoadKeyMenu(what);
|
||||
end);
|
||||
end
|
||||
@@ -0,0 +1,256 @@
|
||||
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/..\FrameXML\UI.xsd">
|
||||
<Script file="FishingOptionsFrame.lua"/>
|
||||
<CheckButton name="FishingBuddyCheckButtonTemplate" virtual="true">
|
||||
<Size>
|
||||
<AbsDimension x="24" y="24"/>
|
||||
</Size>
|
||||
<Layers>
|
||||
<Layer level="ARTWORK">
|
||||
<FontString name="$parentText" inherits="GameFontNormalSmall">
|
||||
<Anchors>
|
||||
<Anchor point="LEFT" relativePoint="RIGHT">
|
||||
<Offset>
|
||||
<AbsDimension x="-2" y="0"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</FontString>
|
||||
</Layer>
|
||||
</Layers>
|
||||
<NormalTexture file="Interface\Buttons\UI-CheckBox-Up"/>
|
||||
<PushedTexture file="Interface\Buttons\UI-CheckBox-Down"/>
|
||||
<HighlightTexture file="Interface\Buttons\UI-CheckBox-Highlight" alphaMode="ADD"/>
|
||||
<CheckedTexture file="Interface\Buttons\UI-CheckBox-Check"/>
|
||||
<DisabledCheckedTexture file="Interface\Buttons\UI-CheckBox-Check-Disabled"/>
|
||||
<HitRectInsets>
|
||||
<AbsInset left="0" right="-100" top="0" bottom="0"/>
|
||||
</HitRectInsets>
|
||||
<Scripts>
|
||||
<OnShow>
|
||||
FishingBuddy.CheckButton_OnShow();
|
||||
</OnShow>
|
||||
<OnClick>
|
||||
FishingBuddy.CheckButton_OnClick();
|
||||
</OnClick>
|
||||
<OnEnter>
|
||||
FishingBuddy.CheckButton_OnEnter();
|
||||
</OnEnter>
|
||||
<OnLeave>
|
||||
FishingBuddy.CheckButton_OnLeave();
|
||||
</OnLeave>
|
||||
</Scripts>
|
||||
</CheckButton>
|
||||
<Frame name="FishingOptionsFrame"
|
||||
setAllPoints="true" enableMouse="true"
|
||||
inherits="FishingBuddySmallHeaderTemplate"
|
||||
parent="FishingBuddyFrame" hidden="true">
|
||||
<HitRectInsets>
|
||||
<AbsInset left="0" right="30" top="0" bottom="75"/>
|
||||
</HitRectInsets>
|
||||
<Frames>
|
||||
<CheckButton name="FishingBuddyOption_ShowNewFishies" inherits="FishingBuddyCheckButtonTemplate">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="32" y="-80"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</CheckButton>
|
||||
<CheckButton name="FishingBuddyOption_WatchFishies" inherits="FishingBuddyCheckButtonTemplate">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="FishingBuddyOption_ShowNewFishies" relativePoint="BOTTOMLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="2"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</CheckButton>
|
||||
<CheckButton name="FishingBuddyOption_WatchCurrentZone" inherits="FishingBuddyCheckButtonTemplate">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="FishingBuddyOption_WatchFishies" relativePoint="BOTTOMLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="16" y="2"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</CheckButton>
|
||||
<CheckButton name="FishingBuddyOption_WatchCurrentSkill" inherits="FishingBuddyCheckButtonTemplate">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="FishingBuddyOption_WatchCurrentZone" relativePoint="BOTTOMLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="2"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</CheckButton>
|
||||
<CheckButton name="FishingBuddyOption_WatchOnlyWhenFishing" inherits="FishingBuddyCheckButtonTemplate">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="FishingBuddyOption_WatchCurrentSkill" relativePoint="BOTTOMLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="2"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</CheckButton>
|
||||
<CheckButton name="FishingBuddyOption_WatchFishPercent" inherits="FishingBuddyCheckButtonTemplate">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="FishingBuddyOption_WatchOnlyWhenFishing" relativePoint="BOTTOMLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="2"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</CheckButton>
|
||||
<CheckButton name="FishingBuddyOption_SortByPercent" inherits="FishingBuddyCheckButtonTemplate">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="FishingBuddyOption_WatchFishPercent" relativePoint="BOTTOMLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="-16" y="2"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</CheckButton>
|
||||
<CheckButton name="FishingBuddyOption_EasyCast" inherits="FishingBuddyCheckButtonTemplate">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="FishingBuddyOption_SortByPercent" relativePoint="BOTTOMLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="2"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</CheckButton>
|
||||
<Frame name="FishingBuddyOption_EasyCastKeys" inherits="UIDropDownMenuTemplate" hidden="false">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="FishingBuddyOption_EasyCast" relativePoint="TOPLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="180" y="0"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Layers>
|
||||
<Layer level="BACKGROUND">
|
||||
<FontString name="$parentLabel" inherits="GameFontNormalSmall">
|
||||
<Anchors>
|
||||
<Anchor point="TOPRIGHT" relativePoint="TOPLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="10" y="-6"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</FontString>
|
||||
</Layer>
|
||||
</Layers>
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
FishingBuddy.OptionsFrame.MenuSetup("EasyCastKeys");
|
||||
</OnLoad>
|
||||
</Scripts>
|
||||
</Frame>
|
||||
<CheckButton name="FishingBuddyOption_FastCast" inherits="FishingBuddyCheckButtonTemplate">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="FishingBuddyOption_EasyCast" relativePoint="BOTTOMLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="16" y="2"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</CheckButton>
|
||||
<CheckButton name="FishingBuddyOption_EasyLures" inherits="FishingBuddyCheckButtonTemplate">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="FishingBuddyOption_FastCast" relativePoint="BOTTOMLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="2"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</CheckButton>
|
||||
<CheckButton name="FishingBuddyOption_STVTimer" inherits="FishingBuddyCheckButtonTemplate">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="FishingBuddyOption_EasyLures" relativePoint="BOTTOMLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="-16" y="2"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</CheckButton>
|
||||
<CheckButton name="FishingBuddyOption_EnhanceFishingSounds" inherits="FishingBuddyCheckButtonTemplate">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="FishingBuddyOption_STVTimer" relativePoint="BOTTOMLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="2"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</CheckButton>
|
||||
<CheckButton name="FishingBuddyOption_UseButtonHole" inherits="FishingBuddyCheckButtonTemplate">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="FishingBuddyOption_EnhanceFishingSounds" relativePoint="BOTTOMLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="2"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</CheckButton>
|
||||
<!-- Thanks to bc_TrackingMenu for this slider code -->
|
||||
<Slider name="FishingBuddyMinimapPosSlider" inherits="OptionsSliderTemplate">
|
||||
<Size>
|
||||
<AbsDimension x="290" y="17"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="BOTTOM" relative="$parent" relativePoint="BOTTOM">
|
||||
<Offset>
|
||||
<AbsDimension x="-10" y="88"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
getglobal(this:GetName().."Text"):SetText(FishingBuddy.MINIMAPBUTTONPLACEMENT);
|
||||
getglobal(this:GetName().."High"):SetText();
|
||||
getglobal(this:GetName().."Low"):SetText();
|
||||
this:SetMinMaxValues(0, 360);
|
||||
this:SetValueStep(1);
|
||||
this.tooltipText = FishingBuddy.MINIMAPBUTTONPLACEMENTTOOLTIP;
|
||||
</OnLoad>
|
||||
<OnShow>
|
||||
local where = FishingBuddy.GetSetting("MinimapButtonPosition");
|
||||
if (where) then
|
||||
this:SetValue(where);
|
||||
end
|
||||
</OnShow>
|
||||
<OnValueChanged>
|
||||
where = this:GetValue();
|
||||
getglobal(this:GetName().."Text"):SetText(FishingBuddy.MINIMAPBUTTONPLACEMENT .. " - "..this:GetValue().."\194\176");
|
||||
FishingBuddy.SetSetting("MinimapButtonPosition", where);
|
||||
FishingBuddyMinimapButton_MoveButton();
|
||||
</OnValueChanged>
|
||||
</Scripts>
|
||||
</Slider>
|
||||
<CheckButton name="FishingBuddyOption_MinimapButtonVisible" inherits="FishingBuddyCheckButtonTemplate">
|
||||
<Anchors>
|
||||
<Anchor point="BOTTOMLEFT" relativeTo="FishingBuddyMinimapPosSlider" relativePoint="TOPLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="-4" y="16"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</CheckButton>
|
||||
</Frames>
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
this:RegisterEvent("VARIABLES_LOADED");
|
||||
</OnLoad>
|
||||
<OnEvent>
|
||||
FishingBuddy.OptionsFrame.Setup();
|
||||
</OnEvent>
|
||||
<OnHide>
|
||||
FishingBuddy.WatchUpdate();
|
||||
FishingBuddy.UpdateMinimap();
|
||||
</OnHide>
|
||||
<OnMouseWheel>
|
||||
return;
|
||||
</OnMouseWheel>
|
||||
</Scripts>
|
||||
</Frame>
|
||||
</Ui>
|
||||
@@ -0,0 +1,178 @@
|
||||
-- Wrap OutfitDisplayFrame with our "improvements"
|
||||
FishingBuddy.OutfitFrame = {};
|
||||
|
||||
local function StylePoints(outfit)
|
||||
local isp = FishingBuddy.OutfitManager.ItemStylePoints;
|
||||
local points = 0;
|
||||
if ( outfit )then
|
||||
for slot in outfit do
|
||||
if ( outfit[slot].item ) then
|
||||
local _,_,check, enchant = string.find(outfit[slot].item,
|
||||
"^(%d+):(%d+)");
|
||||
points = points + isp(check, enchant);
|
||||
end
|
||||
end
|
||||
end
|
||||
return points;
|
||||
end
|
||||
|
||||
local match;
|
||||
local function ItemBonusPoints(item)
|
||||
local points = 0;
|
||||
if ( item and item ~= "" ) then
|
||||
if ( not match ) then
|
||||
match = FishingBuddy.GetFishingSkillName().." %+(%d+)";
|
||||
end
|
||||
FishingOutfitTooltip:SetHyperlink("item:"..item);
|
||||
local bodyslot = FishingOutfitTooltipTextLeft2:GetText();
|
||||
local textline = 2;
|
||||
while (bodyslot) do
|
||||
local _,_,bonus = string.find(bodyslot, match);
|
||||
if bonus then
|
||||
points = points + bonus;
|
||||
end
|
||||
textline = textline + 1;
|
||||
bodyslot = getglobal("FishingOutfitTooltipTextLeft"..textline):GetText();
|
||||
end
|
||||
-- See if the Eternium Fishing Line has been applied
|
||||
local _,_,check, enchant = string.find(item, "^(%d+):(%d+)");
|
||||
if ( enchant == "2603" ) then
|
||||
points = points + 5;
|
||||
end
|
||||
end
|
||||
return points;
|
||||
end
|
||||
|
||||
local function BonusPoints(outfit)
|
||||
local points = 0;
|
||||
if ( outfit )then
|
||||
for slot in outfit do
|
||||
points = points + ItemBonusPoints(outfit[slot].item);
|
||||
end
|
||||
end
|
||||
return points;
|
||||
end
|
||||
|
||||
local function UpdateSwitchButton(outfit)
|
||||
if ( outfit and not OutfitDisplayFrame_SwitchWillFail(FishingOutfitFrame, outfit) ) then
|
||||
FishingOutfitSwitchButton:Enable();
|
||||
else
|
||||
FishingOutfitSwitchButton:Disable();
|
||||
end
|
||||
end
|
||||
|
||||
FishingBuddy.OutfitFrame.OutfitChanged = function(button)
|
||||
local outfit = OutfitDisplayFrame_GetOutfit(FishingOutfitFrame);
|
||||
if ( outfit ) then
|
||||
FishingBuddy.SetOutfit(outfit);
|
||||
end
|
||||
local points = BonusPoints(outfit);
|
||||
if ( points >= 0 ) then
|
||||
points = "+"..points;
|
||||
else
|
||||
points = 0 - points;
|
||||
points = "-"..points;
|
||||
end
|
||||
FishingOutfitSkill:SetText(FishingBuddy.CONFIG_SKILL_TEXT..points);
|
||||
points = StylePoints(outfit);
|
||||
local pstring;
|
||||
if ( points == 1 ) then
|
||||
pstring = FishingBuddy.POINT;
|
||||
else
|
||||
pstring = FishingBuddy.POINTS;
|
||||
end
|
||||
FishingOutfitStyle:SetText(FishingBuddy.CONFIG_STYLISH_TEXT..points.." "..pstring);
|
||||
UpdateSwitchButton(outfit);
|
||||
FishingOutfitFrame.valid = true;
|
||||
end
|
||||
|
||||
FishingBuddy.OutfitFrame.OnLoad = function()
|
||||
-- Handle the override
|
||||
if ( OutfitDisplayFrame_OnLoad ) then
|
||||
OutfitDisplayFrame_OnLoad();
|
||||
FishingOutfitSkill.tooltip = FishingBuddy.CONFIG_SKILL_INFO;
|
||||
FishingOutfitStyle.tooltip = FishingBuddy.CONFIG_STYLISH_INFO;
|
||||
FishingOutfitSwitchButton:SetText(FishingBuddy.SWITCHOUTFIT);
|
||||
FishingOutfitFrame.OutfitChanged = FishingBuddy.OutfitFrame.OutfitChanged;
|
||||
else
|
||||
FishingBuddy.DisableSubFrame("FishingOutfitFrame");
|
||||
end
|
||||
end
|
||||
|
||||
FishingBuddy.OutfitFrame.OnShow = function()
|
||||
if ( not this.valid ) then
|
||||
local outfit = FishingBuddy.GetOutfit();
|
||||
OutfitDisplayFrame_SetOutfit(FishingOutfitFrame, outfit);
|
||||
FishingBuddy.OutfitFrame.OutfitChanged();
|
||||
end
|
||||
end
|
||||
|
||||
FishingBuddy.OutfitFrame.OnHide = function()
|
||||
-- FishingOutfitFrame_OutfitChanged();
|
||||
end
|
||||
|
||||
FishingBuddy.OutfitFrame.Button_OnClick = function()
|
||||
-- make sure we have the current state
|
||||
FishingBuddy.SetOutfit(OutfitDisplayFrame_GetOutfit(FishingOutfitFrame));
|
||||
FishingBuddy.OutfitFrame.Switch();
|
||||
end
|
||||
|
||||
-- only have one outfit at the moment
|
||||
-- don't switch if
|
||||
-- we can't find everything in the outfit
|
||||
-- we have saved stuff but we're not wearing everything in the outfit
|
||||
-- We don't have the outfit display frame!
|
||||
FishingBuddy.OutfitFrame.Switch = function()
|
||||
if (CursorHasItem()) then
|
||||
FishingBuddy.UIError(FishingBuddy.CURSORBUSYMSG);
|
||||
return false;
|
||||
end
|
||||
if ( OutfitDisplayFrame_IsSwapping() ) then
|
||||
FishingBuddy.UIError(OUTFITDISPLAYFRAME_TOOFASTMSG);
|
||||
return false;
|
||||
end
|
||||
|
||||
local isfishing = FishingBuddy.IsFishingPole();
|
||||
local outfit = FishingBuddy.GetOutfit();
|
||||
local waswearing = FishingBuddy.GetWasWearing();
|
||||
if ( waswearing ) then
|
||||
local msg;
|
||||
|
||||
if ( isfishing ) then
|
||||
msg = OutfitDisplayFrame_SwitchWillFail(FishingOutfitFrame, waswearing);
|
||||
else
|
||||
msg = FishingBuddy.CANTSWITCHBACK;
|
||||
FishingBuddy.SetWasWearing(nil);
|
||||
StartedFishing = nil;
|
||||
end
|
||||
|
||||
if ( msg ) then
|
||||
FishingBuddy.UIError(msg);
|
||||
return false;
|
||||
end
|
||||
local check = OutfitDisplayFrame_SwitchOutfit(waswearing);
|
||||
if ( check ) then
|
||||
FishingBuddy.SetWasWearing(nil);
|
||||
FishingBuddy.OutfitManager.CheckSwitch(false);
|
||||
end
|
||||
elseif ( outfit ) then
|
||||
local msg;
|
||||
if ( not isfishing ) then
|
||||
msg = OutfitDisplayFrame_SwitchWillFail(FishingOutfitFrame, outfit);
|
||||
else
|
||||
msg = FishingBuddy.POLEALREADYEQUIPPED;
|
||||
end
|
||||
if ( msg ) then
|
||||
FishingBuddy.UIError(msg);
|
||||
return false;
|
||||
end
|
||||
local waswearing = OutfitDisplayFrame_SwitchOutfit(outfit);
|
||||
if ( waswearing ) then
|
||||
FishingBuddy.SetWasWearing(waswearing);
|
||||
FishingBuddy.OutfitManager.CheckSwitch(true);
|
||||
end
|
||||
else
|
||||
FishingBuddy.UIError(FishingBuddy.NOOUTFITDEFINED);
|
||||
end
|
||||
return true;
|
||||
end
|
||||
@@ -0,0 +1,106 @@
|
||||
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
|
||||
..\FrameXML\UI.xsd">
|
||||
<Script file="FishingOutfitFrame.lua"/>
|
||||
<Button name="FishingOutfitFrameLabel" hidden="false" virtual="true">
|
||||
<Size>
|
||||
<AbsDimension x="90" y="16"/>
|
||||
</Size>
|
||||
<NormalText name="$parentText" inherits="GameFontNormalSmall" justifyH="LEFT">
|
||||
<Size>
|
||||
<AbsDimension x="0" y="0"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="LEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="3" y="0"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</NormalText>
|
||||
<HighlightText name="$parentHighlightText" inherits="GameFontHighlightSmall" justifyH="LEFT">
|
||||
<Size>
|
||||
<AbsDimension x="0" y="0"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="LEFT" relativeTo="$parentText" relativePoint="LEFT"/>
|
||||
</Anchors>
|
||||
</HighlightText>
|
||||
<DisabledText name="$parentDisabledText" inherits="GameFontDisableSmall" justifyH="LEFT">
|
||||
<Size>
|
||||
<AbsDimension x="0" y="0"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="LEFT" relativeTo="$parentText" relativePoint="LEFT"/>
|
||||
</Anchors>
|
||||
</DisabledText>
|
||||
<Scripts>
|
||||
<OnEnter>
|
||||
if ( this.tooltip ) then
|
||||
GameTooltip:SetOwner(this, "ANCHOR_RIGHT");
|
||||
GameTooltip:SetText(this.tooltip, nil, nil, nil, nil, 1);
|
||||
GameTooltip:Show();
|
||||
end
|
||||
</OnEnter>
|
||||
<OnLeave>
|
||||
GameTooltip:Hide();
|
||||
</OnLeave>
|
||||
</Scripts>
|
||||
</Button>
|
||||
|
||||
<Frame name="FishingOutfitFrame" inherits="OutfitDisplayFrame" setAllPoints="true" enableMouse="true" parent="FishingBuddyFrame" hidden="true">
|
||||
<Frames>
|
||||
<Button name="FishingOutfitSkill" inherits="FishingOutfitFrameLabel">
|
||||
<Anchors>
|
||||
<Anchor point="RIGHT" relativeTo="$parentHandsSlotCheckBox" relativePoint="LEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="-15" y="0"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Button>
|
||||
<Button name="FishingOutfitStyle" inherits="FishingOutfitFrameLabel">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="FishingOutfitSkill" relativePoint="BOTTOMLEFT"/>
|
||||
</Anchors>
|
||||
</Button>
|
||||
<Button name="FishingOutfitSwitchButton" inherits="UIPanelButtonTemplate" text="" hidden="false">
|
||||
<Size>
|
||||
<AbsDimension x="160" y="21"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOP" relativeTo="FishingOutfitFrame" relativePoint="TOP">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="-48"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnClick>
|
||||
FishingBuddy.OutfitFrame.Button_OnClick();
|
||||
</OnClick>
|
||||
<OnEnter>
|
||||
GameTooltip:SetText(FishingBuddy.SWITCHOUTFIT_INFO);
|
||||
GameTooltip:Show();
|
||||
</OnEnter>
|
||||
<OnLeave>
|
||||
GameTooltip:Hide();
|
||||
</OnLeave>
|
||||
</Scripts>
|
||||
</Button>
|
||||
</Frames>
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
FishingBuddy.OutfitFrame.OnLoad();
|
||||
</OnLoad>
|
||||
<OnShow>
|
||||
FishingBuddy.OutfitFrame.OnShow();
|
||||
</OnShow>
|
||||
<OnHide>
|
||||
FishingBuddy.OutfitFrame.OnHide();
|
||||
</OnHide>
|
||||
<OnMouseWheel>
|
||||
return;
|
||||
</OnMouseWheel>
|
||||
</Scripts>
|
||||
</Frame>
|
||||
</Ui>
|
||||
@@ -0,0 +1,192 @@
|
||||
-- Manage outfits, whether they're from OutfitDisplayFrame or something else
|
||||
FishingBuddy.OutfitManager = {};
|
||||
|
||||
-- Inferred from Draznar's Fishing FAQ
|
||||
local Accessories = {
|
||||
[19979] = { ["n"] = "Hook of the Master Angler", ["score"] = 5, },
|
||||
[19947] = { ["n"] = "Nat Pagle's Broken Reel", ["score"] = 4, },
|
||||
[19972] = { ["n"] = "Lucky Fishing Hat", ["score"] = 5, },
|
||||
[7996] = { ["n"] = "Lucky Fishing Hat", ["score"] = 5, },
|
||||
[8749] = { ["n"] = "Crochet Hat", ["score"] = 3, },
|
||||
[19039] = { ["n"] = "Zorbin's Water Resistant Hat", ["score"] = 3, },
|
||||
[3889] = { ["n"] = "Russet Hat", ["score"] = 3, },
|
||||
[14584] = { ["n"] = "Dokebi Hat", ["score"] = 2, },
|
||||
[4048] = { ["n"] = "Emblazoned Hat", ["score"] = 1, },
|
||||
[10250] = { ["n"] = "Masters Hat of the Whale", ["score"] = 1, },
|
||||
[9508] = { ["n"] = "Mechbuilder's Overalls", ["score"] = 3, },
|
||||
[6263] = { ["n"] = "Blue Overalls", ["score"] = 4, },
|
||||
[3342] = { ["n"] = "Captain Sander's Shirt", ["score"] = 4, },
|
||||
[5107] = { ["n"] = "Deckhand's Shirt", ["score"] = 2, },
|
||||
[6795] = { ["n"] = "White Swashbuckler's Shirt", ["score"] = 1, },
|
||||
[2576] = { ["n"] = "White Linen Shirt", ["score"] = 1, },
|
||||
[6202] = { ["n"] = "Fingerless Gloves", ["score"] = 3, },
|
||||
[792] = { ["n"] = "Knitted Sandals", ["score"] = 4, },
|
||||
[1560] = { ["n"] = "Bluegill Sandals", ["score"] = 4, },
|
||||
[13402] = { ["n"] = "Timmy's Galoshes", ["score"] = 2, },
|
||||
[10658] = { ["n"] = "Quagmire Galoshes", ["score"] = 2, },
|
||||
[1678] = { ["n"] = "Black Ogre Kickers", ["score"] = 1, },
|
||||
[19969] = { ["n"] = "Nat Pagle's Extreme Anglin' Boots", ["score"] = 5, },
|
||||
[15405] = { ["n"] = "Shucking Gloves", ["score"] = 5, },
|
||||
[15406] = { ["n"] = "Crustacean Boots", ["score"] = 3, },
|
||||
[3287] = { ["n"] = "Tribal Pants", ["score"] = 2, },
|
||||
[5310] = { ["n"] = "Sea Dog Britches", ["score"] = 4, },
|
||||
}
|
||||
|
||||
FishingBuddy.OutfitManager.ItemStylePoints = function(itemno, enchant)
|
||||
local points = 0;
|
||||
if ( itemno ) then
|
||||
itemono = tonumber(itemno);
|
||||
enchant = tonumber(enchant);
|
||||
if (Accessories[itemno]) then
|
||||
points = points + Accessories[itemno].score;
|
||||
end
|
||||
if ( enchant == 846 ) then
|
||||
-- bonus for being enchanted with Fishing +2
|
||||
points = points + 2;
|
||||
end
|
||||
end
|
||||
return points;
|
||||
end
|
||||
|
||||
local CheckSwitch = nil;
|
||||
|
||||
-- update the watcher when we're done switching outfits
|
||||
FishingBuddy.OutfitManager.WaitForUpdate =
|
||||
function(arg1)
|
||||
local hasPole = FishingBuddy.IsFishingPole();
|
||||
if ( hasPole == CheckSwitch ) then
|
||||
FishingOutfitUpdateFrame:Hide();
|
||||
FishingBuddy.FishingMode();
|
||||
end
|
||||
end
|
||||
|
||||
FishingBuddy.OutfitManager.CheckSwitch = function(topole)
|
||||
CheckSwitch = topole;
|
||||
FishingOutfitUpdateFrame:Show();
|
||||
end
|
||||
|
||||
FishingBuddy.OutfitManager.Switch = function(outfitname)
|
||||
if ( OutfitDisplayFrame_OnLoad ) then
|
||||
FishingBuddy.OutfitFrame.Switch();
|
||||
else
|
||||
local vOut, vCat, vInd = Outfitter_FindOutfitByStatId(Outfitter_cFishingStatName);
|
||||
if ( vOut ) then
|
||||
if ( FishingBuddy.IsFishingPole() ) then
|
||||
Outfitter_RemoveOutfit(vOut);
|
||||
FishingBuddy.OutfitManager.CheckSwitch(false);
|
||||
else
|
||||
vOut.Disabled = nil;
|
||||
Outfitter_WearOutfit(vOut, vCat);
|
||||
FishingBuddy.OutfitManager.CheckSwitch(true);
|
||||
end
|
||||
Outfitter_Update(true);
|
||||
end
|
||||
end
|
||||
-- if we're now sporting a fishing pole, let's go fishing
|
||||
FishingBuddy.FishingMode();
|
||||
end
|
||||
|
||||
FishingBuddy.OutfitManager.HasManager = function()
|
||||
return ( OutfitDisplayFrame_OnLoad or Outfitter_OnLoad );
|
||||
end
|
||||
|
||||
FishingBuddy.OutfitManager.Initialize = function()
|
||||
-- no outfit managers, no outfit switching
|
||||
if ( not FishingBuddy.OutfitManager.HasManager() ) then
|
||||
FishingBuddy.SetSetting("InfoBarClickToSwitch", 0);
|
||||
FishingBuddy.SetSetting("TitanClickToSwitch", 0);
|
||||
FishingBuddy.SetSetting("MinimapClickToSwitch", 0);
|
||||
end
|
||||
if ( (not OutfitDisplayFrame_OnLoad) and Outfitter_OnLoad ) then
|
||||
-- create the default fishing outfit, if it doesn't exist
|
||||
if ( gOutfitter_Settings ) then
|
||||
local vOut, vCat, vInd = Outfitter_FindOutfitByStatId(Outfitter_cFishingStatName);
|
||||
local vName = "Fishing Buddy";
|
||||
if ( not vOut ) then
|
||||
vOut = Outfitter_GenerateSmartOutfit(vName, Outfitter_cFishingStatName, OutfitterItemList_GetEquippableItems(true));
|
||||
if not vOut then
|
||||
vOut = Outfitter_NewEmptyOutfit(vName);
|
||||
end
|
||||
|
||||
local vCategoryID = Outfitter_AddOutfit(vOut);
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- calculate scores based on Outfitter
|
||||
local function StylePoints(outfit)
|
||||
local isp = FishingBuddy.OutfitManager.ItemStylePoints;
|
||||
local points = 0;
|
||||
if ( outfit )then
|
||||
for slot in outfit.Items do
|
||||
points = points + isp(outfit.Items[slot].Code,
|
||||
outfit.Items[slot].EnchantCode);
|
||||
end
|
||||
end
|
||||
return points;
|
||||
end
|
||||
|
||||
local function BonusPoints(outfit, vStatID)
|
||||
local points = 0;
|
||||
if ( outfit )then
|
||||
for slot in outfit.Items do
|
||||
if ( outfit.Items[slot][vStatID] ) then
|
||||
points = points + outfit.Items[slot][vStatID];
|
||||
end
|
||||
-- Enternium Fishing Line
|
||||
if ( outfit.Items[slot].EnchantCode == 2603 ) then
|
||||
points = points + 5;
|
||||
end
|
||||
end
|
||||
end
|
||||
return points;
|
||||
end
|
||||
|
||||
-- Outfitter patches
|
||||
|
||||
function Outfitter_FindOutfitByStatId(pStatID)
|
||||
if not pStatID or pStatID == "" then
|
||||
return nil;
|
||||
end
|
||||
|
||||
for vCategoryID, vOutfits in gOutfitter_Settings.Outfits do
|
||||
for vOutfitIndex, vOutfit in vOutfits do
|
||||
if vOutfit.StatID and vOutfit.StatID == pStatID then
|
||||
return vOutfit, vCategoryID, vOutfitIndex;
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- return nil, nil, nil;
|
||||
end
|
||||
|
||||
local Saved_OutfitterItem_OnEnter = OutfitterItem_OnEnter;
|
||||
FishingBuddy.OutfitManager.OutfitterItem_OnEnter = function(pItem)
|
||||
Saved_OutfitterItem_OnEnter(pItem);
|
||||
if ( not pItem.isCategoryItem ) then
|
||||
local vOutfit = Outfitter_GetOutfitFromListItem(pItem);
|
||||
if ( vOutfit and vOutfit.StatID == Outfitter_cFishingStatName ) then
|
||||
local vDescription;
|
||||
local bp = BonusPoints(vOutfit, Outfitter_cFishingStatName);
|
||||
if ( bp >= 0 ) then
|
||||
bp = "+"..bp;
|
||||
else
|
||||
bp = 0 - bp;
|
||||
bp = "-"..bp;
|
||||
end
|
||||
bp = Outfitter_cFishingStatName.." "..bp;
|
||||
local sp = StylePoints(vOutfit);
|
||||
local pstring;
|
||||
if ( points == 1 ) then
|
||||
pstring = FishingBuddy.POINT;
|
||||
else
|
||||
pstring = FishingBuddy.POINTS;
|
||||
end
|
||||
vDescription = string.format(FishingBuddy.CONFIG_OUTFITTER_TEXT,
|
||||
bp, sp)..pstring;
|
||||
GameTooltip_AddNewbieTip(vOutfit.Name, 1.0, 1.0, 1.0, vDescription, 1);
|
||||
end
|
||||
end
|
||||
end
|
||||
OutfitterItem_OnEnter = FishingBuddy.OutfitManager.OutfitterItem_OnEnter;
|
||||
@@ -0,0 +1,12 @@
|
||||
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
|
||||
..\FrameXML\UI.xsd">
|
||||
<Script file="FishingOutfitManager.lua"/>
|
||||
<GameTooltip name="FishingOutfitTooltip" inherits="GameTooltipTemplate" parent="UIParent" hidden="true"/>
|
||||
<Frame name="FishingOutfitUpdateFrame" hidden="true">
|
||||
<Scripts>
|
||||
<OnUpdate>
|
||||
FishingBuddy.OutfitManager.WaitForUpdate(arg1);
|
||||
</OnUpdate>
|
||||
</Scripts>
|
||||
</Frame>
|
||||
</Ui>
|
||||
@@ -0,0 +1,136 @@
|
||||
-- FishingSetup
|
||||
--
|
||||
-- Load out translation strings and such
|
||||
|
||||
FishingBuddy = {};
|
||||
|
||||
FishingBuddy.VERSION = "0.8.6h";
|
||||
FishingBuddy.CURRENTVERSION = 8600;
|
||||
|
||||
FishingBuddy.Colors = {};
|
||||
FishingBuddy.Colors.RED = "ffff0000";
|
||||
FishingBuddy.Colors.GREEN = "ff00ff00";
|
||||
FishingBuddy.Colors.BLUE = "ff0000ff";
|
||||
FishingBuddy.Colors.WHITE = "ffffffff";
|
||||
|
||||
-- debugging
|
||||
|
||||
FishingBuddy.printable = function(foo)
|
||||
if ( foo ) then
|
||||
if ( type(foo) == "table" ) then
|
||||
return "table";
|
||||
elseif ( type(foo) == "boolean" ) then
|
||||
if ( foo ) then
|
||||
return "true";
|
||||
else
|
||||
return "false";
|
||||
end
|
||||
else
|
||||
return foo;
|
||||
end
|
||||
else
|
||||
return "nil";
|
||||
end
|
||||
end
|
||||
|
||||
FishingBuddy.Output = function(msg, r, g, b)
|
||||
if ( DEFAULT_CHAT_FRAME ) then
|
||||
if ( not r ) then
|
||||
DEFAULT_CHAT_FRAME:AddMessage(msg);
|
||||
else
|
||||
DEFAULT_CHAT_FRAME:AddMessage(msg, r, g, b);
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local FishingBuddy_Debugging = 1;
|
||||
FishingBuddy.Debug = function(msg, fixlinks)
|
||||
if ( FishingBuddy_Debugging == 1 ) then
|
||||
if ( fixlinks ) then
|
||||
msg = string.gsub(msg, "|", ";");
|
||||
end
|
||||
local name = FishingBuddy.Name or "Fishing Buddy";
|
||||
FishingBuddy.Output("|c"..FishingBuddy.Colors.RED..name.." DEBUG|r "..msg);
|
||||
end
|
||||
end
|
||||
|
||||
FishingBuddy.Dump = function(thing)
|
||||
if ( FishingBuddy_Debugging == 1 ) then
|
||||
if ( DevTools_Dump ) then
|
||||
DevTools_Dump(thing);
|
||||
else
|
||||
FishingBuddy.Debug("Tried to dump a '"..FishingBuddy.printable(thing).."'.");
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function LoadTranslation(lang)
|
||||
local translation = FishingTranslations[lang];
|
||||
for tag,value in translation do
|
||||
if ( not FishingBuddy[tag] ) then
|
||||
FishingBuddy[tag] = value;
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function FixupThis(tag, what)
|
||||
if ( type(what) == "table" ) then
|
||||
for idx,str in what do
|
||||
what[idx] = FixupThis(tag, str);
|
||||
end
|
||||
return what;
|
||||
elseif ( type(what) == "string" ) then
|
||||
local pattern = "#([A-Z0-9]+)#";
|
||||
local s,e,w = string.find(what, pattern);
|
||||
while ( w ) do
|
||||
local s1 = strsub(what, 1, s-1);
|
||||
local s2 = strsub(what, e+1);
|
||||
what = s1..FishingBuddy[w]..s2;
|
||||
s,e,w = string.find(what, pattern);
|
||||
end
|
||||
return what;
|
||||
else
|
||||
FishingBuddy.Debug("tag "..tag.." type "..type(what));
|
||||
FishingBuddy.Dump(what);
|
||||
end
|
||||
end
|
||||
|
||||
local function FixupStrings()
|
||||
local translation = FishingTranslations["enUS"];
|
||||
for tag,str in translation do
|
||||
FishingBuddy[tag] = FixupThis(tag, str);
|
||||
end
|
||||
end
|
||||
|
||||
local function FixupBindings(lang)
|
||||
local translation = FishingTranslations[lang];
|
||||
for tag,str in translation do
|
||||
if ( string.find(tag, "^BINDING") ) then
|
||||
setglobal(tag, FishingBuddy[tag]);
|
||||
FishingBuddy[tag] = nil;
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local locale = GetLocale();
|
||||
LoadTranslation(locale);
|
||||
if ( locale ~= "enUS" ) then
|
||||
LoadTranslation("enUS");
|
||||
end
|
||||
FixupStrings();
|
||||
FixupBindings(locale);
|
||||
|
||||
-- dump the memory we've allocated for all the translations
|
||||
FishingTranslations = nil;
|
||||
|
||||
FishingBuddy.BYWEEKS_TABLE = {["Jan"] = 0, ["Apr"] = 13, ["Jul"] = 26, ["Oct"] = 39, ["Dec"] = 52};
|
||||
|
||||
FishingBuddy.KEYS_NONE = 0;
|
||||
FishingBuddy.KEYS_SHIFT = 1;
|
||||
FishingBuddy.KEYS_CTRL = 2;
|
||||
FishingBuddy.KEYS_ALT = 3;
|
||||
FishingBuddy.Keys = {};
|
||||
FishingBuddy.Keys[FishingBuddy.KEYS_NONE] = FishingBuddy.KEYS_NONE_TEXT;
|
||||
FishingBuddy.Keys[FishingBuddy.KEYS_SHIFT] = FishingBuddy.KEYS_SHIFT_TEXT;
|
||||
FishingBuddy.Keys[FishingBuddy.KEYS_CTRL] = FishingBuddy.KEYS_CTRL_TEXT;
|
||||
FishingBuddy.Keys[FishingBuddy.KEYS_ALT] = FishingBuddy.KEYS_ALT_TEXT;
|
||||
@@ -0,0 +1,246 @@
|
||||
-- Handle tracking cycle fish
|
||||
|
||||
FishingBuddy.TrackingFrame = {};
|
||||
|
||||
local GRAPH_HEIGHT = 120;
|
||||
|
||||
local trackingWordMap = {
|
||||
["WEEKLY"] = FishingBuddy.WEEKLY,
|
||||
["HOURLY"] = FishingBuddy.HOURLY,
|
||||
[FishingBuddy.WEEKLY] = "WEEKLY",
|
||||
[FishingBuddy.HOURLY] = "HOURLY",
|
||||
};
|
||||
|
||||
local byhours = {
|
||||
[13759] = {
|
||||
["n"] = "Raw Nightfin Snapper",
|
||||
["c"] = { r = 0.5, g = 0.5, b = 1.0, a = 0.75 },
|
||||
},
|
||||
[13760] = {
|
||||
["n"] = "Raw Sunscale Salmon",
|
||||
["c"] = { r = 0.8, g = 0.8, b = 0.1, a = 0.75 },
|
||||
},
|
||||
};
|
||||
local byweeks = {
|
||||
[13756] = {
|
||||
["n"] = "Raw Summer Bass",
|
||||
["c"] = { r = 1.0, g = 1.0, b = 0.0, a = 0.75 },
|
||||
},
|
||||
[13755] = {
|
||||
["n"] = "Winter Squid",
|
||||
["c"] = { r = 0.4, g = 0.1, b = 0.4, a = 0.75 },
|
||||
},
|
||||
};
|
||||
|
||||
local function UntrackThis(id, name)
|
||||
if ( not byhours[id] and not byweeks[id] ) then
|
||||
for how in FishingBuddy_Info["FishTracking"] do
|
||||
if ( FishingBuddy_Info["FishTracking"][how][id] ) then
|
||||
FishingBuddy_Info["FishTracking"][how][id] = nil;
|
||||
FishingBuddy.Print(FishingBuddy.NOTRACKMSG, name);
|
||||
end
|
||||
end
|
||||
else
|
||||
FishingBuddy.Message(FishingBuddy.NOTRACKERRMSG);
|
||||
end
|
||||
end
|
||||
|
||||
local function TrackThis(how, id, color, name)
|
||||
if ( not FishingBuddy_Info["FishTracking"][how] ) then
|
||||
FishingBuddy_Info["FishTracking"][how] = {};
|
||||
end
|
||||
local limit = 23;
|
||||
if ( how == "WEEKLY" ) then
|
||||
limit = 52;
|
||||
end
|
||||
if ( not FishingBuddy_Info["FishTracking"][how][id] ) then
|
||||
FishingBuddy_Info["FishTracking"][how][id] = {};
|
||||
FishingBuddy_Info["FishTracking"][how][id].data = {};
|
||||
for i=0,limit,1 do
|
||||
FishingBuddy_Info["FishTracking"][how][id].data[i] = 0;
|
||||
end
|
||||
FishingBuddy_Info["FishTracking"][how][id].data.n = limit+1;
|
||||
end
|
||||
if ( name and not FishingBuddy_Info["FishTracking"][how][id].name ) then
|
||||
FishingBuddy_Info["FishTracking"][how][id].name = name;
|
||||
end
|
||||
if ( color ) then
|
||||
if ( type(color) == "string") then
|
||||
local a = tonumber(string.sub(color,1,2),16);
|
||||
local r = tonumber(string.sub(color,3,4),16);
|
||||
local g = tonumber(string.sub(color,5,6),16);
|
||||
local b = tonumber(string.sub(color,7,8),16);
|
||||
color = { a = a, r = r, g = g, b = b };
|
||||
end
|
||||
FishingBuddy_Info["FishTracking"][how][id].color = color;
|
||||
end
|
||||
end
|
||||
|
||||
FishingBuddy.Commands[FishingBuddy.TRACK] = {};
|
||||
FishingBuddy.Commands[FishingBuddy.TRACK].args = {};
|
||||
FishingBuddy.Commands[FishingBuddy.TRACK].args[1] = "[%w]+";
|
||||
FishingBuddy.Commands[FishingBuddy.TRACK].args[2] = "|c%x+|Hitem:%d+:%d+:%d+:%d+|h%[.-%]|h|r";
|
||||
FishingBuddy.Commands[FishingBuddy.TRACK].help = FishingBuddy.TRACKING_HELP;
|
||||
FishingBuddy.Commands[FishingBuddy.TRACK].func =
|
||||
function(how, fishlink)
|
||||
if ( how and (how == FishingBuddy.HOURLY or
|
||||
how == FishingBuddy.WEEKLY)) then
|
||||
local c, i, n = FishingBuddy.SplitFishLink(fishlink);
|
||||
if ( i ) then
|
||||
TrackThis(trackingWordMap[how], i, c, n);
|
||||
FishingBuddy.Print(FishingBuddy.TRACKINGMSG, n, how);
|
||||
return true;
|
||||
end
|
||||
end
|
||||
end;
|
||||
FishingBuddy.Commands[FishingBuddy.NOTRACK] = {};
|
||||
FishingBuddy.Commands[FishingBuddy.NOTRACK].args = {};
|
||||
FishingBuddy.Commands[FishingBuddy.NOTRACK].args[1] = "|c%x+|Hitem:%d+:%d+:%d+:%d+|h%[.-%]|h|r";
|
||||
FishingBuddy.Commands[FishingBuddy.NOTRACK].help = FishingBuddy.TRACKING_HELP;
|
||||
FishingBuddy.Commands[FishingBuddy.NOTRACK].func =
|
||||
function(fishlink)
|
||||
local c, i, n = FishingBuddy.SplitFishLink(fishlink);
|
||||
if ( i ) then
|
||||
UntrackThis(i, n);
|
||||
return true;
|
||||
end
|
||||
end;
|
||||
FishingBuddy.Commands[FishingBuddy.TRACKING] = {};
|
||||
FishingBuddy.Commands[FishingBuddy.TRACKING].help = FishingBuddy.TRACKING_HELP;
|
||||
FishingBuddy.Commands[FishingBuddy.TRACKING].func =
|
||||
function()
|
||||
local pr = FishingBuddy.Print;
|
||||
for jdx in FishingBuddy_Info["FishTracking"] do
|
||||
local how = trackingWordMap[jdx];
|
||||
pr("Tracking "..how);
|
||||
local ft = FishingBuddy_Info["FishTracking"];
|
||||
for id in ft[jdx] do
|
||||
local name;
|
||||
if ( ft[jdx][id].name ) then
|
||||
name = ft[jdx][id].name;
|
||||
else
|
||||
name = id;
|
||||
end
|
||||
local line = name.."; ";
|
||||
for k,v in ft[jdx][id].data do
|
||||
line = line.." "..k..": "..v;
|
||||
end
|
||||
pr(line);
|
||||
end
|
||||
end
|
||||
return true;
|
||||
end;
|
||||
|
||||
FishingBuddy.InitTracking = function()
|
||||
if ( not FishingBuddy_Info["FishTracking"] ) then
|
||||
FishingBuddy_Info["FishTracking"] = { };
|
||||
end
|
||||
for k,v in byhours do
|
||||
TrackThis("HOURLY", k, v.c);
|
||||
end
|
||||
for k,v in byweeks do
|
||||
TrackThis("WEEKLY", k, v.c);
|
||||
end
|
||||
end
|
||||
|
||||
FishingBuddy.AddTracking = function(id, name)
|
||||
local ft = FishingBuddy_Info["FishTracking"];
|
||||
local index, how;
|
||||
if ( ft["HOURLY"][id] ) then
|
||||
how = "HOURLY";
|
||||
index,_ = GetGameTime();
|
||||
elseif ( ft["WEEKLY"][id] ) then
|
||||
how = "WEEKLY";
|
||||
index = date("%W");
|
||||
else
|
||||
return false;
|
||||
end
|
||||
if ( not FishingBuddy_Info["FishTracking"][how][id].name ) then
|
||||
FishingBuddy_Info["FishTracking"][how][id].name = name;
|
||||
end
|
||||
index = tonumber(index);
|
||||
|
||||
local p = FishingBuddy.printable;
|
||||
FishingBuddy_Info["FishTracking"][how][id].data[index] =
|
||||
FishingBuddy_Info["FishTracking"][how][id].data[index] + 1;
|
||||
return true;
|
||||
end
|
||||
|
||||
local function PlotData(graph, num, bw, bs, tab, hlabels)
|
||||
local plotem = {};
|
||||
local maxval = 0;
|
||||
local width = 0;
|
||||
local plotted = false;
|
||||
local fdx = 1;
|
||||
local line;
|
||||
local mv = 0;
|
||||
for _,info in tab do
|
||||
plotem[fdx] = false;
|
||||
-- our data is zero based...
|
||||
local n = table.getn(info.data);
|
||||
width = n * (bw+bs);
|
||||
n = n - 1;
|
||||
for idx=0,n do
|
||||
if ( info.data[idx] > mv ) then
|
||||
mv = info.data[idx];
|
||||
end
|
||||
end
|
||||
if ( mv > 0 ) then
|
||||
if ( mv > maxval ) then
|
||||
maxval = mv;
|
||||
end
|
||||
plotem[fdx] = true;
|
||||
plotted = true;
|
||||
end
|
||||
fdx = fdx + 1;
|
||||
end
|
||||
local delta = math.mod(maxval, 5);
|
||||
if ( delta > 0 ) then
|
||||
maxval = maxval + (5 - delta);
|
||||
end
|
||||
graph.maxVal = maxval;
|
||||
graph.barWidth = bw;
|
||||
graph.barSpacing = bs;
|
||||
local count = num;
|
||||
fdx = 1;
|
||||
for id, info in tab do
|
||||
if ( count > 0 and plotem[fdx] ) then
|
||||
local c = info.color or {};
|
||||
local item, texture, _, _, _ = FishingBuddy.GetFishie(id);
|
||||
GraphHandler.PlotLegend(graph, num-count+1, info.name, id,
|
||||
texture, c.r, c.g, c.b);
|
||||
local w = GraphHandler.PlotData(graph, info.data, num-count, 1,
|
||||
c.r, c.g, c.b);
|
||||
if ( info.name ) then
|
||||
if ( line ) then
|
||||
line = line.." / "..info.name;
|
||||
else
|
||||
line = info.name;
|
||||
end
|
||||
end
|
||||
count = count - 1;
|
||||
end
|
||||
fdx = fdx + 1;
|
||||
end
|
||||
if ( plotted ) then
|
||||
local values = {};
|
||||
local delta = maxval/5;
|
||||
for v=0,5 do
|
||||
values[string.format("%d", v*delta)] = v;
|
||||
end
|
||||
GraphHandler.PlotGrid(graph, line or "", values, width, hlabels);
|
||||
else
|
||||
GraphHandler.PlotGrid(graph, FishingBuddy.NODATAMSG );
|
||||
end
|
||||
return width, maxval, line;
|
||||
end
|
||||
|
||||
FishingBuddy.TrackingFrame.OnShow = function()
|
||||
local fi = FishingBuddy_Info["FishTracking"];
|
||||
local graph1 = getglobal("FishingTrackingFrameGraph1");
|
||||
local graph2 = getglobal("FishingTrackingFrameGraph2");
|
||||
|
||||
PlotData(graph1, 2, 5, 5, fi["HOURLY"],
|
||||
{["00:00"] = 0, ["06:00"] = 6, ["12:00"] = 12, ["18:00"] = 18, ["23:59"] = 24});
|
||||
PlotData(graph2, 2, 3, 2, fi["WEEKLY"], FishingBuddy.BYWEEKS_TABLE);
|
||||
end
|
||||
@@ -0,0 +1,126 @@
|
||||
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/..\FrameXML\UI.xsd">
|
||||
<Script file="FishingTrackingFrame.lua"/>
|
||||
<Frame name="FishingTrackingGrid" virtual="true">
|
||||
<Frames>
|
||||
<Frame name="$parentL00" inherits="GraphFrameLine"/>
|
||||
<Frame name="$parentTL0" inherits="GraphFrameText"/>
|
||||
<Frame name="$parentLH1" inherits="GraphFrameLine"/>
|
||||
<Frame name="$parentLH2" inherits="GraphFrameLine"/>
|
||||
<Frame name="$parentLH3" inherits="GraphFrameLine"/>
|
||||
<Frame name="$parentLH4" inherits="GraphFrameLine"/>
|
||||
<Frame name="$parentLH5" inherits="GraphFrameLine"/>
|
||||
<Frame name="$parentTH0" inherits="GraphFrameText"/>
|
||||
<Frame name="$parentTH1" inherits="GraphFrameText"/>
|
||||
<Frame name="$parentTH2" inherits="GraphFrameText"/>
|
||||
<Frame name="$parentTH3" inherits="GraphFrameText"/>
|
||||
<Frame name="$parentTH4" inherits="GraphFrameText"/>
|
||||
<Frame name="$parentTH5" inherits="GraphFrameText"/>
|
||||
<Frame name="$parentLV1" inherits="GraphFrameLine"/>
|
||||
<Frame name="$parentLV2" inherits="GraphFrameLine"/>
|
||||
<Frame name="$parentLV3" inherits="GraphFrameLine"/>
|
||||
<Frame name="$parentLV4" inherits="GraphFrameLine"/>
|
||||
<Frame name="$parentLV5" inherits="GraphFrameLine"/>
|
||||
<Frame name="$parentTV0" inherits="GraphFrameText"/>
|
||||
<Frame name="$parentTV1" inherits="GraphFrameText"/>
|
||||
<Frame name="$parentTV2" inherits="GraphFrameText"/>
|
||||
<Frame name="$parentTV3" inherits="GraphFrameText"/>
|
||||
<Frame name="$parentTV4" inherits="GraphFrameText"/>
|
||||
<Frame name="$parentTV5" inherits="GraphFrameText"/>
|
||||
</Frames>
|
||||
</Frame>
|
||||
<Frame name="FishingTracking24x2Frame" inherits="GraphFrame" virtual="true">
|
||||
<Frames>
|
||||
<Frame name="$parent_01" inherits="GraphPanel32"/>
|
||||
<Frame name="$parent_02" inherits="GraphPanel16"/>
|
||||
<Frame name="$parentP01" inherits="GraphFrameLegend"/>
|
||||
<Frame name="$parentP02" inherits="GraphFrameLegend"/>
|
||||
<Frame name="$parentG00" inherits="FishingTrackingGrid"/>
|
||||
</Frames>
|
||||
</Frame>
|
||||
<Frame name="FishingTracking53x2Frame" inherits="GraphFrame" virtual="true">
|
||||
<Frames>
|
||||
<Frame name="$parent_01" inherits="GraphPanel32"/>
|
||||
<Frame name="$parent_02" inherits="GraphPanel32"/>
|
||||
<Frame name="$parent_03" inherits="GraphPanel32"/>
|
||||
<Frame name="$parent_04" inherits="GraphPanel8"/>
|
||||
<Frame name="$parent_05" inherits="GraphPanel2"/>
|
||||
<Frame name="$parentP01" inherits="GraphFrameLegend"/>
|
||||
<Frame name="$parentP02" inherits="GraphFrameLegend"/>
|
||||
<Frame name="$parentG00" inherits="FishingTrackingGrid"/>
|
||||
</Frames>
|
||||
</Frame>
|
||||
|
||||
<Frame name="FishingTrackingFrame" setAllPoints="true"
|
||||
enableMouse="true" parent="FishingBuddyFrame" hidden="true">
|
||||
<HitRectInsets>
|
||||
<AbsInset left="0" right="30" top="0" bottom="75"/>
|
||||
</HitRectInsets>
|
||||
<Layers>
|
||||
<Layer level="ARTWORK">
|
||||
<Texture file="Interface\Spellbook\UI-SpellbookPanel-TopLeft">
|
||||
<Size>
|
||||
<AbsDimension x="256" y="256"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT"/>
|
||||
</Anchors>
|
||||
</Texture>
|
||||
<Texture file="Interface\Spellbook\UI-SpellbookPanel-TopRight">
|
||||
<Size>
|
||||
<AbsDimension x="128" y="256"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPRIGHT"/>
|
||||
</Anchors>
|
||||
</Texture>
|
||||
<Texture file="Interface\Spellbook\UI-SpellbookPanel-BotLeft">
|
||||
<Size>
|
||||
<AbsDimension x="256" y="256"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="BOTTOMLEFT"/>
|
||||
</Anchors>
|
||||
</Texture>
|
||||
<Texture file="Interface\Spellbook\UI-SpellbookPanel-BotRight">
|
||||
<Size>
|
||||
<AbsDimension x="128" y="256"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="BOTTOMRIGHT"/>
|
||||
</Anchors>
|
||||
</Texture>
|
||||
</Layer>
|
||||
</Layers>
|
||||
<Frames>
|
||||
<Frame name="$parentGraph1" enableMouse="true" inherits="FishingTracking24x2Frame">
|
||||
<Size>
|
||||
<AbsDimension x="280" y="120"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="48" y="-116"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Frame>
|
||||
<Frame name="$parentGraph2" enableMouse="true" inherits="FishingTracking53x2Frame">
|
||||
<Size>
|
||||
<AbsDimension x="280" y="120"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="$parentGraph1" relativePoint="BOTTOMLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="-40"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Frame>
|
||||
</Frames>
|
||||
<Scripts>
|
||||
<OnShow>
|
||||
FishingBuddy.TrackingFrame.OnShow();
|
||||
</OnShow>
|
||||
</Scripts>
|
||||
</Frame>
|
||||
</Ui>
|
||||
@@ -0,0 +1,326 @@
|
||||
-- Display the fish you're catching and/or have caught in a live display
|
||||
|
||||
FishingBuddy.WatchFrame = {};
|
||||
|
||||
local MAX_FISHINGWATCH_LINES = 20;
|
||||
local WATCHDRAGGER_SHOW_DELAY = 0.2;
|
||||
|
||||
local WATCHDRAGGER_FADE_TIME = 0.15;
|
||||
|
||||
local DRAGFRAME_TEXTURES = {
|
||||
"Background",
|
||||
"TopLeft",
|
||||
"TopRight",
|
||||
"BottomLeft",
|
||||
"BottomRight",
|
||||
"Top",
|
||||
"Bottom",
|
||||
"Left",
|
||||
"Right"
|
||||
};
|
||||
|
||||
local function ShowDraggerFrame()
|
||||
if ( not FishingWatchDragFrame:IsVisible() ) then
|
||||
local width = FishingWatchFrame:GetWidth();
|
||||
local height = FishingWatchFrame:GetHeight();
|
||||
FishingWatchDragFrame:SetHeight(height);
|
||||
FishingWatchDragFrame:SetWidth(width);
|
||||
FishingWatchDragFrame:Show();
|
||||
for index, value in DRAGFRAME_TEXTURES do
|
||||
UIFrameFadeIn(getglobal("FishingWatchDragFrame"..value), WATCHDRAGGER_FADE_TIME, 0, 0.25);
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function HideDraggerFrame()
|
||||
if ( FishingWatchDragFrame:IsVisible() ) then
|
||||
for index, value in DRAGFRAME_TEXTURES do
|
||||
UIFrameFadeOut(getglobal("FishingWatchDragFrame"..value), WATCHDRAGGER_FADE_TIME, 0.25, 0);
|
||||
end
|
||||
FishingWatchDragFrame:Hide();
|
||||
local qx, qy = UIParent:GetCenter();
|
||||
local wx, wy = FishingWatchDragFrame:GetCenter();
|
||||
local where = {};
|
||||
where.x = qx - wx;
|
||||
where.y = wy - qy;
|
||||
FishingBuddy.SetSetting("WatcherLocation", where);
|
||||
end
|
||||
end
|
||||
|
||||
FishingBuddy.Commands[FishingBuddy.WATCHER] = {};
|
||||
FishingBuddy.Commands[FishingBuddy.WATCHER].help = FishingBuddy.WATCHER_HELP;
|
||||
FishingBuddy.Commands[FishingBuddy.WATCHER].func =
|
||||
function(what)
|
||||
if ( what and ( what == FishingBuddy.RESET ) ) then
|
||||
FishingWatchDragFrame:ClearAllPoints();
|
||||
FishingWatchDragFrame:SetPoint("CENTER", "UIParent",
|
||||
"CENTER", 0, 0);
|
||||
FishingWatchDragFrame:Hide();
|
||||
FishingBuddy.SetSetting("WatcherLocation", nil);
|
||||
return true;
|
||||
end
|
||||
end;
|
||||
|
||||
-- handle really old versions
|
||||
local function UpdateUnknownZones(zone, subzone)
|
||||
if ( FishingBuddy_Info["FishingHoles"][FishingBuddy.UNKNOWN] ) then
|
||||
if ( FishingBuddy_Info["FishingHoles"][FishingBuddy.UNKNOWN][subzone] ) then
|
||||
if ( not FishingBuddy_Info["FishingHoles"][zone] ) then
|
||||
FishingBuddy_Info["FishingHoles"][zone] = { };
|
||||
tinsert(FishingBuddy.SortedZones, zone);
|
||||
table.sort(FishingBuddy.SortedZones);
|
||||
end
|
||||
if ( not FishingBuddy_Info["FishingHoles"][zone][subzone] ) then
|
||||
FishingBuddy_Info["FishingHoles"][zone][subzone] = { };
|
||||
end
|
||||
for k,v in FishingBuddy_Info["FishingHoles"][FishingBuddy.UNKNOWN][subzone] do
|
||||
FishingBuddy_Info["FishingHoles"][zone][subzone][k] = v;
|
||||
end
|
||||
FishingBuddy_Info["FishingHoles"][FishingBuddy.UNKNOWN][subzone] = nil;
|
||||
end
|
||||
FishingBuddy.Locations.DataChanged(zone, subzone);
|
||||
-- Duh, table.getn doesn't work because there aren't any integer
|
||||
-- keys in this table
|
||||
if ( next(FishingBuddy_Info["FishingHoles"][FishingBuddy.UNKNOWN]) == nil ) then
|
||||
FishingBuddy_Info["FishingHoles"][FishingBuddy.UNKNOWN] = nil;
|
||||
local pos;
|
||||
while ( pos < table.getn(FishingBuddy.SortedZones) ) do
|
||||
if ( FishingBuddy.SortedZones[pos] == FishingBuddy.UNKNOWN ) then
|
||||
break;
|
||||
end
|
||||
pos = pos + 1;
|
||||
end
|
||||
tremove(FishingBuddy.SortedZones, pos);
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- fix a bug where we were recording 'GetZoneText' instead
|
||||
-- of 'GetRealZoneText'
|
||||
local function UpdateRealZones(zone, subzone)
|
||||
local oldzone = GetZoneText();
|
||||
if ( FishingBuddy_Info["FishingHoles"][oldzone] and oldzone ~= zone ) then
|
||||
if ( not FishingBuddy_Info["FishingHoles"][zone] ) then
|
||||
FishingBuddy_Info["FishingHoles"][zone] = { };
|
||||
end
|
||||
for oldsubzone in FishingBuddy_Info["FishingHoles"][oldzone] do
|
||||
local sub = oldsubzone;
|
||||
if ( oldsubzone == oldzone ) then
|
||||
sub = subzone;
|
||||
end
|
||||
if ( not FishingBuddy_Info["FishingHoles"][zone][sub] ) then
|
||||
FishingBuddy_Info["FishingHoles"][zone][sub] = {};
|
||||
end
|
||||
for k,v in FishingBuddy_Info["FishingHoles"][oldzone][oldsubzone] do
|
||||
FishingBuddy_Info["FishingHoles"][zone][sub][k] = v;
|
||||
end
|
||||
end
|
||||
FishingBuddy_Info["FishingHoles"][oldzone] = nil;
|
||||
end
|
||||
end
|
||||
|
||||
-- Fish watcher functions
|
||||
FishingBuddy.WatchUpdate = function()
|
||||
if ( FishingWatchFrame:IsVisible() ) then
|
||||
FishingWatchFrame:Hide();
|
||||
for i=1, MAX_FISHINGWATCH_LINES, 1 do
|
||||
local line = getglobal("FishingWatchLine"..i);
|
||||
line:Hide();
|
||||
end
|
||||
end
|
||||
|
||||
local zone, subzone = FishingBuddy.GetZoneInfo();
|
||||
|
||||
UpdateUnknownZones(zone, subzone);
|
||||
UpdateRealZones(zone, subzone);
|
||||
|
||||
local fz = FishingBuddy_Info["FishingHoles"][zone];
|
||||
if ( FishingBuddy.GetSetting("WatchFishies") == 0 or
|
||||
not fz or not fz[subzone] ) then
|
||||
return;
|
||||
end
|
||||
|
||||
if ( FishingBuddy.GetSetting("WatchOnlyWhenFishing") == 1 and
|
||||
not FishingBuddy.IsFishingPole() ) then
|
||||
return;
|
||||
end
|
||||
|
||||
local current = FishingBuddy.currentFishies;
|
||||
local ff = FishingBuddy_Info["Fishies"];
|
||||
local fishsort = {};
|
||||
local totalCount = 0;
|
||||
local totalCurrent = 0;
|
||||
local gotDiffs = false;
|
||||
for fishid in fz[subzone] do
|
||||
local info = {};
|
||||
info.text = ff[fishid].name;
|
||||
info.count = fz[subzone][fishid];
|
||||
totalCount = totalCount + info.count;
|
||||
if ( current[subzone] ) then
|
||||
info.current = current[subzone][fishid] or 0;
|
||||
else
|
||||
info.current = 0;
|
||||
end
|
||||
if ( info.current > 0 and info.current ~= info.count ) then
|
||||
gotDiffs = true;
|
||||
end
|
||||
totalCurrent = totalCurrent + info.current;
|
||||
tinsert(fishsort, info);
|
||||
end
|
||||
|
||||
if ( totalCount == 0 ) then
|
||||
return;
|
||||
end
|
||||
|
||||
FishingBuddy.FishSort(fishsort);
|
||||
|
||||
local fishingWatchMaxWidth = 0;
|
||||
local tempWidth;
|
||||
local index = 1;
|
||||
local start = 1;
|
||||
local dopercent = FishingBuddy.GetSetting("WatchFishPercent");
|
||||
|
||||
if ( FishingBuddy.GetSetting("WatchCurrentZone") == 1 ) then
|
||||
local entry = getglobal("FishingWatchLine"..index);
|
||||
local line = zone.." : "..subzone;
|
||||
entry:SetText(line);
|
||||
local tempWidth = entry:GetWidth();
|
||||
if ( tempWidth > fishingWatchMaxWidth ) then
|
||||
fishingWatchMaxWidth = tempWidth;
|
||||
end
|
||||
entry:Show();
|
||||
index = index + 1;
|
||||
end
|
||||
if ( FishingBuddy.GetSetting("WatchCurrentSkill") == 1 ) then
|
||||
local entry = getglobal("FishingWatchLine"..index);
|
||||
local skill, mods = FishingBuddy.GetCurrentSkill();
|
||||
local line = "Skill: |cff00ff00"..skill.."+"..mods.."|r";
|
||||
if ( StartedFishing ) then
|
||||
local elapsed = GetTime() - StartedFishing;
|
||||
local t = math.floor(elapsed);
|
||||
local seconds = math.mod(t, 60);
|
||||
t = math.floor(t / 60);
|
||||
local minutes = math.mod(t, 60);
|
||||
local hours = math.floor(t / 60);
|
||||
line = line.." Elapsed: ";
|
||||
if ( hours < 10 ) then
|
||||
line = line.."0";
|
||||
end
|
||||
line = line..hours..":";
|
||||
if ( minutes < 10 ) then
|
||||
line = line.."0";
|
||||
end
|
||||
line = line..minutes..":";
|
||||
if ( seconds < 10 ) then
|
||||
line = line.."0";
|
||||
end
|
||||
line = line..seconds;
|
||||
end
|
||||
|
||||
entry:SetText(line);
|
||||
local tempWidth = entry:GetWidth();
|
||||
if ( tempWidth > fishingWatchMaxWidth ) then
|
||||
fishingWatchMaxWidth = tempWidth;
|
||||
end
|
||||
entry:Show();
|
||||
index = index + 1;
|
||||
end
|
||||
|
||||
for j=1,table.getn(fishsort),1 do
|
||||
local info = fishsort[j];
|
||||
if( index <= MAX_FISHINGWATCH_LINES ) then
|
||||
local entry = getglobal("FishingWatchLine"..index);
|
||||
local fishie = info.text;
|
||||
local amount = info.count;
|
||||
local s,e = string.find(fishie, FishingBuddy.RAW.." ");
|
||||
if ( s ) then
|
||||
if ( s > 1 ) then
|
||||
fishie = string.sub(fishie, 1, s-1)..string.sub(fishie, e+1);
|
||||
else
|
||||
fishie = string.sub(fishie, e+1);
|
||||
end
|
||||
else
|
||||
s,e = string.find(fishie, " "..FishingBuddy.RAW);
|
||||
if ( s ) then
|
||||
fishie = string.sub(fishie, 1, s-1)..string.sub(fishie, e+1);
|
||||
end
|
||||
end
|
||||
local fishietext = fishie.." ("..amount;
|
||||
if ( dopercent == 1 ) then
|
||||
local percent = format("%.1f", ( amount / totalCount ) * 100);
|
||||
fishietext = fishietext.." : "..percent.."%";
|
||||
end
|
||||
if ( gotDiffs ) then
|
||||
amount = info.current;
|
||||
local color;
|
||||
fishietext = fishietext..", |c"..FishingBuddy.Colors.GREEN..amount;
|
||||
if ( dopercent == 1 ) then
|
||||
local percent = format("%.1f", ( amount / totalCurrent ) * 100);
|
||||
fishietext = fishietext.." : "..percent.."%";
|
||||
end
|
||||
fishietext = fishietext.."|r";
|
||||
end
|
||||
fishietext = fishietext..")";
|
||||
entry:SetText(fishietext);
|
||||
tempWidth = entry:GetWidth();
|
||||
entry:Show();
|
||||
if ( tempWidth > fishingWatchMaxWidth ) then
|
||||
fishingWatchMaxWidth = tempWidth;
|
||||
end
|
||||
end
|
||||
index = index + 1;
|
||||
end
|
||||
|
||||
FishingWatchFrame:SetHeight(index * 13);
|
||||
FishingWatchFrame:SetWidth(fishingWatchMaxWidth + 10);
|
||||
FishingWatchFrame:Show();
|
||||
end
|
||||
|
||||
FishingBuddy.WatchFrame.OnLoad = function()
|
||||
local where = FishingBuddy.GetSetting("WatcherLocation");
|
||||
if ( not where ) then
|
||||
where = {};
|
||||
where.x = 0;
|
||||
where.y = 0;
|
||||
end
|
||||
FishingWatchDragFrame:ClearAllPoints();
|
||||
FishingWatchDragFrame:SetPoint("CENTER", "UIParent", "CENTER",
|
||||
where.x, where.y);
|
||||
FishingWatchDragFrame:Hide();
|
||||
|
||||
this:ClearAllPoints();
|
||||
this:SetPoint("TOPRIGHT", "FishingWatchDragFrame", "TOPRIGHT", 0, 0);
|
||||
end
|
||||
|
||||
local hover;
|
||||
FishingBuddy.WatchFrame.OnUpdate = function(elapsed)
|
||||
if ( FishingWatchFrame:IsVisible() ) then
|
||||
if ( MouseIsOver(FishingWatchFrame) ) then
|
||||
local xPos, yPos = GetCursorPosition();
|
||||
if ( hover ) then
|
||||
if ( hover.xPos == xPos and hover.yPos == yPos ) then
|
||||
hover.hoverTime = hover.hoverTime + elapsed;
|
||||
else
|
||||
hover.hoverTime = 0;
|
||||
hover.xPos = xPos;
|
||||
hover.yPos = yPos;
|
||||
end
|
||||
else
|
||||
hover = {};
|
||||
hover.hoverTime = 0;
|
||||
hover.xPos = xPos;
|
||||
hover.yPos = yPos;
|
||||
end
|
||||
if ( hover.hoverTime > WATCHDRAGGER_SHOW_DELAY ) then
|
||||
ShowDraggerFrame();
|
||||
end
|
||||
else
|
||||
HideDraggerFrame();
|
||||
hover = nil;
|
||||
end
|
||||
elseif ( hover ) then
|
||||
HideDraggerFrame();
|
||||
hover = nil;
|
||||
end
|
||||
end
|
||||
|
||||
@@ -0,0 +1,264 @@
|
||||
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
|
||||
..\FrameXML\UI.xsd">
|
||||
<Script file="FishingWatcher.lua"/>
|
||||
<FontString name="FishingWatchFontTemplate" inherits="GameFontNormal" virtual="true" justifyH="LEFT">
|
||||
<Size>
|
||||
<AbsDimension x="0" y="13"/>
|
||||
</Size>
|
||||
</FontString>
|
||||
|
||||
<Frame name="FishingWatchDragFrame" toplevel="true" enableMouse="true" movable="true" parent="UIParent" hidden="true">
|
||||
<Size>
|
||||
<AbsDimension x="280" y="20"/>
|
||||
</Size>
|
||||
<Layers>
|
||||
<Layer level="BACKGROUND">
|
||||
<Texture name="$parentBackground" file="Interface\ChatFrame\ChatFrameBackground">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="-2" y="3"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
<Anchor point="TOPRIGHT">
|
||||
<Offset>
|
||||
<AbsDimension x="2" y="3"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
<Anchor point="BOTTOMLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="-2" y="-6"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
<Anchor point="BOTTOMRIGHT">
|
||||
<Offset>
|
||||
<AbsDimension x="3" y="-6"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Texture>
|
||||
<Texture name="$parentTopLeft" file="Interface\ChatFrame\ChatFrameBorder">
|
||||
<Size>
|
||||
<AbsDimension x="16" y="16"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT"/>
|
||||
</Anchors>
|
||||
<TexCoords left="0" right="0.25" top="0" bottom="0.125"/>
|
||||
</Texture>
|
||||
<Texture name="$parentTopRight" file="Interface\ChatFrame\ChatFrameBorder">
|
||||
<Size>
|
||||
<AbsDimension x="16" y="16"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT"/>
|
||||
</Anchors>
|
||||
<TexCoords left="0.75" right="1.0" top="0" bottom="0.125"/>
|
||||
</Texture>
|
||||
<Texture name="$parentBottomLeft" file="Interface\ChatFrame\ChatFrameBorder">
|
||||
<Size>
|
||||
<AbsDimension x="16" y="16"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT"/>
|
||||
</Anchors>
|
||||
<TexCoords left="0" right="0.25" top="0.7265625" bottom="0.8515625"/>
|
||||
</Texture>
|
||||
<Texture name="$parentBottomRight" file="Interface\ChatFrame\ChatFrameBorder">
|
||||
<Size>
|
||||
<AbsDimension x="16" y="16"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT"/>
|
||||
</Anchors>
|
||||
<TexCoords left="0.75" right="1.0" top="0.7265625" bottom="0.8515625"/>
|
||||
</Texture>
|
||||
<Texture name="$parentTop" file="Interface\ChatFrame\ChatFrameBorder">
|
||||
<Size>
|
||||
<AbsDimension x="16" y="16"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="LEFT"/>
|
||||
<Anchor point="RIGHT"/>
|
||||
</Anchors>
|
||||
<TexCoords left="0.25" right="0.75" top="0" bottom="0.125"/>
|
||||
</Texture>
|
||||
<Texture name="$parentBottom" file="Interface\ChatFrame\ChatFrameBorder">
|
||||
<Size>
|
||||
<AbsDimension x="16" y="16"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="LEFT"/>
|
||||
<Anchor point="RIGHT"/>
|
||||
</Anchors>
|
||||
<TexCoords left="0.25" right="0.75" top="0.7265625" bottom="0.8515625"/>
|
||||
</Texture>
|
||||
<Texture name="$parentLeft" file="Interface\ChatFrame\ChatFrameBorder">
|
||||
<Size>
|
||||
<AbsDimension x="16" y="16"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOP"/>
|
||||
<Anchor point="BOTTOM"/>
|
||||
</Anchors>
|
||||
<TexCoords left="0" right="0.25" top="0.125" bottom="0.7265625"/>
|
||||
</Texture>
|
||||
<Texture name="$parentRight" file="Interface\ChatFrame\ChatFrameBorder">
|
||||
<Size>
|
||||
<AbsDimension x="16" y="16"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOP"/>
|
||||
<Anchor point="BOTTOM"/>
|
||||
</Anchors>
|
||||
<TexCoords left="0.75" right="1.0" top="0.125" bottom="0.7265625"/>
|
||||
</Texture>
|
||||
</Layer>
|
||||
</Layers>
|
||||
<Scripts>
|
||||
<OnEnter>
|
||||
GameTooltip:SetOwner(this, "ANCHOR_TOPLEFT");
|
||||
GameTooltip:SetText(FishingBuddy.LEFTCLICKTODRAG);
|
||||
</OnEnter>
|
||||
<OnLeave>
|
||||
GameTooltip:Hide();
|
||||
</OnLeave>
|
||||
<OnMouseDown>
|
||||
if ( arg1 == "LeftButton" ) then
|
||||
this:StartMoving();
|
||||
end
|
||||
</OnMouseDown>
|
||||
<OnMouseUp>
|
||||
this:StopMovingOrSizing();
|
||||
</OnMouseUp>
|
||||
</Scripts>
|
||||
</Frame>
|
||||
|
||||
<Frame name="FishingWatchFrame" toplevel="true" enableMouse="false" movable="true" parent="UIParent" hidden="true">
|
||||
<Size>
|
||||
<AbsDimension x="280" y="20"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPRIGHT" relativeTo="FishingWatchDragFrame" relativePoint="TOPRIGHT">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="0"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Layers>
|
||||
<Layer level="BACKGROUND">
|
||||
<FontString name="FishingWatchLine1" inherits="FishingWatchFontTemplate" hidden="true">
|
||||
<Size>
|
||||
<AbsDimension x="0" y="13"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT"/>
|
||||
</Anchors>
|
||||
</FontString>
|
||||
<FontString name="FishingWatchLine2" inherits="FishingWatchFontTemplate" hidden="true">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="FishingWatchLine1" relativePoint="BOTTOMLEFT"/>
|
||||
</Anchors>
|
||||
</FontString>
|
||||
<FontString name="FishingWatchLine3" inherits="FishingWatchFontTemplate" hidden="true">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="FishingWatchLine2" relativePoint="BOTTOMLEFT"/>
|
||||
</Anchors>
|
||||
</FontString>
|
||||
<FontString name="FishingWatchLine4" inherits="FishingWatchFontTemplate" hidden="true">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="FishingWatchLine3" relativePoint="BOTTOMLEFT"/>
|
||||
</Anchors>
|
||||
</FontString>
|
||||
<FontString name="FishingWatchLine5" inherits="FishingWatchFontTemplate" hidden="true">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="FishingWatchLine4" relativePoint="BOTTOMLEFT"/>
|
||||
</Anchors>
|
||||
</FontString>
|
||||
<FontString name="FishingWatchLine6" inherits="FishingWatchFontTemplate" hidden="true">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="FishingWatchLine5" relativePoint="BOTTOMLEFT"/>
|
||||
</Anchors>
|
||||
</FontString>
|
||||
<FontString name="FishingWatchLine7" inherits="FishingWatchFontTemplate" hidden="true">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="FishingWatchLine6" relativePoint="BOTTOMLEFT"/>
|
||||
</Anchors>
|
||||
</FontString>
|
||||
<FontString name="FishingWatchLine8" inherits="FishingWatchFontTemplate" hidden="true">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="FishingWatchLine7" relativePoint="BOTTOMLEFT"/>
|
||||
</Anchors>
|
||||
</FontString>
|
||||
<FontString name="FishingWatchLine9" inherits="FishingWatchFontTemplate" hidden="true">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="FishingWatchLine8" relativePoint="BOTTOMLEFT"/>
|
||||
</Anchors>
|
||||
</FontString>
|
||||
<FontString name="FishingWatchLine10" inherits="FishingWatchFontTemplate" hidden="true">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="FishingWatchLine9" relativePoint="BOTTOMLEFT"/>
|
||||
</Anchors>
|
||||
</FontString>
|
||||
<FontString name="FishingWatchLine11" inherits="FishingWatchFontTemplate" hidden="true">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="FishingWatchLine10" relativePoint="BOTTOMLEFT"/>
|
||||
</Anchors>
|
||||
</FontString>
|
||||
<FontString name="FishingWatchLine12" inherits="FishingWatchFontTemplate" hidden="true">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="FishingWatchLine11" relativePoint="BOTTOMLEFT"/>
|
||||
</Anchors>
|
||||
</FontString>
|
||||
<FontString name="FishingWatchLine13" inherits="FishingWatchFontTemplate" hidden="true">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="FishingWatchLine12" relativePoint="BOTTOMLEFT"/>
|
||||
</Anchors>
|
||||
</FontString>
|
||||
<FontString name="FishingWatchLine14" inherits="FishingWatchFontTemplate" hidden="true">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="FishingWatchLine13" relativePoint="BOTTOMLEFT"/>
|
||||
</Anchors>
|
||||
</FontString>
|
||||
<FontString name="FishingWatchLine15" inherits="FishingWatchFontTemplate" hidden="true">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="FishingWatchLine14" relativePoint="BOTTOMLEFT"/>
|
||||
</Anchors>
|
||||
</FontString>
|
||||
<FontString name="FishingWatchLine16" inherits="FishingWatchFontTemplate" hidden="true">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="FishingWatchLine15" relativePoint="BOTTOMLEFT"/>
|
||||
</Anchors>
|
||||
</FontString>
|
||||
<FontString name="FishingWatchLine17" inherits="FishingWatchFontTemplate" hidden="true">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="FishingWatchLine16" relativePoint="BOTTOMLEFT"/>
|
||||
</Anchors>
|
||||
</FontString>
|
||||
<FontString name="FishingWatchLine18" inherits="FishingWatchFontTemplate" hidden="true">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="FishingWatchLine17" relativePoint="BOTTOMLEFT"/>
|
||||
</Anchors>
|
||||
</FontString>
|
||||
<FontString name="FishingWatchLine19" inherits="FishingWatchFontTemplate" hidden="true">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="FishingWatchLine18" relativePoint="BOTTOMLEFT"/>
|
||||
</Anchors>
|
||||
</FontString>
|
||||
<FontString name="FishingWatchLine20" inherits="FishingWatchFontTemplate" hidden="true">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="FishingWatchLine19" relativePoint="BOTTOMLEFT"/>
|
||||
</Anchors>
|
||||
</FontString>
|
||||
</Layer>
|
||||
</Layers>
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
FishingBuddy.WatchFrame.OnLoad();
|
||||
</OnLoad>
|
||||
<OnUpdate>
|
||||
FishingBuddy.WatchFrame.OnUpdate(arg1);
|
||||
</OnUpdate>
|
||||
</Scripts>
|
||||
</Frame>
|
||||
</Ui>
|
||||
@@ -0,0 +1,241 @@
|
||||
-- Do graph stuff
|
||||
-- This should be a separate addon someday
|
||||
|
||||
GraphHandler = {};
|
||||
GraphHandler.Legend = {};
|
||||
|
||||
GraphHandler.Legend.OnEnter = function()
|
||||
if( this.item or this.tooltop ) then
|
||||
GameTooltip:SetOwner(this, "ANCHOR_RIGHT");
|
||||
if (this.item and this.item ~= "") then
|
||||
GameTooltip:SetHyperlink("item:"..this.item);
|
||||
elseif (this.tooltip) then
|
||||
GameTooltip:SetText(this.tooltip);
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
GraphHandler.Legend.OnLeave = function()
|
||||
if( this.item or this.tooltop ) then
|
||||
this.updateToolTip = nil;
|
||||
GameTooltip:Hide();
|
||||
end
|
||||
end
|
||||
|
||||
GraphHandler.Legend.OnClick = function(button)
|
||||
if ( button == "LeftButton" ) then
|
||||
if( IsShiftKeyDown() and this.item ) then
|
||||
GraphHandler.Legend.ChatLink(this.item, this.name, this.color);
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
GraphHandler.Legend.ChatLink = FishingBuddy.ChatLink;
|
||||
|
||||
GraphHandler.BAR = "BAR";
|
||||
GraphHandler.LEGEND = "LEGEND";
|
||||
GraphHandler.LINE = "LINE";
|
||||
GraphHandler.LABEL = "LABEL";
|
||||
GraphHandler.TEXT = "TEXT";
|
||||
|
||||
GraphHandler.InitElements = function()
|
||||
if ( not this.elements ) then
|
||||
this.elements = {};
|
||||
this.elements[GraphHandler.BAR] = {};
|
||||
this.elements[GraphHandler.LINE] = {};
|
||||
this.elements[GraphHandler.LEGEND] = {};
|
||||
this.elements[GraphHandler.LABEL] = {};
|
||||
this.elements[GraphHandler.TEXT] = {};
|
||||
end
|
||||
end
|
||||
|
||||
local function SetColorBar(bar, base, x, y, width, height, r, g, b)
|
||||
local name;
|
||||
if ( type(bar) == "STRING" ) then
|
||||
name = bar;
|
||||
bar = getglobal(name);
|
||||
elseif ( bar ) then
|
||||
name = bar:GetName();
|
||||
end
|
||||
if ( bar ) then
|
||||
if ( not r ) then
|
||||
r = 1.0;
|
||||
g = 1.0;
|
||||
b = 1.0;
|
||||
end
|
||||
if ( base ) then
|
||||
local tex = getglobal(name.."Texture");
|
||||
if ( x and y ) then
|
||||
bar:ClearAllPoints();
|
||||
bar:SetPoint("BOTTOMLEFT", base, "BOTTOMLEFT", x, y);
|
||||
end
|
||||
if ( width ) then
|
||||
bar:SetWidth(width);
|
||||
end
|
||||
if ( height ) then
|
||||
bar:SetHeight(height);
|
||||
end
|
||||
tex:SetVertexColor(r, g, b);
|
||||
bar:Show();
|
||||
else
|
||||
bar:Hide();
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- Registration functions
|
||||
|
||||
GraphHandler.Register = function(kind, what)
|
||||
local frame = this;
|
||||
local lastframe = nil;
|
||||
for idx=1,5 do
|
||||
frame = frame:GetParent();
|
||||
if ( frame == lastframe ) then
|
||||
break;
|
||||
end
|
||||
if ( frame and frame.elements ) then
|
||||
if ( not frame.elements[kind] ) then
|
||||
frame.elements[kind] = {};
|
||||
end
|
||||
tinsert(frame.elements[kind], what);
|
||||
break;
|
||||
end
|
||||
lastframe = frame;
|
||||
end
|
||||
end
|
||||
|
||||
GraphHandler.PlotData = function(frame, data, offset, skip, r, g, b)
|
||||
local limit = table.getn(data);
|
||||
local start = 1;
|
||||
if ( data[0] ) then
|
||||
start = 0;
|
||||
limit = limit - 1;
|
||||
end
|
||||
|
||||
local bdx=offset+1;
|
||||
local bwid = frame.barWidth;
|
||||
local bspc = frame.barSpacing;
|
||||
local maxval = frame.maxVal;
|
||||
local xoff = offset*bspc;
|
||||
local yoff = 0;
|
||||
local graphHeight = frame:GetHeight();
|
||||
for idx=start,limit,1 do
|
||||
local bar = frame.elements[GraphHandler.BAR][bdx];
|
||||
bdx = bdx + skip + 1;
|
||||
if ( bar ) then
|
||||
if ( (maxval > 0) and (data[idx] > 0) ) then
|
||||
local height = (data[idx]*graphHeight)/maxval;
|
||||
SetColorBar(bar, frame, xoff, 0, bwid, height, r, g, b);
|
||||
else
|
||||
bar:Hide();
|
||||
end
|
||||
end
|
||||
xoff = xoff + bwid + skip*bspc;
|
||||
end
|
||||
return xoff - skip*bspc;
|
||||
end
|
||||
|
||||
GraphHandler.PlotLegend = function(frame, ldx, name, item, texture, r, g, b)
|
||||
local legend = frame.elements[GraphHandler.LEGEND][ldx];
|
||||
if ( legend ) then
|
||||
local name = legend:GetName();
|
||||
local icon = getglobal(name.."Icon");
|
||||
local tex = getglobal(name.."IconTexture");
|
||||
local color = getglobal(name.."Color");
|
||||
-- SetColorBar(color, legend, nil, nil, nil, nil, r, g, b);
|
||||
SetColorBar(color, legend, 0, 1, 10, 16, r, g, b);
|
||||
icon:Show();
|
||||
tex:SetTexture(texture);
|
||||
tex:Show();
|
||||
legend:SetPoint("TOPRIGHT", frame, "TOPRIGHT", 0, -(ldx-1)*21);
|
||||
legend.item = item;
|
||||
legend.name = name;
|
||||
legend:Show();
|
||||
end
|
||||
end
|
||||
|
||||
GraphHandler.PlotGrid = function(frame, label, texth, width, textv, height)
|
||||
local ldx=1;
|
||||
local tdx=1;
|
||||
if ( not width ) then
|
||||
width = frame:GetWidth();
|
||||
end
|
||||
if ( not height ) then
|
||||
height = frame:GetHeight();
|
||||
end
|
||||
if ( label ) then
|
||||
local button = frame.elements[GraphHandler.TEXT][tdx];
|
||||
if ( button ) then
|
||||
local text = getglobal(button:GetName().."T");
|
||||
text:SetText(label);
|
||||
text:SetPoint("BOTTOM", frame, "BOTTOM", 0, -28);
|
||||
text:SetVertexColor(1.0, 1.0, 1.0);
|
||||
text:Show();
|
||||
tdx = tdx + 1;
|
||||
end
|
||||
end
|
||||
if ( texth ) then
|
||||
local linesh = 0;
|
||||
for _,_ in texth do
|
||||
linesh = linesh + 1;
|
||||
end
|
||||
local offset = height/(linesh-1);
|
||||
for label,tick in texth do
|
||||
local line = frame.elements[GraphHandler.LINE][ldx];
|
||||
if ( line ) then
|
||||
ldx = ldx + 1;
|
||||
line:SetHeight(1);
|
||||
line:SetWidth(width);
|
||||
line:SetPoint("BOTTOMLEFT", frame, "BOTTOMLEFT", 0, tick*offset);
|
||||
line:SetAlpha(0.5);
|
||||
line:Show();
|
||||
local button = frame.elements[GraphHandler.TEXT][tdx];
|
||||
if ( button ) then
|
||||
local text = getglobal(button:GetName().."T");
|
||||
if ( type(label) ~= "string" ) then
|
||||
label = string.format("%3d", label);
|
||||
end
|
||||
text:SetText(label);
|
||||
text:SetPoint("LEFT", line, "LEFT", -(text:GetWidth()+4), 0);
|
||||
tdx = tdx + 1;
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
if ( textv ) then
|
||||
local linesv = 0;
|
||||
for _,_ in textv do
|
||||
linesv = linesv + 1;
|
||||
end
|
||||
local offset = frame.barSpacing + frame.barWidth;
|
||||
for label,tick in textv do
|
||||
local line = frame.elements[GraphHandler.LINE][ldx];
|
||||
if ( line ) then
|
||||
local xpos = tick*offset;
|
||||
ldx = ldx + 1;
|
||||
line:SetHeight(height);
|
||||
line:SetWidth(1);
|
||||
line:SetPoint("BOTTOMLEFT", frame, "BOTTOMLEFT", xpos, 0);
|
||||
line:SetAlpha(0.5);
|
||||
line:Show();
|
||||
local button = frame.elements[GraphHandler.TEXT][tdx];
|
||||
if ( button ) then
|
||||
local text = getglobal(button:GetName().."T");
|
||||
if ( type(label) ~= "string" ) then
|
||||
label = string.format("%3d", label);
|
||||
end
|
||||
text:SetText(label);
|
||||
local wid = text:GetWidth();
|
||||
if ( xpos < wid ) then
|
||||
text:SetPoint("TOPLEFT", line, "BOTTOMLEFT", 0, -4);
|
||||
elseif ( xpos > (width - wid) ) then
|
||||
text:SetPoint("TOPRIGHT", line, "BOTTOMRIGHT", 0, -4);
|
||||
else
|
||||
text:SetPoint("TOP", line, "BOTTOM", 0, -4);
|
||||
end
|
||||
tdx = tdx + 1;
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,211 @@
|
||||
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/..\FrameXML\UI.xsd">
|
||||
<Script file="GraphHandler.lua"/>
|
||||
<Frame name="GraphFrame" enableMouse="true" virtual="true">
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
GraphHandler.InitElements();
|
||||
</OnLoad>
|
||||
</Scripts>
|
||||
</Frame>
|
||||
|
||||
<Frame name="GraphPanel" enableMouse="true" virtual="true">
|
||||
</Frame>
|
||||
|
||||
<Button name="GraphFrameColorBar" virtual="true">
|
||||
<Layers>
|
||||
<Layer level="OVERLAY">
|
||||
<Texture name="$parentTexture" virtual="true">
|
||||
<Color r="1.0" g="1.0" b="1.0" a="1.0"/>
|
||||
</Texture>
|
||||
</Layer>
|
||||
</Layers>
|
||||
<Scripts>
|
||||
<Onload>
|
||||
this:RegisterEvent("VARIABLES_LOADED");
|
||||
</Onload>
|
||||
<OnEvent>
|
||||
GraphHandler.Register(GraphHandler.BAR, this);
|
||||
</OnEvent>
|
||||
</Scripts>
|
||||
</Button>
|
||||
<Button name="GraphFrameLine" virtual="true">
|
||||
<Layers>
|
||||
<Layer level="OVERLAY">
|
||||
<Texture name="$parentTexture" virtual="true">
|
||||
<Color r="1.0" g="1.0" b="1.0" a="1.0"/>
|
||||
</Texture>
|
||||
</Layer>
|
||||
</Layers>
|
||||
<Scripts>
|
||||
<Onload>
|
||||
this:RegisterEvent("VARIABLES_LOADED");
|
||||
</Onload>
|
||||
<OnEvent>
|
||||
GraphHandler.Register(GraphHandler.LINE, this);
|
||||
</OnEvent>
|
||||
</Scripts>
|
||||
</Button>
|
||||
<Button name="GraphFrameText" virtual="true">
|
||||
<Layers>
|
||||
<Layer level="OVERLAY">
|
||||
<FontString name="$parentT" inherits="GameFontNormalSmall"/>
|
||||
</Layer>
|
||||
</Layers>
|
||||
<Scripts>
|
||||
<Onload>
|
||||
this:RegisterEvent("VARIABLES_LOADED");
|
||||
</Onload>
|
||||
<OnEvent>
|
||||
GraphHandler.Register(GraphHandler.TEXT, this);
|
||||
</OnEvent>
|
||||
</Scripts>
|
||||
</Button>
|
||||
<Frame name="GraphFrameLegend" virtual="true">
|
||||
<Size>
|
||||
<AbsDimension x="30" y="18"/>
|
||||
</Size>
|
||||
<Frames>
|
||||
<Button name="$parentColor" inherits="GraphFrameColorBar" hidden="true">
|
||||
<Size>
|
||||
<AbsDimension x="10" y="18"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="1"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Button>
|
||||
<Button name="$parentIcon" hidden="true">
|
||||
<Size>
|
||||
<AbsDimension x="16" y="16"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="LEFT" relativeTo="$parentColor" relativePoint="RIGHT">
|
||||
<Offset>
|
||||
<AbsDimension x="2" y="0"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Layers>
|
||||
<Layer level="BORDER">
|
||||
<Texture name="$parentTexture"/>
|
||||
</Layer>
|
||||
</Layers>
|
||||
<Scripts>
|
||||
<Onload>
|
||||
this:RegisterForClicks("LeftButtonUp");
|
||||
</Onload>
|
||||
<OnClick>
|
||||
GraphHandler.Legend.OnClick(arg1);
|
||||
</OnClick>
|
||||
</Scripts>
|
||||
</Button>
|
||||
</Frames>
|
||||
<Scripts>
|
||||
<Onload>
|
||||
this:SetFrameLevel(this:GetFrameLevel() + 1);
|
||||
this:RegisterEvent("VARIABLES_LOADED");
|
||||
</Onload>
|
||||
<OnEvent>
|
||||
GraphHandler.Register(GraphHandler.LEGEND, this);
|
||||
</OnEvent>
|
||||
<OnEnter>
|
||||
GraphHandler.Legend.OnEnter();
|
||||
</OnEnter>
|
||||
<OnLeave>
|
||||
GraphHandler.Legend.OnLeave();
|
||||
</OnLeave>
|
||||
</Scripts>
|
||||
</Frame>
|
||||
|
||||
<Frame name="GraphPanel2" inherits="GraphPanel" virtual="true">
|
||||
<Frames>
|
||||
<Button name="$parent_00" inherits="GraphFrameColorBar" hidden="true"/>
|
||||
<Button name="$parent_01" inherits="GraphFrameColorBar" hidden="true"/>
|
||||
</Frames>
|
||||
</Frame>
|
||||
|
||||
<Frame name="GraphPanel4" inherits="GraphPanel" virtual="true">
|
||||
<Frames>
|
||||
<Button name="$parent_00" inherits="GraphFrameColorBar" hidden="true"/>
|
||||
<Button name="$parent_01" inherits="GraphFrameColorBar" hidden="true"/>
|
||||
<Button name="$parent_02" inherits="GraphFrameColorBar" hidden="true"/>
|
||||
<Button name="$parent_03" inherits="GraphFrameColorBar" hidden="true"/>
|
||||
</Frames>
|
||||
</Frame>
|
||||
|
||||
<Frame name="GraphPanel8" inherits="GraphPanel" virtual="true">
|
||||
<Frames>
|
||||
<Button name="$parent_00" inherits="GraphFrameColorBar" hidden="true"/>
|
||||
<Button name="$parent_01" inherits="GraphFrameColorBar" hidden="true"/>
|
||||
<Button name="$parent_02" inherits="GraphFrameColorBar" hidden="true"/>
|
||||
<Button name="$parent_03" inherits="GraphFrameColorBar" hidden="true"/>
|
||||
<Button name="$parent_04" inherits="GraphFrameColorBar" hidden="true"/>
|
||||
<Button name="$parent_05" inherits="GraphFrameColorBar" hidden="true"/>
|
||||
<Button name="$parent_06" inherits="GraphFrameColorBar" hidden="true"/>
|
||||
<Button name="$parent_07" inherits="GraphFrameColorBar" hidden="true"/>
|
||||
</Frames>
|
||||
</Frame>
|
||||
|
||||
<Frame name="GraphPanel16" inherits="GraphPanel" virtual="true">
|
||||
<Frames>
|
||||
<Button name="$parent_00" inherits="GraphFrameColorBar" hidden="true"/>
|
||||
<Button name="$parent_01" inherits="GraphFrameColorBar" hidden="true"/>
|
||||
<Button name="$parent_02" inherits="GraphFrameColorBar" hidden="true"/>
|
||||
<Button name="$parent_03" inherits="GraphFrameColorBar" hidden="true"/>
|
||||
<Button name="$parent_04" inherits="GraphFrameColorBar" hidden="true"/>
|
||||
<Button name="$parent_05" inherits="GraphFrameColorBar" hidden="true"/>
|
||||
<Button name="$parent_06" inherits="GraphFrameColorBar" hidden="true"/>
|
||||
<Button name="$parent_07" inherits="GraphFrameColorBar" hidden="true"/>
|
||||
<Button name="$parent_08" inherits="GraphFrameColorBar" hidden="true"/>
|
||||
<Button name="$parent_09" inherits="GraphFrameColorBar" hidden="true"/>
|
||||
<Button name="$parent_10" inherits="GraphFrameColorBar" hidden="true"/>
|
||||
<Button name="$parent_11" inherits="GraphFrameColorBar" hidden="true"/>
|
||||
<Button name="$parent_12" inherits="GraphFrameColorBar" hidden="true"/>
|
||||
<Button name="$parent_13" inherits="GraphFrameColorBar" hidden="true"/>
|
||||
<Button name="$parent_14" inherits="GraphFrameColorBar" hidden="true"/>
|
||||
<Button name="$parent_15" inherits="GraphFrameColorBar" hidden="true"/>
|
||||
<Button name="$parent_16" inherits="GraphFrameColorBar" hidden="true"/>
|
||||
</Frames>
|
||||
</Frame>
|
||||
|
||||
<Frame name="GraphPanel32" inherits="GraphPanel" virtual="true">
|
||||
<Frames>
|
||||
<Button name="$parent_00" inherits="GraphFrameColorBar" hidden="true"/>
|
||||
<Button name="$parent_01" inherits="GraphFrameColorBar" hidden="true"/>
|
||||
<Button name="$parent_02" inherits="GraphFrameColorBar" hidden="true"/>
|
||||
<Button name="$parent_03" inherits="GraphFrameColorBar" hidden="true"/>
|
||||
<Button name="$parent_04" inherits="GraphFrameColorBar" hidden="true"/>
|
||||
<Button name="$parent_05" inherits="GraphFrameColorBar" hidden="true"/>
|
||||
<Button name="$parent_06" inherits="GraphFrameColorBar" hidden="true"/>
|
||||
<Button name="$parent_07" inherits="GraphFrameColorBar" hidden="true"/>
|
||||
<Button name="$parent_08" inherits="GraphFrameColorBar" hidden="true"/>
|
||||
<Button name="$parent_09" inherits="GraphFrameColorBar" hidden="true"/>
|
||||
<Button name="$parent_10" inherits="GraphFrameColorBar" hidden="true"/>
|
||||
<Button name="$parent_11" inherits="GraphFrameColorBar" hidden="true"/>
|
||||
<Button name="$parent_12" inherits="GraphFrameColorBar" hidden="true"/>
|
||||
<Button name="$parent_13" inherits="GraphFrameColorBar" hidden="true"/>
|
||||
<Button name="$parent_14" inherits="GraphFrameColorBar" hidden="true"/>
|
||||
<Button name="$parent_15" inherits="GraphFrameColorBar" hidden="true"/>
|
||||
<Button name="$parent_16" inherits="GraphFrameColorBar" hidden="true"/>
|
||||
<Button name="$parent_17" inherits="GraphFrameColorBar" hidden="true"/>
|
||||
<Button name="$parent_18" inherits="GraphFrameColorBar" hidden="true"/>
|
||||
<Button name="$parent_19" inherits="GraphFrameColorBar" hidden="true"/>
|
||||
<Button name="$parent_20" inherits="GraphFrameColorBar" hidden="true"/>
|
||||
<Button name="$parent_21" inherits="GraphFrameColorBar" hidden="true"/>
|
||||
<Button name="$parent_22" inherits="GraphFrameColorBar" hidden="true"/>
|
||||
<Button name="$parent_23" inherits="GraphFrameColorBar" hidden="true"/>
|
||||
<Button name="$parent_24" inherits="GraphFrameColorBar" hidden="true"/>
|
||||
<Button name="$parent_25" inherits="GraphFrameColorBar" hidden="true"/>
|
||||
<Button name="$parent_26" inherits="GraphFrameColorBar" hidden="true"/>
|
||||
<Button name="$parent_27" inherits="GraphFrameColorBar" hidden="true"/>
|
||||
<Button name="$parent_28" inherits="GraphFrameColorBar" hidden="true"/>
|
||||
<Button name="$parent_29" inherits="GraphFrameColorBar" hidden="true"/>
|
||||
<Button name="$parent_30" inherits="GraphFrameColorBar" hidden="true"/>
|
||||
<Button name="$parent_31" inherits="GraphFrameColorBar" hidden="true"/>
|
||||
</Frames>
|
||||
</Frame>
|
||||
|
||||
</Ui>
|
||||
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
@@ -0,0 +1,178 @@
|
||||
Version 0.8.6h
|
||||
- Fast Cast is back!
|
||||
|
||||
Version 0.8.6g
|
||||
- Fixed a nil reference bug in binding the keys that happens to some people (but
|
||||
this makes easy cast not work, I still need to figure out what's happening)
|
||||
- Made the Fish Watcher window relative to UIParent and implement 'hover' dragging
|
||||
- Fixed the right-click menu in InfoBar support
|
||||
- Made click-to-move support a little more predictable. If you don't have a casting
|
||||
modifer set, then click-to-move is turned off while you're fishing.
|
||||
|
||||
Version 0.8.6f
|
||||
- Remove some debugging that broke when DevTools wasn't installed
|
||||
|
||||
Version 0.8.6e
|
||||
- Easy Cast is back (Fast Cast is no more). Thanks to the Cosmos team who
|
||||
figured out the appropriate place for hooking in the handling code -- it
|
||||
was a snap to add in!
|
||||
- Removed the "Suit up and go fishing" stuff since we don't need it any more
|
||||
|
||||
Version 0.8.6d
|
||||
- Fix a bunch of small errors that never showed up before
|
||||
- Add 'mouse fishing' option that binds the middle button (BUTTON3) to
|
||||
'cast now' (may not be necessary since 'Suit up and go fishing' works...)
|
||||
|
||||
Version 0.8.6c
|
||||
- Mark OutfitDisplayFrame as version 1.10 compatible
|
||||
|
||||
Version 0.8.6b
|
||||
- Update for patch 1.10 (11000)
|
||||
- Partial Spanish translation, thanks to fili
|
||||
- Some fixes that now don't make much difference because of 1.10
|
||||
|
||||
Version 0.8.6a
|
||||
- Fixes for handling Eternium enchant correctly
|
||||
- Fix bug in 'Suit up and go fishing' handler
|
||||
|
||||
Version 0.8.6
|
||||
- Rework easy cast to work with 1.10 -- no dice yet though :-(
|
||||
- Add "Suit up and go fishing" binding for an alternate 1.10 when "Easy Cast" no longer works
|
||||
- Outfitter support
|
||||
- Translation handling completely rewritten to eliminate missing strings
|
||||
in translations
|
||||
- Fix for Eternium Line enchant (the tooltip string changed)
|
||||
|
||||
Version 0.8.5g
|
||||
- Include OutfitDisplayFrame fix for nil error when fewer than five bags
|
||||
|
||||
Version 0.8.5f
|
||||
- Auto-set sound volumes to make the bobber sounds stand out
|
||||
|
||||
Version 0.8.5e
|
||||
- Don't count "Nat Pagle's Fish Terminator" as a fishing pole, even if it looks like one
|
||||
|
||||
Version 0.8.5d
|
||||
- Fix a nil error in comparison after we've shrunk a table
|
||||
|
||||
Version 0.8.5c
|
||||
- Fix nil error in cleanup command
|
||||
- Missing string in French translation for checking not to lure while clicking on the
|
||||
bobber (it's still not the right translation though, hint hint!)
|
||||
|
||||
Version 0.8.5b
|
||||
- Handle defaulting to 'English' correctly if we don't have a valid translation
|
||||
|
||||
Version 0.8.5a
|
||||
- Fix French localization file
|
||||
|
||||
Version 0.8.5
|
||||
- Add partial French translation, thanks to Corwin Whitehorn
|
||||
- Support for Titan v2.08
|
||||
- Support for InfoBar
|
||||
- Rewritten to drastically reduce global namespace pollution
|
||||
- Rewrote database displays to reduce memory usage
|
||||
- Use item ids instead of names in fish database to make things smaller
|
||||
- Rewritten graphing subsystem for future improvements
|
||||
- Use per-character variable saving to simplify data access and structures
|
||||
- Added 'cleanup' command to remove stale settings
|
||||
- Add modifier key support for easy cast
|
||||
- Show number of Tastyfish caught so far
|
||||
- Add partial French translation, thanks to Corwin Whitehorn
|
||||
- Try supporting ModWatcher
|
||||
- Fix for menu popup outside of minimap button
|
||||
- Don't do 'easy lures' if we're about to click on the bobber
|
||||
|
||||
Version 0.8.4f
|
||||
- Change line endings to DOS again, seems to fix some LUA loading errors
|
||||
- Fix location scrollbar position for 1.9
|
||||
- Update to new numbering scheme for version
|
||||
- Fix a bug catching tracking fish in the last week of the year
|
||||
- Fix some small bugs that affect brand-new toons
|
||||
- Notice if we can't display fish tooltips instead of disconnecting
|
||||
- Fix bug where bringing up the outfit window would lose
|
||||
what you were wearing before
|
||||
- Fishing Extravaganza countdown timer
|
||||
- Keep track of Tastyfish "schooling" locations
|
||||
|
||||
Version 0.8.3
|
||||
- Update style and skill messages in outfit display to handle new 'dressing room' feature
|
||||
- Make sure that errors in switching outfits don't erase what we changed out of
|
||||
- Handle elapsed time even if OutfitDisplayFrame is disabled
|
||||
- Make sure we're not already switching outfits before we try again
|
||||
- Improved ButtonHole support
|
||||
|
||||
Version 0.8.2
|
||||
- 'Cycle fish' graphs for the main cycle fish (additional fish coming soon)
|
||||
- New minimap button support
|
||||
- Display current zone in the fish watcher
|
||||
- Show elapsed time in the fish watcher (not perfect yet)
|
||||
- Fish watcher frame is moveable
|
||||
- Support for 'auto fishing lures'
|
||||
- Style points added for some of the Extravaganza rewards
|
||||
- Improved support for languages (removed static strings)
|
||||
- Support for 'ButtonHole' -- if that addon gets finished it'll be way cool
|
||||
- OutfitDisplayFrame support improved
|
||||
|
||||
Version 0.8.1d
|
||||
- Better German help. Thanks blackrat!
|
||||
- '/fb import' import information from Impp's fishinfo, DataFish, or Fishinfo2 databases
|
||||
- '/fb current reset' to restart the current session fish counts
|
||||
- Some small internal code cleanup
|
||||
|
||||
Version 0.8.1
|
||||
- Fixed an error in the German help system (I hope!)
|
||||
- '/fb watcher unlock/lock/reset' to move the fish watcher
|
||||
- Display percentage per zone when viewing 'by fish' so you can find those hot spots
|
||||
|
||||
Version 0.8
|
||||
- Display your current skill in the watch frame
|
||||
- Track fish by zone and subzone (converts old data as you visit your old fishing haunts)
|
||||
- Track minimum skill for locations and for fish types
|
||||
- Full Titan panel support
|
||||
- Basic myAddOns support
|
||||
- Keeping up with the Jones' and added 'Easy Lure' just like Mugendai has :-)
|
||||
- A much better German translation (outfit switching should work now too) -- thanks blackrat!
|
||||
- Sort by number of fish caught
|
||||
- Should work with 'click to move' turned on
|
||||
- Track 'cycle fish' information (very preliminary)
|
||||
- OutfitDisplayFrame is now optional if you have an equipment manager you prefer
|
||||
|
||||
Version 0.7.9c
|
||||
- Fix the I can't believe it worked! bug when looking for the Fishing skill
|
||||
|
||||
Version 0.7.9b
|
||||
- It works even if you've never used Fishing Buddy before!
|
||||
|
||||
Version 0.7.9
|
||||
- Really fix the per-server settings
|
||||
|
||||
I aplogize for those people whose options got lost -- this time I got it right! I have
|
||||
no idea why the zip file didn't get uploaded last night, but the new one is good. Thank
|
||||
you for your patience!
|
||||
|
||||
Version 0.7.8
|
||||
- a very preliminary German translation
|
||||
- myAddOns support
|
||||
- prefs are now stored by server for each toon
|
||||
|
||||
The Titan panel support is still preliminary -- I want to make it default to 'on' and have a better icon. There are still things I'd like to have options for (like sorting the watch panel various ways and making it movable), but I'm going to concentrate on the outfit pieces so that they work for more situations.
|
||||
|
||||
Thanks for all of your support!
|
||||
|
||||
Version 0.7.7
|
||||
- Fix ugly display when switching between fish and locations
|
||||
- Added Titan panel support (ugly icon, need to polish up my image skills and make a nice gold one)
|
||||
- Sort the 'Fish Watcher' by name (for now)
|
||||
- Added key bindings for window toggle and outfit switching
|
||||
- Internal cleanups, prep for storing toon prefs by server
|
||||
|
||||
Auto-loot (shift right click) works for me 'as is' -- I'll have to play with key mappings to see if there's one that stops this from working...
|
||||
|
||||
Version 0.7.6
|
||||
- Add an option to leave off those pesky percentages
|
||||
- Add an option to only watch the fish while you're actually fishing
|
||||
- Update the version of OutfitDisplayFrame
|
||||
|
||||
Version 0.7.5
|
||||
- fix a bad memory leak on the outfit display page
|
||||
@@ -0,0 +1,199 @@
|
||||
-- Deutsche
|
||||
-- lower upper
|
||||
-- a umlaut \195\164 \195\132
|
||||
-- o umlaut \195\192 \195\150
|
||||
-- u umlaut \195\188 \195\156
|
||||
|
||||
FishingTranslations["deDE"] = {
|
||||
NAME = "Fishing Buddy",
|
||||
DESCRIPTION1 = "\195\188bersicht, wo welche Fische gefangen wurden",
|
||||
DESCRIPTION2 = "und Handhabung deiner Fischereiausr\195\188stung.",
|
||||
|
||||
-- Tab labels and tooltips
|
||||
LOCATIONS_INFO = "Anzeige von Fischen nach Fanggebieten",
|
||||
LOCATIONS_TAB = "Fische",
|
||||
OUTFITS_INFO = "W\195\164hlen aus, was du beim Fischen tragen willst",
|
||||
OUTFITS_TAB = "Ausr\195\188stung",
|
||||
OPTIONS_INFO = NAME.." Einstellungen",
|
||||
OPTIONS_TAB = "Einstellungen",
|
||||
TRACKING_INFO = "Zeige graphische #NAME#-Anzeige der letzten F\195\164nge",
|
||||
TRACKING_TAB = "Saisonfische",
|
||||
|
||||
POINT = "Punkt",
|
||||
POINTS = "Punkte",
|
||||
|
||||
RAW = "Roher",
|
||||
FISH = "Fische",
|
||||
|
||||
BOBBER_NAME = "Blinker",
|
||||
FISHINGSKILL = "Angeln",
|
||||
HELP = "Hilfe",
|
||||
SWITCH = "wechseln",
|
||||
IMPORT = "importiere",
|
||||
TRACK = "Aufzeichnung",
|
||||
NOTRACK = "Aufzeichnung-nicht",
|
||||
TRACKING = "aufzeichnen",
|
||||
|
||||
ADD = "hinzuf\195\188gen",
|
||||
REPLACE = "ersetze",
|
||||
UPDATE = "update",
|
||||
CURRENT = "Session",
|
||||
RESET = "reset",
|
||||
CLEANUP = "cleanup",
|
||||
CHECK = "check",
|
||||
NOW = "now",
|
||||
|
||||
NOREALM = "unknown realm",
|
||||
|
||||
WATCHER = "Watcher",
|
||||
WATCHER_LOCK = "fixieren",
|
||||
WATCHER_UNLOCK = "freigeben",
|
||||
|
||||
UNKNOWN = "unbekannt",
|
||||
WEEKLY = "w\195\182chentlich",
|
||||
HOURLY = "st\195\188ndlich",
|
||||
|
||||
SHOWFISHIES = "Nach Fischnamen",
|
||||
SHOWFISHIES_INFO = "Anzeigen Fischlog gruppiert nach Fischart.",
|
||||
SHOWLOCATIONS = "Nach Fanggebieten",
|
||||
SHOWLOCATIONS_INFO = "Anzeigen Fischlog gruppiert nach Fanggebiet.",
|
||||
SWITCHOUTFIT = "Ausr\195\188stung wechseln",
|
||||
SWITCHOUTFIT_INFO = "Schalter zwischen der Fischereiausstattung und was Sie vorher trugen.",
|
||||
|
||||
-- Option names and tooltips
|
||||
CONFIG_SHOWNEWFISHIES_ONOFF = "Zeige neue Fische",
|
||||
CONFIG_SHOWNEWFISHIES_INFO = "Zeigt im Chat-Log an, wenn ein neuer Fisch an der gegenw\195\164rtige Position gefangen wird.",
|
||||
CONFIG_FISHWATCH_ONOFF = "Fisch-W\195\164chter",
|
||||
CONFIG_FISHWATCH_INFO = "Zeigt in einer eigenen Chat-Anzeige die Fische an, die an der gegenw\195\164rtigen Location gefangen wurden.",
|
||||
CONFIG_FISHWATCHSKILL_ONOFF = "Zeige Fishing-Skill an",
|
||||
CONFIG_FISHWATCHSKILL_INFO = "Zeigt deinen gegenw\195\164rtigen Fishing-Skill im Fanggebiet an.",
|
||||
CONFIG_FISHWATCHZONE_ONOFF = "Zone des Fanggebietes",
|
||||
CONFIG_FISHWATCHZONE_INFO = "Zeigt die gegenw\195\164rtige Zone im Fanggebiet an.",
|
||||
CONFIG_FISHWATCHONLY_ONOFF = "Nur beim Fischen",
|
||||
CONFIG_FISHWATCHONLY_INFO = "Anzeige nur beim Fischen",
|
||||
CONFIG_FISHWATCHPERCENT_ONOFF = "Prozent je Fischart",
|
||||
CONFIG_FISHWATCHPERCENT_INFO = "Zeigt den Prozentsatz der gefangenen Fische je Fischart in der Anzeige",
|
||||
CONFIG_ONLYMINE_ONOFF = "Angel der Fischeriausr\195\188stung",
|
||||
CONFIG_ONLYMINE_INFO = "Wenn aktiviert, wird \"Einfaches Werfen\" nur die Angel der aktuellen Fischereiausr\195\188stung checken (nicht nach weitern/besseren Angeln suchen).",
|
||||
CONFIG_EASYLURES_ONOFF = "Automatischer K\195\182der",
|
||||
CONFIG_EASYLURES_INFO = "Wenn aktiviert, wird falls erforderlich ein K\195\182der an der Angel angebracht, bevor man mit dem Angeln beginnt.",
|
||||
CONFIG_SHOWLOCATIONZONES_ONOFF = "Zeige Zonen",
|
||||
CONFIG_SHOWLOCATIONZONES_INFO = "Zeigt Zonen und Sub-Zonen an.",
|
||||
CONFIG_SORTBYPERCENT_ONOFF = "Sortiere nach Anzahl gefangener Fische",
|
||||
CONFIG_SORTBYPERCENT_INFO = "Anzeige sortiert nach Zahl der gefangenen Fische, anstelle von Fischnamen.",
|
||||
CONFIG_STVTIMER_ONOFF = "Angelwettbewerb-Timer.",
|
||||
CONFIG_STVTIMER_INFO = "Wenn Sie erm\195\182glicht werden, zeigen Sie einen Countdowntimer für den Anfang des Fischens Extravaganza und ein Countdown vom Timer nach links an.",
|
||||
CONFIG_USEBUTTONHOLE_ONOFF = "Verwenden Sie ButtonHole",
|
||||
CONFIG_USEBUTTONHOLE_INFO = "Wenn es erm\195\182glicht wird, steuert das ButtonHole-addon die minimaptaste. Nehmen bewirkt auf dem folgenden LOGON.",
|
||||
|
||||
CONFIG_SKILL_INFO = "Gesamtausstattungs-Bonus.",
|
||||
CONFIG_SKILL_TEXT = "Angeln ",
|
||||
CONFIG_STYLISH_INFO = "Styling-Punkte, inspiriert durch die Draznars Fishing-FAQ auf den (englischen) WoW-Foren.",
|
||||
CONFIG_STYLISH_TEXT = "Styling: ",
|
||||
|
||||
TITAN_CLICKTOSWITCH_ONOFF = "Zum Wechseln der Ausr\195\188stung klicken.",
|
||||
TITAN_CLICKTOSWITCH_INFO = "Wenn aktiviert, wechselt ein Linksklcik die Ausr\195\188stung, statt nur das #NAME#-Fenster zu \195\182ffnen.",
|
||||
|
||||
LEFTCLICKTODRAG = "Link-Klicken zum Schleppen",
|
||||
|
||||
MINIMAPBUTTONPLACEMENT = "Ikon-Plazierung",
|
||||
MINIMAPBUTTONPLACEMENTTOOLTIP = "Erlaubt dir, das #NAME#-Ikon um die Minimap zu verschieben",
|
||||
CONFIG_MINIMAPBUTTON_ONOFF = "Anzeigen des Minimapikons",
|
||||
CONFIG_MINIMAPBUTTON_INFO = "Zeige #NAME#-Ikon auf der Minimap an.",
|
||||
|
||||
CONFIG_ENHANCESOUNDS_ONOFF = "Erh\195\192hen Sie Fischent\195\192ne",
|
||||
CONFIG_ENHANCESOUNDS_INFO = "Maximieren Sie Klangvolumen und setzen Sie umgebende Ausgabe herab, um das bobber noise zu lassen wahrnehmbareres beim Fischen.",
|
||||
|
||||
-- messages
|
||||
FAILEDINIT = "Initialisierte nicht richtig.",
|
||||
IMPORTMSG = "Importierte '%s'-Datenbank.",
|
||||
NOIMPORTMSG = "Datenbanken Impp, DataFish oder FishInfo2 nicht gefunden.",
|
||||
ADDFISHIEMSG = "Hinzuf\195\188gen von %s Position %s.",
|
||||
CURSORBUSY = "Konnte Ausr\195\188stung nicht wechseln, da Computer mit anderen Aktivit\195\164ten besch\195\164ftigt!",
|
||||
NOOUTFITDEFINED = "Sie haben keine Ausr\195\188stungsteile in Ihrer Fischenausstattung angegeben.",
|
||||
NODATAMSG = "Keine Fischdaten vorhanden.",
|
||||
TRACKINGMSG = "Aufzeichnung '%s' (%s).",
|
||||
TOOFASTMSG = "Kann Ausr\195\188stung nicht schnell wechseln.",
|
||||
NOTRACKERRMSG = "Kann nicht R\195\188ckstellung saisonfisch entfernen.",
|
||||
NOTRACKMSG = "Saisonfisch '%s' entfernt.",
|
||||
POLEALREADYEQUIPPED = "Sie werden bereits f\195\188r Fischen ausger\195\188stet.",
|
||||
CANTSWITCHBACK = "Sie haben bereits Ihre Fischenausr\195\188stung entfernt.",
|
||||
CLEANUP_NONEMSG = "Keine alten Einstellungen bleiben.",
|
||||
CLEANUP_WILLMSG = "Alte Einstellungen restlich f\195\188r |c0000FF00%s|r: %s.",
|
||||
CLEANUP_DONEMSG = "Alte Einstellungen entfernt f\195\188r |c0000FF00%s|r: %s.",
|
||||
CLEANUP_NOOLDMSG = "Es gibt keine alten Einstellungen f\195\188r Spieler |c0000FF00%s|r.",
|
||||
|
||||
NOTLINKABLE = "<Einzelteil ist nicht verbindbar>",
|
||||
|
||||
TIMETOGO = "Angelwettbewerb beginnt in %d:%02d",
|
||||
TIMELEFT = "Angelwettbewerb endet in %d:%02d -- %d %s",
|
||||
|
||||
STVZONENAME = "Stranglethorn",
|
||||
|
||||
TOOLTIP_HINTSWITCH = "Hinweis: wechselt ein Linksklcik die Ausr\195\188stung",
|
||||
TOOLTIP_HINTTOGGLE = "Hinweis: das #NAME#-Fenster zu \195\182ffnen.",
|
||||
|
||||
-- Key binding support
|
||||
BINDING_HEADER_FISHINGBUDDY_BINDINGS = "#NAME#",
|
||||
BINDING_NAME_FISHINGBUDDY_TOGGLE = "#NAME# anzeigen",
|
||||
BINDING_NAME_FISHINGBUDDY_SWITCH = "Ausr\195\188stung wechseln",
|
||||
|
||||
BINDING_NAME_TOGGLEFISHINGBUDDY_LOC = "#NAME# #LOCATIONS# Fenster anzeigen",
|
||||
BINDING_NAME_TOGGLEFISHINGBUDDY_OUT = "#NAME# #OUTFITS# Fenster anzeigen",
|
||||
BINDING_NAME_TOGGLEFISHINGBUDDY_TRK = "#NAME# #TRACKING# Fenster anzeigen",
|
||||
BINDING_NAME_TOGGLEFISHINGBUDDY_OPT = "#NAME# #OPTIONS# Fenster anzeigen",
|
||||
};
|
||||
|
||||
FishingTranslations["deDE"].IMPORT_HELP = {
|
||||
"|c0000FF00/fb #IMPORT#|r",
|
||||
" Importiere Impp's Fishinfo or FishInfo2 Daten.",
|
||||
};
|
||||
|
||||
FishingTranslations["deDE"].SWITCH_HELP = {
|
||||
"|c0000FF00/fb #SWITCH#|r",
|
||||
" wechsele deine Fischereiausr\195\188stung und -kleidung.",
|
||||
};
|
||||
|
||||
FishingTranslations["deDE"].WATCHER_HELP = {
|
||||
"|c0000FF00/fb #WATCHER#|r [|c0000FF00#WATCHER_LOCK#|r oder |c0000FF00#WATCHER_UNLOCK#|r oder |c0000FF00#RESET#|r]",
|
||||
" fixieren .. Fixieren des Watcher-Fenster,",
|
||||
" freigeben .. Entriegeln zum Verschieben,",
|
||||
" reset .. Zur\195\188ckstellen",
|
||||
};
|
||||
|
||||
FishingTranslations["deDE"].CURRENT_HELP = {
|
||||
"|c0000FF00/fb #CURRENT# #RESET#|r",
|
||||
" Zur\195\188ckstellen der w\195\164hrend der gegenw\195\164rtigen Session gefangenen Fische.",
|
||||
};
|
||||
FishingTranslations["deDE"].CLEANUP_HELP = {
|
||||
"|c0000FF00/fb #CLEANUP#|r [|c0000FF00#CHECK#|r or |c0000FF00#NOW#|r]",
|
||||
" S\195\164ubern Sie herauf alte Einstellungen. |c0000FF00#CHECK#|r verzeichnet",
|
||||
" die alten Einstellungen, die von |c0000FF00#NOW#|r entfernt werden.",
|
||||
};
|
||||
|
||||
FishingTranslations["deDE"].TRACKING_HELP = {
|
||||
"|c0000FF00/fb #TRACK#|r [|c0000FF00#HOURLY#|r oder |c0000FF00#WEEKLY#|r] |c00FF00FF<Fish-Link>|r",
|
||||
" zeichne die Angeldauer f\195\188r die angegebenen",
|
||||
" Fischart (ein Shift-Klick Link) auf",
|
||||
"|c0000FF00/fb #NOTRACK#|r |c00FF00FF<fish link>|r",
|
||||
" remove the specified fish (a shift click link) from the tracker",
|
||||
"|c0000FF00/fb #TRACKING#|r",
|
||||
" eine einfache Anzeige, wann die gefangenen",
|
||||
" Fische gefangen wurden",
|
||||
};
|
||||
|
||||
FishingTranslations["deDE"].HELPMSG = {
|
||||
"Du kannst |c0000FF00/fishingbuddy|r oder |c0000FF00/fb|r f\195\188r alle Befehle benutzen",
|
||||
"|c0000FF00/fb|r: schaltet das Fenster ein/aus.",
|
||||
"|c0000FF00/fb #HELP#|r: zeigt diesern Hilfetext",
|
||||
"#SWITCH_HELP#",
|
||||
"#WATCHER_HELP#",
|
||||
"#CURRENT_HELP#",
|
||||
"#CLEANUP_HELP#",
|
||||
"#IMPORT_HELP#",
|
||||
"#TRACKING_HELP#",
|
||||
" ",
|
||||
"Du kannst die Fensteraktivierung und den",
|
||||
"Befehl zum Wechseln deiner Ausstattung in den",
|
||||
"\"Tastaturbelegungen\" festlegen.",
|
||||
};
|
||||
@@ -0,0 +1,197 @@
|
||||
FishingTranslations["esES"] = {
|
||||
NAME = "Fishing Buddy",
|
||||
DESCRIPTION1 = "Seguimiento de las capturas que has hecho",
|
||||
DESCRIPTION2 = "y maneja tu caña de pescar.",
|
||||
|
||||
-- Tab labels and tooltips
|
||||
LOCATIONS_INFO = "Muestra info de zona de pesca",
|
||||
LOCATIONS_TAB = "Zona",
|
||||
OUTFITS_INFO = "Desviste los que llevas cuando pescas",
|
||||
OUTFITS_TAB = "Equipos",
|
||||
OPTIONS_INFO = "Establece #NAME# opciones",
|
||||
OPTIONS_TAB = "Opciones",
|
||||
TRACKING_INFO = "Muestra #NAME# informacióon de pesca ciclica",
|
||||
TRACKING_TAB = "Seguimiento",
|
||||
|
||||
POINT = "punto",
|
||||
POINTS = "puntos",
|
||||
|
||||
RAW = "Crudo",
|
||||
FISH = "Pesca",
|
||||
|
||||
BOBBER_NAME = "Anzuelo",
|
||||
FISHINGSKILL = "Pesca",
|
||||
HELP = "ayuda",
|
||||
SWITCH = "cambia",
|
||||
IMPORT = "importa",
|
||||
TRACK = "sigue",
|
||||
NOTRACK = "no siguas",
|
||||
TRACKING = "siguiendo",
|
||||
|
||||
ADD = "añde",
|
||||
REPLACE = "reemplaza",
|
||||
UPDATE = "actualiza",
|
||||
CURRENT = "actual",
|
||||
RESET = "resetea",
|
||||
CLEANUP = "limpia",
|
||||
CHECK = "chequea",
|
||||
NOW = "ahora",
|
||||
|
||||
NOREALM = "reino desconocido",
|
||||
|
||||
WATCHER = "observador",
|
||||
WATCHER_LOCK = "bloquea",
|
||||
WATCHER_UNLOCK = "desbloquea",
|
||||
|
||||
UNKNOWN = "Desconocido",
|
||||
WEEKLY = "Semanal",
|
||||
HOURLY = "Por hora",
|
||||
|
||||
KEYS_LABEL_TEXT = "Modificadores:",
|
||||
KEYS_NONE_TEXT = "Ninguno",
|
||||
KEYS_SHIFT_TEXT = "Shift",
|
||||
KEYS_CTRL_TEXT = "Control",
|
||||
KEYS_ALT_TEXT = "Alt",
|
||||
|
||||
SHOWFISHIES = "Muestra Pez",
|
||||
SHOWFISHIES_INFO = "Muestra historial de pesca por tipo de pez.",
|
||||
|
||||
SHOWLOCATIONS = "Ubicaciones",
|
||||
SHOWLOCATIONS_INFO = "Muestra hostorial de pesca por zona de pesca.",
|
||||
|
||||
SWITCHOUTFIT = "Cambia",
|
||||
SWITCHOUTFIT_INFO = "Cambia entre el equipo de pesca y lo que llevabas puesto.",
|
||||
|
||||
-- Option names and tooltips
|
||||
CONFIG_SHOWNEWFISHIES_ONOFF = "Muestra nuevos peces",
|
||||
CONFIG_SHOWNEWFISHIES_INFO = "Muestra un mensaje en el chat cuando la captura es nueva en el área actual.",
|
||||
CONFIG_FISHWATCH_ONOFF = "Observador",
|
||||
CONFIG_FISHWATCH_INFO = "Muestra un texto con la captura en el área actual.",
|
||||
CONFIG_FISHWATCHSKILL_ONOFF = "Muestra habilidad actual",
|
||||
CONFIG_FISHWATCHSKILL_INFO = "Muestra habilidad y mods en el área de observación.",
|
||||
CONFIG_FISHWATCHZONE_ONOFF = "Muestra zona actual",
|
||||
CONFIG_FISHWATCHZONE_INFO = "Muestra zona actual en el área de observación.",
|
||||
CONFIG_FISHWATCHONLY_ONOFF = "Solo cuando pescas",
|
||||
CONFIG_FISHWATCHONLY_INFO = "Solo muestra capturas en el observador si estas pescando actualmente",
|
||||
CONFIG_FISHWATCHPERCENT_ONOFF = "Muestra porcentaje capturado",
|
||||
CONFIG_FISHWATCHPERCENT_INFO = "Muestra el porcentaje de cada tipo de pez en el observador",
|
||||
CONFIG_EASYLURES_ONOFF = "Señuelo facil",
|
||||
CONFIG_EASYLURES_INFO = "Si activado, se aplicará un señuelo a tu caña antes de empezar a pescar siempre que lo necesites.",
|
||||
CONFIG_ONLYMINE_ONOFF = "Equipa solo caña",
|
||||
CONFIG_ONLYMINE_INFO = "Si activado, captura facil solo cequeará si llevas la caña (p.ej. no buscará todas las posibilidades).",
|
||||
CONFIG_SHOWLOCATIONZONES_ONOFF = "Muestra zonas",
|
||||
CONFIG_SHOWLOCATIONZONES_INFO = "Muestra zonas y subzonas.",
|
||||
CONFIG_SORTBYPERCENT_ONOFF = "Por número de capturas",
|
||||
CONFIG_SORTBYPERCENT_INFO = "Ordena la pantalla con el número de peces capturadas y no por el nombre.",
|
||||
CONFIG_STVTIMER_ONOFF = "Marcador de Fishing Extravaganza",
|
||||
CONFIG_STVTIMER_INFO = "Si activado, muestra la cuenta atras para el comienzo de Fishing Extravaganza y muestra el tiempo restante.",
|
||||
CONFIG_USEBUTTONHOLE_ONOFF = "Usa ButtonHole",
|
||||
CONFIG_USEBUTTONHOLE_INFO = "Si activo, al addon ButtonHole controlará el botón del minimapa. Hace efecto al siguiente login.",
|
||||
|
||||
CONFIG_SKILL_INFO = "Bonus de equipo total.",
|
||||
CONFIG_SKILL_TEXT = "Pescando ",
|
||||
CONFIG_STYLISH_INFO = "Style points loosely inspired by Draznar's Fishing FAQ in the WoW forums.",
|
||||
CONFIG_STYLISH_TEXT = "Estilo: ",
|
||||
|
||||
CONFIG_OUTFITTER_TEXT = "Bonus equipo habilidad: %s\r\nPuntuacion estilo Draznar's: %d ";
|
||||
|
||||
TITAN_CLICKTOSWITCH_ONOFF = "Click para cambiar",
|
||||
TITAN_CLICKTOSWITCH_INFO = "Si activado, click-izq. Cambia equipos, sino saltarála ventana Fishing Buddy.",
|
||||
|
||||
LEFTCLICKTODRAG = "Click-izq para mover",
|
||||
|
||||
MINIMAPBUTTONPLACEMENT = "Posición Botón",
|
||||
MINIMAPBUTTONPLACEMENTTOOLTIP = "Permite mover el #NAME# icono alrdedor del minimapa",
|
||||
CONFIG_MINIMAPBUTTON_ONOFF = "Muestra icono minimapa",
|
||||
CONFIG_MINIMAPBUTTON_INFO = "Muestra un #NAME# icono en el minimapa.",
|
||||
|
||||
CONFIG_ENHANCESOUNDS_ONOFF = "Activa sonidos de pesca",
|
||||
CONFIG_ENHANCESOUNDS_INFO = "Maximiza el volúmen y minimiza el volúmen del ambiente para que se aprecie mejor el sonido cuando se pesca.",
|
||||
|
||||
-- messages
|
||||
FAILEDINIT = "No inicializó correctamente.",
|
||||
IMPORTMSG = "BaseDatos '%s' importada.",
|
||||
NOIMPORTMSG = "No Impp, DataFish, o FishInfo2 BasesDatos encontradas.",
|
||||
ADDFISHIEMSG = "Añdiendo %s a zona %s.",
|
||||
CURSORBUSYMSG = "no pudo cambiar por estar el cursor ocupado!",
|
||||
NOOUTFITDEFINED = "No tienes objetos en tu equipo de pesca.",
|
||||
NODATAMSG = "No datos pesca disponibles.",
|
||||
TRACKINGMSG = "Segumiento '%s' %s.",
|
||||
NOTRACKERRMSG = "No puede borrar pesca ciclica.",
|
||||
NOTRACKMSG = "Pesca ciclica borrada '%s'.",
|
||||
POLEALREADYEQUIPPED = "Ya estas equipado para pescar.",
|
||||
CANTSWITCHBACK = "Ya te has quitado el equipamiento de pesca.",
|
||||
CLEANUP_NONEMSG = "No quedan antigÜos ajustes.",
|
||||
CLEANUP_WILLMSG = "Ajustes antigÜos quedan para |c0000FF00%s|r: %s.",
|
||||
CLEANUP_DONEMSG = "Borrados ajustes antigÜos para |c0000FF00%s|r: %s.",
|
||||
CLEANUP_NOOLDMSG = "No hay ajustes antigÜos para jugador |c0000FF00%s|r.",
|
||||
|
||||
NOTLINKABLE = "<Objeto no se puede alcanzar>",
|
||||
|
||||
TIMETOGO = "Extravaganza comienza en %d:%02d",
|
||||
TIMELEFT = "Extravaganza acaba en %d:%02d -- %d %s",
|
||||
|
||||
STVZONENAME = "Stranglethorn Vale",
|
||||
|
||||
TOOLTIP_HINTSWITCH = "Consejo: click para cambiar equipos",
|
||||
TOOLTIP_HINTTOGGLE = "Consejo: click para mostar #NAME# ventana.",
|
||||
|
||||
-- Key binding support
|
||||
BINDING_HEADER_FISHINGBUDDY_BINDINGS = "#NAME#",
|
||||
BINDING_NAME_FISHINGBUDDY_TOGGLE = "Toggle #NAME# Window",
|
||||
BINDING_NAME_FISHINGBUDDY_SWITCH = "Switch Fishing Outfit",
|
||||
BINDING_NAME_FISHINGBUDDY_GOFISHING = "Suit up and go fishing",
|
||||
|
||||
BINDING_NAME_TOGGLEFISHINGBUDDY_LOC = "Toggle #NAME# Locations Pane",
|
||||
BINDING_NAME_TOGGLEFISHINGBUDDY_OUT = "Toggle #NAME# Outfit Pane",
|
||||
BINDING_NAME_TOGGLEFISHINGBUDDY_TRK = "Toggle #NAME# Tracking Pane",
|
||||
BINDING_NAME_TOGGLEFISHINGBUDDY_OPT = "Toggle #NAME# Options Pane",
|
||||
};
|
||||
|
||||
FishingTranslations["esES"].IMPORT_HELP = {
|
||||
"|c0000FF00/fb #IMPORT#|r",
|
||||
" Import Impp's fishinfo or FishInfo2 data.",
|
||||
};
|
||||
FishingTranslations["esES"].SWITCH_HELP = {
|
||||
"|c0000FF00/fb #SWITCH#|r",
|
||||
" swap outfits (if OutfitDisplayFrame or Outfitter is available)",
|
||||
};
|
||||
FishingTranslations["esES"].WATCHER_HELP = {
|
||||
"|c0000FF00/fb #WATCHER#|r [|c0000FF00#WATCHER_LOCK#|r or |c0000FF00#WATCHER_UNLOCK#|r or |c0000FF00#RESET#|r]",
|
||||
" Unlock the watcher to move the window,",
|
||||
" lock to stop, reset to reset",
|
||||
};
|
||||
FishingTranslations["esES"].CURRENT_HELP = {
|
||||
"|c0000FF00/fb #CURRENT# #RESET#|r",
|
||||
" Reset the fish caught during the current session.",
|
||||
};
|
||||
FishingTranslations["esES"].CLEANUP_HELP = {
|
||||
"|c0000FF00/fb #CLEANUP#|r [|c0000FF00f#CHECK#|r or |c0000FF00#NOW#|r]",
|
||||
" Clean up old settings. |c0000FF00#CHECK#|r lists which",
|
||||
" settings will be removed by |c0000FF00#NOW#|r.",
|
||||
};
|
||||
FishingTranslations["esES"].TRACKING_HELP = {
|
||||
"|c0000FF00/fb #TRACK#|r [|c0000FF00#HOURLY#|r or |c0000FF00#WEEKLY#|r] |c00FF00FF<fish link>|r",
|
||||
" track the catch times for the specified fish (a shift click link)",
|
||||
"|c0000FF00/fb #NOTRACK#|r |c00FF00FF<fish link>|r",
|
||||
" remove the specified fish (a shift click link) from the tracker",
|
||||
"|c0000FF00/fb #TRACKING#|r",
|
||||
" a really bad display of when tracked fish were caught",
|
||||
};
|
||||
|
||||
FishingTranslations["esES"].HELPMSG = {
|
||||
"You can use |c0000FF00/fishingbuddy|r or |c0000FF00/fb|r for all commands",
|
||||
"|c0000FF00/fb|r: by itself, toggle the Fishing Buddy window",
|
||||
"|c0000FF00/fb #HELP#|r: display this message",
|
||||
"#SWITCH_HELP#",
|
||||
"#WATCHER_HELP#",
|
||||
"#CURRENT_HELP#",
|
||||
"#CLEANUP_HELP#",
|
||||
"#IMPORT_HELP#",
|
||||
"#TRACKING_HELP#",
|
||||
" ",
|
||||
"You can bind both the window toggle and the outfit",
|
||||
" switch command to keys in the \"Key Bindings\" window.",
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1,124 @@
|
||||
FishingTranslations["frFR"] = {
|
||||
NAME = "Fishing Buddy";
|
||||
DESCRIPTION1 = "Se souvient des poissons pris et";
|
||||
DESCRIPTION2 = "organise votre \195\169quipement.";
|
||||
|
||||
-- Tab labels and tooltips
|
||||
LOCATIONS_INFO = "Affiche les informations de p\195\170che locales";
|
||||
LOCATIONS = "R\195\169gions";
|
||||
OUTFITS_INFO = "Pr\195\169pare votre equipement de p\195\170che";
|
||||
OUTFITS = "Equipement";
|
||||
OPTIONS_INFO = "R\195\168gle les options";
|
||||
OPTIONS = "Options";
|
||||
TRACKING_INFO = "Affiche les donn\195\169es sur les poissons";
|
||||
TRACKING = "Donn\195\169es";
|
||||
|
||||
POINT = "point";
|
||||
POINTS = "points";
|
||||
|
||||
RAW = "Raw";
|
||||
|
||||
BOBBER_NAME = "Fishing Bobber";
|
||||
FISHINGSKILL = "P\195\170che";
|
||||
HELP = "Aide";
|
||||
SWITCH = "switch";
|
||||
IMPORT = "import";
|
||||
TRACK = "track";
|
||||
NOTRACK = "notrack";
|
||||
TRACKING = "tracking";
|
||||
|
||||
ADD = "add";
|
||||
REPLACE = "replace";
|
||||
UPDATE = "update";
|
||||
CURRENT = "current";
|
||||
RESET = "reset";
|
||||
CLEANUP = "cleanup";
|
||||
CHECK = "check";
|
||||
NOW = "NOW";
|
||||
|
||||
WATCHER = "watcher";
|
||||
WATCHER_LOCK = "lock";
|
||||
WATCHER_UNLOCK = "unlock";
|
||||
|
||||
UNKNOWN = "Inconnu";
|
||||
WEEKLY = "Hebdomadaire";
|
||||
HOURLY = "toutes les heures";
|
||||
|
||||
SHOWFISHIES = "Poissons";
|
||||
SHOWFISHIES_INFO = "Affiche vos prises class\195\169es par type de poisson.";
|
||||
|
||||
SHOWLOCATIONS = "R\195\169gions";
|
||||
SHOWLOCATIONS_INFO = "Affiche vos prises class\195\169es par r\195\169gions.";
|
||||
|
||||
SWITCHOUTFIT = "Equipement";
|
||||
SWITCHOUTFIT_INFO = "Vous habille avec votre \195\169quipement de p\195\170che, ou vous r\195\169habille comme avant.";
|
||||
|
||||
CONFIG_SKILL_TEXT = "P\195\170che ";
|
||||
|
||||
TITAN_CLICKTOSWITCH_ONOFF = "Clique pour changer";
|
||||
TITAN_CLICKTOSWITCH_INFO = "Si activ\195\169, un clic gauche change l'\195\169quipement, si d\195\169sactiv\195\169, affiche la fen\195\170tre.";
|
||||
|
||||
LEFTCLICKTODRAG = "Clique gauche pour bouger";
|
||||
|
||||
MINIMAPBUTTONPLACEMENT = "Position du bouton";
|
||||
MINIMAPBUTTONPLACEMENTTOOLTIP = "Permet de bouger le bouton de #NAME# autour de la minimap";
|
||||
CONFIG_MINIMAPBUTTON_ONOFF = "Affiche le bouton de la minimap.";
|
||||
CONFIG_MINIMAPBUTTON_INFO = "Affiche le bouton de #NAME# pr\195\168s de la minimap.";
|
||||
|
||||
CONFIG_ENHANCESOUNDS_ONOFF = "Augmentez les bruits de p\195\170che";
|
||||
CONFIG_ENHANCESOUNDS_INFO = "Maximisez le volume sain et r\195\169duisez au minimum le volume ambiant pour faire le bobber \195\169bruiter plus apparent tout en p\195\170chant.";
|
||||
|
||||
TIMETOGO = "Le concours de p\195\170che commence dans %d:%02d";
|
||||
TIMELEFT = "Le concours de p\195\170che se termine dans %d:%02d";
|
||||
|
||||
STVZONENAME = "Vall\195\169e de Strangleronce";
|
||||
};
|
||||
|
||||
FishingTranslations["frFR"].IMPORT_HELP = {
|
||||
"|c0000FF00/fb #IMPORT#|r",
|
||||
" Importe les donn\195\169es d'Impp's fishinfo ou de FishInfo2.",
|
||||
};
|
||||
FishingTranslations["frFR"].SWITCH_HELP = {
|
||||
"|c0000FF00/fb #SWITCH#|r",
|
||||
" Change l'\195\169quipement (si OutfitDisplayFrame ou Outfitter est charg\195\169)",
|
||||
};
|
||||
FishingTranslations["frFR"].WATCHER_HELP = {
|
||||
"|c0000FF00/fb #WATCHER#|r [|c0000FF00#WATCHER_LOCK#|r or |c0000FF00#WATCHER_UNLOCK#|r or |c0000FF00#RESET#|r]",
|
||||
" D\195\169v\195\169rouille pour bouger la fen\195\170tre,",
|
||||
" lock pour arr\195\170ter, reset pour mettre a z\195\169ro",
|
||||
};
|
||||
FishingTranslations["frFR"].CURRENT_HELP = {
|
||||
"|c0000FF00/fb #CURRENT# #RESET#|r",
|
||||
" Met a z\195\169ro des poissons pris durant cette session.",
|
||||
};
|
||||
FishingTranslations["frFR"].TRACKING_HELP = {
|
||||
"|c0000FF00/fb #TRACK#|r [|c0000FF00#HOURLY#|r or |c0000FF00#WEEKLY#|r] |c00FF00FF<fish link>|r",
|
||||
" Surveille le temps de prise pour ce poisson (Maj-Click)",
|
||||
"|c0000FF00/fb #NOTRACK#|r |c00FF00FF<fish link>|r",
|
||||
" Retire ce poisson (Maj-Click) du surveillant",
|
||||
"|c0000FF00/fb #TRACKING#|r",
|
||||
" Un mauvais affichage du moment de prise d'un poisson surveill\195\169",
|
||||
};
|
||||
|
||||
FishingTranslations["frFR"].HELPMSG = {
|
||||
"Vous pouvez utiliser |c0000FF00/fishingbuddy|r ou |c0000FF00/fb|r pour toutes les commandes",
|
||||
"|c0000FF00/fb|r: seul, affiche/cache la fen\195\170tre de FishingBuddy",
|
||||
"|c0000FF00/fb #HELP#|r: affiche ce message",
|
||||
"#SWITCH_HELP#",
|
||||
"#WATCHER_HELP#",
|
||||
"#CURRENT_HELP#",
|
||||
"#IMPORT_HELP#",
|
||||
"#TRACKING_HELP#",
|
||||
" ",
|
||||
"Vous pouvez assigner une touche pour afficher/cacher la fen\195\170tre et/ou",
|
||||
"changer d'\195\169quipement dans la fen\195\170tre \"Raccourcis\".",
|
||||
|
||||
BINDING_HEADER_FISHINGBUDDY_BINDINGS = "#NAME#";
|
||||
BINDING_NAME_FISHINGBUDDY_TOGGLE = "Toggle:#NAME#(Fen\195\170tre)";
|
||||
BINDING_NAME_FISHINGBUDDY_SWITCH = "Changer l'\195\169quipement";
|
||||
|
||||
BINDING_NAME_TOGGLEFISHINGBUDDY_LOC = "Toggle: #NAME# (Panneau de r\195\169gion)";
|
||||
BINDING_NAME_TOGGLEFISHINGBUDDY_OUT = "Toggle: #NAME# (Panneau d'\195\169quipement)";
|
||||
BINDING_NAME_TOGGLEFISHINGBUDDY_TRK = "Toggle: #NAME# (Panneau de donn\195\169es)";
|
||||
BINDING_NAME_TOGGLEFISHINGBUDDY_OPT = "Toggle: #NAME# (Panneau d'options)";
|
||||
};
|
||||
@@ -0,0 +1,218 @@
|
||||
-- default to American English
|
||||
|
||||
FishingTranslations = {};
|
||||
FishingTranslations["enUS"] = {
|
||||
NAME = "Fishing Buddy",
|
||||
DESCRIPTION1 = "Keep track of the fish you've caught",
|
||||
DESCRIPTION2 = "and manage your fishing gear.",
|
||||
DESCRIPTION = "#DESCRIPTION1# #DESCRIPTION2#",
|
||||
|
||||
ID = "FishingBuddy";
|
||||
|
||||
WINDOW_TITLE = "#NAME# v#VERSION#";
|
||||
FISHINGTEXTURE = "Interface\\Icons\\Trade_Fishing";
|
||||
|
||||
-- Tab labels and tooltips
|
||||
LOCATIONS_INFO = "Show fishing location information",
|
||||
LOCATIONS_TAB = "Locations",
|
||||
OUTFITS_INFO = "Pick out what to wear when fishing",
|
||||
OUTFITS_TAB = "Outfits",
|
||||
OPTIONS_INFO = "Set #NAME# options",
|
||||
OPTIONS_TAB = "Options",
|
||||
TRACKING_INFO = "Show #NAME# cycle fish information",
|
||||
TRACKING_TAB = "Tracking",
|
||||
|
||||
POINT = "point",
|
||||
POINTS = "points",
|
||||
|
||||
RAW = "Raw",
|
||||
FISH = "Fish",
|
||||
|
||||
BOBBER_NAME = "Fishing Bobber",
|
||||
FISHINGSKILL = "Fishing",
|
||||
HELP = "help",
|
||||
SWITCH = "switch",
|
||||
IMPORT = "import",
|
||||
TRACK = "track",
|
||||
NOTRACK = "notrack",
|
||||
TRACKING = "tracking",
|
||||
|
||||
ADD = "add",
|
||||
REPLACE = "replace",
|
||||
UPDATE = "update",
|
||||
CURRENT = "current",
|
||||
RESET = "reset",
|
||||
CLEANUP = "cleanup",
|
||||
CHECK = "check",
|
||||
NOW = "now",
|
||||
|
||||
NOREALM = "unknown realm",
|
||||
|
||||
WATCHER = "watcher",
|
||||
WATCHER_LOCK = "lock",
|
||||
WATCHER_UNLOCK = "unlock",
|
||||
|
||||
UNKNOWN = "Unknown",
|
||||
WEEKLY = "weekly",
|
||||
HOURLY = "hourly",
|
||||
|
||||
KEYS_LABEL_TEXT = "Modifiers:",
|
||||
KEYS_NONE_TEXT = "None",
|
||||
KEYS_SHIFT_TEXT = "Shift",
|
||||
KEYS_CTRL_TEXT = "Control",
|
||||
KEYS_ALT_TEXT = "Alt",
|
||||
|
||||
SHOWFISHIES = "Show fish",
|
||||
SHOWFISHIES_INFO = "Display fishing history grouped by fish type.",
|
||||
|
||||
SHOWLOCATIONS = "Locations",
|
||||
SHOWLOCATIONS_INFO = "Display fishing history grouped by where caught.",
|
||||
|
||||
SWITCHOUTFIT = "Switch",
|
||||
SWITCHOUTFIT_INFO = "Switch between the fishing outfit and what you were wearing before.",
|
||||
|
||||
-- Option names and tooltips
|
||||
CONFIG_SHOWNEWFISHIES_ONOFF = "Show new fish",
|
||||
CONFIG_SHOWNEWFISHIES_INFO = "Display a message in the chat area when a new fish for the current location is caught.",
|
||||
CONFIG_FISHWATCH_ONOFF = "Fish watcher",
|
||||
CONFIG_FISHWATCH_INFO = "Display a text overlay with the fish caught in the current location.",
|
||||
CONFIG_FISHWATCHSKILL_ONOFF = "Display current skill",
|
||||
CONFIG_FISHWATCHSKILL_INFO = "Display your current fishing skill and mods in the fish watch area.",
|
||||
CONFIG_FISHWATCHZONE_ONOFF = "Display current zone",
|
||||
CONFIG_FISHWATCHZONE_INFO = "Display the current zone in the fish watch area.",
|
||||
CONFIG_FISHWATCHONLY_ONOFF = "Only while fishing",
|
||||
CONFIG_FISHWATCHONLY_INFO = "Only watch the fish caught when we're actually fishing",
|
||||
CONFIG_FISHWATCHPERCENT_ONOFF = "Show percentage caught",
|
||||
CONFIG_FISHWATCHPERCENT_INFO = "Display the percentage of each kind of fish on the watch display",
|
||||
CONFIG_SUITUPFIRST_ONOFF = "Dress for succcess",
|
||||
CONFIG_SUITUPFIRST_INFO = "Put on your fishing outfit if you're not wearing it when the binding key is pressed",
|
||||
CONFIG_EASYCAST_ONOFF = "Easy Cast",
|
||||
CONFIG_EASYCAST_INFO = "If enabled, then when a fishing pole is equipped and you right click, you will cast the line.",
|
||||
CONFIG_FASTCAST_ONOFF = "Fast Cast";
|
||||
CONFIG_FASTCAST_INFO = "If enabled, you can throw your line at the same time you click your bobber.";
|
||||
CONFIG_EASYLURES_ONOFF = "Easy Lures",
|
||||
CONFIG_EASYLURES_INFO = "If enabled, a lure will applied to your fishing pole before you start fishing, whenever you need one.",
|
||||
CONFIG_ONLYMINE_ONOFF = "Outfit Pole Only",
|
||||
CONFIG_ONLYMINE_INFO = "If enabled, easy cast will only check for your outfit's fishing pole (i.e. it won't search all possible poles for a match).",
|
||||
CONFIG_MOUSEFISHING_ONOFF = "Mouse fishing",
|
||||
CONFIG_MOUSEFISHING_INFO = "If enabled, left-click throws your line and right-click loots the bobber",
|
||||
CONFIG_SHOWLOCATIONZONES_ONOFF = "Show Zones",
|
||||
CONFIG_SHOWLOCATIONZONES_INFO = "Display both zones and subzones.",
|
||||
CONFIG_SORTBYPERCENT_ONOFF = "Sort by number caught",
|
||||
CONFIG_SORTBYPERCENT_INFO = "Order displays by the number of fish caught instead of by name.",
|
||||
CONFIG_STVTIMER_ONOFF = "Fishing Extravaganza timer",
|
||||
CONFIG_STVTIMER_INFO = "If enabled, display a countdown timer for the start of the Fishing Extravaganza and a countdown of the timer left.",
|
||||
CONFIG_USEBUTTONHOLE_ONOFF = "Use ButtonHole",
|
||||
CONFIG_USEBUTTONHOLE_INFO = "If enabled, the ButtonHole addon will control the minimap button. Takes effect on the next login.",
|
||||
|
||||
CONFIG_SKILL_INFO = "Total outfit skill bonus.",
|
||||
CONFIG_SKILL_TEXT = "Fishing ",
|
||||
CONFIG_STYLISH_INFO = "Style points loosely inspired by Draznar's Fishing FAQ in the WoW forums.",
|
||||
CONFIG_STYLISH_TEXT = "Style: ",
|
||||
|
||||
CONFIG_OUTFITTER_TEXT = "Outfit skill bonus: %s\r\nDraznar's style score: %d ";
|
||||
|
||||
TITAN_CLICKTOSWITCH_ONOFF = "Click to switch",
|
||||
TITAN_CLICKTOSWITCH_INFO = "If enabled, a left click switches outfits, otherwise it brings up the Fishing Buddy window.",
|
||||
|
||||
LEFTCLICKTODRAG = "Left-click to drag",
|
||||
|
||||
MINIMAPBUTTONPLACEMENT = "Button Placement",
|
||||
MINIMAPBUTTONPLACEMENTTOOLTIP = "Allows you to move the #NAME# icon around the minimap",
|
||||
CONFIG_MINIMAPBUTTON_ONOFF = "Display minimap icon",
|
||||
CONFIG_MINIMAPBUTTON_INFO = "Display a #NAME# icon on the minimap.",
|
||||
|
||||
CONFIG_ENHANCESOUNDS_ONOFF = "Enhance fishing sounds",
|
||||
CONFIG_ENHANCESOUNDS_INFO = "Maximize sound volume and minimize ambient volume to make the bobber noise more noticeable while fishing.",
|
||||
|
||||
-- messages
|
||||
TOOMANYFISHERMEN = "You have more than one easy cast mod installed.",
|
||||
FAILEDINIT = "Did not initialize correctly.",
|
||||
IMPORTMSG = "Imported '%s' database.",
|
||||
NOIMPORTMSG = "No Impp, DataFish, or FishInfo2 databases found.",
|
||||
ADDFISHIEMSG = "Adding %s to location %s.",
|
||||
CURSORBUSYMSG = "Couldn't switch because the cursor is busy!",
|
||||
NOOUTFITDEFINED = "You don't have any items in your fishing outfit.",
|
||||
NODATAMSG = "No fishing data available.",
|
||||
TRACKINGMSG = "Tracking '%s' %s.",
|
||||
NOTRACKERRMSG = "Can't remove default cycle fish.",
|
||||
NOTRACKMSG = "Removed cycle fish '%s'.",
|
||||
POLEALREADYEQUIPPED = "You're already equipped for fishing.",
|
||||
CANTSWITCHBACK = "You've already removed your fishing equipment.",
|
||||
CLEANUP_NONEMSG = "No old settings remain.",
|
||||
CLEANUP_WILLMSG = "Old settings remaining for |c0000FF00%s|r: %s.",
|
||||
CLEANUP_DONEMSG = "Old settings removed for |c0000FF00%s|r: %s.",
|
||||
CLEANUP_NOOLDMSG = "There are no old settings for player |c0000FF00%s|r.",
|
||||
|
||||
MINIMUMSKILL = "Minimum skill: %d";
|
||||
NOTLINKABLE = "<Item is not linkable>",
|
||||
CAUGHTTHISMANY = "Caught %d";
|
||||
CAUGHTTHISTOTAL = "Total %d";
|
||||
FISHTYPES = "Fish types: %d";
|
||||
|
||||
TIMETOGO = "Extravaganza starts in %d:%02d",
|
||||
TIMELEFT = "Extravaganza ends in %d:%02d -- %d %s",
|
||||
|
||||
STVZONENAME = "Stranglethorn Vale",
|
||||
|
||||
TOOLTIP_HINTSWITCH = "Hint: click to switch outfits",
|
||||
TOOLTIP_HINTTOGGLE = "Hint: click to show the #NAME# window.",
|
||||
|
||||
-- Key binding support
|
||||
BINDING_HEADER_FISHINGBUDDY_BINDINGS = "#NAME#",
|
||||
BINDING_NAME_FISHINGBUDDY_TOGGLE = "Toggle #NAME# Window",
|
||||
BINDING_NAME_FISHINGBUDDY_SWITCH = "Switch Fishing Outfit",
|
||||
BINDING_NAME_FISHINGBUDDY_GOFISHING = "Suit up and go fishing",
|
||||
|
||||
BINDING_NAME_TOGGLEFISHINGBUDDY_LOC = "Toggle #NAME# Locations Pane",
|
||||
BINDING_NAME_TOGGLEFISHINGBUDDY_OUT = "Toggle #NAME# Outfit Pane",
|
||||
BINDING_NAME_TOGGLEFISHINGBUDDY_TRK = "Toggle #NAME# Tracking Pane",
|
||||
BINDING_NAME_TOGGLEFISHINGBUDDY_OPT = "Toggle #NAME# Options Pane",
|
||||
};
|
||||
|
||||
FishingTranslations["enUS"].IMPORT_HELP = {
|
||||
"|c0000FF00/fb #IMPORT#|r",
|
||||
" Import Impp's fishinfo or FishInfo2 data.",
|
||||
};
|
||||
FishingTranslations["enUS"].SWITCH_HELP = {
|
||||
"|c0000FF00/fb #SWITCH#|r",
|
||||
" swap outfits (if OutfitDisplayFrame or Outfitter is available)",
|
||||
};
|
||||
FishingTranslations["enUS"].WATCHER_HELP = {
|
||||
"|c0000FF00/fb #WATCHER#|r [|c0000FF00#WATCHER_LOCK#|r or |c0000FF00#WATCHER_UNLOCK#|r or |c0000FF00#RESET#|r]",
|
||||
" Unlock the watcher to move the window,",
|
||||
" lock to stop, reset to reset",
|
||||
};
|
||||
FishingTranslations["enUS"].CURRENT_HELP = {
|
||||
"|c0000FF00/fb #CURRENT# #RESET#|r",
|
||||
" Reset the fish caught during the current session.",
|
||||
};
|
||||
FishingTranslations["enUS"].CLEANUP_HELP = {
|
||||
"|c0000FF00/fb #CLEANUP#|r [|c0000FF00f#CHECK#|r or |c0000FF00#NOW#|r]",
|
||||
" Clean up old settings. |c0000FF00#CHECK#|r lists which",
|
||||
" settings will be removed by |c0000FF00#NOW#|r.",
|
||||
};
|
||||
FishingTranslations["enUS"].TRACKING_HELP = {
|
||||
"|c0000FF00/fb #TRACK#|r [|c0000FF00#HOURLY#|r or |c0000FF00#WEEKLY#|r] |c00FF00FF<fish link>|r",
|
||||
" track the catch times for the specified fish (a shift click link)",
|
||||
"|c0000FF00/fb #NOTRACK#|r |c00FF00FF<fish link>|r",
|
||||
" remove the specified fish (a shift click link) from the tracker",
|
||||
"|c0000FF00/fb #TRACKING#|r",
|
||||
" a really bad display of when tracked fish were caught",
|
||||
};
|
||||
|
||||
FishingTranslations["enUS"].HELPMSG = {
|
||||
"You can use |c0000FF00/fishingbuddy|r or |c0000FF00/fb|r for all commands",
|
||||
"|c0000FF00/fb|r: by itself, toggle the Fishing Buddy window",
|
||||
"|c0000FF00/fb #HELP#|r: display this message",
|
||||
"#SWITCH_HELP#",
|
||||
"#WATCHER_HELP#",
|
||||
"#CURRENT_HELP#",
|
||||
"#CLEANUP_HELP#",
|
||||
"#IMPORT_HELP#",
|
||||
"#TRACKING_HELP#",
|
||||
" ",
|
||||
"You can bind both the window toggle and the outfit",
|
||||
" switch command to keys in the \"Key Bindings\" window.",
|
||||
};
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
Fishing Buddy
|
||||
-------------
|
||||
|
||||
Yet another fishing support add-on. It's a combination of TackleBox,
|
||||
Impp's Fishing Info and a fishing outfit manager all rolled into one. I
|
||||
wrote it both to provide some functionality that was missing from all
|
||||
of the other fishing add-ons I was using and to learn to do add-ons.
|
||||
|
||||
Features:
|
||||
- 'Easy Cast' lets you right-click to cast your line. Use the same mouse
|
||||
button for looting and casting. A double-click will force another cast early
|
||||
- 'Fish Watcher' lets you see the fish you've caught here before (or
|
||||
the fish that you've caught in the current session)
|
||||
- Display your current skill level and the time since you started fishing
|
||||
- Choose your fishing outfit and change into it easily
|
||||
- Support for automatically adding a lure to your fishing pole
|
||||
- Full Titan Panel support
|
||||
- myAddOns support
|
||||
- Preliminary support for tracking 'cycle fish' such as the Nightfin
|
||||
Snapper so you know when to go looking for them
|
||||
|
||||
Example commands:
|
||||
/fishingbuddy or /fb
|
||||
toggle the display of the Fishing Buddy window
|
||||
/fb help
|
||||
print the list of Fishing Buddy commands
|
||||
/fb switch
|
||||
wear your chosen fishing outfit, or change back
|
||||
|
||||
There are two actual add-ons -- the second one, OutfitDisplayFrame,
|
||||
handles the pretty pane to set up your fishing outfit (it's next on
|
||||
the list to be made into something more general that anyone can use).
|
||||
The OutfitDisplayFrame addon can be safely left out if you have a
|
||||
preferred equipment manager.
|
||||
|
||||
alt-clicking on an item in your outfit display will clear it
|
||||
|
||||
Silly stuff:
|
||||
In addition to displaying the fishing bonus for your fishing outfit,
|
||||
it also displays your 'style points' as inferred from Draznar's
|
||||
Fishing FAQ (http://wow.toshimo.com/viewtopic.php?t=272).
|
||||
|
||||
Thanks to the authors of:
|
||||
|
||||
TackleBox -- still adding cool features to keep up with!
|
||||
Impp's Fishing DB
|
||||
QuickWeaponSwap
|
||||
GuildMap
|
||||
|
||||
and many, many others!
|
||||
|
||||
Feel free to send comments to Sutorix on the Windrunner server.
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
||||
1. Unzip the 'FishingBuddyVERSION.zip' file
|
||||
2. If your unzip program allows you to specify a location, then
|
||||
unzip it into the "Interface/AddOns" folder contained in your
|
||||
WoW folder (the location that WoW was installed)
|
||||
3. If your unzip program doesn't let you specify the destination,
|
||||
then find your WoW folder (where it was installed) and drag
|
||||
the 'FishingBuddy' and 'OutfitDisplayFrame' folder into the
|
||||
'Interface/AddOns' folder.
|
||||