Skip to content

Commit

Permalink
[Event AI] Event AI editor
Browse files Browse the repository at this point in the history
  • Loading branch information
BAndysc committed Aug 21, 2022
1 parent 96c83b6 commit aaba540
Show file tree
Hide file tree
Showing 168 changed files with 12,376 additions and 22 deletions.
1 change: 1 addition & 0 deletions LoaderAvalonia/LoaderAvalonia.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
<ProjectReference Include="..\WDE.Conditions\WDE.Conditions.csproj" />
<ProjectReference Include="..\WDE.DatabaseEditors.Avalonia\WDE.DatabaseEditors.Avalonia.csproj" />
<ProjectReference Include="..\WDE.DatabaseEditors\WDE.DatabaseEditors.csproj" />
<ProjectReference Include="..\WDE.MangosEventAiEditor\WDE.MangosEventAiEditor.csproj" />
<ProjectReference Include="..\WDE.MVVM\WDE.MVVM.csproj" />
<ProjectReference Include="..\WDE.Parameters\WDE.Parameters.csproj" />
<ProjectReference Include="..\WDE.SourceCodeIntegrationEditor\WDE.SourceCodeIntegrationEditor.csproj" />
Expand Down
4 changes: 3 additions & 1 deletion LoaderAvalonia/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
using WDE.WoWHeadConnector;
using WDE.AnniversaryInfo;
using WDE.EventScriptsEditor;
using WDE.MangosEventAiEditor;
using WDE.MapSpawns;
using WDE.PathPreviewTool;

