ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   General Authoring Discussion (https://www.esoui.com/forums/forumdisplay.php?f=174)
-   -   Premium Membership (https://www.esoui.com/forums/showthread.php?t=4687)

@AlphaLemming 05/04/15 08:09 AM

Premium Membership
 
Hello,

due to the fact, that a premium membership grants 10% reduction to research time of traits, i need a method for my Addon, to get this info. Has anyone an idea how to handle this?
Otherwise i must use a option, which has to be enabled, if a user is a premium member.

Thanks in advance.

sirinsidiator 05/04/15 08:59 AM

Premium members have a buff called "ESO Plus Membership".
GetUnitBuffInfo returns the following for it:
Quote:

ESO Plus Member, 25523.859375, 25523.859375, 161780, 0, /esoui/art/icons/ability_enchanter_005.dds, "", 1, 0, 0, 63601, false

Garkin 05/04/15 09:29 AM

Quote:

Originally Posted by sirinsidiator (Post 21059)
Premium members have a buff called "ESO Plus Membership".
GetUnitBuffInfo returns the following for it:

Important is just abilityId (63601), it is always the same for this buff.

Ayantir 05/04/15 09:35 AM

Quote:

Originally Posted by Garkin (Post 21060)
Important is just abilityId (63601), it is always the same for this buff.


Lua Code:
  1. function isPremiumAccount()
  2.     local IS_PREMIUM_BUFF = 63601
  3.     for i=1, GetNumBuffs("player") do
  4.         local _,_,_,_,_,_,_,_,_,_, abilityId = GetUnitBuffInfo("player", i)
  5.         if abilityId == IS_PREMIUM_BUFF then return true end
  6.     end
  7.     return false
  8. end

@AlphaLemming 05/04/15 09:38 AM

Wow, thanks for the fast answers. That will help. :)


All times are GMT -6. The time now is 10:32 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI