Widget handler: OnTooltipAddMoney

From AddOn Studio
Revision as of 04:49, 15 August 2023 by Move page script (talk | contribs) (Move page script moved page UIHANDLER OnTooltipAddMoney to UIHANDLER OnTooltipAddMoney without leaving a redirect)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Widget handlers < OnTooltipAddMoney

Invoked when money information needs to be added to a tooltip.

Arguments[edit]

arg1
Number - amount of money to add, in copper pieces.

Example[edit]

-- overload the base function with a custom routine
Saved_OnTooltipAddMoney = MyTooltip:GetScript("OnTooltipAddMoney");
MyTooltip:SetScript("OnTooltipAddMoney", My_OnTooltipAddMoney);
-- my custom routine
function My_OnTooltipAddMoney ()
  Saved_OnTooltipAddMoney();
  -- do something extra with the money amount in arg1
end


Details[edit]

This function was added in v1.7 and replaces the functionality that used to be provided by trapping the TOOLTIP_ADD_MONEY event. It is most commonly used to get merchant sell values when you scan the items in the inventory.