Skip to content

Commit

Permalink
[UX] Icons
Browse files Browse the repository at this point in the history
  • Loading branch information
BAndysc committed Jan 11, 2023
1 parent 3962777 commit 7f6efed
Show file tree
Hide file tree
Showing 13 changed files with 234 additions and 44 deletions.
32 changes: 25 additions & 7 deletions WDE.DatabaseEditors/DbDefinitions/creature.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,16 +120,34 @@
"foreign_table": "creature_addon"
},
{
"name": "Bytes 1",
"db_column_name": "bytes1",
"value_type": "UnitBytes1Parameter",
"name": "Stand state",
"db_column_name": "StandState",
"value_type": "StandStateParameter",
"foreign_table": "creature_addon"
},
{
"name": "Bytes 2",
"db_column_name": "bytes2",
"value_type": "UnitBytes2Parameter",
"default": 1,
"name": "AnimTier",
"db_column_name": "AnimTier",
"value_type": "AnimTierParameter",
"foreign_table": "creature_addon"
},
{
"name": "VisFlags",
"db_column_name": "VisFlags",
"value_type": "int",
"foreign_table": "creature_addon"
},
{
"name": "SheathState",
"db_column_name": "SheathState",
"value_type": "SheathStateParameter",
"foreign_table": "creature_addon",
"default": 1
},
{
"name": "PvPFlags",
"db_column_name": "PvPFlags",
"value_type": "UnitPVPStateFlagParameter",
"foreign_table": "creature_addon"
},
{
Expand Down
32 changes: 25 additions & 7 deletions WDE.DatabaseEditors/DbDefinitions/creature_tcpp.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,16 +142,34 @@
"foreign_table": "creature_addon"
},
{
"name": "Bytes 1",
"db_column_name": "bytes1",
"value_type": "UnitBytes1Parameter",
"name": "Stand state",
"db_column_name": "StandState",
"value_type": "StandStateParameter",
"foreign_table": "creature_addon"
},
{
"name": "Bytes 2",
"db_column_name": "bytes2",
"value_type": "UnitBytes2Parameter",
"default": 1,
"name": "AnimTier",
"db_column_name": "AnimTier",
"value_type": "AnimTierParameter",
"foreign_table": "creature_addon"
},
{
"name": "VisFlags",
"db_column_name": "VisFlags",
"value_type": "int",
"foreign_table": "creature_addon"
},
{
"name": "SheathState",
"db_column_name": "SheathState",
"value_type": "SheathStateParameter",
"foreign_table": "creature_addon",
"default": 1
},
{
"name": "PvPFlags",
"db_column_name": "PvPFlags",
"value_type": "UnitPVPStateFlagParameter",
"foreign_table": "creature_addon"
},
{
Expand Down
33 changes: 26 additions & 7 deletions WDE.DatabaseEditors/DbDefinitions/creature_template.json
Original file line number Diff line number Diff line change
Expand Up @@ -192,16 +192,35 @@
"value_type": "CreatureParameter"
},
{
"name": "Bytes 1",
"db_column_name": "bytes1",
"foreign_table": "creature_template_addon",
"value_type": "uint"
"name": "Stand state",
"db_column_name": "StandState",
"value_type": "StandStateParameter",
"foreign_table": "creature_template_addon"
},
{
"name": "AnimTier",
"db_column_name": "AnimTier",
"value_type": "AnimTierParameter",
"foreign_table": "creature_template_addon"
},
{
"name": "VisFlags",
"db_column_name": "VisFlags",
"value_type": "int",
"foreign_table": "creature_template_addon"
},
{
"name": "Bytes 2",
"db_column_name": "bytes2",
"name": "SheathState",
"db_column_name": "SheathState",
"value_type": "SheathStateParameter",
"foreign_table": "creature_template_addon",
"value_type": "uint"
"default": 1
},
{
"name": "PvPFlags",
"db_column_name": "PvPFlags",
"value_type": "UnitPVPStateFlagParameter",
"foreign_table": "creature_template_addon"
},
{
"name": "Emote",
Expand Down
2 changes: 1 addition & 1 deletion WDE.DatabaseEditors/DbDefinitions/instance_template.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "instance_template",
"compatibility": ["TrinityWrath", "TrinityCata", "Azeroth"],
"compatibility": ["TrinityWrath", "Azeroth"],
"name": "Instance Template",
"description": "Edit or create instance templates",
"table_name": "instance_template",
Expand Down
38 changes: 38 additions & 0 deletions WDE.DatabaseEditors/DbDefinitions/instance_template_cata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"id": "instance_template",
"compatibility": ["TrinityCata"],
"name": "Instance Template",
"description": "Edit or create instance templates",
"table_name": "instance_template",
"table_index_name": "map",
"record_mode": "SingleRow",
"table_name_source_field": "script",
"icon_path": "Icons/document_instance_template.png",
"picker": "MapParameter",
"group_name": "Instance",
"primary_key": [
"map"
],
"groups": [
{
"group_name": "Instance",
"fields": [
{
"name": "Map",
"db_column_name": "map",
"value_type": "MapParameter"
},
{
"name": "Parent map",
"db_column_name": "parent",
"value_type": "MapParameter"
},
{
"name": "Script name",
"db_column_name": "script",
"value_type": "string"
}
]
}
]
}
33 changes: 26 additions & 7 deletions WDE.DatabaseEditors/DbDefinitions/tcpp/creature_template.json
Original file line number Diff line number Diff line change
Expand Up @@ -214,16 +214,35 @@
"value_type": "CreatureParameter"
},
{
"name": "Bytes 1",
"db_column_name": "bytes1",
"foreign_table": "creature_template_addon",
"value_type": "uint"
"name": "Stand state",
"db_column_name": "StandState",
"value_type": "StandStateParameter",
"foreign_table": "creature_template_addon"
},
{
"name": "AnimTier",
"db_column_name": "AnimTier",
"value_type": "AnimTierParameter",
"foreign_table": "creature_template_addon"
},
{
"name": "VisFlags",
"db_column_name": "VisFlags",
"value_type": "int",
"foreign_table": "creature_template_addon"
},
{
"name": "Bytes 2",
"db_column_name": "bytes2",
"name": "SheathState",
"db_column_name": "SheathState",
"value_type": "SheathStateParameter",
"foreign_table": "creature_template_addon",
"value_type": "uint"
"default": 1
},
{
"name": "PvPFlags",
"db_column_name": "PvPFlags",
"value_type": "UnitPVPStateFlagParameter",
"foreign_table": "creature_template_addon"
},
{
"name": "Emote",
Expand Down
102 changes: 90 additions & 12 deletions WDE.MySqlDatabaseCommon/CommonModels/MySqlCreatureAddon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,9 @@ public abstract class MySqlBaseCreatureAddon : IBaseCreatureAddon

public abstract uint MountCreatureId { get; set; }

[Column(Name = "bytes1")]
public uint Bytes1 { get; set; }

[Column(Name = "bytes2")]
public uint Bytes2 { get; set; }
public abstract uint Bytes1 { get; }
public abstract byte Sheath { get; }
public abstract byte PvP { get; }

[Column(Name = "emote")]
public uint Emote { get; set; }
Expand All @@ -26,14 +24,26 @@ public abstract class MySqlBaseCreatureAddon : IBaseCreatureAddon

[Column(Name = "auras")]
public string? Auras { get; set; }
}

