Skip to content
This repository has been archived by the owner on Aug 5, 2024. It is now read-only.

Commit

Permalink
fix demo events not got deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
Ghost-chu committed Nov 8, 2023
1 parent 25530dc commit b25827a
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions DoDoSRV/SRVWSEventHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,19 @@
using DoDo.Open.Sdk.Models.Events;
using DoDo.Open.Sdk.Models.Messages;
using DoDo.Open.Sdk.Services;
using Terraria;
using Terraria.Chat;
using Terraria.ID;
using Terraria.Localization;
using Color = Microsoft.Xna.Framework.Color;

namespace TRDoDoSRV.DoDoSRV
{
public class SRVWSEventHandler : DemoEventProcessService
public class SRVWSEventHandler : EventProcessService
{
private readonly TRDoDoSRV modInstance;
private readonly string channelId;
private readonly string islandId;

public SRVWSEventHandler(TRDoDoSRV modInstance, OpenApiService openApiService, string channelId, string islandId) : base(openApiService)
public SRVWSEventHandler(TRDoDoSRV modInstance, OpenApiService openApiService, string channelId, string islandId)
{
this.modInstance = modInstance;
this.channelId = channelId;
Expand All @@ -26,7 +24,6 @@ public SRVWSEventHandler(TRDoDoSRV modInstance, OpenApiService openApiService, s

public override void Connected(string message)
{
base.Connected(message);
Console.WriteLine("DoDoSRV 连接已建立:" + message);
}

Expand All @@ -40,6 +37,11 @@ public override void Reconnected(string message)
Console.WriteLine("DoDoSRV 已重新连接到事件服务器:" + message);
}

public override void Exception(string message)
{
Console.WriteLine("DoDoSRV 连接发生错误:" + message);
}

public override void ChannelMessageEvent<T>(EventSubjectOutput<EventSubjectDataBusiness<EventBodyChannelMessage<T>>> input)
{
var eventBody = input.Data.EventBody;
Expand Down

0 comments on commit b25827a

Please sign in to comment.