ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   Tutorials & Other Helpful Info (https://www.esoui.com/forums/forumdisplay.php?f=172)
-   -   Update 34 (Version 8.0) (https://www.esoui.com/forums/showthread.php?t=10145)

ivanwfr 05/04/22 09:03 AM

Can someone explain why this call to FireCallbacks is not executed
and EVENT_ACTION_SLOT_UPDATED is not dispatched in API 101034 ?

Code:

600 function ZO_ActionBarAssignmentManager_Hotbar:ClearSlot(actionSlotIndex)
        ...
613    ACTION_BAR_ASSIGNMENT_MANAGER:FireCallbacks(
          "SlotUpdated"
        ,  self.hotbarCategory
        ,  actionSlotIndex
        ,  IS_CHANGED_BY_PLAYER
        )

This online code is from API 101032 but this part is unchanged
on both GitHub pts7.32 and pts8.0 branches:



I can get the expected result manually by running zo_loadstring from GQSB with those slash commands:
Code:

-- init required for this to work (as it has not been called yet):
 /gqsb lua ZO_ActionBarAssignmentManager_Hotbar:Initialize(10)

-- player dragging an item out of the wheel by code:
 /gqsb lua CallSecureProtected("ClearSlot", 4, 10)

-- firing the missing "SlotUpdated" hooks calls:
 /gqsb lua ACTION_BAR_ASSIGNMENT_MANAGER:FireCallbacks("SlotUpdated", 10, 4, true)

BTW: EVENT_ACTION_SLOT_UPDATED is not dispatched either!

Of course, those calls may not be the appropriate ones.
All I'm saying here is that it gets the job done as to what
GQSB Preset changes saving needs to be working again.


v2.6.8.2 220504 on GitHub
(rigged with /gqsb debug_event toggled on on startup)

My guess is:
- either there is some replacement mechanism at work I'm not aware of, or
- the pts7.3 branch handling is freezed at the moment in pts8.0.
...

Baertram 05/04/22 10:01 AM

You should explain what you are trying to achieve here FIRST and then post some code etc. ;)

From your dev name and the abbreviation GQSB I know it's about Gremyind Quickslot bar and it seems to be something about dragging items from the bar, and you expect (it worked on live server I assume) either the event EVENT_ACTION_SLOT_UPDATED to fire then, or the
callback manager to fire
ACTION_BAR_ASSIGNMENT_MANAGER:FireCallbacks("SlotUpdated", self.hotbarCategory, actionSlotIndex, IS_CHANGED_BY_PLAYER)

When exactly do you think this should fire? What are you doing?
It's easier for Dan to understand and maybe find a bug then.
Thank you.

btw: The quickslots changed and there are new files that might fire a quickslot only related callback meanwhile, so check the new files, if it's about quickslots:
https://github.com/esoui/esoui/blob/...board.lua#L202
https://github.com/esoui/esoui/blob/...l_keyboard.lua
ZO_UtilityWheelValidateOrClearSlot

ivanwfr 05/04/22 12:12 PM

Quote:

Originally Posted by Baertram (Post 45850)
You should explain what you are trying to achieve here FIRST and then post some code etc. ;)

From your dev name and the abbreviation GQSB I know it's about Gremyind Quickslot bar and it seems to be something about dragging items from the bar, and you expect (it worked on live server I assume) either the event EVENT_ACTION_SLOT_UPDATED to fire then, or the
callback manager to fire
ACTION_BAR_ASSIGNMENT_MANAGER:FireCallbacks("SlotUpdated", self.hotbarCategory, actionSlotIndex, IS_CHANGED_BY_PLAYER)

You're right.
I was just following your last post about QuickSlot handling with this added bar category parameter.
As if that was an obvious continuation about this very subject.
But I could have stated it more clearly!

Quote:

When exactly do you think this should fire? What are you doing?
It's easier for Dan to understand and maybe find a bug then.
Thank you.

Everything you guessed is right! It's all about the yellow keywords, as I thought it would highlight enough the fact I was missing some of those for Greymind Quick Slot Bar to work on pts as it does on live, with some adjustments I'm trying to guess what they should be.

Quote:

My broken code has to do with saving the content of the QUICKSLOT_WHEEL before changing Preset.
It's synchronized on those slot changes to add/remove items.
There is simply no way to trigger this code when both callbacks and hooks are not working anymore.

Quote:

btw: The quickslots changed and there are new files that might fire a quickslot only related callback meanwhile, so check the new files, if it's about quickslots:
https://github.com/esoui/esoui/blob/...board.lua#L202
https://github.com/esoui/esoui/blob/...l_keyboard.lua
ZO_UtilityWheelValidateOrClearSlot
Thanks for the heads up.
But, after a git clone https://github.com/esoui/esoui.git, I took the time to search the whole pts8.0 and pts7.3 branches for those keywords before posting here.

I'm ready to give a try to any suggestion, Thanks.

ZOS_DanBatson 05/04/22 02:41 PM

EVENT_ACTION_SLOT_UPDATED is only fired for slots on the active bar, and now that quickslots are not part of the skill bars, it wont fire for them. They want EVENT_HOTBAR_SLOT_UPDATED instead.

