WoWInterface SVN PuppyHelmHider

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk
    from Rev 1 to Rev 2
    Reverse comparison

Rev 1 → Rev 2

PuppyHelmHider/PuppyHelmHider.xml New file
0,0 → 1,17
<Ui xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.blizzard.com/wow/ui/">
<Scripts file="Frame.lua" />
<Frame name="PuppyHelmHider">
<Scripts>
<OnLoad>
PuppyHelmHider_OnLoad(PuppyHelmHider)
</OnLoad>
<OnEvent>
PuppyHelmHider_OnEvent(self, event, ...)
InitPuppyHelmHider_OnEvent(self, event, ...)
</OnEvent>
<OnUpdate>
PuppyHelmHider_OnUpdate(self, elapsed)
</OnUpdate>
</Scripts>
</Frame>
</Ui>
\ No newline at end of file
PuppyHelmHider/PuppyHelmHider.lua New file
0,0 → 1,68
--================================================================
--[[
PuppyHelmHider
by Chrome67 (aka. Rhusty@EmeraldDream.US)
available on Curse.com and WoWInterface.com
 
-- Change Log --
-- 0.01 (12.30.2010, initial alpha)
-- 0.01b (3.27.2012, beta testing complete, code cleanup)
-- 0.01c (3.28.2012, more code cleanup, added reload slash command)
-- 0.02 (4.22.2012, added CityHelm compatability)
]]--
--================================================================
 
--[[ Initialization ]]--
 
local version = "0.01c"
local PuppyHelmHider = CreateFrame("PlayerModel", nil, UIParent)
PuppyHelmHider:SetUnit("player")
local race = UnitRace("player")
local PHH_debug = 1
 
--[[ Functions ]]--
 
function HatBeGone()
PuppyHelmHider:SetUnit("player")
if strfind(PuppyHelmHider:GetModel(),"\\human") == nil
then
ShowHelm(hide)
if PHH_debug == 1 then DEFAULT_CHAT_FRAME:AddMessage("worgen-form helm hidden...") end
else
local zone = GetZoneText() -- CityHelm addon compatibility
if changeHelm == (0 or nil)
then
ShowHelm()
elseif CityZoneMap[zone] ~= "city"
then
ShowHelm()
end
if PHH_debug == 1 then DEFAULT_CHAT_FRAME:AddMessage("human-form helm shown...") end
end
end
 
function PuppyHelmHider:OnEvent(event, arg1, ...)
if event == "PLAYER_LOGIN" then
print("|cffffd700<PuppyHelmHider>|r v" ..version.. " by |cff66ccffChrome67|r loaded...")
HatBeGone()
else
HatBeGone()
end
end
 
if race == "Worgen"
then
PuppyHelmHider:SetScript("OnEvent", PuppyHelmHider.OnEvent)
PuppyHelmHider:RegisterEvent("UNIT_MODEL_CHANGED")
PuppyHelmHider:RegisterEvent("PLAYER_LOGIN")
else
print("|cffffd700<PuppyHelmHider>|r v" ..version.. " by |cff66ccffChrome67|r NOT loaded...(hint: you are not a worgen!)")
return
end
 
--[[ Slash Commands and Help ]]--
 
SLASH_RELOAD1 = "/rl"
SlashCmdList["RELOAD"] = function(cmd)
ReloadUI()
end
PuppyHelmHider/PuppyHelmHider.toc New file
0,0 → 1,9
## Interface: 40300
## Title: PuppyHelmHider
## Version: 0.02
## Author: Chrome67
## Notes: Removes Helm in puppy form (worgen) and puts it back on in human form.
## DefaultState: Enabled
## LoadOnDemand: 0
 
PuppyHelmHider.lua