Clicked

Clicked

294k Downloads

Zone condition doesn't work when first logging in at Garrison (Alliance)

pgl opened this issue ยท 2 comments

commented

Describe the bug

When zoning into the Garrison, a binding to mount on the condition that the zone matches "Lunarfall" doesn't work.

Some time later it will start to work, eg after going mining or something.

General information

  • Clicked Version: 1.2.0
  • WoW Version: Retail
  • Did it work before? I don't know, this is the first time I tried using the zone conditionals
  • Does it occur with all other addons disabled? I honestly haven't tried this, sorry

Expected behavior

Zone conditional should always work (or not work if I fluffed it).

Reproduction

  1. Use Garrison Hearthstone
  2. Click Mount binding
  3. Doesn't match

Notes

I have a fallback for the same keybinding that does work.

/run print(GetZoneText()) outputs "Lunarfall".

I'm only really trying this because I want to use a flying mount and the game's [flyable] conditional doesn't seem to work in the Garrison, I guess because it's an instance.

commented

Thanks! Your suggestion of adding Town Hall worked. Much obliged.

commented

I believe there are two issues here:

  • Using the Garrision Hearthstone teleports you to the Town Hall (or Alliance equivalent), for some reason this building does not count as being within Frostwall/Lunarfall, as indicated by /dump GetRealZoneText().
  • Moving outside of the town hall does not trigger ZONE_CHANGED_NEW_AREA, but rather ZONE_CHANGED.

I believe you can fix this by including the town hall building in your zone names: Lunarfall,Town Hall (or whatever it's called for Alliance). It's a bit weird to say the least.

I'll look into adding the ZONE_CHANGED event as a reload trigger, but that can happen quite often so I'll have to check if that's feasible.