View Single Post
05/04/22, 09:03 AM   #21
ivanwfr
Join Date: Apr 2014
Posts: 9
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.
...

Last edited by ivanwfr : 05/04/22 at 09:40 AM.
  Reply With Quote