Skip to content

Commit

Permalink
Reorganizing Dota 2 models
Browse files Browse the repository at this point in the history
  • Loading branch information
babelshift committed Apr 30, 2020
1 parent b7723f9 commit 158b401
Show file tree
Hide file tree
Showing 66 changed files with 118 additions and 92 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

namespace Steam.Models.DOTA2
{
public class HeroAbilityDetailModel
public class HeroAbilityDetail
{
public uint Id { get; set; }
public string Name { get; set; }
public string AvatarImagePath { get; set; }
public string Description { get; set; }
public IReadOnlyCollection<HeroAbilitySpecialDetailModel> Attributes { get; set; }
public IReadOnlyCollection<HeroAbilitySpecialDetail> AbilitySpecials { get; set; }
public string Behaviors { get; set; }
public string TeamTargets { get; set; }
public string TargetTypes { get; set; }
Expand All @@ -35,7 +35,7 @@ public bool HasLinkedSpecialBonus
{
get
{
return Attributes.Any(x => !String.IsNullOrWhiteSpace(x.LinkedSpecialBonus));
return AbilitySpecials.Any(x => !String.IsNullOrWhiteSpace(x.LinkedSpecialBonus));
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
namespace Steam.Models.DOTA2
{
public class HeroAbilitySpecialDetailModel
public class HeroAbilitySpecialDetail
{
public string Name { get; set; }

public string Value { get; set; }

public string RawName { get; set; }

public string LinkedSpecialBonus { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Steam.Models.DOTA2
{
public class HeroDetailModel
public class HeroDetail
{
private const int baseHealth = 150;
private const int healthPerStrength = 19;
Expand Down Expand Up @@ -38,7 +38,7 @@ public class HeroDetailModel
public bool IsEnabled { get; set; }

public IReadOnlyCollection<HeroRoleModel> Roles { get; set; }
public IReadOnlyCollection<HeroAbilityDetailModel> Abilities { get; set; }
public IReadOnlyCollection<HeroAbilityDetail> Abilities { get; set; }

public double GetBaseHealth()
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
namespace Steam.Models.DOTA2
{
public class RarityModel
public class Rarity
{
public string Name { get; set; }

public uint Id { get; set; }

public uint Order { get; set; }

public string Color { get; set; }

public string LocalizedName { get; set; }
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public sealed class DotaHeroAbilityBehaviorType : DotaEnumType
public static readonly DotaHeroAbilityBehaviorType DONT_CANCEL_MOVEMENT = new DotaHeroAbilityBehaviorType("DOTA_ABILITY_BEHAVIOR_DONT_CANCEL_MOVEMENT", "Does Not Cancel Movement", "This ability does not stop hero movement.");
public static readonly DotaHeroAbilityBehaviorType OPTIONAL_UNIT_TARGET = new DotaHeroAbilityBehaviorType("DOTA_ABILITY_BEHAVIOR_OPTIONAL_UNIT_TARGET", "Optional Unit Target", "Unknown.");
public static readonly DotaHeroAbilityBehaviorType SUPPRESS_ASSOCIATED_CONSUMABLE = new DotaHeroAbilityBehaviorType("DOTA_ABILITY_BEHAVIOR_SUPPRESS_ASSOCIATED_CONSUMABLE", "Suppress Associated Consumable", "Unknown.");
public static readonly DotaHeroAbilityBehaviorType SHOW_IN_GUIDES = new DotaHeroAbilityBehaviorType("DOTA_ABILITY_BEHAVIOR_SHOW_IN_GUIDES", "Show in Guides", "Unknown.");

public DotaHeroAbilityBehaviorType(string key, string displayName, string description)
: base(key, displayName, description)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Steam.Models.DOTA2
{
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
namespace Steam.Models.DOTA2
{
public class HeroModel
public class Hero
{
public uint Id { get; set; }

public string Name { get; set; }

public string LocalizedName { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Steam.Models.DOTA2
{
public class AbilitySchemaItemModel
public class HeroAbility
{
public uint Id { get; set; }

Expand Down Expand Up @@ -50,6 +50,6 @@ public class AbilitySchemaItemModel

public string AbilityUnitTargetType { get; set; }

public IList<AbilitySpecialSchemaItemModel> AbilitySpecials { get; set; }
public IList<HeroAbilitySpecial> AbilitySpecials { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
namespace Steam.Models.DOTA2
{
public class AbilitySpecialSchemaItemModel
public class HeroAbilitySpecial
{
public string Name { get; set; }

public string Value { get; set; }

public string VarType { get; set; }

public string LinkedSpecialBonus { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
public class HeroRoleModel
{
public string Name { get; set; }

public string Level { get; set; }
}
}
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Steam.Models.DOTA2
{
public class ItemAbilitySchemaItemModel
public class ItemAbility
{
public uint Id { get; set; }

Expand Down Expand Up @@ -42,7 +42,7 @@ public class ItemAbilitySchemaItemModel

public string AbilityUnitTargetType { get; set; }

public IList<AbilitySpecialSchemaItemModel> AbilitySpecials { get; set; }
public IList<HeroAbilitySpecial> AbilitySpecials { get; set; }

public uint ItemCost { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@

namespace Steam.Models.DOTA2
{
public class ItemBuildSchemaItemModel
public class ItemBuild
{
public string Author { get; set; }

public string Hero { get; set; }

public string Title { get; set; }

public IList<ItemBuildGroupSchemaItemModel> Items { get; set; }
public IList<ItemBuildGroup> Items { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

namespace Steam.Models.DOTA2
{
public class ItemBuildGroupSchemaItemModel
public class ItemBuildGroup
{
public string Name { get; set; }

public IList<string> Items { get; set; }
}
}
23 changes: 23 additions & 0 deletions src/Steam.Models/DOTA2/External/Schema.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using System.Collections.Generic;

namespace Steam.Models.DOTA2
{
public class Schema
{
public SchemaGameInfo GameInfo { get; set; }

public IList<SchemaRarity> Rarities { get; set; }

public IList<SchemaQuality> Qualities { get; set; }

public IList<SchemaColor> Colors { get; set; }

public IList<SchemaPrefab> Prefabs { get; set; }

public IList<SchemaItem> Items { get; set; }

public IList<SchemaItemSet> ItemSets { get; set; }

public IList<SchemaItemAutograph> ItemAutographs { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Steam.Models.DOTA2
{
public class SchemaColorModel
public class SchemaColor
{
public string Name { get; set; }

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Steam.Models.DOTA2
{
public class SchemaGameInfoModel
public class SchemaGameInfo
{
public string FirstValidClass { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Steam.Models.DOTA2
{
public class SchemaItemModel
public class SchemaItem
{
public string DefIndex { get; set; }

Expand All @@ -23,7 +23,7 @@ public class SchemaItemModel

public DateTime? ExpirationDate { get; set; }

public SchemaItemToolModel Tool { get; set; }
public SchemaItemTool Tool { get; set; }

public string TournamentUrl { get; set; }

Expand All @@ -35,12 +35,12 @@ public class SchemaItemModel

public string ItemSlot { get; set; }

public SchemaItemPriceInfoModel PriceInfo { get; set; }
public SchemaItemPriceInfo PriceInfo { get; set; }

public IList<string> UsedByHeroes { get; set; }

public IList<string> BundledItems { get; set; }

public IList<SchemaItemStaticAttributeModel> StaticAttributes { get; set; }
public IList<SchemaItemStaticAttribute> StaticAttributes { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Steam.Models.DOTA2
{
public class SchemaItemAutographModel
public class SchemaItemAutograph
{
public string DefIndex { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Steam.Models.DOTA2
{
public class SchemaItemPriceInfoModel
public class SchemaItemPriceInfo
{
public string Bucket { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Steam.Models.DOTA2
{
public class SchemaItemSetModel
public class SchemaItemSet
{
public string RawName { get; set; }

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Steam.Models.DOTA2
{
public class SchemaItemStaticAttributeModel
public class SchemaItemStaticAttribute
{
public string Class { get; set; }
public string Value { get; set; }
Expand Down
7 changes: 7 additions & 0 deletions src/Steam.Models/DOTA2/External/SchemaItemTool.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace Steam.Models.DOTA2
{
public class SchemaItemTool
{
public SchemaItemToolUsage Usage { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Steam.Models.DOTA2
{
public class SchemaItemToolUsageModel
public class SchemaItemToolUsage
{
public uint LeagueId { get; set; }

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Steam.Models.DOTA2
{
public class SchemaPrefabModel
public class SchemaPrefab
{
public string Type { get; set; }

Expand All @@ -24,6 +24,6 @@ public class SchemaPrefabModel

public string ImageInventorySizeHeight { get; set; }

public SchemaPrefabCapabilityModel Capabilities { get; set; }
public SchemaPrefabCapability Capabilities { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Steam.Models.DOTA2
{
public class SchemaPrefabCapabilityModel
public class SchemaPrefabCapability
{
public bool Nameable { get; set; }

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Steam.Models.DOTA2
{
public class SchemaQualityModel
public class SchemaQuality
{
public string Name { get; set; }

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Steam.Models.DOTA2
{
public class SchemaRarityModel
public class SchemaRarity
{
public string Name { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Steam.Models.DOTA2
{
public class TeamInfoModel
public class TeamInfo
{
public uint TeamId { get; set; }
public string Name { get; set; }
Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions src/Steam.Models/DOTA2/MatchPickBanModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ public class MatchPickBanModel
public uint HeroId { get; set; }

public uint Team { get; set; }

public uint Order { get; set; }
}
}
2 changes: 2 additions & 0 deletions src/Steam.Models/DOTA2/MatchPlayerAbilityUpgradeModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
public class MatchPlayerAbilityUpgradeModel
{
public uint Ability { get; set; }

public uint Time { get; set; }

public uint Level { get; set; }
}
}
Loading

0 comments on commit 158b401

Please sign in to comment.