Changing zone or entering house. - ESOUI
Thread Tools Display Modes
11/20/21, 05:10 PM   #1
Phinix's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 167
Changing zone or entering house.

Hey all,

I have tried several methods of detecting going from a zone containing a player house into that player house, but none of them seem to work.

I have tried EVENT_ZONE_CHANGED, EVENT_CURRENT_SUBZONE_LIST_CHANGED, EVENT_PLAYER_ACTIVATED, and some others but none of these seem to fire when going through a simple "fade to black" door and not an actual wayshrine zone change.

Looking for a reliable, low-impact way to detect this, if anyone knows a way!
  Reply With Quote
11/20/21, 07:13 PM   #2
AddOn Author - Click to view addons
Join Date: Aug 2019
Posts: 19
Player houses are in different zones, so EVENT_PLAYER_ACTIVATED should be fired.
GetCurrentZoneHouseId() returns a non-zero value only in the player house,
so you can determine whether your character is located in the player house or not.

Edited: ;-p

Last edited by Calamath : 11/21/21 at 02:27 AM.
  Reply With Quote
11/21/21, 09:55 AM   #3
Super Moderator
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 3,817
Non-player houses are not detectable afaik.
There is no event firing and the map and zone data stays the same (for most of them).

If there is any unique interaction text at the door which you are able to detect (like "Open door to ...." or similar) you'd be able to use INTERACTION_MANAGER

Lua Code:
  1. SecurePostHook(FISHING_MANAGER, "StartInteraction", OnStartInteraction)
  2.         local action, interactableName, interactionBlocked, isOwned, additionalInteractInfo, context, contextLink, isCriminalInteract = GetGameCameraInteractableActionInfo()
  3.         if additionalInteractInfo == ADDITIONAL_INTERACT_INFO_<choose constant here> and not interactionBlocked and action== "<your action text like 'Open door' here>" then
  4.        end

> I found the additionalInteractInfo == ADDITIONAL_INTERACT_INFO_HOUSE_INSTANCE_DOOR in ZOs code, maybe it's always this for doors?
> action will be the name of the house owner then I guess, and the text at the reticle will use SI_GAME_CAMERA_TARGET + the action text then

to check for the interacation and if it was interacted with (not sure how to detect if this was interacted with though, maybe there fires another event then. You can check this via merTorchbug events or zgoo events e.g.) you#d know you have used a door or similar.

But IF I remember correctly the doors are all named differently :-( Maybe a pattern like "Enter <name>'s house" will appear, but still it would be a hacky way to detect + multi language issue

Last edited by Baertram : 11/21/21 at 10:00 AM.
  Reply With Quote
11/21/21, 07:25 PM   #4
Phinix's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 167
Thanks guys. Oddly enough, after completely exiting the game and logging back in, my EVENT_PLAYER_ACTIVATED registration is now firing when entering a house or place that requires a fade-to-black loading screen.
  Reply With Quote

ESOUI » AddOns » AddOn Help/Support » Changing zone or entering house.

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