Go to Page... |
Compatibility: | Scribes of Fate (8.3.5) Firesong (8.2.5) Lost Depths (8.1.5) High Isle (8.0.0) |
Updated: | 03/14/23 08:21 AM |
Created: | 10/15/18 11:41 AM |
Monthly downloads: | 48,740 |
Total downloads: | 1,028,658 |
Favorites: | 279 |
MD5: |
-Added: Slash commans /lzt or /transz: Enter a zone name afterwards (in your client language) or choose it from the autocompletion list. Press tab or space to chose the zonename, and you'll see another auto completion which will provide you the translations of this zone to other languages. Chosing an entry will put the translated zone name into the chat. -Added slash commands to search in your desired language: /lztde or /transzde: German /lzten or /transzen: English /lztfr or /transzfr: French /lztjp or /transzjp: Japanese /lztru or /transzru: Russian /lztpl or /transzpl: Polish /lztes or /transzes: Spanish
local libZone = LibZone
## DependsOn: LibZone>=077
## OptionalDependsOn: LibZone>=077
LibZone.preloadedZoneNames[language][zoneId] = "Localized name of the zone"
* GetMapInfo(*luaindex* _index_) ** _Returns:_ *string* _name_, *[UIMapType|#UIMapType]* _mapType_, *[MapContentType|#MapContentType]* _mapContentType_, *integer* _zoneId_, *string* _description_ * GetGuildMemberCharacterInfo(*integer* _guildId_, *luaindex* _memberIndex_) ** _Returns:_ *bool* _hasCharacter_, *string* _characterName_, *string* _zoneName_, *integer* _classType_, *integer* _alliance_, *integer* _level_, *integer* _championRank_, *integer* _zoneId_ * GetFriendCharacterInfo(*luaindex* _friendIndex_) ** _Returns:_ *bool* _hasCharacter_, *string* _characterName_, *string* _zoneName_, *integer* _classType_, *integer* _alliance_, *integer* _level_, *integer* _championRank_, *integer* _zoneId_
LibZone.zoneData[zoneId] = { ["zoneIndex"] = zoneIndex, ["parentZone"] = zoneId of the parent Zone }
* GetCurrentMapZoneIndex() ** _Returns:_ *luaindex* _zoneIndex_ * GetZoneIndex(*integer* _zoneId_) ** _Returns:_ *luaindex* _zoneIndex_
--Returns: Returns the preloaded zoneData with all available languages as table. function lib:GetAllZoneData()
--Check and get all zone's data and save them to the SavedVariables --Parameters: -->reBuildNew: Boolean [true=Rebuild the zoneData for all zones, even if they already exist / false=Skip already existing zoneIds] -->doReloadUI: Boolean [true=If at least one zoneId was added/updated, do a ReloadUI() at the end to update the SavedVariables now / false=No automatic ReloadUI()] function lib:GetAllZoneDataById(reBuildNew, doReloadUI)
LibZone
File Name |
Version |
Size |
Uploader |
Date |
8.3 |
184kB |
Baertram |
12/27/22 01:08 PM |
|
8.2 |
186kB |
Baertram |
08/26/22 05:11 AM |
|
8.1 |
186kB |
Baertram |
07/30/22 12:07 PM |
|
8 |
175kB |
Baertram |
07/11/22 05:46 AM |
|
7.8 |
155kB |
Baertram |
04/22/22 02:02 PM |
|
7.8 |
155kB |
Baertram |
03/12/22 05:49 AM |
|
7.6 |
155kB |
Baertram |
12/17/21 07:17 AM |
|
7.5 |
146kB |
Baertram |
08/31/21 05:02 AM |
|
7.4 |
70kB |
Baertram |
06/01/21 06:10 AM |
|
7.2 |
69kB |
Baertram |
03/07/21 01:57 PM |
|
7.1 |
69kB |
Baertram |
03/07/21 11:43 AM |
|
7.0 |
68kB |
Baertram |
10/11/20 04:34 PM |
|
6.9 |
67kB |
Baertram |
08/09/20 07:27 AM |
|
6.8 |
67kB |
Baertram |
05/07/20 04:27 PM |
|
6.8 |
65kB |
Baertram |
03/14/20 12:58 PM |
|
6.6 |
65kB |
Baertram |
03/14/20 12:12 PM |
|
6.5 |
65kB |
Baertram |
02/24/20 04:54 AM |
|
6.4 |
61kB |
Baertram |
12/23/19 09:33 AM |
|
6.3 |
60kB |
Baertram |
11/03/19 11:12 AM |
|
6.2 |
59kB |
Baertram |
10/21/19 08:28 AM |
|
6.1 |
59kB |
Baertram |
08/23/19 11:08 AM |
|
6 |
58kB |
Baertram |
08/23/19 10:16 AM |
|
5 |
56kB |
Baertram |
05/05/19 12:41 PM |
|
0.4 |
48kB |
Baertram |
01/25/19 09:25 AM |
|
0.2 |
29kB |
Baertram |
10/15/18 11:41 AM |
![]() |
Comment Options |
![]() |
|
|
Yeah, might have forgotten to update it, will have a look. Thanks
|
![]() |
![]() |
Baertram |
View Public Profile |
Send a private message to Baertram |
Find More Posts by Baertram |
Add Baertram to Your Buddy List |
wambo |
View Public Profile |
Send a private message to wambo |
Find More Posts by wambo |
Add wambo to Your Buddy List |
![]() |
|
|
LibZone on Github was updated for PTS and should be compatible with live HighIsle and PTS Firesong
|
![]() |
![]() |
Baertram |
View Public Profile |
Send a private message to Baertram |
Find More Posts by Baertram |
Add Baertram to Your Buddy List |
Baertram |
View Public Profile |
Send a private message to Baertram |
Find More Posts by Baertram |
Add Baertram to Your Buddy List |
![]() |
|
Forum posts: 0
File comments: 12
Uploads: 0
|
So, initially, the new version just reports all Delves, Public Dungeons, and Group Dungeons as Group Dungeons.
So I did some experimenting; the GetMapDungeonDifficulty() reports back 0 for Delves and Public, >0 for any type of Group Dungeon. I'm suspecting there's a problem with the value of the constant DUNGEON_DIFFICULTY_NORMAL. Fixing that, the next problem is that it can report back that the character is both In a Delve AND In a Public Dungeon if in a Public Dungeon. So I went ahead and changed the logic somewhat. This code replaces lines 504 - 518 in your new LibZone.lua file. Code:
--Check if user is in any dungeon if isInAnyDungeon and isNotInRaidChecks then -- if Difficulty is anything other than zero; it's a Group Dungeon if dungeonDifficulty > 0 then isInGroupDungeon = true else -- if Difficulty is zero; it's either a Delve or a Public Dungeon -- check the Public Dungeons list first local pubDungeons = lib.publicDungeonMapIds local _, _, _, _, mapId, _ = lib:GetCurrentZoneIds() isInPublicDungeon = pubDungeons[mapId] or false -- if it isn't a Public Dungeon, it's a Delve isInDelve = not isInPublicDungeon end end |
![]() |
![]() |
Sensei27 |
View Public Profile |
Send a private message to Sensei27 |
Find More Posts by Sensei27 |
Add Sensei27 to Your Buddy List |
![]() |
||
|
Thanks for the hints, will have a look.
Edit: Please download and try this version: https://github.com/Baertram/LibZone/...ads/master.zip Code:
local isInRaidChecks = (not isInRaid and groupSize <= SMALL_GROUP_SIZE_THRESHOLD and true) or false Will not be needed here, but well, should do ![]()
Last edited by Baertram : 03/17/22 at 03:09 PM.
|
|
![]() |
![]() |
Baertram |
View Public Profile |
Send a private message to Baertram |
Find More Posts by Baertram |
Add Baertram to Your Buddy List |
![]() |
|
Forum posts: 0
File comments: 12
Uploads: 0
|
Baertram, the library doesn't seem to notice when I enter a group dungeon solo - using GetCurrentZoneAndGroupStatus() - (yes I'm a masochist sometimes!).
In fact all the flags return false. Is that by design? ------------------------------------------------------------- Okay, did some digging, if the player isn't grouped it doesn't do the isInGroupDungeon test: Code:
if not isInGroup then isInDelve = (isInAnyDungeon and dungeonDifficulty == DUNGEON_DIFFICULTY_NONE) or false else groupSize = GetGroupSize() --SMALL_GROUP_SIZE_THRESHOLD (4) / RAID_GROUP_SIZE_THRESHOLD (12) / GROUP_SIZE_MAX (24) local isInRaidChecks = (not isInRaid and groupSize <= SMALL_GROUP_SIZE_THRESHOLD and true) or false isInGroupDungeon = (isInAnyDungeon and (dungeonDifficulty == DUNGEON_DIFFICULTY_NORMAL or DUNGEON_DIFFICULTY_VETERAN) and isInRaidChecks) or false isInDelve = (not isInGroupDungeon and (isInAnyDungeon and dungeonDifficulty == DUNGEON_DIFFICULTY_NONE and isInRaidChecks)) or false end * additional note: why "and true" on the 'isInRaidChecks =' line - surely superfluous to the statement!? (sorry I might be missing something obvious there)
Last edited by Sensei27 : 03/17/22 at 02:57 PM.
|
![]() |
![]() |
Sensei27 |
View Public Profile |
Send a private message to Sensei27 |
Find More Posts by Sensei27 |
Add Sensei27 to Your Buddy List |
![]() |
|
|
Thanks, will update it with the Blackwood update then.
|
![]() |
![]() |
Baertram |
View Public Profile |
Send a private message to Baertram |
Find More Posts by Baertram |
Add Baertram to Your Buddy List |
![]() |
|||
Tried that, nothing bad happened.
|
|||
![]() |
![]() |
SimonIllyan |
View Public Profile |
Send a private message to SimonIllyan |
Send email to SimonIllyan |
Find More Posts by SimonIllyan |
Add SimonIllyan to Your Buddy List |
![]() |
||
|
Hi SimonIllyan,
it might have had a reason, but as I did not mention it in the comments I'm not sure which one anymore ![]() Perhaps there were created endless loops or whatever in an earlier state. Could you try to raise the AddOnVersion in LibZoone.txt to a higher value so that your local copy is always loaded, and then remove the assert and test it a bit. If everything works out well I'll release an update with the assert removed.
|
|
![]() |
![]() |
Baertram |
View Public Profile |
Send a private message to Baertram |
Send email to Baertram |
Find More Posts by Baertram |
Add Baertram to Your Buddy List |
![]() |
|
Hello,
I have a question regarding function GetZoneNameByLocalizedSearchString: why do you explicitly (using assert) forbid using returnLanguage equal to searchLanguage? I was going to use this function to find the id and name of a first zone matching the search string, regardless of the current language, like this: Code:
zoneId, zoneName = next(GetZoneNameByLocalizedSearchString(nameFragment, currentLanguage, currentLanguage)) |
|
![]() |
![]() |
SimonIllyan |
View Public Profile |
Send a private message to SimonIllyan |
Send email to SimonIllyan |
Find More Posts by SimonIllyan |
Add SimonIllyan to Your Buddy List |
![]() |
|
|
Attention:
LibZone will be removing LibStub compatibility. Please change your addon's to NOT use LibStub for LibZone anymore but load it via the global variable Code:
LibZone Update date: Sunday 03.11.2019
Last edited by Baertram : 11/03/19 at 11:13 AM.
|
![]() |
![]() |
Baertram |
View Public Profile |
Send a private message to Baertram |
Send email to Baertram |
Find More Posts by Baertram |
Add Baertram to Your Buddy List |
![]() |
|
|
You can also try this on the live server if you want to test if it's compatible.
Last edited by Baertram : 10/31/19 at 11:11 AM.
|
![]() |
![]() |
Baertram |
View Public Profile |
Send a private message to Baertram |
Send email to Baertram |
Find More Posts by Baertram |
Add Baertram to Your Buddy List |
![]() |
|
|
Version 6:
-Removed table LibZone.givenZoneData -> Please use the API function LibZone:GetAllZoneData() instead! So if you have reference the table directly in your addon change the code to the appropriate API function LibZone:GetAllZoneData() please.
Last edited by Baertram : 08/23/19 at 10:26 AM.
|
![]() |
![]() |
Baertram |
View Public Profile |
Send a private message to Baertram |
Send email to Baertram |
Find More Posts by Baertram |
Add Baertram to Your Buddy List |
![]() |
|||||
|
Re: Re: Re: Re: Re: Re: even with out of date addon checked, this library would not load
I can only say: Maybe
![]() Not sure, sometimes it works, sometimes it doesn't. You can only try to rebuild it with manualy freshly installed addons + libraies (the affected ones) I guess.
|
||||
![]() |
![]() |
Baertram |
View Public Profile |
Send a private message to Baertram |
Send email to Baertram |
Find More Posts by Baertram |
Add Baertram to Your Buddy List |
![]() |
You have just downloaded by the author . If you like this AddOn why not consider supporting the author? This author has set up a donation account. Donations ensure that authors can continue to develop useful tools for everyone.