-
Notifications
You must be signed in to change notification settings - Fork 1
/
SpellShapeshiftForm.cs
56 lines (42 loc) · 1.92 KB
/
SpellShapeshiftForm.cs
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
using TrinityCore.Dbc.Net.Lib.Attributes;
namespace TrinityCore.Dbc.Net.Lib.Definitions
{
[DbcFile("SpellShapeshiftForm.dbc")]
public class SpellShapeshiftForm : DbcFile
{
[DbcColumn(0, Enums.DbcColumnDataType.Int32)]
public int Id { get; set; }
[DbcColumn(1, Enums.DbcColumnDataType.Int32)]
public int BonusActionBar { get; set; }
[DbcColumn(2, Enums.DbcColumnDataType.Loc)]
public string? NameLang { get; set; }
[DbcColumn(3, Enums.DbcColumnDataType.Int32)]
public int Flags { get; set; }
[DbcColumn(4, Enums.DbcColumnDataType.Int32)]
public int CreatureType { get; set; }
[DbcColumn(5, Enums.DbcColumnDataType.Int32)]
public int AttackIconId { get; set; }
[DbcColumn(6, Enums.DbcColumnDataType.Int32)]
public int CombatRoundTime { get; set; }
[DbcColumn(7, Enums.DbcColumnDataType.ArrayOfUint32, 4)]
public int[]? CreatureDisplayId { get; set; }
[DbcColumn(8, Enums.DbcColumnDataType.ArrayOfUint32, 8)]
public int[]? PresetSpellId { get; set; }
public CreatureType? GetCreatureTypeCreatureType()
{
return DbcDirectory.Open<CreatureType>()?.Where(c => c.Id == this.CreatureType).FirstOrDefault();
}
public SpellIcon? GetAttackIconIdSpellIcon()
{
return DbcDirectory.Open<SpellIcon>()?.Where(c => c.Id == this.AttackIconId).FirstOrDefault();
}
public CreatureDisplayInfo[]? GetCreatureDisplayIdCreatureDisplayInfos()
{
return DbcDirectory.Open<CreatureDisplayInfo>()?.Where(c => this.CreatureDisplayId != null && this.CreatureDisplayId.Contains(c.Id)).ToArray();
}
public Spell[]? GetPresetSpellIdSpells()
{
return DbcDirectory.Open<Spell>()?.Where(c => this.PresetSpellId != null && this.PresetSpellId.Contains(c.Id)).ToArray();
}
}
}