DB/SpellItemEnchantmentCondition: Difference between revisions
Jump to navigation
Jump to search
m (→Structure) |
|||
Line 14: | Line 14: | ||
22 value[5] Integer | 22 value[5] Integer | ||
27 Logic[5] Byte | 27 Logic[5] Byte | ||
struct SpellItemEnchantmentConditionEntry // sizeof(0x48) | |||
{ | |||
m_ID; // +0x0, size 0x4, type 0 | |||
m_lt_operandType; // +0x4, size 0x5, type 0 | |||
m_lt_operand; // +0xC, size 0x14, type 0 | |||
m_operator; // +0x20, size 0x5, type 0 | |||
m_rt_operandType; // +0x25, size 0x5, type 0 | |||
m_rt_operand; // +0x2C, size 0x14, type 0 | |||
m_logic; // +0x40, size 0x5, type 0 | |||
}; | |||
==How It Works== | ==How It Works== |
Revision as of 20:01, 16 April 2011
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[5] Byte 7 LT_Operand[5] Integer 12 comparator[5] Byte 17 compareColor[5] Byte 22 value[5] Integer 27 Logic[5] Byte
struct SpellItemEnchantmentConditionEntry // sizeof(0x48) { m_ID; // +0x0, size 0x4, type 0 m_lt_operandType; // +0x4, size 0x5, type 0 m_lt_operand; // +0xC, size 0x14, type 0 m_operator; // +0x20, size 0x5, type 0 m_rt_operandType; // +0x25, size 0x5, type 0 m_rt_operand; // +0x2C, size 0x14, type 0 m_logic; // +0x40, size 0x5, type 0 };
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"