DB/SpellItemEnchantmentCondition

From wowdev
Revision as of 13:26, 25 July 2007 by Schlumpf (talk | contribs) (New page: ==Header Info== Records....................11 Fields.....................31 Record Size................64 String Block Size...........1 ==Structure== '''Column Field Type Notes''...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Header Info

Records....................11
Fields.....................31
Record Size................64
String Block Size...........1

Structure

Column Field Type Notes

1 	ID 		Integer 	Referenced from SpellItemEnchantment.dbc  
2 	gemColor_1 	Byte 	
3 	gemColor_2 	Byte 	
4 	gemColor_3 	Byte 	
5 	gemColor_4 	Byte 	
6 	gemColor_5 	Byte 	
7 	Unknown_1 	Integer 	
8 	Unknown_2 	Integer 	
9 	Unknown_3 	Integer 	
10 	Unknown_4 	Integer 	
11 	Unknown_5 	Integer 	
12 	comparator_1 	Byte 	
13 	comparator_2 	Byte 	
14 	comparator_3 	Byte 	
15 	comparator_4 	Byte 	
16 	comparator_5 	Byte 	
17 	compareColor_1 	Byte 	
18 	compareColor_2 	Byte 	
19 	compareColor_3 	Byte 	
20 	compareColor_4 	Byte 	
21 	compareColor_5 	Byte 	
22 	value_1 	Integer 	
23 	value_2 	Integer 	
24 	value_3 	Integer 	
25 	value_4 	Integer 	
26 	value_5 	Integer 	
27 	Unknown_1 	Byte 	
28 	Unknown_2 	Byte 	
29 	Unknown_3 	Byte 	
30 	Unknown_4 	Byte 	
31 	Unknown_5 	Byte 		or Boolean?

How It Works

I think the last unknown, represents a boolean if the conditions should be and'ed or or'ed together (it's only set for entries with more than one condition).

The "comparator" field seems to determine how to compare the values, what I've noticed so far, from what's available in the DBC file at the moment:

  • 2: Seems to be <
    • Used in Compare as: Requires more [compareColor] gems than [gemColor] gems.
  • 3: Seems to be >
    • Used in Compare as: Requires more [gemColor] gems than [compareColor] gems.
    • Used in Value as: Requires at least [value + 1] [gemColor] gems.
  • 5: Seems to be >=
    • Used in Value as: Requires at least [value] [gemColor] gems.

Type: Value

Example: 
Swift Skyfire Diamond
+24 Attack Power and Minor Run Speed Increase
Requires at least 2 Yellow gems
Requires at least 1 Red gem

Matching DBC entry (id 31):

gemColor:     {3, 2, 0, 0, 0}
unknownValue: {0, 0, 0, 0, 0}
comparator:   {5, 5, 0, 0, 0}
compareColor: {0, 0, 0, 0, 0}
value:        {2, 1, 0, 0, 0}
unknown:      {1, 0, 0, 0, 0}
  • Requires at least (2) (Gem Type 3 = Yellow) gems
  • Requires at least (1) (Gem Type 2 = Red) gems

Type: Compare

Example: 
Bracing Earthstorm Diamond
+26 Healing Spells & 2% Reduced Threat
Requires more Yellow gems than Blue gems
Requires more Red gems than Blue gems

Matching DBC entry (id 34):

gemColor:     {3, 2, 0, 0, 0}
unknownValue: {0, 0, 0, 0, 0}
comparator:   {3, 3, 0, 0, 0}
compareColor: {4, 4, 0, 0, 0}
value:        {0, 0, 0, 0, 0}
unknown:      {1, 0, 0, 0, 0}
  • Requires more (Gem Type 3 = Yellow) gems than (Gem Type 4 = Blue) gems
  • Requires more (Gem Type 2 = Red) gems than (Gem Type 4 = Blue) gems

GlobalStrings.lua constants

ENCHANT_CONDITION_AND = " and\32";
ENCHANT_CONDITION_EQUAL_COMPARE = "an equal number of %s and %s gems";
ENCHANT_CONDITION_EQUAL_VALUE = "exactly %d %s gem";
ENCHANT_CONDITION_EQUAL_VALUE_P1 = "exactly %d %s gems";
ENCHANT_CONDITION_LESS_VALUE = "less than %d %s gem";
ENCHANT_CONDITION_LESS_VALUE_P1 = "less than %d %s gems";
ENCHANT_CONDITION_MORE_COMPARE = "more %s gems than %s gems";
ENCHANT_CONDITION_MORE_EQUAL_COMPARE = "at least as many %s gems as %s gems";
ENCHANT_CONDITION_MORE_VALUE = "at least %d %s gem";
ENCHANT_CONDITION_MORE_VALUE_P1 = "at least %d %s gems";
ENCHANT_CONDITION_NOT_EQUAL_COMPARE = "a different number of %s and %s gems";
ENCHANT_CONDITION_NOT_EQUAL_VALUE = "any number but %d %s gem";
ENCHANT_CONDITION_NOT_EQUAL_VALUE_P1 = "any number but %d %s gems";
ENCHANT_CONDITION_REQUIRES = "Requires\32";

Retrieved from "http://www.sourcepeek.com/wiki/SpellItemEnchantmentCondition.dbc"