Fixed Server starting.

This commit is contained in:
Hondacrx
2025-06-09 00:04:23 -04:00
parent 4214100d93
commit 59b507e93d
16 changed files with 105 additions and 98 deletions
+7 -2
View File
@@ -249,11 +249,16 @@ namespace Game.Scripting
public class GenericConversationScript<Script> : ConversationScript where Script : ConversationAI
{
public GenericConversationScript(string name) : base(name) { }
object[] _args;
public GenericConversationScript(string name, object[] args) : base(name)
{
_args = args;
}
public override ConversationAI GetAI(Conversation conversation)
{
return (Script)Activator.CreateInstance(typeof(Script), [conversation]);
return (Script)Activator.CreateInstance(typeof(Script), [conversation, _args]);
}
}
+3
View File
@@ -126,6 +126,9 @@ namespace Game.Scripting
case nameof(AreaTriggerAI):
genericType = typeof(GenericAreaTriggerScript<>).MakeGenericType(type);
break;
case nameof(ConversationAI):
genericType = typeof(GenericConversationScript<>).MakeGenericType(type);
break;
case "SpellScriptLoader":
case "AuraScriptLoader":
case "WorldScript":