Skip to content

Commit 3f7984c

Browse files
author
Justin
committed
Code cleanup.
1 parent 0d3f94a commit 3f7984c

28 files changed

Lines changed: 82 additions & 134 deletions

SourceSchemaParser/Dota2/DotaAbilitySchemaItem.cs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
using Newtonsoft.Json;
22
using Newtonsoft.Json.Serialization;
33
using SourceSchemaParser.JsonConverters;
4-
using System;
54
using System.Collections.Generic;
6-
using System.Linq;
7-
using System.Text;
8-
using System.Threading.Tasks;
95

106
namespace SourceSchemaParser.Dota2
117
{
@@ -45,7 +41,7 @@ public DotaAbilitySchemaItem()
4541
public int AbilityRangeBuffer { get; set; }
4642

4743
[JsonProperty("AbilityCastPoint")]
48-
public string AbilityCastPoint{ get; set; }
44+
public string AbilityCastPoint { get; set; }
4945

5046
[JsonProperty("AbilityChannelTime")]
5147
public string AbilityChannelTime { get; set; }
@@ -82,12 +78,12 @@ public DotaAbilitySchemaItem()
8278

8379
[JsonProperty("AbilityUnitTargetFlags")]
8480
public string AbilityUnitTargetFlags { get; set; }
85-
81+
8682
[JsonProperty("AbilityUnitTargetType")]
8783
public string AbilityUnitTargetType { get; set; }
8884

8985
[JsonProperty("AbilitySpecial")]
9086
[JsonConverter(typeof(DotaAbilitySpecialSchemaItemJsonConverter))]
9187
public IList<DotaAbilitySpecialSchemaItem> AbilitySpecials { get; set; }
9288
}
93-
}
89+
}
Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,9 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.Linq;
4-
using System.Text;
5-
using System.Threading.Tasks;
6-
7-
namespace SourceSchemaParser.Dota2
1+
namespace SourceSchemaParser.Dota2
82
{
93
internal class DotaAbilitySpecialSchemaItem
104
{
115
public string Name { get; set; }
126
public string Value { get; set; }
137
public string VarType { get; set; }
148
}
15-
}
9+
}

SourceSchemaParser/Dota2/DotaHeroSchemaItem.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ internal class DotaHeroSchemaItem
201201

202202
[JsonProperty("Team")]
203203
public string Team { get; set; }
204-
204+
205205
[JsonProperty("CombatClassAttack")]
206206
public string CombatClassAttack { get; set; }
207207

SourceSchemaParser/Dota2/DotaItemAbilitySchemaItem.cs

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
using Newtonsoft.Json;
22
using Newtonsoft.Json.Serialization;
33
using SourceSchemaParser.JsonConverters;
4-
using System;
54
using System.Collections.Generic;
6-
using System.Linq;
7-
using System.Text;
8-
using System.Threading.Tasks;
95

106
namespace SourceSchemaParser.Dota2
117
{
@@ -20,15 +16,15 @@ public DotaItemAbilitySchemaItem()
2016
public int Id { get; set; }
2117

2218
public string Name { get; set; }
23-
19+
2420
[JsonProperty("AbilityBehavior")]
2521
public string AbilityBehavior { get; set; }
26-
22+
2723
[JsonProperty("AbilityCastRange")]
2824
public string AbilityCastRange { get; set; }
2925

3026
[JsonProperty("AbilityCastPoint")]
31-
public string AbilityCastPoint{ get; set; }
27+
public string AbilityCastPoint { get; set; }
3228

3329
[JsonProperty("AbilityChannelTime")]
3430
public string AbilityChannelTime { get; set; }
@@ -59,7 +55,7 @@ public DotaItemAbilitySchemaItem()
5955

6056
[JsonProperty("AbilityUnitTargetFlags")]
6157
public string AbilityUnitTargetFlags { get; set; }
62-
58+
6359
[JsonProperty("AbilityUnitTargetType")]
6460
public string AbilityUnitTargetType { get; set; }
6561

@@ -143,4 +139,4 @@ public DotaItemAbilitySchemaItem()
143139
[JsonProperty("ItemDisassembleRule")]
144140
public string ItemDisassembleRule { get; set; }
145141
}
146-
}
142+
}
Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.Linq;
4-
using System.Text;
5-
using System.Threading.Tasks;
1+
using System.Collections.Generic;
62

73
namespace SourceSchemaParser.Dota2
84
{
@@ -11,4 +7,4 @@ internal class DotaItemBuildGroupSchemaItem
117
public string Name { get; set; }
128
public IList<string> Items { get; set; }
139
}
14-
}
10+
}
Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
using Newtonsoft.Json;
22
using SourceSchemaParser.JsonConverters;
3-
using System;
43
using System.Collections.Generic;
5-
using System.Linq;
6-
using System.Text;
7-
using System.Threading.Tasks;
84

95
namespace SourceSchemaParser.Dota2
106
{
@@ -17,4 +13,4 @@ internal class DotaItemBuildSchemaItem
1713
[JsonConverter(typeof(DotaItemBuildGroupSchemaItemJsonConverter))]
1814
public IList<DotaItemBuildGroupSchemaItem> Items { get; set; }
1915
}
20-
}
16+
}

SourceSchemaParser/Dota2/DotaLeague.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ internal class DotaLeague
77
public string ItemDef { get; set; }
88
public string Name { get; set; }
99
public string ImageInventoryPath { get; set; }
10-
public string ImageBannerPath { get;set; }
10+
public string ImageBannerPath { get; set; }
1111
public string NameLocalized { get; set; }
1212
public string DescriptionLocalized { get; set; }
1313
public string TypeName { get; set; }
1414
public string TournamentUrl { get; set; }
1515
public int LeagueId { get; set; }
1616
public string Tier { get; set; }
1717
public string Location { get; set; }
18-
18+
1919
public override string ToString()
2020
{
2121
string result = String.Format("Name: {0}", NameLocalized);

SourceSchemaParser/Dota2/DotaSchema.cs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,27 +43,35 @@ public class DotaSchemaPrefabCapability
4343
[JsonConverter(typeof(StringToBoolJsonConverter))]
4444
[JsonProperty("nameable")]
4545
public bool Nameable { get; set; }
46+
4647
[JsonConverter(typeof(StringToBoolJsonConverter))]
4748
[JsonProperty("can_have_sockets")]
4849
public bool CanHaveSockets { get; set; }
50+
4951
[JsonConverter(typeof(StringToBoolJsonConverter))]
5052
[JsonProperty("gems_can_be_extracted")]
5153
public bool GemsCanBeExtracted { get; set; }
54+
5255
[JsonConverter(typeof(StringToBoolJsonConverter))]
5356
[JsonProperty("can_gift_wrap")]
5457
public bool CanGiftWrap { get; set; }
58+
5559
[JsonConverter(typeof(StringToBoolJsonConverter))]
5660
[JsonProperty("usable_gc")]
5761
public bool UsableGC { get; set; }
62+
5863
[JsonConverter(typeof(StringToBoolJsonConverter))]
5964
[JsonProperty("usable_out_of_game")]
6065
public bool UsableOutOfGame { get; set; }
66+
6167
[JsonConverter(typeof(StringToBoolJsonConverter))]
6268
[JsonProperty("decodable")]
6369
public bool Decodable { get; set; }
70+
6471
[JsonConverter(typeof(StringToBoolJsonConverter))]
6572
[JsonProperty("usable")]
6673
public bool Usable { get; set; }
74+
6775
[JsonConverter(typeof(StringToBoolJsonConverter))]
6876
[JsonProperty("is_gem")]
6977
public bool IsGem { get; set; }
@@ -72,26 +80,37 @@ public class DotaSchemaPrefabCapability
7280
public class DotaSchemaPrefab
7381
{
7482
public string Type { get; set; }
83+
7584
[JsonProperty("item_type_name")]
7685
public string TypeName { get; set; }
86+
7787
[JsonProperty("item_class")]
7888
public string Class { get; set; }
89+
7990
[JsonProperty("item_name")]
8091
public string Name { get; set; }
92+
8193
[JsonProperty("item_slot")]
8294
public string Slot { get; set; }
95+
8396
[JsonProperty("item_quality")]
8497
public string Quality { get; set; }
98+
8599
[JsonProperty("item_rarity")]
86100
public string Rarity { get; set; }
101+
87102
[JsonProperty("min_ilevel")]
88103
public string MinItemLevel { get; set; }
104+
89105
[JsonProperty("max_ilevel")]
90106
public string MaxItemLevel { get; set; }
107+
91108
[JsonProperty("image_inventory_size_w")]
92109
public string ImageInventorySizeWidth { get; set; }
110+
93111
[JsonProperty("image_inventory_size_h")]
94112
public string ImageInventorySizeHeight { get; set; }
113+
95114
[JsonProperty("capabilities")]
96115
public DotaSchemaPrefabCapability Capabilities { get; set; }
97116
}

SourceSchemaParser/Dota2/DotaSchemaItem.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,20 @@ public class DotaSchemaItemPriceInfo
4040
{
4141
[JsonProperty("bucket")]
4242
public string Bucket { get; set; }
43+
4344
[JsonProperty("class")]
4445
public string Class { get; set; }
46+
4547
[JsonProperty("category_tags")]
4648
public string CategoryTags { get; set; }
49+
4750
[JsonProperty("date")]
4851
public DateTime? Date { get; set; }
52+
4953
[JsonConverter(typeof(DotaSchemaItemPriceJsonConverter))]
5054
[JsonProperty("price")]
5155
public decimal? Price { get; set; }
56+
5257
[JsonConverter(typeof(StringToBoolJsonConverter))]
5358
[JsonProperty("is_pack_item")]
5459
public bool? IsPackItem { get; set; }
Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,27 @@
11
using Newtonsoft.Json;
2-
using System;
3-
using System.Collections.Generic;
4-
using System.Linq;
5-
using System.Text;
6-
using System.Threading.Tasks;
72

83
namespace SourceSchemaParser.Dota2
94
{
105
internal class DotaSchemaItemAutograph
116
{
127
public string DefIndex { get; set; }
8+
139
[JsonProperty("name")]
1410
public string Name { get; set; }
11+
1512
[JsonProperty("autograph")]
1613
public string Autograph { get; set; }
14+
1715
[JsonProperty("workshoplink")]
1816
public long? WorkshopLink { get; set; }
17+
1918
[JsonProperty("language")]
2019
public int Language { get; set; }
20+
2121
[JsonProperty("icon_path")]
2222
public string IconPath { get; set; }
23+
2324
[JsonProperty("name_modifier")]
2425
public string Modifier { get; set; }
2526
}
26-
}
27+
}

0 commit comments

Comments
 (0)