Add files via upload

This commit is contained in:
totalllyswede
2025-11-23 00:01:38 -08:00
committed by GitHub
parent 9a3ad6f6c5
commit 54bd7a319f
4 changed files with 142 additions and 22 deletions
+138 -18
View File
@@ -98,6 +98,18 @@ function MM_Button_UpdatePosition()
); );
end end
--
-- ADDED: REQUIRED LEVEL CHECKS
--
function MM_CanCastTeleport()
return UnitLevel("player") >= 20;
end
function MM_CanCastPortal()
return UnitLevel("player") >= 40;
end
-- --
-- Drop down menu functions -- Drop down menu functions
-- --
@@ -135,24 +147,48 @@ function MM_DropDown_ForTheHorde()
info.notCheckable = 1; info.notCheckable = 1;
UIDropDownMenu_AddButton(info); UIDropDownMenu_AddButton(info);
-- ORG PORTAL
info = { }; info = { };
info.text = MINIMAGE_LABEL_ORG; info.text = MINIMAGE_LABEL_ORG;
info.func = function(msg) CastSpellByName(MINIMAGE_LABEL_PORTAL..appender..MINIMAGE_LABEL_ORG); end; info.disabled = not MM_CanCastPortal();
info.func = function(msg)
if MM_CanCastPortal() then
CastSpellByName(MINIMAGE_LABEL_PORTAL..appender..MINIMAGE_LABEL_ORG);
end
end;
UIDropDownMenu_AddButton(info); UIDropDownMenu_AddButton(info);
-- STONARD PORTAL
info = { }; info = { };
info.text = MINIMAGE_LABEL_STONARD; info.text = MINIMAGE_LABEL_STONARD;
info.func = function(msg) CastSpellByName(MINIMAGE_LABEL_PORTAL..appender..MINIMAGE_LABEL_STONARD); end; info.disabled = not MM_CanCastPortal();
info.func = function(msg)
if MM_CanCastPortal() then
CastSpellByName(MINIMAGE_LABEL_PORTAL..appender..MINIMAGE_LABEL_STONARD);
end
end;
UIDropDownMenu_AddButton(info); UIDropDownMenu_AddButton(info);
-- TB PORTAL
info = { }; info = { };
info.text = MINIMAGE_LABEL_TB; info.text = MINIMAGE_LABEL_TB;
info.func = function(msg) CastSpellByName(MINIMAGE_LABEL_PORTAL..appender..MINIMAGE_LABEL_TB); end; info.disabled = not MM_CanCastPortal();
info.func = function(msg)
if MM_CanCastPortal() then
CastSpellByName(MINIMAGE_LABEL_PORTAL..appender..MINIMAGE_LABEL_TB);
end
end;
UIDropDownMenu_AddButton(info); UIDropDownMenu_AddButton(info);
-- UC PORTAL
info = { }; info = { };
info.text = MINIMAGE_LABEL_UC; info.text = MINIMAGE_LABEL_UC;
info.func = function(msg) CastSpellByName(MINIMAGE_LABEL_PORTAL..appender..MINIMAGE_LABEL_UC); end; info.disabled = not MM_CanCastPortal();
info.func = function(msg)
if MM_CanCastPortal() then
CastSpellByName(MINIMAGE_LABEL_PORTAL..appender..MINIMAGE_LABEL_UC);
end
end;
UIDropDownMenu_AddButton(info); UIDropDownMenu_AddButton(info);
end end
@@ -163,24 +199,48 @@ function MM_DropDown_ForTheHorde()
info.notCheckable = 1; info.notCheckable = 1;
UIDropDownMenu_AddButton(info); UIDropDownMenu_AddButton(info);
-- ORG TELEPORT
info = { }; info = { };
info.text = MINIMAGE_LABEL_ORG; info.text = MINIMAGE_LABEL_ORG;
info.func = function(msg) CastSpellByName(MINIMAGE_LABEL_TELEPORT..appender..MINIMAGE_LABEL_ORG); end; info.disabled = not MM_CanCastTeleport();
info.func = function(msg)
if MM_CanCastTeleport() then
CastSpellByName(MINIMAGE_LABEL_TELEPORT..appender..MINIMAGE_LABEL_ORG);
end
end;
UIDropDownMenu_AddButton(info); UIDropDownMenu_AddButton(info);
-- STONARD TELEPORT
info = { }; info = { };
info.text = MINIMAGE_LABEL_STONARD; info.text = MINIMAGE_LABEL_STONARD;
info.func = function(msg) CastSpellByName(MINIMAGE_LABEL_TELEPORT..appender..MINIMAGE_LABEL_STONARD); end; info.disabled = not MM_CanCastTeleport();
info.func = function(msg)
if MM_CanCastTeleport() then
CastSpellByName(MINIMAGE_LABEL_TELEPORT..appender..MINIMAGE_LABEL_STONARD);
end
end;
UIDropDownMenu_AddButton(info); UIDropDownMenu_AddButton(info);
-- TB TELEPORT
info = { }; info = { };
info.text = MINIMAGE_LABEL_TB; info.text = MINIMAGE_LABEL_TB;
info.func = function(msg) CastSpellByName(MINIMAGE_LABEL_TELEPORT..appender..MINIMAGE_LABEL_TB); end; info.disabled = not MM_CanCastTeleport();
info.func = function(msg)
if MM_CanCastTeleport() then
CastSpellByName(MINIMAGE_LABEL_TELEPORT..appender..MINIMAGE_LABEL_TB);
end
end;
UIDropDownMenu_AddButton(info); UIDropDownMenu_AddButton(info);
-- UC TELEPORT
info = { }; info = { };
info.text = MINIMAGE_LABEL_UC; info.text = MINIMAGE_LABEL_UC;
info.func = function(msg) CastSpellByName(MINIMAGE_LABEL_TELEPORT..appender..MINIMAGE_LABEL_UC); end; info.disabled = not MM_CanCastTeleport();
info.func = function(msg)
if MM_CanCastTeleport() then
CastSpellByName(MINIMAGE_LABEL_TELEPORT..appender..MINIMAGE_LABEL_UC);
end
end;
UIDropDownMenu_AddButton(info); UIDropDownMenu_AddButton(info);
end end
@@ -195,29 +255,59 @@ function MM_DropDown_ForTheAlliance()
info.notCheckable = 1; info.notCheckable = 1;
UIDropDownMenu_AddButton(info); UIDropDownMenu_AddButton(info);
-- ALAH PORTAL
info = { }; info = { };
info.text = MINIMAGE_LABEL_ALAH; info.text = MINIMAGE_LABEL_ALAH;
info.func = function(msg) CastSpellByName(MINIMAGE_LABEL_PORTAL..appender..MINIMAGE_LABEL_ALAH); end; info.disabled = not MM_CanCastPortal();
info.func = function(msg)
if MM_CanCastPortal() then
CastSpellByName(MINIMAGE_LABEL_PORTAL..appender..MINIMAGE_LABEL_ALAH);
end
end;
UIDropDownMenu_AddButton(info); UIDropDownMenu_AddButton(info);
-- DARNASSUS PORTAL
info = { }; info = { };
info.text = MINIMAGE_LABEL_DARNASSUS; info.text = MINIMAGE_LABEL_DARNASSUS;
info.func = function(msg) CastSpellByName(MINIMAGE_LABEL_PORTAL..appender..MINIMAGE_LABEL_DARNASSUS); end; info.disabled = not MM_CanCastPortal();
info.func = function(msg)
if MM_CanCastPortal() then
CastSpellByName(MINIMAGE_LABEL_PORTAL..appender..MINIMAGE_LABEL_DARNASSUS);
end
end;
UIDropDownMenu_AddButton(info); UIDropDownMenu_AddButton(info);
-- IF PORTAL
info = { }; info = { };
info.text = MINIMAGE_LABEL_IF; info.text = MINIMAGE_LABEL_IF;
info.func = function(msg) CastSpellByName(MINIMAGE_LABEL_PORTAL..appender..MINIMAGE_LABEL_IF); end; info.disabled = not MM_CanCastPortal();
info.func = function(msg)
if MM_CanCastPortal() then
CastSpellByName(MINIMAGE_LABEL_PORTAL..appender..MINIMAGE_LABEL_IF);
end
end;
UIDropDownMenu_AddButton(info); UIDropDownMenu_AddButton(info);
-- SW PORTAL
info = { }; info = { };
info.text = MINIMAGE_LABEL_SW; info.text = MINIMAGE_LABEL_SW;
info.func = function(msg) CastSpellByName(MINIMAGE_LABEL_PORTAL..appender..MINIMAGE_LABEL_SW); end; info.disabled = not MM_CanCastPortal();
info.func = function(msg)
if MM_CanCastPortal() then
CastSpellByName(MINIMAGE_LABEL_PORTAL..appender..MINIMAGE_LABEL_SW);
end
end;
UIDropDownMenu_AddButton(info); UIDropDownMenu_AddButton(info);
-- THERAMORE PORTAL
info = { }; info = { };
info.text = MINIMAGE_LABEL_THERAMORE; info.text = MINIMAGE_LABEL_THERAMORE;
info.func = function(msg) CastSpellByName(MINIMAGE_LABEL_PORTAL..appender..MINIMAGE_LABEL_THERAMORE); end; info.disabled = not MM_CanCastPortal();
info.func = function(msg)
if MM_CanCastPortal() then
CastSpellByName(MINIMAGE_LABEL_PORTAL..appender..MINIMAGE_LABEL_THERAMORE);
end
end;
UIDropDownMenu_AddButton(info); UIDropDownMenu_AddButton(info);
end end
@@ -228,29 +318,59 @@ function MM_DropDown_ForTheAlliance()
info.notCheckable = 1; info.notCheckable = 1;
UIDropDownMenu_AddButton(info); UIDropDownMenu_AddButton(info);
-- ALAH TELEPORT
info = { }; info = { };
info.text = MINIMAGE_LABEL_ALAH; info.text = MINIMAGE_LABEL_ALAH;
info.func = function(msg) CastSpellByName(MINIMAGE_LABEL_TELEPORT..appender..MINIMAGE_LABEL_ALAH); end; info.disabled = not MM_CanCastTeleport();
info.func = function(msg)
if MM_CanCastTeleport() then
CastSpellByName(MINIMAGE_LABEL_TELEPORT..appender..MINIMAGE_LABEL_ALAH);
end
end;
UIDropDownMenu_AddButton(info); UIDropDownMenu_AddButton(info);
-- DARN TELEPORT
info = { }; info = { };
info.text = MINIMAGE_LABEL_DARNASSUS; info.text = MINIMAGE_LABEL_DARNASSUS;
info.func = function(msg) CastSpellByName(MINIMAGE_LABEL_TELEPORT..appender..MINIMAGE_LABEL_DARNASSUS); end; info.disabled = not MM_CanCastTeleport();
info.func = function(msg)
if MM_CanCastTeleport() then
CastSpellByName(MINIMAGE_LABEL_TELEPORT..appender..MINIMAGE_LABEL_DARNASSUS);
end
end;
UIDropDownMenu_AddButton(info); UIDropDownMenu_AddButton(info);
-- IF TELEPORT
info = { }; info = { };
info.text = MINIMAGE_LABEL_IF; info.text = MINIMAGE_LABEL_IF;
info.func = function(msg) CastSpellByName(MINIMAGE_LABEL_TELEPORT..appender..MINIMAGE_LABEL_IF); end; info.disabled = not MM_CanCastTeleport();
info.func = function(msg)
if MM_CanCastTeleport() then
CastSpellByName(MINIMAGE_LABEL_TELEPORT..appender..MINIMAGE_LABEL_IF);
end
end;
UIDropDownMenu_AddButton(info); UIDropDownMenu_AddButton(info);
-- SW TELEPORT
info = { }; info = { };
info.text = MINIMAGE_LABEL_SW; info.text = MINIMAGE_LABEL_SW;
info.func = function(msg) CastSpellByName(MINIMAGE_LABEL_TELEPORT..appender..MINIMAGE_LABEL_SW); end; info.disabled = not MM_CanCastTeleport();
info.func = function(msg)
if MM_CanCastTeleport() then
CastSpellByName(MINIMAGE_LABEL_TELEPORT..appender..MINIMAGE_LABEL_SW);
end
end;
UIDropDownMenu_AddButton(info); UIDropDownMenu_AddButton(info);
-- THERAMORE TELEPORT
info = { }; info = { };
info.text = MINIMAGE_LABEL_THERAMORE; info.text = MINIMAGE_LABEL_THERAMORE;
info.func = function(msg) CastSpellByName(MINIMAGE_LABEL_TELEPORT..appender..MINIMAGE_LABEL_THERAMORE); end; info.disabled = not MM_CanCastTeleport();
info.func = function(msg)
if MM_CanCastTeleport() then
CastSpellByName(MINIMAGE_LABEL_TELEPORT..appender..MINIMAGE_LABEL_THERAMORE);
end
end;
UIDropDownMenu_AddButton(info); UIDropDownMenu_AddButton(info);
end end
+1 -1
View File
@@ -1,6 +1,6 @@
## Interface: 11200 ## Interface: 11200
## Title: MiniMage_TWOW ## Title: MiniMage_TWOW
## Version: 1.0 ## Version: 1.1
## Notes: Forked version of MiniMage 1.2b. No original GitHub Repo found, only found in Wow1.12.1_Addons_Collection ## Notes: Forked version of MiniMage 1.2b. No original GitHub Repo found, only found in Wow1.12.1_Addons_Collection
## SavedVariables: MiniMageOptions ## SavedVariables: MiniMageOptions
localization.lua localization.lua
+2 -2
View File
@@ -1,6 +1,6 @@
<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/ C:\Projects\WoW\Bin\Interface\FrameXML\UI.xsd"> <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/ C:\Projects\WoW\Bin\Interface\FrameXML\UI.xsd">
<Script file="MiniMage_TWOW.lua"/> <Script file="localization.lua"/>
<Script file="localization.lua"/> <Script file="MiniMage_TWOW.lua"/>
<!-- Empty core frame used for initialization and such --> <!-- Empty core frame used for initialization and such -->
+1 -1
View File
@@ -1,6 +1,6 @@
--the only place MINIMAGE_VERSION should be set --the only place MINIMAGE_VERSION should be set
MINIMAGE_VERSION = "1.0"; MINIMAGE_VERSION = "1.1";
--[[ --[[