Merge ilithyia-addons fork (v0.8.8e)
- Russian localization (by Maus) - FishingSchools: track fishing pools, Gatherer integration - FishingOutfitter: Outfitter addon integration - Interface 11200 (patch 1.12 support) - Improved options system with dependencies - Better watcher frame positioning - Various bugfixes Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
+345
-80
@@ -3,11 +3,21 @@
|
||||
-- Everything you wanted support for in your fishing endeavors
|
||||
|
||||
local gotSetupDone = false;
|
||||
local lastVersion;
|
||||
local playerName;
|
||||
local realmName;
|
||||
|
||||
local DEFAULT_MINIMAP_POSITION = 256;
|
||||
|
||||
local function tablecount(tab)
|
||||
local n = 0;
|
||||
for k,v in tab do
|
||||
n = n + 1;
|
||||
end
|
||||
return n;
|
||||
end
|
||||
FishingBuddy.tablecount = tablecount;
|
||||
|
||||
FishingBuddy.IsLoaded = function()
|
||||
return gotSetupDone;
|
||||
end
|
||||
@@ -28,8 +38,16 @@ FishingBuddy.SavePlayerInfo = function()
|
||||
end
|
||||
end
|
||||
|
||||
local Setup = {};
|
||||
Setup.CheckPlayerInfo = function()
|
||||
local FishingInit = {};
|
||||
|
||||
-- Fill in the player name and realm
|
||||
FishingInit.SetupNameInfo = function()
|
||||
playerName = UnitName("player");
|
||||
realmName = GetRealmName();
|
||||
return playerName, realmName;
|
||||
end
|
||||
|
||||
FishingInit.CheckPlayerInfo = function()
|
||||
local tabs = { "Settings", "Outfit", "WasWearing" };
|
||||
if ( not FishingBuddy_Player ) then
|
||||
FishingBuddy_Player = {};
|
||||
@@ -67,7 +85,7 @@ Setup.CheckPlayerInfo = function()
|
||||
end
|
||||
end
|
||||
|
||||
Setup.CheckPlayerSetting = function(setting, defaultvalue)
|
||||
FishingInit.CheckPlayerSetting = function(setting, defaultvalue)
|
||||
if ( not FishingBuddy_Player["Settings"] ) then
|
||||
FishingBuddy_Player["Settings"] = { };
|
||||
end
|
||||
@@ -76,7 +94,7 @@ Setup.CheckPlayerSetting = function(setting, defaultvalue)
|
||||
end
|
||||
end
|
||||
|
||||
Setup.CheckGlobalSetting = function(setting, defaultvalue)
|
||||
FishingInit.CheckGlobalSetting = function(setting, defaultvalue)
|
||||
if ( not FishingBuddy_Info[setting] ) then
|
||||
if ( not defaultvalue ) then
|
||||
FishingBuddy_Info[setting] = {};
|
||||
@@ -86,7 +104,7 @@ Setup.CheckGlobalSetting = function(setting, defaultvalue)
|
||||
end
|
||||
end
|
||||
|
||||
Setup.CheckRealm = function()
|
||||
FishingInit.CheckRealm = function()
|
||||
local tabs = { "Settings", "Outfit", "WasWearing" };
|
||||
for _,tab in tabs do
|
||||
if ( FishingBuddy_Info[tab] ) then
|
||||
@@ -119,7 +137,23 @@ Setup.CheckRealm = function()
|
||||
end
|
||||
end
|
||||
|
||||
Setup.UpdateFishingDB1 = function()
|
||||
FishingInit.SetupZoneMapping = function()
|
||||
local continentNames = { GetMapContinents() };
|
||||
if ( not FishingBuddy_Info["ZoneIndex"] ) then
|
||||
FishingBuddy_Info["ZoneIndex"] = {};
|
||||
for idx,name in continentNames do
|
||||
local zones = { GetMapZones(idx) };
|
||||
for jdx,zone in zones do
|
||||
tinsert(FishingBuddy_Info["ZoneIndex"], zone);
|
||||
end
|
||||
end
|
||||
end
|
||||
if ( not FishingBuddy_Info["SubZones"] ) then
|
||||
FishingBuddy_Info["SubZones"] = {};
|
||||
end
|
||||
end
|
||||
|
||||
FishingInit.UpdateFishingDB1 = function()
|
||||
local version = FishingBuddy_Info["Version"];
|
||||
if ( not version ) then
|
||||
version = 7700; -- be really old
|
||||
@@ -262,19 +296,133 @@ Setup.UpdateFishingDB1 = function()
|
||||
FishingBuddy_Info["Locations"] = nil;
|
||||
end
|
||||
|
||||
Setup.UpdateFishingDB2 = function()
|
||||
FishingInit.FixupNumericZones = function()
|
||||
-- fix bad zones from FishSchools update bug
|
||||
local badones;
|
||||
local biggest = 0;
|
||||
local hardfix = false;
|
||||
for zidx,zone in FishingBuddy_Info["ZoneIndex"] do
|
||||
if ( type(zone) ~= "string" ) then
|
||||
if ( not badones ) then
|
||||
badones = {};
|
||||
end
|
||||
badones[zidx] = zone;
|
||||
if ( biggest < zidx ) then
|
||||
biggest = zidx;
|
||||
end
|
||||
elseif ( biggest > 0 ) then
|
||||
-- found a string after we started seeing numbers
|
||||
hardfix = true;
|
||||
end
|
||||
end
|
||||
if ( badones ) then
|
||||
local fs = FishingBuddy_Info["FishingSkill"];
|
||||
local fh = FishingBuddy_Info["FishingHoles"];
|
||||
for bidx,gidx in badones do
|
||||
if ( fs[bidx] ) then
|
||||
for sidx,skill in fs[bidx] do
|
||||
local z = FishingBuddy_Info["ZoneIndex"][gidx];
|
||||
local sz = FishingBuddy_Info["SubZones"][gidx][sidx];
|
||||
FishingBuddy.SetZoneLevel(z, sz, fs[bidx][gidx]);
|
||||
end
|
||||
end
|
||||
if ( fh[bidx] ) then
|
||||
if ( not fh[gidx] ) then
|
||||
fh[gidx] = {};
|
||||
end
|
||||
for sidx,fishies in fh[bidx] do
|
||||
for id,cnt in fishies do
|
||||
if ( fh[gidx] and
|
||||
fh[gidx][sidx] and
|
||||
fh[gidx][sidx][id] ) then
|
||||
fh[gidx][sidx][id] = fh[gidx][sidx][id] + cnt;
|
||||
else
|
||||
if ( not fh[gidx] ) then
|
||||
fh[gidx] = {};
|
||||
end
|
||||
if ( not fh[gidx][sidx] ) then
|
||||
fh[gidx][sidx] = {};
|
||||
end
|
||||
fh[gidx][sidx][id] = cnt;
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
if ( not hardfix ) then
|
||||
-- these are already in numerical order
|
||||
local count = table.getn(FishingBuddy_Info["ZoneIndex"]);
|
||||
for idx=count,1,-1 do
|
||||
if ( badones[idx] ) then
|
||||
table.remove(FishingBuddy_Info["ZoneIndex"], idx);
|
||||
FishingBuddy_Info["FishingSkill"][idx] = nil;
|
||||
FishingBuddy_Info["FishingHoles"][idx] = nil;
|
||||
FishingBuddy_Info["SubZones"][idx] = nil;
|
||||
end
|
||||
end
|
||||
else
|
||||
local fixers = { "FishingSkill", "FishingHoles", "SubZones" };
|
||||
-- okay, this gonna be tough
|
||||
-- strip out the numbers after the string
|
||||
while ( badones ) do
|
||||
local count = table.getn(FishingBuddy_Info["ZoneIndex"]);
|
||||
local gotstring = false;
|
||||
local sidx;
|
||||
for idx=count,1,-1 do
|
||||
if ( not gotstring ) then
|
||||
if (type(fh[idx]) ~= "string" ) then
|
||||
table.remove(FishingBuddy_Info["ZoneIndex"], idx);
|
||||
for _,k in fixers do
|
||||
FishingBuddy_Info[k][idx] = nil;
|
||||
end
|
||||
badones[idx] = nil;
|
||||
else
|
||||
gotstring = true;
|
||||
sidx = idx;
|
||||
end
|
||||
end
|
||||
end
|
||||
if ( next(badones) == nil) then
|
||||
badones = nil;
|
||||
end
|
||||
if ( sidx and sidx ~= count ) then
|
||||
count = table.getn(FishingBuddy_Info["ZoneIndex"]);
|
||||
local fidx = 1;
|
||||
while ( fidx < count and type(FishingBuddy_Info["ZoneIndex"][fidx] == "string" ) ) do
|
||||
fidx = fidx + 1;
|
||||
end
|
||||
for k,v in FishingBuddy_Info["ZoneIndex"][sidx] do
|
||||
FishingBuddy_Info["ZoneIndex"][fidx][k] = v;
|
||||
end
|
||||
FishingBuddy_Info["ZoneIndex"][sidx] = nil;
|
||||
for _,f in fixers do
|
||||
for k,v in FishingBuddy_Info[f][sidx] do
|
||||
FishingBuddy_Info[f][fidx][k] = v;
|
||||
end
|
||||
FishingBuddy_Info[f][sidx] = nil;
|
||||
end
|
||||
else
|
||||
-- if it's not already nil, we're in trouble
|
||||
badones = nil;
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
FishingInit.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
|
||||
if ( version < 8509 and FishingBuddy.ByFishie ) 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
|
||||
for _,count in FishingBuddy.ByFishie[id] do
|
||||
total = total + count;
|
||||
end
|
||||
local tracked = 0;
|
||||
@@ -290,11 +438,133 @@ Setup.UpdateFishingDB2 = function()
|
||||
end
|
||||
end
|
||||
|
||||
-- version < 8700
|
||||
local needCollapse = true;
|
||||
if ( FishingBuddy_Info["Schools"] ) then
|
||||
-- convert zone coords into minimap coords
|
||||
local STVInfo = { scale = 0.18128603034401,
|
||||
xoffset = 0.39145470225916, yoffset = 0.79412224886668 };
|
||||
local tastyfish_id = 19807;
|
||||
|
||||
local addschool = FishingBuddy.Schools.AddFishingSchool;
|
||||
local zone = FishingBuddy.STVZONENAME;
|
||||
for _,pools in FishingBuddy_Info["Schools"] do
|
||||
for idx,entry in pools do
|
||||
local t;
|
||||
local x = (entry.x - STVInfo.xoffset) / STVInfo.scale;
|
||||
local y = (entry.y - STVInfo.yoffset) / STVInfo.scale;
|
||||
addschool(FishingBuddy.SCHOOL_TASTY, 19807, zone, x, y);
|
||||
end
|
||||
end
|
||||
FishingBuddy_Info["Schools"] = nil;
|
||||
needCollapse = nil;
|
||||
end
|
||||
|
||||
if ( version < 8701 ) then
|
||||
FishingBuddy.SetSetting("FastCast", nil);
|
||||
end
|
||||
|
||||
if ( version < 8703 ) then
|
||||
local azi = FishingBuddy.AddZoneIndex;
|
||||
if ( FishingBuddy_Info["FishingSkill"] ) then
|
||||
didsomething = false;
|
||||
local fixit = false;
|
||||
for zone,info in FishingBuddy_Info["FishingSkill"] do
|
||||
if ( type(zone) == "string" ) then
|
||||
fixit = true;
|
||||
break;
|
||||
end
|
||||
end
|
||||
if ( fixit ) then
|
||||
local newskills = {};
|
||||
for zone,info in FishingBuddy_Info["FishingSkill"] do
|
||||
local zidx = azi(zone);
|
||||
newskills[zidx] = {};
|
||||
for subzone,count in info do
|
||||
local _,sidx = azi(zone,subzone);
|
||||
newskills[zidx][sidx] = count;
|
||||
end
|
||||
FishingBuddy_Info["FishingSkill"][zone] = nil;
|
||||
end
|
||||
FishingBuddy_Info["FishingSkill"] = newskills;
|
||||
end
|
||||
end
|
||||
|
||||
if ( FishingBuddy_Info["FishingHoles"] ) then
|
||||
local fixit = false;
|
||||
for zone,info in FishingBuddy_Info["FishingHoles"] do
|
||||
if ( type(zone) == "string" ) then
|
||||
fixit = true;
|
||||
break;
|
||||
end
|
||||
end
|
||||
if ( fixit ) then
|
||||
local newholes = {};
|
||||
for zone,info in FishingBuddy_Info["FishingHoles"] do
|
||||
local zidx = azi(zone);
|
||||
newholes[zidx] = {};
|
||||
for subzone,stuff in info do
|
||||
local _,sidx = azi(zone,subzone);
|
||||
newholes[zidx][sidx] = stuff;
|
||||
end
|
||||
FishingBuddy_Info["FishingHoles"][zone] = nil;
|
||||
end
|
||||
FishingBuddy_Info["FishingHoles"] = newholes;
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if ( version < 8704 and needCollapse ) then
|
||||
if ( FishingBuddy_Info["FishSchools"] ) then
|
||||
local azi = FishingBuddy.AddZoneIndex;
|
||||
local fixit = false;
|
||||
for zone,info in FishingBuddy_Info["FishSchools"] do
|
||||
if ( type(zone) == "string" ) then
|
||||
fixit = true;
|
||||
break;
|
||||
end
|
||||
end
|
||||
if ( fixit ) then
|
||||
local newschools = {};
|
||||
for zone,info in FishingBuddy_Info["FishSchools"] do
|
||||
local zidx = azi(zone);
|
||||
newschools[zidx] = {};
|
||||
for idx,entry in info do
|
||||
tinsert(newschools[zidx], entry);
|
||||
end
|
||||
FishingBuddy_Info["FishSchools"][zone] = nil;
|
||||
end
|
||||
FishingBuddy_Info["FishSchools"] = newschools;
|
||||
end
|
||||
end
|
||||
FishingBuddy.Schools.CollapseHoles();
|
||||
end
|
||||
|
||||
if ( version < 8707 ) then
|
||||
FishingInit.FixupNumericZones();
|
||||
end
|
||||
|
||||
if ( version < 8712 ) then
|
||||
local ft = FishingBuddy_Info["FishTracking"];
|
||||
for how,info in ft do
|
||||
for id,what in ft[how] do
|
||||
what.plot = 1;
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- save this for other pieces that might need to update
|
||||
lastVersion = version;
|
||||
|
||||
FishingBuddy_Info["Version"] = FishingBuddy.CURRENTVERSION;
|
||||
end
|
||||
|
||||
FishingBuddy.GetLastVersion = function()
|
||||
return lastVersion;
|
||||
end
|
||||
|
||||
-- Based on code in QuickMountEquip
|
||||
Setup.HookFunction = function(func, newfunc)
|
||||
FishingInit.HookFunction = function(func, newfunc)
|
||||
local oldValue = getglobal(func);
|
||||
if ( oldValue ~= getglobal(newfunc) ) then
|
||||
setglobal(func, getglobal(newfunc));
|
||||
@@ -305,25 +575,29 @@ end
|
||||
|
||||
-- set up alternate view of fish data. do this as startup to
|
||||
-- lower overall dynamic hit when loading the window
|
||||
Setup.SetupByFishie = function()
|
||||
FishingInit.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];
|
||||
for zidx in fh do
|
||||
local zone = FishingBuddy_Info["ZoneIndex"][zidx];
|
||||
for sidx in fh[zidx] do
|
||||
local subzone = FishingBuddy_Info["SubZones"][zidx][sidx];
|
||||
local indexer = zidx.."."..sidx;
|
||||
for id in fh[zidx][sidx] do
|
||||
local quantity = fh[zidx][sidx][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;
|
||||
|
||||
if ( not FishingBuddy.ByFishie[id][indexer] ) then
|
||||
FishingBuddy.ByFishie[id][indexer] = quantity;
|
||||
else
|
||||
FishingBuddy.ByFishie[id][subzone] = FishingBuddy.ByFishie[id][subzone] + quantity;
|
||||
FishingBuddy.ByFishie[id][indexer] = FishingBuddy.ByFishie[id][indexer] + quantity;
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -332,85 +606,59 @@ Setup.SetupByFishie = function()
|
||||
end
|
||||
end
|
||||
|
||||
Setup.InitSortHelpers = function()
|
||||
FishingInit.InitSortHelpers = function()
|
||||
local fh = FishingBuddy_Info["FishingHoles"];
|
||||
FishingBuddy.SortedZones = {};
|
||||
FishingBuddy.SortedByZone = {};
|
||||
FishingBuddy.SortedSubZones = {};
|
||||
for zone in fh do
|
||||
for zidx,zone in FishingBuddy_Info["ZoneIndex"] do
|
||||
tinsert(FishingBuddy.SortedZones, zone);
|
||||
FishingBuddy.SortedByZone[zone] = {};
|
||||
for subzone in fh[zone] do
|
||||
tinsert(FishingBuddy.SortedByZone[zone], subzone);
|
||||
tinsert(FishingBuddy.SortedSubZones, subzone);
|
||||
if ( fh[zidx] ) then
|
||||
for sidx in fh[zidx] do
|
||||
local subzone = FishingBuddy_Info["SubZones"][zidx][sidx];
|
||||
tinsert(FishingBuddy.SortedByZone[zone], subzone);
|
||||
tinsert(FishingBuddy.SortedSubZones, subzone);
|
||||
end
|
||||
table.sort(FishingBuddy.SortedByZone[zone]);
|
||||
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()
|
||||
FishingInit.InitSettings = function()
|
||||
if( not FishingBuddy_Info ) then
|
||||
FishingBuddy_Info = { };
|
||||
end
|
||||
-- global stuff
|
||||
Setup.UpdateFishingDB1();
|
||||
Setup.CheckRealm();
|
||||
FishingInit.SetupZoneMapping();
|
||||
FishingInit.UpdateFishingDB1();
|
||||
FishingInit.CheckRealm();
|
||||
|
||||
Setup.CheckGlobalSetting("ImppDBLoaded", 0);
|
||||
Setup.CheckGlobalSetting("FishInfo2", 0);
|
||||
Setup.CheckGlobalSetting("DataFish", 0);
|
||||
Setup.CheckGlobalSetting("FishingHoles");
|
||||
Setup.CheckGlobalSetting("FishingSkill");
|
||||
Setup.CheckGlobalSetting("Fishies");
|
||||
FishingInit.CheckGlobalSetting("ImppDBLoaded", 0);
|
||||
FishingInit.CheckGlobalSetting("FishInfo2", 0);
|
||||
FishingInit.CheckGlobalSetting("DataFish", 0);
|
||||
FishingInit.CheckGlobalSetting("FishingHoles");
|
||||
FishingInit.CheckGlobalSetting("FishingSkill");
|
||||
FishingInit.CheckGlobalSetting("Fishies");
|
||||
FishingInit.CheckGlobalSetting("HiddenFishies");
|
||||
|
||||
Setup.CheckPlayerInfo();
|
||||
FishingInit.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);
|
||||
if ( not FishingBuddy_Player["Settings"] ) then
|
||||
FishingBuddy_Player["Settings"] = { };
|
||||
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();
|
||||
FishingInit.UpdateFishingDB2();
|
||||
FishingInit.SetupByFishie();
|
||||
FishingInit.InitSortHelpers();
|
||||
end
|
||||
|
||||
Setup.RegisterMyAddOn = function()
|
||||
FishingInit.RegisterMyAddOn = function()
|
||||
-- Register the addon in myAddOns
|
||||
if (myAddOnsFrame_Register) then
|
||||
local details = {
|
||||
@@ -438,31 +686,48 @@ Setup.RegisterMyAddOn = function()
|
||||
end
|
||||
end
|
||||
|
||||
Setup.RegisterHandlers = function()
|
||||
FishingInit.RegisterHandlers = function()
|
||||
temp = ToggleMinimap;
|
||||
if ( Setup.HookFunction("ToggleMinimap", "FishingBuddy_ToggleMinimap") ) then
|
||||
if ( FishingInit.HookFunction("ToggleMinimap", "FishingBuddy_ToggleMinimap") ) then
|
||||
FishingBuddy.SavedToggleMinimap = temp;
|
||||
end
|
||||
FishingBuddy.TrapWorldMouse()
|
||||
end
|
||||
|
||||
local WOW = {};
|
||||
FishingBuddy.WOWVersion = function()
|
||||
return WOW.major, WOW.minor, WOW.dot;
|
||||
end
|
||||
|
||||
FishingBuddy.Initialize = function()
|
||||
-- Set everything up, then dump the code we don't need anymore
|
||||
playerName, realmName = FishingBuddy.SetupNameInfo();
|
||||
if ( Setup ) then
|
||||
playerName, realmName = FishingInit.SetupNameInfo();
|
||||
if ( FishingInit ) then
|
||||
if ( GetBuildInfo ) then
|
||||
local version, buildnum, builddate = GetBuildInfo();
|
||||
local v, b, d = GetBuildInfo();
|
||||
WOW.build = b;
|
||||
WOW.date = d;
|
||||
local s,e,maj,min,dot = string.find("(%d+).(%d+).(%d+)", v);
|
||||
WOW.major = tonumber(maj);
|
||||
WOW.minor = tonumber(min);
|
||||
WOW.dot = tonumber(dot);
|
||||
else
|
||||
FishingBuddy.Is10900 = true;
|
||||
end
|
||||
Setup.RegisterHandlers();
|
||||
Setup.InitSettings();
|
||||
FishingInit.RegisterHandlers();
|
||||
FishingInit.InitSettings();
|
||||
-- register with myAddOn
|
||||
Setup.RegisterMyAddOn();
|
||||
FishingInit.RegisterMyAddOn();
|
||||
-- clean out some beta trash
|
||||
FishingBuddy.SetSetting("ClockOffset", nil);
|
||||
|
||||
FishingBuddy.Schools.Init();
|
||||
|
||||
gotSetupDone = true;
|
||||
FishingBuddy.WatchUpdate();
|
||||
-- debugging state
|
||||
FishingBuddy.Debugging = FishingBuddy.GetSetting("FishDebug");
|
||||
-- we don't need these functions anymore, gc 'em
|
||||
Setup = nil;
|
||||
FishingInit = nil;
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user