Expand Down Expand Up @@ -74,7 +75,8 @@ public static void Main(string[] args)
typeof(AnniversaryModule),
typeof(EventScriptsModule),
typeof(MapSpawnsModule),
typeof(PathPreviewToolModule)
typeof(PathPreviewToolModule),
typeof(EventAiModule)
};
WoWDatabaseEditorCore.Avalonia.Program.PreloadedModules = modules;
WoWDatabaseEditorCore.Avalonia.Program.Main(args);
Expand Down
3 changes: 2 additions & 1 deletion WDE.AzerothCore/AzerothCoreVersion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ namespace WDE.AzerothCore
{
[AutoRegister]
[SingleInstance]
public class AzerothCoreVersion : ICoreVersion, IDatabaseFeatures, ISmartScriptFeatures, IConditionFeatures, IGameVersionFeatures
public class AzerothCoreVersion : ICoreVersion, IDatabaseFeatures, ISmartScriptFeatures, IConditionFeatures, IGameVersionFeatures, IEventAiFeatures
{
public string Tag => "Azeroth";
public string FriendlyName => "AzerothCore Wrath of the Lich King";
public ISmartScriptFeatures SmartScriptFeatures => this;
public IConditionFeatures ConditionFeatures => this;
public IGameVersionFeatures GameVersionFeatures => this;
public IEventAiFeatures EventAiFeatures => this;
public IDatabaseFeatures DatabaseFeatures => this;
public bool SupportsRbac => false;
public bool SupportsConditionTargetVictim => true;
Expand Down
3 changes: 2 additions & 1 deletion WDE.CMaNGOS/CMaNGOSVersion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ namespace WDE.CMaNGOS
{
[AutoRegister]
[SingleInstance]
public class CMaNGOSCoreVersion : ICoreVersion, IDatabaseFeatures, ISmartScriptFeatures, IConditionFeatures, IGameVersionFeatures
public class CMaNGOSCoreVersion : ICoreVersion, IDatabaseFeatures, ISmartScriptFeatures, IConditionFeatures, IGameVersionFeatures, IEventAiFeatures
{
public string Tag => "CMaNGOS-WoTLK";
public string FriendlyName => "CMaNGOS Wrath of the Lich King";
public ISmartScriptFeatures SmartScriptFeatures => this;
public IConditionFeatures ConditionFeatures => this;
public IGameVersionFeatures GameVersionFeatures => this;
public IEventAiFeatures EventAiFeatures => this;
public IDatabaseFeatures DatabaseFeatures => this;
public bool SupportsRbac => false;
public bool SupportsConditionTargetVictim => false;
Expand Down
3 changes: 3 additions & 0 deletions WDE.DatabaseEditors/DatabaseEditorsModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,12 @@ public override void OnInitialized(IContainerProvider containerProvider)
this.containerProvider = containerProvider;
containerProvider.Resolve<ILoadingEventAggregator>().OnEvent<EditorLoaded>().SubscribeOnce(_ =>
{
var parameterPickerService = containerProvider.Resolve<IParameterPickerService>();
containerProvider.Resolve<IContextualParametersProvider>();
var factory = containerProvider.Resolve<IParameterFactory>();
factory.Register("BroadcastTextParameter", containerProvider.Resolve<BroadcastTextParameter>());
factory.RegisterDepending("CreatureTemplateSpellListIdParameter", "CreatureParameter", (a) => new CreatureTemplateSpellListIdParameter(a, parameterPickerService));
factory.RegisterDepending("DbScriptRandomTemplateTargetValueParameter", "BroadcastTextParameter", bcast => new DbScriptRandomTemplateTargetValueParameter(containerProvider.Resolve<IParameterPickerService>(), bcast));
factory.Register("LootReferenceParameter", containerProvider.Resolve<LootReferenceParameter>());
factory.Register("EquipmentCreatureGuidParameter", containerProvider.Resolve<EquipmentCreatureGuidParameter>());
factory.Register("CreatureGUIDParameter", factory.Factory("TableReference(creature#guid)Parameter"));
Expand Down
61 changes: 61 additions & 0 deletions WDE.DatabaseEditors/DbDefinitions/cmangos/creature_ai_summons.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
"id": "creature_ai_summons",
"compatibility": [
"CMaNGOS-WoTLK"
],
"name": "Creature Ai Summons",
"description": "Positions for summons in Event AI",
"table_name": "creature_ai_summons",
"table_index_name": "id",
"record_mode": "SingleRow",
"group_name": "Event AI",
"icon_path": "Icons/document_creature_summon_groups.png",
"reload_command": "reload creature_ai_summons",
"primary_key": [
"id"
],
"groups": [
{
"group_name": "group",
"fields": [
{
"name": "Id",
"db_column_name": "id",
"value_type": "uint"
},
{
"name": "Position X",
"db_column_name": "position_x",
"value_type": "float"
},
{
"name": "Position Y",
"db_column_name": "position_y",
"value_type": "float"
},
{
"name": "Position Z",
"db_column_name": "position_z",
"value_type": "float"
},
{
"name": "Orientation",
"db_column_name": "orientation",
"value_type": "float"
},
{
"name": "Spawntimesecs",
"db_column_name": "spawntimesecs",
"value_type": "uint",
"default": 120
},
{
"name": "Comment",
"db_column_name": "comment",
"value_type": "string",
"default": ""
}
]
}
]
}
91 changes: 91 additions & 0 deletions WDE.DatabaseEditors/DbDefinitions/cmangos/creature_spell_list.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
{
"id": "creature_spell_list",
"compatibility": [
"CMaNGOS-WoTLK"
],
"name": "Creature Spell List",
"description": "Used to define spells per creature.",
"table_name": "creature_spell_list",
"table_index_name": "Id",
"record_mode": "SingleRow",
"group_name": "Combat",
"icon_path": "Icons/document_creature_spell.png",
"picker": "Parameter",
"primary_key": [
"Id",
"Position"
],
"groups": [
{
"group_name": "group",
"fields": [
{
"name": "Id",
"db_column_name": "Id",
"value_type": "CreatureTemplateSpellListIdParameter"
},
{
"name": "Position",
"db_column_name": "Position",
"value_type": "int"
},
{
"name": "Spell",
"db_column_name": "SpellId",
"value_type": "SpellParameter"
},
{
"name": "Initial Min",
"db_column_name": "InitialMin",
"value_type": "int"
},
{
"name": "Initial Max",
"db_column_name": "InitialMax",
"value_type": "int"
},
{
"name": "Repeat Min",
"db_column_name": "RepeatMin",
"value_type": "int"
},
{
"name": "Repeat Max",
"db_column_name": "RepeatMax",
"value_type": "int"
},
{
"name": "Flags",
"db_column_name": "Flags",
"value_type": "MangosSpellListFlagsParameter"
},
{
"name": "Target",
"db_column_name": "TargetId",
"value_type": "TableReference(creature_spell_targeting#Id)Parameter"
},
{
"name": "Relay Script Id",
"db_column_name": "ScriptId",
"value_type": "int",
"zero_is_blank": true
},
{
"name": "Availability",
"db_column_name": "Availability",
"value_type": "PercentageParameter"
},
{
"name": "Probability",
"db_column_name": "Probability",
"value_type": "int"
},
{
"name": "Comment",
"db_column_name": "Comments",
"value_type": "string"
}
]
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"id": "creature_spell_list_entry",
"compatibility": [
"CMaNGOS-WoTLK"
],
"name": "Creature Spell List Entry",
"description": "Holds basic chance of a ai to perform either a SPELL_LIST_FLAG_SUPPORT_ACTION or SPELL_LIST_FLAG_RANGED_ACTION.",
"table_name": "creature_spell_list_entry",
"table_index_name": "Id",
"record_mode": "SingleRow",
"group_name": "Combat",
"skip_quick_load": true,
"icon_path": "Icons/document_creature_spell_group.png",
"reload_command": "reload creature_spell_list_entry",
"primary_key": [
"Id"
],
"groups": [
{
"group_name": "group",
"fields": [
{
"name": "Id",
"db_column_name": "Id",
"value_type": "int",
"read_only": true
},
{
"name": "Name",
"db_column_name": "Name",
"value_type": "string"
},
{
"name": "Chance Support Action",
"db_column_name": "ChanceSupportAction",
"value_type": "int"
},
{
"name": "Chance Ranged Attack",
"db_column_name": "ChanceRangedAttack",
"value_type": "int"
}
]
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"id": "creature_spell_targeting",
"compatibility": [
"CMaNGOS-WoTLK"
],
"name": "Creature Spell Targeting",
"description": "Spell targeting data",
"table_name": "creature_spell_targeting",
"table_index_name": "Id",
"record_mode": "SingleRow",
"group_name": "Combat",
"skip_quick_load": true,
"icon_path": "Icons/document_creature_spell_group.png",
"reload_command": "reload creature_spell_targeting",
"primary_key": [
"Id"
],
"groups": [
{
"group_name": "group",
"fields": [
{
"name": "Id",
"db_column_name": "Id",
"value_type": "int",
"read_only": true
},
{
"name": "Type",
"db_column_name": "Type",
"value_type": "CreatureSpellTargetingTypeParameter"
},
{
"name": "Param 1",
"db_column_name": "Param1",
"value_type": "int"
},
{
"name": "Param 2",
"db_column_name": "Param2",
"value_type": "int"
},
{
"name": "Param 3",
"db_column_name": "Param3",
"value_type": "int"
},
{
"name": "Comments",
"db_column_name": "Comments",
"value_type": "string"
}
]
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"id": "dbscript_random_templates",
"compatibility": [
"CMaNGOS-WoTLK"
],
"name": "Db script Random Templates",
"description": "Random templates used to define random texts or relay script IDs",
"table_name": "dbscript_random_templates",
"table_index_name": "id",
"record_mode": "SingleRow",
"group_name": "Database scripts",
"icon_path": "Icons/document_dice.png",
"primary_key": [
"id",
"type",
"target_id"
],
"groups": [
{
"group_name": "group",
"fields": [
{
"name": "Id",
"db_column_name": "id",
"value_type": "uint",
"preferred_width": 40.0
},
{
"name": "Type",
"db_column_name": "type",
"value_type": "MangosDbScriptRandomTemplateTypeParameter",
"preferred_width": 55.0
},
{
"name": "Target Value",
"db_column_name": "target_id",
"value_type": "DbScriptRandomTemplateTargetValueParameter",
"preferred_width": 200.0
},
{
"name": "Chance",
"db_column_name": "chance",
"value_type": "PercentageParameter",
"preferred_width": 40.0,
"zero_is_blank": true
},
{
"name": "Comment",
"db_column_name": "comments",
"value_type": "string",
"default": "",
"can_be_null": true
}
]
}
]
}
Loading

0 comments on commit aaba540

Please sign in to comment.