forked from OptimShi/CustomClothingBase
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathClothingTableEx.cs
109 lines (94 loc) · 2.94 KB
/
ClothingTableEx.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
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
using ACE.DatLoader.Entity;
using ACE.DatLoader.FileTypes;
using System.Collections.Generic;
//ClothingTableEx
// ClothingBaseEffectEx (Dic)
// CloObjectEffect (List)
// Index
// ModelId
// CloTextureEffectEx (List)
// OldTexture
// NewTexture
// CloSubPalEffectEx (Dic)
// Icon
// CloSubPaletteEx (List)
// CloSubPaletteRangeEx (List)
// Offset
// NumColors
public class ClothingTableEx : ClothingTable
{
public new Dictionary<uint, ClothingBaseEffectEx> ClothingBaseEffects { get; set; } = new();
public new Dictionary<uint, CloSubPalEffectEx> ClothingSubPalEffects { get; set; } = new();
public new uint Id { get; set; }
public ClothingTable Convert()
{
ClothingTable value = new();
value.Id = Id;
foreach (var cbe in ClothingBaseEffects)
value.ClothingBaseEffects.Add(cbe.Key, cbe.Value.Convert());
foreach (var cbe in ClothingSubPalEffects)
value.ClothingSubPalEffects.Add(cbe.Key, cbe.Value.Convert());
return value;
}
}
public class CloSubPalEffectEx : CloSubPalEffect
{
public uint Icon { get; set; }
public new List<CloSubPaletteEx> CloSubPalettes { get; set; } = new();
public CloSubPalEffect Convert()
{
CloSubPalEffect value = new();
value.Icon = Icon;
value.CloSubPalettes.AddRange(CloSubPalettes.ConvertAll(x => x.Convert()));
return value;
}
}
public class CloSubPaletteEx : CloSubPalette
{
public new List<CloSubPaletteRange> Ranges { get; set; } = new();
public new uint PaletteSet { get; set; }
public CloSubPalette Convert()
{
CloSubPalette value = new();
value.PaletteSet = PaletteSet;
value.Ranges.AddRange(Ranges);
return value;
}
}
public class ClothingBaseEffectEx : ClothingBaseEffect
{
public new List<CloObjectEffectEx> CloObjectEffects { get; set; } = new();
public ClothingBaseEffect Convert()
{
ClothingBaseEffect value = new();
value.CloObjectEffects.AddRange(CloObjectEffects.ConvertAll(x => x.Convert()));
return value;
}
}
public class CloObjectEffectEx : CloObjectEffect
{
public new uint Index { get; set; }
public new uint ModelId { get; set; }
public new List<CloTextureEffectEx> CloTextureEffects { get; set; } = new();
public CloObjectEffect Convert()
{
CloObjectEffect value = new();
value.Index = Index;
value.ModelId = ModelId;
value.CloTextureEffects.AddRange(CloTextureEffects.ConvertAll(x => x.Convert()));
return value;
}
}
public class CloTextureEffectEx : CloTextureEffect
{
public new uint OldTexture { get; set; }
public new uint NewTexture { get; set; }
public CloTextureEffect Convert()
{
return new()
{
NewTexture = this.NewTexture,
OldTexture = this.OldTexture,
};
}
}