Thread Tools Display Modes
05/04/15, 08:09 AM   #1
@AlphaLemming
 
@AlphaLemming's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 122
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.
  Reply With Quote
05/04/15, 08:59 AM   #2
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,578
Premium members have a buff called "ESO Plus Membership".
GetUnitBuffInfo returns the following for it:
ESO Plus Member, 25523.859375, 25523.859375, 161780, 0, /esoui/art/icons/ability_enchanter_005.dds, "", 1, 0, 0, 63601, false
  Reply With Quote
05/04/15, 09:29 AM   #3
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 832
Originally Posted by sirinsidiator View Post
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.
  Reply With Quote
05/04/15, 09:35 AM   #4
Ayantir
 
Ayantir's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 1,019
Originally Posted by Garkin View Post
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

Last edited by Ayantir : 05/10/15 at 05:33 PM.
  Reply With Quote
05/04/15, 09:38 AM   #5
@AlphaLemming
 
@AlphaLemming's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 122
Wow, thanks for the fast answers. That will help.
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » Premium Membership


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off