View Single Post
09/23/20, 09:21 AM   #12
votan
 
votan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 577
Ok. The next hint:
You have to pre-hook ZO_MapPin.UpdateSize(self)

Lua Code:
  1. function ZO_MapPin:UpdateSize()
  2. -- here your pre-hook saved the last use pin: lastPin = self (lastPin is declared outside the hook function, like orgSize
  3.         local singlePinData = ZO_MapPin.PIN_DATA[self.m_PinType]
  4.         if singlePinData ~= nil then
  5.             -- There are two passes on setting the size...it could also be set when SetLocation is called because that takes a pin radius.
  6.             local control = self:GetControl()
  7.             local hasNonZeroRadius = self.radius and self.radius > 0
  8.             local baseSize = singlePinData.size or CONSTANTS.DEFAULT_PIN_SIZE -- here the altered "size" uses lastPin to return a value based on lastPin:GetUnitTag().
  9. ...
  Reply With Quote