Thread Tools Display Modes
01-27-05, 01:55 AM   #1
Leandred
A Deviate Faerie Dragon
Join Date: Jan 2005
Posts: 10
PetWindow Problem

I'm making a conversion of vert EQ UI to WoW.


I have a problem with it. When i summon the pet the window doesn't
appear. I have to ReloadUI() to make it show. And when i dispand
pet the window doesnt disappear.

Could someone look at my attached files and point out what i did wrong?
I'm new to lua so please bare with me.

Ciao Leandred
Attached Files
File Type: zip petwindow.zip (3.1 KB, 988 views)
  Reply With Quote
01-30-05, 07:39 PM   #2
Goatus
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Jan 2005
Posts: 18
hmm don't know if found your bug already but i will try answering

From what i can see you call PetWindow_Update (which is responsible for showing hidding your frame) only OnLoad for your frame.

Code:
function PetWindow_OnLoad()
	
        [cut]
	
	this.attackModeCounter = 0;
	this.attackModeSign = -1;
	--this.flashState = 1;
	--this.flashTimer = 0;
        PetWindow_Update();
	CombatFeedback_Initialize(PetHitIndicator, 30);
	
        [cut]
end
But OnLoad happens much earlier then UnitExist("pet") returns true so it won't show... You should call PetWindow_Update at least on event: "PLAYER_PET_CHANGED"

here:

Code:
function PetWindow_OnEvent()
	PeW_OnEvent(event);
	if ( event == "PLAYER_PET_CHANGED" ) then
		PeW_Update();
                PetWindow_Update();
		return;
	end
	if ( event == "PLAYER_ENTERING_WORLD" ) then
		PeW_Update();
		return;
	end

end
that should fix it
  Reply With Quote
02-01-05, 04:08 AM   #3
Leandred
A Deviate Faerie Dragon
Join Date: Jan 2005
Posts: 10
Thanks, i found it. Did some changes further up in the code. Forgot to edit this post though ><

But thank you for taking your time

Ciao
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » PetWindow Problem

Thread Tools
Display Modes

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