Thread Tools Display Modes
04/25/18, 05:07 PM   #1
calia1120
 
calia1120's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 62
How to differentiate between Regular and Crown Soul Gems

How would we differentiate soul gems vs crown soul gems for inventory count purposes?
There's a SPECIALIZED_ITEMTYPE_SOUL_GEM, as well as SOUL_GEM_TYPE_FILLED
Only place I'm seeing a differentiation is for default soul gem choice

Crown Gem - http://esoitem.uesp.net/viewlog.php?...mmary&id=17501
Regular - http://esoitem.uesp.net/viewlog.php?...ummary&id=1295

One of the requests I got for Wykkyd Toolbar was to show a count for both types.
  Reply With Quote
04/26/18, 03:18 AM   #2
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,566
I'd just count them by item id since they have removed all except for those two types when they simplified the soul gem system.
Seeing that there already is a function GetSoulGemInfo which is used to determine how many soul gems the player has available, it might also be worthwhile to ask for an additional argument SoulGemType which can be SOUL_GEM_INFO_ALL, SOUL_GEM_INFO_REGULAR or SOUL_GEM_INFO_CROWN.
  Reply With Quote
04/26/18, 07:54 AM   #3
ZOS_ChipHilseberg
ZOS Staff!
Premium Member
Yes this person is from ZeniMax!
Join Date: Oct 2014
Posts: 551
I think IsItemFromCrownStore(bag, slot) should work.
  Reply With Quote
04/26/18, 09:39 AM   #4
calia1120
 
calia1120's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 62
That could work. This is what Wykkyd had originally come up with for the count:
Code:
 local useIcon = _addon:GetOrDefault( true, _addon.Settings["soulgem_icon"] )
    local retVal, c = "", {215/255,213/255,205/255,1}
    local name, icon, icon2, stackCount = "", "", "", 0
    local myLevel = GetUnitEffectiveLevel("player")
    local emptyCount, fullCount = 0, 0
    name, icon, stackCount = GetSoulGemInfo(SOUL_GEM_TYPE_EMPTY, myLevel, true); emptyCount = stackCount;
    name, icon2, stackCount = GetSoulGemInfo(SOUL_GEM_TYPE_FILLED, myLevel, true); fullCount = stackCount;
It's not using slot references, but I'm not against reworking things.
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » How to differentiate between Regular and Crown Soul Gems

Thread Tools
Display Modes

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