nikkisaurus / FarmingBar

4 stars 1 forks source link

[REQUEST]: Hidden Feature #48

Closed DaNod123 closed 1 year ago

DaNod123 commented 1 year ago

Describe what you want to be implemented?

Hello!

I try to make a function that hide the bar when I am not in Dragon Isles but it doesn't working. Could you please help me?

Regards!

Explain why you want this feature implemented.

I want to change bars when I move to another map! Thank you!

Describe any alternatives you've considered.

No response

Please provide screenshots or relevant context to support your request.

No response

nikkisaurus commented 1 year ago

Under events you should add: ZONE_CHANGED_NEW_AREA

For the function, you need to get the zone IDs for the dragon isles zones you want it to show up in. function() -- To hide this bar, return true -- To show this bar, return nil return C_Map.GetBestMapForUnit("player") ~= 2024 end

The above example would hide it if not in Azure Span. For each zone, just add and C_Map.GetBestMapForUnit("player") ~= ZONEID after the return, but before end (replacing ZONEID with the id for the zone you want it to show in). You can use /run print(C_Map.GetBestMapForUnit("player")) in the zone to get the id.