public byte Sheath => (byte)(Bytes2 & 0xFF);
public abstract class MySqlBaseCreatureAddonTrinity : MySqlBaseCreatureAddon
{
public override uint Bytes1 => StandState;
public override byte Sheath => sheath;
public override byte PvP => pvP;

[Column(Name = "StandState")]
public byte StandState { get; set; }

public byte PvP => (byte)((Bytes2 >> 8) & 0xFF);
[Column(Name = "SheathState")]
public byte sheath { get; set; }

[Column(Name = "PvPFlags")]
public byte pvP { get; set; }
}

[Table(Name = "creature_addon")]
public class MySqlCreatureAddon : MySqlBaseCreatureAddon, ICreatureAddon
public class MySqlCreatureAddonWrath : MySqlBaseCreatureAddonTrinity, ICreatureAddon
{
[PrimaryKey]
[Identity]
Expand All @@ -48,7 +58,7 @@ public class MySqlCreatureAddon : MySqlBaseCreatureAddon, ICreatureAddon
}

[Table(Name = "creature_template_addon")]
public class MySqlCreatureTemplateAddon : MySqlBaseCreatureAddon, ICreatureTemplateAddon
public class MySqlCreatureTemplateAddon : MySqlBaseCreatureAddonTrinity, ICreatureTemplateAddon
{
[PrimaryKey]
[Identity]
Expand All @@ -62,9 +72,8 @@ public class MySqlCreatureTemplateAddon : MySqlBaseCreatureAddon, ICreatureTempl
public override uint MountCreatureId { get; set; }
}


[Table(Name = "creature_addon")]
public class MySqlCreatureAddonCata : MySqlBaseCreatureAddon, ICreatureAddon
public class MySqlCreatureAddonCata : MySqlBaseCreatureAddonTrinity, ICreatureAddon
{
[PrimaryKey]
[Identity]
Expand All @@ -78,7 +87,7 @@ public class MySqlCreatureAddonCata : MySqlBaseCreatureAddon, ICreatureAddon
}

