Thread Tools Display Modes
Prev Previous Post   Next Post Next
01-29-13, 07:34 PM   #1
A_Nolan
A Deviate Faerie Dragon
 
A_Nolan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2007
Posts: 16
Question GetDungeonDifficultyID and PLAYER_DIFFICULTY_CHANGED do they go together?

function FIZ_OnLoad(self)
-- Events monitored by Event Handler
FIZ_Main = self
self:RegisterEvent("ADDON_LOADED")
self:RegisterEvent("VARIABLES_LOADED")
self:RegisterEvent("PLAYER_ENTERING_WORLD")
self:RegisterEvent("PLAYER_LOGIN")
self:RegisterEvent("GUILD_PERK_UPDATE")
self:RegisterEvent("PLAYER_DIFFICULTY_CHANGED")
end

function FIZ_OnEvent(self, event, ...)
local arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13 = ...
if (event == "ADDON_LOADED") and (arg1 == FIZ_NAME) then
FIZ_Main:UnregisterEvent("ADDON_LOADED")
FIZ_InitStages = FIZ_InitStages + 1
FIZ_Init()
elseif (event == "VARIABLES_LOADED") then
filler
elseif (event == "PLAYER_LOGIN") then
filler
elseif (event == "PLAYER_ENTERING_WORLD") then
filler
--elseif( event == "PLAYER_LEAVING_WORLD" ) then
filler
elseif (event == "UPDATE_FACTION" or
event == "QUEST_COMPLETE" or
event == "QUEST_WATCH_UPDATE") then
filler
elseif ( event == "BAG_UPDATE") then
filler
--elseif ( event == "UNIT_INVENTORY_CHANGED") then
filler
elseif ( event == "BANKFRAME_OPENED") then
filler
elseif ( event == "BANKFRAME_CLOSED") then
filler
elseif ( event == "CHAT_MSG_SKILL") or
filler
elseif ( event == "GUILD_PERK_UPDATE") then
filler
elseif ( event == "PLAYER_DIFFICULTY_CHANGED") then
FIZ_difficultyID = GetDungeonDifficultyID()
if (FIZ_difficultyID == 2) then
FIZ_IsHeroic = true
else
FIZ_IsHeroic = false
end
end

ok the sticky said to enter the entire code so i'v put in the main part. Is PLAYER_DIFFICULTY_CHANGED the correct event to pull when the dungeon difficulty (normal/heroic) is toggled. I have the correct setup to get the difficulty but can't get the thing to fire when i toggle it.
__________________
w.w.J.d. read the book and find out (J 3:16)
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » GetDungeonDifficultyID and PLAYER_DIFFICULTY_CHANGED do they go together?


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off