According to this filename here:
https://github.com/esoui/esoui/blob/...d_keyboard.lua
You need to set the sendMoneyMode to false (true = send money / false = COD)
-> See function ZO_MailSend_SetCoDMode at the bottom of this post.
and then you could use the function MailSend:AttachMoney to specify which amount of COD to use.
See functions below which should help:
Lua Code:
function MailSend:SetSendMoneyMode(sendMoneyMode)
if self.sendMoneyMode ~= sendMoneyMode then
self.sendMoneyMode = sendMoneyMode
ZO_DefaultCurrencyInputField_SetCurrencyAmount(self.sendCurrency, 0)
ZO_DefaultCurrencyInputField_SetUsePlayerCurrencyAsMax(self.sendCurrency, sendMoneyMode)
if(sendMoneyMode) then
QueueMoneyAttachment(ZO_DefaultCurrencyInputField_GetCurrency(self.sendCurrency))
else
QueueCOD(ZO_DefaultCurrencyInputField_GetCurrency(self.sendCurrency))
end
self:UpdatePostageMoney()
end
end
function MailSend:AttachMoney(moneyInput, money)
if self.sendMoneyMode then
QueueMoneyAttachment(money)
else
QueueCOD(money)
end
end
But "MailSend" ist not the global variable used ingame so you are not able to use this. It's the "class" and you need to use the created "object" of that class to use the functions.
If you check the code where MailSend gets created via :New or :Initialize you'll get the object name.
It should be:
MAIL_SEND
And these functions may be helping as well:
Lua Code:
function ZO_MailSend_SetCoDMode()
MAIL_SEND:SetCoDMode()
end
BUT: As there were addons messing around with the send gold feature it might be not possible for addons to specify to send gold or set the COD from addon code. You need to check it. Sending gold will not be possible for sure!