[Table(Name = "creature_template_addon")]
public class MySqlCreatureTemplateAddonCata : MySqlBaseCreatureAddon, ICreatureTemplateAddon
public class MySqlCreatureTemplateAddonCata : MySqlBaseCreatureAddonTrinity, ICreatureTemplateAddon
{
[PrimaryKey]
[Identity]
Expand All @@ -91,6 +100,55 @@ public class MySqlCreatureTemplateAddonCata : MySqlBaseCreatureAddon, ICreatureT
public override uint MountCreatureId { get; set; }
}

[Table(Name = "creature_addon")]
public class MySqlCreatureAddonMaster: MySqlBaseCreatureAddon, ICreatureAddon
{
[PrimaryKey]
[Identity]
[Column(Name = "guid")]
public uint Guid { get; set; }

[Column(Name = "path_id")]
public override uint PathId { get; set; }

[Column(Name = "MountCreatureID")]
public override uint MountCreatureId { get; set; }

public override uint Bytes1 => bytes1;
public override byte Sheath => (byte)(bytes2 & 0xFF);
public override byte PvP => (byte)((bytes2 >> 8) & 0xFF);

[Column(Name = "bytes1")]
public uint bytes1 { get; set; }

[Column(Name = "bytes2")]
public uint bytes2 { get; set; }
}

[Table(Name = "creature_template_addon")]
public class MySqlCreatureTemplateAddonMaster : MySqlBaseCreatureAddon, ICreatureTemplateAddon
{
[PrimaryKey]
[Identity]
[Column(Name = "entry")]
public uint Entry { get; set; }

[Column(Name = "path_id")]
public override uint PathId { get; set; }

[Column(Name = "MountCreatureID")]
public override uint MountCreatureId { get; set; }

public override uint Bytes1 => bytes1;
public override byte Sheath => (byte)(bytes2 & 0xFF);
public override byte PvP => (byte)((bytes2 >> 8) & 0xFF);

[Column(Name = "bytes1")]
public uint bytes1 { get; set; }

[Column(Name = "bytes2")]
public uint bytes2 { get; set; }
}

[Table(Name = "creature_addon")]
public class MySqlCreatureAddonAC: MySqlBaseCreatureAddon, ICreatureAddon
Expand All @@ -104,6 +162,16 @@ public class MySqlCreatureAddonAC: MySqlBaseCreatureAddon, ICreatureAddon
public override uint PathId { get; set; }

public override uint MountCreatureId { get; set; }

public override uint Bytes1 => bytes1;
public override byte Sheath => (byte)(bytes2 & 0xFF);
public override byte PvP => (byte)((bytes2 >> 8) & 0xFF);

[Column(Name = "bytes1")]
public uint bytes1 { get; set; }

[Column(Name = "bytes2")]
public uint bytes2 { get; set; }
}

[Table(Name = "creature_template_addon")]
Expand All @@ -118,4 +186,14 @@ public class MySqlCreatureTemplateAddonAC : MySqlBaseCreatureAddon, ICreatureTem
public override uint PathId { get; set; }

public override uint MountCreatureId { get; set; }

public override uint Bytes1 => bytes1;
public override byte Sheath => (byte)(bytes2 & 0xFF);
public override byte PvP => (byte)((bytes2 >> 8) & 0xFF);

[Column(Name = "bytes1")]
public uint bytes1 { get; set; }

[Column(Name = "bytes2")]
public uint bytes2 { get; set; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ public class TrinityMasterDatabase : BaseTrinityDatabase
public ITable<TrinityMasterMySqlServersideSpell> SpellDbc => GetTable<TrinityMasterMySqlServersideSpell>();
public ITable<MySqlGameObjectCata> GameObject => GetTable<MySqlGameObjectCata>();
public ITable<MySqlCreatureModelInfoShadowlands> CreatureModelInfo => GetTable<MySqlCreatureModelInfoShadowlands>();
public ITable<MySqlCreatureAddon> CreatureAddon => GetTable<MySqlCreatureAddon>();
public ITable<MySqlCreatureTemplateAddon> CreatureTemplateAddon => GetTable<MySqlCreatureTemplateAddon>();
public ITable<MySqlCreatureAddonMaster> CreatureAddon => GetTable<MySqlCreatureAddonMaster>();
public ITable<MySqlCreatureTemplateAddonMaster> CreatureTemplateAddon => GetTable<MySqlCreatureTemplateAddonMaster>();
public ITable<MySqlWrathQuestTemplateAddon> QuestTemplateAddon => GetTable<MySqlWrathQuestTemplateAddon>();
public ITable<MySqlPlayerChoice> PlayerChoice => GetTable<MySqlPlayerChoice>();
public ITable<MySqlPlayerChoiceResponse> PlayerChoiceResponse => GetTable<MySqlPlayerChoiceResponse>();
Expand Down
Loading

0 comments on commit 7f6efed

Please sign in to comment.