summaryrefslogtreecommitdiff
path: root/docs/spell_custom_attr.md
blob: 33c1606b8b7b930db57ebe5fd4909f2a9dab6e78 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# spell\_custom\_attr

`Back-to:World`

**The \`spell\_custom\_attr\` table**

Table used for storing custom spell attributes.

**Structure**

<table>
<colgroup>
<col width="12%" />
<col width="12%" />
<col width="12%" />
<col width="12%" />
<col width="12%" />
<col width="12%" />
<col width="12%" />
<col width="12%" />
</colgroup>
<tbody>
<tr class="odd">
<td><p><strong>Field</strong></p></td>
<td><p><strong>Type</strong></p></td>
<td><p><strong>Attributes</strong></p></td>
<td><p><strong>Key</strong></p></td>
<td><p><strong>Null</strong></p></td>
<td><p><strong>Default</strong></p></td>
<td><p><strong>Extra</strong></p></td>
<td><p><strong>Comment</strong></p></td>
</tr>
<tr class="even">
<td><p><a href="#spell_custom_attr-entry">entry</a></p></td>
<td><p>medium int(8)</p></td>
<td><p>unsigned</p></td>
<td><p>PRI</p></td>
<td><p>NO</p></td>
<td><p>0</p></td>
<td><p> </p></td>
<td><p>spell id</p></td>
</tr>
<tr class="odd">
<td><p><a href="#spell_custom_attr-direct_bonus">a</a><a href="#spell_custom_attr-attributes">ttributes</a></p></td>
<td><p>medium int(8)</p></td>
<td><p>unsigned</p></td>
<td><p> </p></td>
<td><p>NO</p></td>
<td><p>0</p></td>
<td><p> </p></td>
<td><p>SpellCustomAttributes</p></td>
</tr>
</tbody>
</table>

 

 

**Description of the fields**

### entry

Spell ID. See [Spell.dbc](http://collab.kpsn.org/display/tc/spell_dbc) .

### attributes

Spell custom attributes from the enumeration SpellCustomAttributes in SpellInfo.h

``` sql
SET @SPELL_ATTR0_CU_ENCHANT_PROC                  = 1,
    @SPELL_ATTR0_CU_CONE_BACK                     = 2,
    @SPELL_ATTR0_CU_CONE_LINE                     = 4,
    @SPELL_ATTR0_CU_SHARE_DAMAGE                  = 8,
    @SPELL_ATTR0_CU_NO_INITIAL_THREAT             = 16,
    @SPELL_ATTR0_CU_AURA_CC                       = 64,
    @SPELL_ATTR0_CU_DIRECT_DAMAGE                 = 256,
    @SPELL_ATTR0_CU_CHARGE                        = 512,
    @SPELL_ATTR0_CU_PICKPOCKET                    = 1024,
    @SPELL_ATTR0_CU_NEGATIVE_EFF0                 = 4096,
    @SPELL_ATTR0_CU_NEGATIVE_EFF1                 = 8192,
    @SPELL_ATTR0_CU_NEGATIVE_EFF2                 = 16384,
    @SPELL_ATTR0_CU_IGNORE_ARMOR                  = 32768,
    @SPELL_ATTR0_CU_REQ_TARGET_FACING_CASTER      = 65536,
    @SPELL_ATTR0_CU_REQ_CASTER_BEHIND_TARGET      = 131072;

DELETE FROM `spell_custom_attr` WHERE `entry`=123;
INSERT INTO `spell_custom_attr` (`entry`, `attributes`) VALUES
(123, @SPELL_ATTR0_CU_FLAG1 | @SPELL_ATTR0_CU_FLAG2);
```