removed all battle pet related code
this is wow, not pokémon
Cette révision appartient à :
Parent
26a508ceea
révision
b7a89c46f2
5 fichiers modifiés avec 0 ajouts et 136 suppressions
21
Bar.lua
21
Bar.lua
|
@ -522,7 +522,6 @@ function Bar:Configure(BarSave)
|
|||
self:SetHSpec4(BarSave["HSpec4"]);
|
||||
self:SetHVehicle(BarSave["HVehicle"]);
|
||||
self:SetHBonusBar(BarSave["HBonusBar"]);
|
||||
self:SetHPetBattle(BarSave["HPetBattle"]);
|
||||
self:SetVD(BarSave["VDriver"]);
|
||||
self:SetGridAlwaysOn(BarSave["GridAlwaysOn"]);
|
||||
self:SetButtonsLocked(BarSave["ButtonsLocked"]);
|
||||
|
@ -1547,23 +1546,6 @@ function Bar:GetHBonusBar()
|
|||
end
|
||||
end
|
||||
|
||||
function Bar:SetHPetBattle(Value)
|
||||
if (not InCombatLockdown()) then
|
||||
if (Value == "toggle") then
|
||||
Value = not self.BarSave["HPetBattle"];
|
||||
end
|
||||
self.BarSave["HPetBattle"] = Value;
|
||||
self:SetVD(self.BarSave["VDriver"]);
|
||||
end
|
||||
end
|
||||
function Bar:GetHPetBattle()
|
||||
if (self.BarSave["HPetBattle"]) then
|
||||
return self.BarSave["HPetBattle"], Util.GetLocaleString("Hidden");
|
||||
else
|
||||
return self.BarSave["HPetBattle"], Util.GetLocaleString("Shown");
|
||||
end
|
||||
end
|
||||
|
||||
--[[
|
||||
Handle updating the Visibility State Driver
|
||||
--]]
|
||||
|
@ -1585,9 +1567,6 @@ function Bar:SetVD(VDText)
|
|||
if (not self.BarSave["Enabled"]) then
|
||||
Text = Text.."hide; ";
|
||||
end
|
||||
if (self.BarSave["HPetBattle"]) then
|
||||
Text = Text.."[petbattle] hide; ";
|
||||
end
|
||||
if (self.BarSave["HSpec1"]) then
|
||||
Text = Text.."[spec:1] hide; ";
|
||||
end
|
||||
|
|
106
Button.lua
106
Button.lua
|
@ -195,9 +195,6 @@ function Button:Configure(Parent, ButtonSave, ButtonLocked, TooltipEnabled, Macr
|
|||
|
||||
elseif (Mode == "customaction") then
|
||||
self:SetCommandExplicitCustomAction(ButtonSave["CustomActionName"]);
|
||||
|
||||
elseif (Mode == "battlepet") then
|
||||
self:SetCommandExplicitBattlePet(ButtonSave["BattlePetId"]);
|
||||
|
||||
else
|
||||
self:ClearCommand();
|
||||
|
@ -556,8 +553,6 @@ function Button:SetCommandFromTriplet(Command, Data, Subvalue, Subsubvalue)
|
|||
self:SetCommandFlyout(Data); --Data = Id
|
||||
elseif (Command == "customaction") then
|
||||
self:SetCommandCustomAction(Data); --Data = Action
|
||||
elseif (Command == "battlepet") then
|
||||
self:SetCommandBattlePet(Data);
|
||||
elseif (Command == nil or Command == "") then
|
||||
self:ClearCommand();
|
||||
else
|
||||
|
@ -614,9 +609,6 @@ end
|
|||
function Button:SetCommandCustomAction(Name)
|
||||
self:SetCommandExplicitCustomAction(Name);
|
||||
end
|
||||
function Button:SetCommandBattlePet(Id)
|
||||
self:SetCommandExplicitBattlePet(Id);
|
||||
end
|
||||
|
||||
--[[ Set the individual types of actions (all data needed is supplied to the functions as args) --]]
|
||||
function Button:SetCommandExplicitSpell(Id, NameRank, Name, Book)
|
||||
|
@ -668,11 +660,6 @@ function Button:SetCommandExplicitCustomAction(Name)
|
|||
self:SetAttributes("customaction", Name);
|
||||
self:SaveCustomAction(Name);
|
||||
end
|
||||
function Button:SetCommandExplicitBattlePet(Id)
|
||||
self:SetEnvBattlePet(Id);
|
||||
self:SetAttributes("battlepet", Id);
|
||||
self:SaveBattlePet(Id);
|
||||
end
|
||||
|
||||
--[[ The following functions will configure the button to operate correctly for the specific type of action (these functions must be able to handle the player not knowing spells/macros etc) --]]
|
||||
function Button:SetEnvSpell(Id, NameRank, Name, Book, IsTalent)
|
||||
|
@ -995,35 +982,6 @@ function Button:SetEnvCustomAction(Name)
|
|||
self:DisplayActive(TexCoords);
|
||||
Util.AddBonusAction(self);
|
||||
end
|
||||
function Button:SetEnvBattlePet(Id)
|
||||
self.UpdateTexture = Button.Empty;
|
||||
self.UpdateChecked = Button.UpdateCheckedBattlePet;
|
||||
self.UpdateEquipped = Button.Empty;
|
||||
self.UpdateCooldown = Button.UpdateCooldownBattlePet;
|
||||
self.UpdateUsable = Button.UpdateUsableBattlePet;
|
||||
self.UpdateTextCount = Button.Empty;
|
||||
self.UpdateTooltipFunc = Button.UpdateTooltipBattlePet;
|
||||
self.UpdateRangeTimer = Button.Empty;
|
||||
self.CheckRangeTimer = Button.Empty;
|
||||
self.UpdateFlash = Button.Empty;
|
||||
self.UpdateFlyout = Button.Empty;
|
||||
|
||||
self.GetCursor = Button.GetCursorBattlePet;
|
||||
|
||||
self.FullRefresh = Button.FullRefresh;
|
||||
|
||||
self.Mode = "battlepet";
|
||||
self.BattlePetId = Id;
|
||||
if (Id == Const.SUMMON_RANDOM_FAVORITE_BATTLE_PET_ID) then
|
||||
self.Texture = Const.SUMMON_RANDOM_FAVORITE_BATTLE_PET_TEXTURE;
|
||||
else
|
||||
self.Texture = select(9, C_PetJournal.GetPetInfoByPetID(Id));
|
||||
end
|
||||
self.Target = "target";
|
||||
|
||||
self:ResetAppearance();
|
||||
self:DisplayActive();
|
||||
end
|
||||
function Button:SetEnvClear()
|
||||
self.UpdateTexture = Button.Empty;
|
||||
self.UpdateChecked = Button.UpdateChecked;
|
||||
|
@ -1098,11 +1056,6 @@ function Button:SaveCustomAction(Name)
|
|||
self.ButtonSave["Mode"] = "customaction";
|
||||
self.ButtonSave["CustomActionName"] = Name;
|
||||
end
|
||||
function Button:SaveBattlePet(Id)
|
||||
self:SaveClear();
|
||||
self.ButtonSave["Mode"] = "battlepet";
|
||||
self.ButtonSave["BattlePetId"] = Id;
|
||||
end
|
||||
function Button:SaveClear()
|
||||
self.ButtonSave["SpellId"] = nil;
|
||||
self.ButtonSave["SpellNameRank"] = nil;
|
||||
|
@ -1131,7 +1084,6 @@ function Button:SaveClear()
|
|||
self.ButtonSave["BonusActionId"] = nil;
|
||||
self.ButtonSave["FlyoutId"] = nil;
|
||||
self.ButtonSave["CustomActionName"] = nil;
|
||||
self.ButtonSave["BattlePetId"] = nil;
|
||||
self.ButtonSave["Mode"] = nil;
|
||||
end
|
||||
|
||||
|
@ -1184,9 +1136,6 @@ function Button:SetAttributes(Type, Value)
|
|||
self.Widget:SetAttribute("spell", Value);
|
||||
elseif (Type == "customaction") then
|
||||
CustomAction.SetAttributes(Value, self.Widget);
|
||||
elseif (Type == "battlepet") then
|
||||
self.Widget:SetAttribute("type", "macro");
|
||||
self.Widget:SetAttribute("macrotext", "/summonpet "..Value);
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -1446,12 +1395,6 @@ end
|
|||
function Button:UpdateCheckedCustomAction()
|
||||
self.Widget:SetChecked(CustomAction.GetChecked(self.CustomActionName));
|
||||
end
|
||||
function Button:UpdateCheckedBattlePet()
|
||||
local Active = self.BattlePetId == C_PetJournal.GetSummonedPetGUID();
|
||||
self.Widget:SetChecked(Active);
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
--[[---------------------------------------------------------------------------------------
|
||||
|
@ -1533,11 +1476,6 @@ function Button:UpdateCooldownBonusAction()
|
|||
self.WCooldown:Hide();
|
||||
end
|
||||
end
|
||||
function Button:UpdateCooldownBattlePet()
|
||||
--CooldownFrame_SetTimer(self.WCooldown, GetCompanionCooldown(self.CompanionType, self.CompanionIndex));
|
||||
--as of 5.0.4 doesn't appear to exist anymore?!
|
||||
end
|
||||
|
||||
|
||||
|
||||
--[[-------------------------------------------------------------------------------------
|
||||
|
@ -1623,16 +1561,6 @@ function Button:UpdateUsableCustomAction()
|
|||
self.WNormalTexture:SetVertexColor(1.0, 1.0, 1.0);
|
||||
end
|
||||
end
|
||||
function Button:UpdateUsableBattlePet()
|
||||
--local IsUsable, NotEnoughMana = IsUsableItem(self.ItemName);
|
||||
--if (self.CompanionType == "MOUNT" and IsIndoors()) then
|
||||
-- self.WIcon:SetVertexColor(0.4, 0.4, 0.4);
|
||||
-- self.WNormalTexture:SetVertexColor(1.0, 1.0, 1.0);
|
||||
--else
|
||||
self.WIcon:SetVertexColor(1.0, 1.0, 1.0);
|
||||
self.WNormalTexture:SetVertexColor(1.0, 1.0, 1.0);
|
||||
--end
|
||||
end
|
||||
|
||||
|
||||
--[[----------------------------------------------------------------------------
|
||||
|
@ -1788,23 +1716,6 @@ function Button:UpdateTooltipCustomAction()
|
|||
|
||||
CustomAction.UpdateTooltip(self.CustomActionName);
|
||||
end
|
||||
function Button:UpdateTooltipBattlePet()
|
||||
self = self.ParentButton or self; --This is a sneaky cheat incase the widget was used to get here...
|
||||
local speciesID, customName, level, xp, maxXp, displayID, isFavorite
|
||||
, name = C_PetJournal.GetPetInfoByPetID(self.BattlePetId);
|
||||
|
||||
if ( customName or name ) then
|
||||
GameTooltip:SetText(customName or name, 1, 1, 1);
|
||||
GameTooltip:AddLine(SPELL_CAST_TIME_INSTANT, 1, 1, 1, true);
|
||||
GameTooltip:AddLine(string.format(BATTLE_PET_TOOLTIP_SUMMON, name), nil, nil, nil, true);
|
||||
GameTooltip:Show();
|
||||
elseif (self.BattlePetId == Const.SUMMON_RANDOM_FAVORITE_BATTLE_PET_ID) then
|
||||
GameTooltip:SetText(PET_JOURNAL_SUMMON_RANDOM_FAVORITE_PET, 1, 1, 1);
|
||||
GameTooltip:AddLine(SPELL_CAST_TIME_INSTANT, 1, 1, 1, true);
|
||||
GameTooltip:Show();
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
--[[---------------------------------------------------------------------
|
||||
|
@ -1837,11 +1748,6 @@ end
|
|||
function Button:GetCursorCustomAction()
|
||||
return self.Mode, self.CustomActionName, nil;
|
||||
end
|
||||
function Button:GetCursorBattlePet()
|
||||
return self.Mode, self.BattlePetId, nil;
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
--[[------------------------------------------------------------------------
|
||||
|
@ -2121,18 +2027,6 @@ function Button:RefreshSpell()
|
|||
end
|
||||
end
|
||||
|
||||
function Button:RefreshBattlePet()
|
||||
if (self.Mode == "battlepet") then
|
||||
if (self.BattlePetId == Const.SUMMON_RANDOM_FAVORITE_BATTLE_PET_ID) then
|
||||
self.Texture = Const.SUMMON_RANDOM_FAVORITE_BATTLE_PET_TEXTURE;
|
||||
else
|
||||
self.Texture = select(9, C_PetJournal.GetPetInfoByPetID(self.BattlePetId));
|
||||
end
|
||||
self.Texture = self.Texture or "Interface/Icons/INV_Misc_QuestionMark";
|
||||
self:DisplayActive();
|
||||
end
|
||||
end
|
||||
|
||||
function Button:RefreshCompanion()
|
||||
if (InCombatLockdown()) then
|
||||
return;
|
||||
|
|
|
@ -9,8 +9,6 @@
|
|||
local Const = BFConst;
|
||||
Const.SUMMON_RANDOM_FAVORITE_MOUNT_SPELL = 150544;
|
||||
Const.SUMMON_RANDOM_FAVORITE_MOUNT_ID = 268435455;
|
||||
Const.SUMMON_RANDOM_FAVORITE_BATTLE_PET_ID = "BattlePet-0-FFFFFFFFFFFFFF";
|
||||
Const.SUMMON_RANDOM_FAVORITE_BATTLE_PET_TEXTURE = "Interface/Icons/INV_Pet_Achievement_CaptureAPetFromEachFamily_Battle";
|
||||
Const.Version = 0.9;
|
||||
Const.VersionMinor = 50;
|
||||
Const.MAX_ACCOUNT_MACROS = 120;
|
||||
|
@ -112,7 +110,6 @@ Const.SlashCommands["-hidespec3"] = {params = "bool", group = "bar"};
|
|||
Const.SlashCommands["-hidespec4"] = {params = "bool", group = "bar"};
|
||||
Const.SlashCommands["-hidevehicle"] = {params = "bool", group = "bar"};
|
||||
Const.SlashCommands["-hideoverridebar"] = {params = "bool", group = "bar"};
|
||||
Const.SlashCommands["-hidepetbattle"] = {params = "bool", group = "bar"};
|
||||
Const.SlashCommands["-vismacro"] = {params = "^%s*(.-)%s*$", group = "bar"}; -- I'm tempted to make this one require a bar, but to some degree it is player beware until/if I implement an undo stack
|
||||
Const.SlashCommands["-gui"] = {params = "bool", group = "bar"};
|
||||
Const.SlashCommands["-alpha"] = {params = "^%s*(%d*%.?%d+)%s*$", group = "bar", validate = function (p) return tonumber(p) <= 1; end};
|
||||
|
|
|
@ -36,7 +36,6 @@ local CompatibleActions = {
|
|||
, ["flyout"] = true
|
||||
, ["petaction"] = true
|
||||
, ["companion"] = true
|
||||
, ["battlepet"] = true
|
||||
, ["equipmentset"] = true};
|
||||
function CursorUtil.CursorHasAction()
|
||||
return CompatibleActions[GetCursorInfo()] or CustomCommand ~= nil;
|
||||
|
|
|
@ -78,7 +78,6 @@ end
|
|||
Misc Resync type events
|
||||
--------------------------------------------------------------------------]]
|
||||
Misc:RegisterEvent("COMPANION_LEARNED"); --resync companions
|
||||
Misc:RegisterEvent("PET_JOURNAL_LIST_UPDATE"); --textures etc should now be available
|
||||
Misc:RegisterEvent("LEARNED_SPELL_IN_TAB"); --refresh/promote spells
|
||||
Misc:RegisterEvent("SPELLS_CHANGED"); --refresh spells depending on play style this could trigger often, we will instead rely on other events to keep spells synched
|
||||
Misc:RegisterEvent("CHARACTER_POINTS_CHANGED"); --refresh spells
|
||||
|
@ -107,7 +106,6 @@ Checked:RegisterEvent("TRADE_SKILL_CLOSE");
|
|||
Checked:RegisterEvent("ARCHAEOLOGY_TOGGLE");
|
||||
Checked:RegisterEvent("ARCHAEOLOGY_CLOSED");
|
||||
Checked:RegisterEvent("COMPANION_UPDATE");
|
||||
Checked:RegisterEvent("PET_BATTLE_PET_CHANGED");
|
||||
Checked:RegisterEvent("CURRENT_SPELL_CAST_CHANGED");
|
||||
Checked:RegisterEvent("ACTIONBAR_UPDATE_STATE"); --I am not certain how excessive this event is yet, it may not be needed and is a canidate to remove
|
||||
Checked:RegisterEvent("PLAYER_ENTER_COMBAT");
|
||||
|
@ -446,9 +444,6 @@ function Misc:OnEvent(Event, ...)
|
|||
elseif (Event == "UNIT_INVENTORY_CHANGED") then
|
||||
Util.CacheInvItems();
|
||||
|
||||
elseif (Event == "PET_JOURNAL_LIST_UPDATE") then
|
||||
Util.RefreshBattlePets();
|
||||
|
||||
elseif (Event == "SPELL_FLYOUT_UPDATE") then
|
||||
Full.RefreshButtons = true;
|
||||
Full.RefFlyouts = true;
|
||||
|
|
Référencer dans un nouveau ticket