From a377f4b8c91f9cb83041f821be4ee1bb123ca895 Mon Sep 17 00:00:00 2001 From: Tek Hudson Date: Wed, 2 Oct 2019 08:22:13 -0700 Subject: [PATCH] Remove non-functional shapeshift code due to protected CastShapefiftForm method --- DruidBar.lua | 100 ---------------------------------------------------------- 1 file changed, 100 deletions(-) diff --git a/DruidBar.lua b/DruidBar.lua index 705bbc5..75d6863 100644 --- a/DruidBar.lua +++ b/DruidBar.lua @@ -763,103 +763,3 @@ function DruidBar_ColorAndStrataAndTexture() DruidBarBorder:SetTexture(DruidBarKey.bordertexture); DruidBarManaBackground:SetDrawLayer(DruidBarKey.bgstrata); end - -function UIErrorsFrame:realEcho() -end - -function UIErrorsFrame:fakeEcho(str, a1, a2, a3, a4, a5, a6) - --DruidBar_Print(str, a1, a2, a3) - --The outdoors message is normally delayed by lag so that it doesn't actually come until after the function is re-enabled. However, on occasion when the latency is very low and the interface lags, it will come while the function is still disabled. Allow the message through if this is the case. - if(str == "Can only use outside") then - UIErrorsFrame:realEcho(str, a1, a2, a3, a4, a5, a6) - end -end - ---[[ Shapeshifting Code ]]-- ---Thanks to mib for this code! it's awesome! ---also thanks to Zevzabich for a bit of help since the pure rapeage of both my character and my lua that is know as 0.10 -function DruidBar_ChangeBestForm() - local m_bag = -1; - local m_pos = -1; - local aq_bag = -1; - local aq_pos = -1; - -- search position of mount - for bag = 0,4 do - for i = 1,GetContainerNumSlots(bag) do - local t = GetContainerItemInfo(bag, i) - if (t) then - if (strfind(t,"\Ability_Mount_")) then - m_bag = bag; - m_pos = i; - end - if strfind(t, "\INV_Misc_Horn_01") and strfind(strlower(GetContainerItemLink(bag,i)), "frostwolf") then - m_bag = bag; - m_pos = i; - end - if (strfind(t, "INV_Misc_QirajiCrystal")) then - aq_bag = bag; - aq_pos = i; - end - end - end - end - local _, pqrs = UnitClass("player"); - if pqrs == "DRUID" then - --first hide the error messages - --we try to do all 3 at once! - - UIErrorsFrame.realEcho = UIErrorsFrame.AddMessage; - UIErrorsFrame.AddMessage = UIErrorsFrame.fakeEcho; - if (m_bag > -1 and m_pos > -1) or (aq_bag > -1 and aq_pos > -1) then - if strfind(GetRealZoneText(), DRUIDBAR_AQ1) and not strfind(GetRealZoneText(), DRUIDBAR_AQ2) and not strfind(GetRealZoneText(), DRUIDBAR_AQ3) then - UseContainerItem(aq_bag, aq_pos); - else - UseContainerItem(m_bag, m_pos); - end - end - ShapeshiftBar_ChangeForm(travelformid); - ShapeshiftBar_ChangeForm(aquaformid); - --then we allow error messages again - UIErrorsFrame.AddMessage = UIErrorsFrame.realEcho; - else - local i = 1; - --check for high-speed castable mounts. - while true do - local spellName = GetSpellName(i, BOOKTYPE_SPELL); - if not spellName then - do break end - end - if spellName == DRUIDBAR_CHARGER or spellName == DRUIDBAR_DREAD then - CastSpell(i, BOOKTYPE_SPELL); - return; - end - i = i + 1; - end - i = 1; - --check for lv40 castable mounts, or ghost wolf. - while true do - local spellName = GetSpellName(i, BOOKTYPE_SPELL); - if not spellName then - do break end - end - if spellName == DRUIDBAR_FEL or spellName == DRUIDBAR_GHOST or spellName == DRUIDBAR_WAR then - CastSpell(i, BOOKTYPE_SPELL); - return; - end - i = i + 1; - end - --nothing yet? let's try to mount normally. - UIErrorsFrame.realEcho = UIErrorsFrame.AddMessage; - UIErrorsFrame.AddMessage = UIErrorsFrame.fakeEcho; - --and trying... - if (m_bag > -1 and m_pos > -1) or (aq_bag > -1 and aq_pos > -1) then - if strfind(GetRealZoneText(), DRUIDBAR_AQ1) and not strfind(GetRealZoneText(), DRUIDBAR_AQ2) and not strfind(GetRealZoneText(), DRUIDBAR_AQ3) then - UseContainerItem(aq_bag, aq_pos); - else - UseContainerItem(m_bag, m_pos); - end - end - --then we allow error messages again - UIErrorsFrame.AddMessage = UIErrorsFrame.realEcho; - end -end -- 1.7.9.5