Thread Tools Display Modes
09-28-08, 12:11 PM   #1
Scale
A Fallenroot Satyr
AddOn Author - Click to view addons
Join Date: Jul 2005
Posts: 28
Is in town

Is there an method to check if a player is in town,
Also is it possible to move the chat frame page from code.

I have an addon which fades out the chat frame which i love,
It returns on mouse over but you have to scroll a line up and down to see previous content.
I would like to fix this and make it not fade out in town.

Thanks!
  Reply With Quote
09-28-08, 12:28 PM   #2
Slakah
A Molten Giant
 
Slakah's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2007
Posts: 863
The easiest method is IsResting() but that works for City's and Inns.
  Reply With Quote
09-29-08, 11:43 AM   #3
Scale
A Fallenroot Satyr
AddOn Author - Click to view addons
Join Date: Jul 2005
Posts: 28
Having some trouble with this..
I registered ZONE_CHANGED then i check IsRested() but the event only fires when entering shattrath but not when leaving the city and entering the forest (whichi is contested zone)

EDIT:

I added the event "ZONE_CHANGED_NEW_AREA"
And now it "works" the problem is that IsResting() returns 1 when leaving town like a second later shows nil.
Any idea how to fix this?

Last edited by Scale : 09-29-08 at 12:11 PM.
  Reply With Quote
09-29-08, 11:44 AM   #4
Shirik
Blasphemer!
Premium Member
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2007
Posts: 818
Try ZONE_CHANGED_NEW_AREA
__________________
たしかにひとつのじだいがおわるのお
ぼくはこのめでみたよ
だけどつぎがじぶんおばんだってことわ
しりたくなかったんだ
It's my turn next.

Shakespeare liked regexes too!
/(bb|[^b]{2})/
  Reply With Quote
09-29-08, 11:48 AM   #5
Slakah
A Molten Giant
 
Slakah's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2007
Posts: 863
If your gonna use IsResting() I would advise "PLAYER_UPDATE_RESTING".
  Reply With Quote
09-29-08, 04:59 PM   #6
Scale
A Fallenroot Satyr
AddOn Author - Click to view addons
Join Date: Jul 2005
Posts: 28
Ahh nice idea, it's beter then my 3 second OnUpdate :P
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » Is in town

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