ivanwfr 05/04/22 03:35 PM

Quote:

Originally Posted by ZOS_DanBatson (Post 45854)
EVENT_ACTION_SLOT_UPDATED is only fired for slots on the active bar, and now that quickslots are not part of the skill bars, it wont fire for them. They want EVENT_HOTBAR_SLOT_UPDATED instead.

Thanks Dan! That was all I had to know.
Quote:

v2.6.8.2 220504 on GitHub
Working on both live and PTS
I still have a tiny missing feature that could hide the standard ACTIVE QUICKSLOT ITEM.
It is a GQSB Settings option [Disable Default Quick Slot Button].
I was using ActionButton9:SetHidden() but ActionButton9 is nil on PTS.

Baertram 05/04/22 04:27 PM

It's control name should be QuickslotButton now

ivanwfr 05/04/22 05:27 PM

Quote:

Originally Posted by Baertram (Post 45857)
It's control name should be QuickslotButton now

Thanks! everything is working again!

Quote:

v2.6.9 220505 pre-release on GitHub click here to load from GitHub
working on both LIVE (7.3) and PTS (8.1)

ZOS_DanBatson 05/05/22 03:35 PM

2 Attachment(s)
Updated documentation for the upcoming PTS 4.

ZOS_DanBatson 06/06/22 09:08 AM

2 Attachment(s)
Final updated documentation

Phinix 06/06/22 09:53 PM

Thanks for everything Dan, sirinsidiator, Baertram et al. Your extensive documentation efforts made a pretty major API update a lot less of a hassle for all of us addon authors!

pithka 07/22/22 09:28 PM

Invite pls
 
Can I get a guild invite to the dev/testing guild? @Pithka on NA

pithka 07/22/22 11:25 PM

Leaderboard changes from Update 34
 
Catching up after being away for a few patches and am a bit confused by some of the API changes. Previously, to get all of a characters top scores for each trial and arena, I would

1. Call QueryRaidLeaderboardData()
2. Wait for the event EVENT_RAID_LEADERBOARD_DATA_CHANGED
3. Loop through GetRaidLeaderboardLocalPlayerInfo(RAID_CATEGORY_TRIAL, raidId) for all trials
4. Loop through GetRaidLeaderboardLocalPlayerInfo(RAID_CATEGORY_CHALLENGE, arenaId) for all arena

This doesn't work anymore. Here is the section of the API patch notes that I think are relevant

Code:

Changed
* QueryRaidLeaderboardData()
* QueryBattlegroundLeaderboardData()
* QueryCampaignLeaderboardData()
to
* QueryRaidLeaderboardData(*[RaidCategory|#RaidCategory]* _raidCategory_, *integer* _raidId_, *integer* _classId_)
** _Returns:_ *[LeaderboardDataReadyState|#LeaderboardDataReadyState]* _readyState_
* QueryBattlegroundLeaderboardData(*[BattlegroundLeaderboardType|#BattlegroundLeaderboardType]* _battlegroundType_)
** _Returns:_ *[LeaderboardDataReadyState|#LeaderboardDataReadyState]* _readyState_
* QueryCampaignLeaderboardData(*[Alliance|#Alliance]* _alliance_)
** _Returns:_ *[LeaderboardDataReadyState|#LeaderboardDataReadyState]* _readyState_


Changed to _raidId_
* GetRaidLeaderboardLocalPlayerInfo(*integer* _raidId_)
* GetNumTrialLeaderboardEntries(*integer* _raidId_)
* GetNumChallengeLeaderboardEntries(*integer* _raidId_, *integer* _classId_)
* GetTrialLeaderboardEntryInfo(*integer* _raidId_, *luaindex* _entryIndex_)
* GetChallengeLeaderboardEntryInfo(*integer* _raidId_, *integer* _classId_, *luaindex* _entryIndex_)
* GetPlayerRaidParticipationInfo(*integer* _raidId_)
* GetPlayerRaidProgressInfo(*integer* _raidId_)



I'm not entirely sure how to read these patch notes. A couple of quick questions.
  • Does this mean now I should call QueryRaidLeaderboardData(raidId) multiple times, once for each raidId?
  • what is *[RaidCategory|#RaidCategory]* _raidCategory_, is this the RAID_CATEGORY_TRIAL and RAID_CATEGORY_CHALLENGE enums?
Thanks

Baertram 07/23/22 02:35 AM

RaidCategory should be the enum/number constant, yes.

You can find a list of the parameter constants/return values within/of API functions if you search for the constant (here: RaidCategory) within the API documentation txt file attached to this thread, or for the most current at the PTS 8.1 thread.


For the other functions I guess you need to provide the raidId now, yes. Maybe there is another API function GetNumRaids() or similar to get a raidIndex 1 to n, And GetRaidId(raidIndex)? Or maybe the ID is the index (same, 1 to n) in this case. I never used those functions yet.

Another hint: some api functions do not return data if you haven't opened the menu (campaign e.g.) before as the server will not collect the dats earlier, to prevent the server being asked too often, making it slow. Not sure if this is the case here too, just wanted to warn you.


All times are GMT -6. The time now is 11:36 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI