Gem Properties

Hello, recently i have been trying to get something like: (this is information from tooltip for item with socket bonus)

		<span class="icon-socket socket-type-7">

					<a href="/wow/en/item/130215" class="gem">

						<img src="[](" alt=""/>



[COLOR=rgb(0,0,0)]+250 Critical Strike

[COLOR=rgb(0,0,0)]Even tho i am able to get the item information and so on, i can’t get my head around the value for critical strike on this item.

[COLOR=rgb(0,0,0)]After browsing master branch, i’ve been able to find following info:

GemProperties.db2 (Direct link from Item-sparse.db) GemProperties → ID

			[COLOR=rgb(167,29,93)]struct [COLOR=rgb(121,93,163)]GemPropertiesEntry


			uint32 ID;

			uint32 Type;

			uint16 EnchantID;

			uint16 MinItemLevel;


SpellItemEnchantment.db2 (Direct Link From GemProperties.db2) EnchantID → ID

			[COLOR=rgb(167,29,93)]struct [COLOR=rgb(121,93,163)]SpellItemEnchantmentEntry


			uint32 ID;


			LocalizedString* Name;

			[COLOR=rgb(167,29,93)]float EffectScalingPoints[MAX_ITEM_ENCHANTMENT_EFFECTS];

			uint32 TransmogCost;

			uint32 TextureFileDataID;

			uint16 EffectPointsMin[MAX_ITEM_ENCHANTMENT_EFFECTS];

			uint16 ItemVisual;

			uint16 Flags;

			uint16 RequiredSkillID;

			uint16 RequiredSkillRank;

			uint16 ItemLevel;

			uint8 Charges;


			uint8 ConditionID;

			uint8 MinLevel;

			uint8 MaxLevel;

			int8 ScalingClass;

			int8 ScalingClassRestricted;

			uint32 PlayerConditionID;


I’ve managed to get the data for GemProperties and Enchant ID. For example, we want to get Gem with ID = 130215 (Deadly Deep Amber),

This will give us following info:

[SocketBonus] => 0
[GemProperties] => 2552
[RequiredDisenchantSkill] => -1
[ArmorDamageModifier] => 0

Okay, now we are going to GemProperties and looking for this entry:


Okay, EnchantID = 5459, lets look at SpellItemEnchantment.db2

[ID] => 5459
[EffectSpellID1] => 32
[EffectSpellID2] => 0
[EffectSpellID3] => 0
[Name] => +$k1 Critical Strike
[EffectScalingPoints1] => 0.555556
[EffectScalingPoints2] => 0
[EffectScalingPoints3] => 0
[TransmogCost] => 0
[TextureFileDataID] => 0
[EffectPointsMin1] => 0
[EffectPointsMin2] => 0
[EffectPointsMin3] => 0
[ItemVisual] => 0
[Flags] => 224
[RequiredSkillID] => 0
[RequiredSkillRank] => 0
[ItemLevel] => 1
[Charges] => 0
[Effect1] => 5
[Effect2] => 0
[Effect3] => 0
[ConditionID] => 0
[MinLevel] => 0
[MaxLevel] => 110
[ScalingClass] => 253
[ScalingClassRestricted] => 0
[PlayerConditionID] => 0

As you can see, we can now have actual string, in which $k1 needs to be sprintf (in PHP for example) with the correct value. However, where is this value stored? I've tried looking @ Spell.db2 (well, got SpellID from wowhead for creating this item, tried that aswell), as well as SpellEffect.db2 (guessed that EffectSpellID1 might be the pointer) and SpellEffectScaling.db2 (guessed that ScalingClass might be the pointer) and i am not even able to find a single clue.

Just wonder if someone is familiar with how it all works and have at least not a solution, but direction on where i should be headed in order to obtain this value.

And since most of the DB2 files got ‘upgraded’ in between WoD and Legion, most of the info for these files irrelevant (on other websites which provide description for fields and etc)

Effect[] tells you the type of enchantment, see Player::ApplyEnchantment, case ITEM_ENCHANTMENT_TYPE_STAT (5).

You need to use ScalingClass, Flags, gt/SpellScaling.txt (and player level!)