Thread Tools Display Modes
09-30-05, 07:17 PM   #1
Corwyn
A Murloc Raider
 
Corwyn's Avatar
Join Date: Jun 2005
Posts: 5
Question Events: Entering an Inn/Tavern

Does anyone know the event that triggers when you enter an inn. There must be one as it starts the "inn music" playing, which is what I want to change. Is it some subset or argument to ZONE_CHANGED_INDOORS?
__________________
Spaghetti Code - 0 net carbs.
  Reply With Quote
10-07-05, 11:08 AM   #2
Trimble Epic
An Aku'mai Servant
 
Trimble Epic's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2005
Posts: 31
I don't know if there is an event for entering an actual INN (the event that causes music to play), but I DO know that the player frame updates when you are in an in in that the little indicator that you are resting appears in the level indicator.

Perhaps there is an event that fires to indicate resting state that youc an use. I'll bet it always fires when entering an in, or any of the 6 major cities.
  Reply With Quote
10-11-05, 01:50 AM   #3
Gorak
A Fallenroot Satyr
Join Date: Oct 2005
Posts: 21
Inns are considered as "city" zones, thus they activate your rested bonus timer.

ZONE_CHANGED_INDOORS is triggered whenever you enter a city. Have you tried monitoring for the event, to see if it suits your needs ?

Also, I developed a small debug add-on that can register itself for events, and then post the event name and the valid arguments as a chatbox message to your screen. It's VERY helpful, so you should consider coding one for yourself. Just create an add-on with a dummy frame that can be registered to listen to different events, and when any event is detected, it will parse through the argument variables and concatenate a string from them.

Works smooth for me, and speeds up debugging.
  Reply With Quote
10-14-05, 08:36 PM   #4
Corwyn
A Murloc Raider
 
Corwyn's Avatar
Join Date: Jun 2005
Posts: 5
I have monitored ZONE_CHANGED_INDOORS . . . doesn't really work. Well, it'll work unless I'm in a city. I'm trying to change the basic Inn music, really. Oh well. I had a nice piece from Last Exile I wanted to use.
__________________
Spaghetti Code - 0 net carbs.
  Reply With Quote
10-14-05, 09:27 PM   #5
noraj
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Jul 2005
Posts: 102
couldnt you just do an onupdate check of playerstate?
  Reply With Quote
10-15-05, 12:50 AM   #6
Gello
A Molten Giant
AddOn Author - Click to view addons
Join Date: Jan 2005
Posts: 521
From PlayerFrame.lua, looks like you can register for PLAYER_UPDATE_RESTING, then check IsResting() to see if they're resting/in an inn.
  Reply With Quote
10-17-05, 10:48 AM   #7
Atrius
A Murloc Raider
Join Date: Jul 2005
Posts: 5
I think the problem that he's stating here is that when you're in a Tavern/Inn and you're already inside a capital city. Your rested state is already On, and your ZONE_CHANGE_INDOORS already fired upon entering the city itself.

Once you're inside the city I don't think ZONE_CHANGE_INDOORS will fire unless it does when you change quarters or districts. I'm pretty sure the music is tied deeper than the UI, the engine itself triggers the music.

I can't think of any way that this could be accomplished that wouldn't be an odd hack.

-Atrius
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » Events: Entering an Inn/Tavern


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