use prim ctor and fixed warnings: DialogueCallbacks and a bit of dialogueController
This commit is contained in:
@@ -10,27 +10,14 @@ namespace Core.Callbacks;
|
||||
|
||||
[Injectable(InjectableTypeOverride = typeof(OnUpdate), TypePriority = OnUpdateOrder.DialogueCallbacks)]
|
||||
[Injectable(InjectableTypeOverride = typeof(DialogueCallbacks))]
|
||||
public class DialogueCallbacks : OnUpdate
|
||||
public class DialogueCallbacks(
|
||||
HashUtil _hashUtil,
|
||||
TimeUtil _timeUtil,
|
||||
HttpResponseUtil _httpResponseUtil,
|
||||
DialogueController _dialogueController
|
||||
)
|
||||
: OnUpdate
|
||||
{
|
||||
protected HashUtil _hashUtil;
|
||||
protected TimeUtil _timeUtil;
|
||||
protected HttpResponseUtil _httpResponseUtil;
|
||||
protected DialogueController _dialogueController;
|
||||
|
||||
public DialogueCallbacks
|
||||
(
|
||||
HashUtil hashUtil,
|
||||
TimeUtil timeUtil,
|
||||
HttpResponseUtil httpResponseUtil,
|
||||
DialogueController dialogueController
|
||||
)
|
||||
{
|
||||
_hashUtil = hashUtil;
|
||||
_timeUtil = timeUtil;
|
||||
_httpResponseUtil = httpResponseUtil;
|
||||
_dialogueController = dialogueController;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handle client/friend/list
|
||||
/// </summary>
|
||||
@@ -60,7 +47,7 @@ public class DialogueCallbacks : OnUpdate
|
||||
RegistrationId = 20,
|
||||
DateTime = _timeUtil.GetTimeStamp(),
|
||||
IsDeveloper = true,
|
||||
Regions = new() { "EUR" },
|
||||
Regions = ["EUR"],
|
||||
VersionId = "bgkidft87ddd",
|
||||
Ip = "",
|
||||
Port = 0,
|
||||
@@ -335,10 +322,10 @@ public class DialogueCallbacks : OnUpdate
|
||||
throw new NotImplementedException(); // Not implemented in Node
|
||||
}
|
||||
|
||||
public async Task<bool> OnUpdate(long timeSinceLastRun)
|
||||
public Task<bool> OnUpdate(long timeSinceLastRun)
|
||||
{
|
||||
_dialogueController.Update();
|
||||
return true;
|
||||
return Task.FromResult(true);
|
||||
}
|
||||
|
||||
public string GetRoute()
|
||||
|
||||
@@ -150,7 +150,7 @@ public class DialogueController
|
||||
/// <param name="sessionId">Session Id</param>
|
||||
/// <returns>DialogueInfo</returns>
|
||||
public DialogueInfo GetDialogueInfo(
|
||||
string dialogueId,
|
||||
string? dialogueId,
|
||||
string sessionId)
|
||||
{
|
||||
var dialogs = _dialogueHelper.GetDialogsForProfile(sessionId);
|
||||
@@ -280,7 +280,7 @@ public class DialogueController
|
||||
/// <param name="dialogueId">id of the dialog to remove</param>
|
||||
/// <param name="sessionId">Player id</param>
|
||||
public void RemoveDialogue(
|
||||
string dialogueId,
|
||||
string? dialogueId,
|
||||
string sessionId)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
@@ -293,7 +293,7 @@ public class DialogueController
|
||||
/// <param name="shouldPin"></param>
|
||||
/// <param name="sessionId"></param>
|
||||
public void SetDialoguePin(
|
||||
string dialogueId,
|
||||
string? dialogueId,
|
||||
bool shouldPin,
|
||||
string sessionId)
|
||||
{
|
||||
@@ -307,7 +307,7 @@ public class DialogueController
|
||||
/// <param name="dialogueIds">Dialog ids to set as read</param>
|
||||
/// <param name="sessionId">Player profile id</param>
|
||||
public void SetRead(
|
||||
List<string> dialogueIds,
|
||||
List<string>? dialogueIds,
|
||||
string sessionId)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
|
||||
Reference in New Issue
Block a user