ingame/companion/keyboard/companionoverview_keyboard.lua:38 -- COMPANION_OVERVIEW_KEYBOARD_FRAGMENT:RegisterCallback("StateChange", function(oldState, newState)
if newState == SCENE_FRAGMENT_SHOWING then
if HasActiveCompanion() then
if not self.initialized then
self.initialized = true
self:OnDeferredInitialize()
end
self.levelBar:OnShowing()
self:RefreshCompanionRapport()
self:RefreshPassivePerk()
--Order matters
ACTION_BAR_ASSIGNMENT_MANAGER:SetHotbarCycleOverride(HOTBAR_CATEGORY_COMPANION)
self.readOnlyActionBar:RefreshAllButtons()
end
elseif newState == SCENE_HIDING then
if self.pendingEquipOutfitIndex ~= ZO_OUTFIT_MANAGER:GetEquippedOutfitIndex(GAMEPLAY_ACTOR_CATEGORY_COMPANION) then
if self.pendingEquipOutfitIndex then
ZO_OUTFIT_MANAGER:EquipOutfit(GAMEPLAY_ACTOR_CATEGORY_COMPANION, self.pendingEquipOutfitIndex)
else
ZO_OUTFIT_MANAGER:UnequipOutfit(GAMEPLAY_ACTOR_CATEGORY_COMPANION)
end
end
ITEM_PREVIEW_KEYBOARD:ClearPreviewCollection()
ApplyChangesToPreviewCollectionShown()
elseif newState == SCENE_FRAGMENT_HIDDEN then
ACTION_BAR_ASSIGNMENT_MANAGER:SetHotbarCycleOverride(nil)
end
end)