Thread Tools Display Modes
03-14-18, 12:20 PM   #1
MunkDev
A Scalebane Royal Guard
 
MunkDev's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2015
Posts: 431
Originally Posted by Ammako View Post
Major cities put your character at rest, aka you will have shop music playing all the time while in cities.
Lua Code:
  1. IsIndoors()
__________________
  Reply With Quote
03-14-18, 01:03 PM   #2
Ammako
A Frostmaul Preserver
AddOn Author - Click to view addons
Join Date: Jun 2016
Posts: 256
Originally Posted by MunkDev View Post
Lua Code:
  1. IsIndoors()
1- Cities have other buildings that aren't inns, too.
2- Rested state only updates when you enter or leave the city (a.k.a. PLAYER_UPDATE_RESTING only fires then.)

Checking for IsIndoors(), the script will see you aren't indoors once you enter the city and stop there. The music won't play while inside inns that are within cities.
If you were inside a building while the script runs (tping back from an instance, or if the event fires at login), then it'll see you're indoors, and play the music constantly even after leaving.

If there is an event that tells when you go indoors/outdoors, that would make it activate in buildings that aren't inns, so that's not reliable either.

Last edited by Ammako : 03-14-18 at 01:05 PM.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Search/Requests » Legend of Zelda Sound Addon


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