forked from project-redbud/FunGame-Core
添加新的枚举、字符常量和方法 (#59)
* 添加大量新的枚举,添加缺少的枚举字符串,修改枚举转字符串方法的位置 * 添加StartGame和Gaming的SocketHandler方法 * 添加MainInvokeType.StartGame * 优化代码格式 * 添加默认的User.ToString() * 添加EndGame * 添加GameMode.GetTypeString * 添加GameMode.GetRoomType
This commit is contained in:
parent
5341e1734a
commit
e7214c3fb9
@ -87,7 +87,7 @@ namespace Milimoe.FunGame.Core.Api.Transmittal
|
|||||||
Worker.SendRequest();
|
Worker.SendRequest();
|
||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 异步向服务器发送数据请求
|
/// 异步向服务器发送数据请求
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -142,7 +142,7 @@ namespace Milimoe.FunGame.Core.Api.Transmittal
|
|||||||
_Error = e.GetErrorInfo();
|
_Error = e.GetErrorInfo();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task SendRequestAsync()
|
public async Task SendRequestAsync()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@ -195,34 +195,6 @@ namespace Milimoe.FunGame.Core.Api.Transmittal
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取Type的等效字符串
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="type"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public static string GetTypeString(DataRequestType type)
|
|
||||||
{
|
|
||||||
return type switch
|
|
||||||
{
|
|
||||||
DataRequestType.RunTime_Logout => DataRequestSet.RunTime_Logout,
|
|
||||||
DataRequestType.Main_GetNotice => DataRequestSet.Main_GetNotice,
|
|
||||||
DataRequestType.Main_CreateRoom => DataRequestSet.Main_CreateRoom,
|
|
||||||
DataRequestType.Main_UpdateRoom => DataRequestSet.Main_UpdateRoom,
|
|
||||||
DataRequestType.Main_IntoRoom => DataRequestSet.Main_IntoRoom,
|
|
||||||
DataRequestType.Main_QuitRoom => DataRequestSet.Main_QuitRoom,
|
|
||||||
DataRequestType.Main_MatchRoom => DataRequestSet.Main_MatchRoom,
|
|
||||||
DataRequestType.Main_Chat => DataRequestSet.Main_Chat,
|
|
||||||
DataRequestType.Reg_GetRegVerifyCode => DataRequestSet.Reg_GetRegVerifyCode,
|
|
||||||
DataRequestType.Login_Login => DataRequestSet.Login_Login,
|
|
||||||
DataRequestType.Login_GetFindPasswordVerifyCode => DataRequestSet.Login_GetFindPasswordVerifyCode,
|
|
||||||
DataRequestType.Login_UpdatePassword => DataRequestSet.Login_UpdatePassword,
|
|
||||||
DataRequestType.Room_GetRoomSettings => DataRequestSet.Room_GetRoomSettings,
|
|
||||||
DataRequestType.Room_GetRoomPlayerCount => DataRequestSet.Room_GetRoomPlayerCount,
|
|
||||||
DataRequestType.Room_UpdateRoomMaster => DataRequestSet.Room_UpdateRoomMaster,
|
|
||||||
_ => DataRequestSet.UnKnown
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 反序列化Hashtable中的Json对象
|
/// 反序列化Hashtable中的Json对象
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@ -57,7 +57,7 @@ namespace Milimoe.FunGame.Core.Api.Transmittal
|
|||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 执行指定的命令查询DataRow(可选实现)
|
/// 执行指定的命令查询DataRow(可选实现)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
using System;
|
using System.Data;
|
||||||
using System.Data;
|
|
||||||
using Milimoe.FunGame.Core.Api.Factory;
|
using Milimoe.FunGame.Core.Api.Factory;
|
||||||
using Milimoe.FunGame.Core.Entity;
|
using Milimoe.FunGame.Core.Entity;
|
||||||
using Milimoe.FunGame.Core.Library.Constant;
|
using Milimoe.FunGame.Core.Library.Constant;
|
||||||
@ -156,7 +155,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
{
|
{
|
||||||
return SkillFactory.Create(type);
|
return SkillFactory.Create(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取主动技能实例
|
/// 获取主动技能实例
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -165,7 +164,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
{
|
{
|
||||||
return (ActiveSkill)SkillFactory.Create(SkillType.Active);
|
return (ActiveSkill)SkillFactory.Create(SkillType.Active);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取被动技能实例
|
/// 获取被动技能实例
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
using Milimoe.FunGame.Core.Library.Constant;
|
using System.Reflection;
|
||||||
using System.Reflection;
|
using Milimoe.FunGame.Core.Library.Constant;
|
||||||
|
|
||||||
namespace Milimoe.FunGame.Core.Api.Utility
|
namespace Milimoe.FunGame.Core.Api.Utility
|
||||||
{
|
{
|
||||||
@ -88,7 +88,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
return value;
|
return value;
|
||||||
else return null;
|
else return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Linq;
|
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
using System.Text.Json.Serialization;
|
using System.Text.Json.Serialization;
|
||||||
using Milimoe.FunGame.Core.Library.Common.Architecture;
|
using Milimoe.FunGame.Core.Library.Common.Architecture;
|
||||||
@ -31,7 +30,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
if (!JsonSerializerOptions.Converters.Contains(converter))
|
if (!JsonSerializerOptions.Converters.Contains(converter))
|
||||||
JsonSerializerOptions.Converters.Add(converter);
|
JsonSerializerOptions.Converters.Add(converter);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 注册多个自定义转换器,支持 <see cref="BaseEntityConverter{T}"/>
|
/// 注册多个自定义转换器,支持 <see cref="BaseEntityConverter{T}"/>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@ -20,7 +20,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
return loader;
|
return loader;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnBeforeConnectEvent(object sender,ConnectEventArgs e)
|
public void OnBeforeConnectEvent(object sender, ConnectEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -28,7 +28,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnAfterConnectEvent(object sender,ConnectEventArgs e)
|
public void OnAfterConnectEvent(object sender, ConnectEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -36,7 +36,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnSucceedConnectEvent(object sender,ConnectEventArgs e)
|
public void OnSucceedConnectEvent(object sender, ConnectEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -44,7 +44,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnFailedConnectEvent(object sender,ConnectEventArgs e)
|
public void OnFailedConnectEvent(object sender, ConnectEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -52,7 +52,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnBeforeDisconnectEvent(object sender,GeneralEventArgs e)
|
public void OnBeforeDisconnectEvent(object sender, GeneralEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -60,7 +60,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnAfterDisconnectEvent(object sender,GeneralEventArgs e)
|
public void OnAfterDisconnectEvent(object sender, GeneralEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -68,7 +68,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnSucceedDisconnectEvent(object sender,GeneralEventArgs e)
|
public void OnSucceedDisconnectEvent(object sender, GeneralEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -76,7 +76,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnFailedDisconnectEvent(object sender,GeneralEventArgs e)
|
public void OnFailedDisconnectEvent(object sender, GeneralEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -84,7 +84,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnBeforeLoginEvent(object sender,LoginEventArgs e)
|
public void OnBeforeLoginEvent(object sender, LoginEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -92,7 +92,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnAfterLoginEvent(object sender,LoginEventArgs e)
|
public void OnAfterLoginEvent(object sender, LoginEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -100,7 +100,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnSucceedLoginEvent(object sender,LoginEventArgs e)
|
public void OnSucceedLoginEvent(object sender, LoginEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -108,7 +108,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnFailedLoginEvent(object sender,LoginEventArgs e)
|
public void OnFailedLoginEvent(object sender, LoginEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -116,7 +116,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnBeforeLogoutEvent(object sender,GeneralEventArgs e)
|
public void OnBeforeLogoutEvent(object sender, GeneralEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -124,7 +124,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnAfterLogoutEvent(object sender,GeneralEventArgs e)
|
public void OnAfterLogoutEvent(object sender, GeneralEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -132,7 +132,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnSucceedLogoutEvent(object sender,GeneralEventArgs e)
|
public void OnSucceedLogoutEvent(object sender, GeneralEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -140,7 +140,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnFailedLogoutEvent(object sender,GeneralEventArgs e)
|
public void OnFailedLogoutEvent(object sender, GeneralEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -148,7 +148,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnBeforeRegEvent(object sender,RegisterEventArgs e)
|
public void OnBeforeRegEvent(object sender, RegisterEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -156,7 +156,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnAfterRegEvent(object sender,RegisterEventArgs e)
|
public void OnAfterRegEvent(object sender, RegisterEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -164,7 +164,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnSucceedRegEvent(object sender,RegisterEventArgs e)
|
public void OnSucceedRegEvent(object sender, RegisterEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -172,7 +172,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnFailedRegEvent(object sender,RegisterEventArgs e)
|
public void OnFailedRegEvent(object sender, RegisterEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -180,7 +180,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnBeforeIntoRoomEvent(object sender,RoomEventArgs e)
|
public void OnBeforeIntoRoomEvent(object sender, RoomEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -188,7 +188,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnAfterIntoRoomEvent(object sender,RoomEventArgs e)
|
public void OnAfterIntoRoomEvent(object sender, RoomEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -196,7 +196,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnSucceedIntoRoomEvent(object sender,RoomEventArgs e)
|
public void OnSucceedIntoRoomEvent(object sender, RoomEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -204,7 +204,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnFailedIntoRoomEvent(object sender,RoomEventArgs e)
|
public void OnFailedIntoRoomEvent(object sender, RoomEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -212,7 +212,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnBeforeSendTalkEvent(object sender,SendTalkEventArgs e)
|
public void OnBeforeSendTalkEvent(object sender, SendTalkEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -220,7 +220,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnAfterSendTalkEvent(object sender,SendTalkEventArgs e)
|
public void OnAfterSendTalkEvent(object sender, SendTalkEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -228,7 +228,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnSucceedSendTalkEvent(object sender,SendTalkEventArgs e)
|
public void OnSucceedSendTalkEvent(object sender, SendTalkEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -236,7 +236,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnFailedSendTalkEvent(object sender,SendTalkEventArgs e)
|
public void OnFailedSendTalkEvent(object sender, SendTalkEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -244,7 +244,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnBeforeCreateRoomEvent(object sender,RoomEventArgs e)
|
public void OnBeforeCreateRoomEvent(object sender, RoomEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -252,7 +252,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnAfterCreateRoomEvent(object sender,RoomEventArgs e)
|
public void OnAfterCreateRoomEvent(object sender, RoomEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -260,7 +260,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnSucceedCreateRoomEvent(object sender,RoomEventArgs e)
|
public void OnSucceedCreateRoomEvent(object sender, RoomEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -268,7 +268,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnFailedCreateRoomEvent(object sender,RoomEventArgs e)
|
public void OnFailedCreateRoomEvent(object sender, RoomEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -276,7 +276,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnBeforeQuitRoomEvent(object sender,RoomEventArgs e)
|
public void OnBeforeQuitRoomEvent(object sender, RoomEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -284,7 +284,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnAfterQuitRoomEvent(object sender,RoomEventArgs e)
|
public void OnAfterQuitRoomEvent(object sender, RoomEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -292,7 +292,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnSucceedQuitRoomEvent(object sender,RoomEventArgs e)
|
public void OnSucceedQuitRoomEvent(object sender, RoomEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -300,7 +300,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnFailedQuitRoomEvent(object sender,RoomEventArgs e)
|
public void OnFailedQuitRoomEvent(object sender, RoomEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -308,7 +308,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnBeforeChangeRoomSettingEvent(object sender,GeneralEventArgs e)
|
public void OnBeforeChangeRoomSettingEvent(object sender, GeneralEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -316,7 +316,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnAfterChangeRoomSettingEvent(object sender,GeneralEventArgs e)
|
public void OnAfterChangeRoomSettingEvent(object sender, GeneralEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -324,7 +324,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnSucceedChangeRoomSettingEvent(object sender,GeneralEventArgs e)
|
public void OnSucceedChangeRoomSettingEvent(object sender, GeneralEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -332,7 +332,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnFailedChangeRoomSettingEvent(object sender,GeneralEventArgs e)
|
public void OnFailedChangeRoomSettingEvent(object sender, GeneralEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -340,7 +340,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnBeforeStartMatchEvent(object sender,GeneralEventArgs e)
|
public void OnBeforeStartMatchEvent(object sender, GeneralEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -348,7 +348,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnAfterStartMatchEvent(object sender,GeneralEventArgs e)
|
public void OnAfterStartMatchEvent(object sender, GeneralEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -356,7 +356,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnSucceedStartMatchEvent(object sender,GeneralEventArgs e)
|
public void OnSucceedStartMatchEvent(object sender, GeneralEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -364,7 +364,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnFailedStartMatchEvent(object sender,GeneralEventArgs e)
|
public void OnFailedStartMatchEvent(object sender, GeneralEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -372,7 +372,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnBeforeStartGameEvent(object sender,GeneralEventArgs e)
|
public void OnBeforeStartGameEvent(object sender, GeneralEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -380,7 +380,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnAfterStartGameEvent(object sender,GeneralEventArgs e)
|
public void OnAfterStartGameEvent(object sender, GeneralEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -388,7 +388,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnSucceedStartGameEvent(object sender,GeneralEventArgs e)
|
public void OnSucceedStartGameEvent(object sender, GeneralEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -396,7 +396,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnFailedStartGameEvent(object sender,GeneralEventArgs e)
|
public void OnFailedStartGameEvent(object sender, GeneralEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -404,7 +404,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnBeforeChangeProfileEvent(object sender,GeneralEventArgs e)
|
public void OnBeforeChangeProfileEvent(object sender, GeneralEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -412,7 +412,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnAfterChangeProfileEvent(object sender,GeneralEventArgs e)
|
public void OnAfterChangeProfileEvent(object sender, GeneralEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -420,7 +420,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnSucceedChangeProfileEvent(object sender,GeneralEventArgs e)
|
public void OnSucceedChangeProfileEvent(object sender, GeneralEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -428,7 +428,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnFailedChangeProfileEvent(object sender,GeneralEventArgs e)
|
public void OnFailedChangeProfileEvent(object sender, GeneralEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -436,7 +436,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnBeforeChangeAccountSettingEvent(object sender,GeneralEventArgs e)
|
public void OnBeforeChangeAccountSettingEvent(object sender, GeneralEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -444,7 +444,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnAfterChangeAccountSettingEvent(object sender,GeneralEventArgs e)
|
public void OnAfterChangeAccountSettingEvent(object sender, GeneralEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -452,7 +452,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnSucceedChangeAccountSettingEvent(object sender,GeneralEventArgs e)
|
public void OnSucceedChangeAccountSettingEvent(object sender, GeneralEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -460,7 +460,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnFailedChangeAccountSettingEvent(object sender,GeneralEventArgs e)
|
public void OnFailedChangeAccountSettingEvent(object sender, GeneralEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -468,7 +468,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnBeforeOpenInventoryEvent(object sender,GeneralEventArgs e)
|
public void OnBeforeOpenInventoryEvent(object sender, GeneralEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -476,7 +476,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnAfterOpenInventoryEvent(object sender,GeneralEventArgs e)
|
public void OnAfterOpenInventoryEvent(object sender, GeneralEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -484,7 +484,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnSucceedOpenInventoryEvent(object sender,GeneralEventArgs e)
|
public void OnSucceedOpenInventoryEvent(object sender, GeneralEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -492,7 +492,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnFailedOpenInventoryEvent(object sender,GeneralEventArgs e)
|
public void OnFailedOpenInventoryEvent(object sender, GeneralEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -500,7 +500,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnBeforeSignInEvent(object sender,GeneralEventArgs e)
|
public void OnBeforeSignInEvent(object sender, GeneralEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -508,7 +508,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnAfterSignInEvent(object sender,GeneralEventArgs e)
|
public void OnAfterSignInEvent(object sender, GeneralEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -516,7 +516,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnSucceedSignInEvent(object sender,GeneralEventArgs e)
|
public void OnSucceedSignInEvent(object sender, GeneralEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -524,7 +524,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnFailedSignInEvent(object sender,GeneralEventArgs e)
|
public void OnFailedSignInEvent(object sender, GeneralEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -532,7 +532,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnBeforeOpenStoreEvent(object sender,GeneralEventArgs e)
|
public void OnBeforeOpenStoreEvent(object sender, GeneralEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -540,7 +540,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnAfterOpenStoreEvent(object sender,GeneralEventArgs e)
|
public void OnAfterOpenStoreEvent(object sender, GeneralEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -548,7 +548,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnSucceedOpenStoreEvent(object sender,GeneralEventArgs e)
|
public void OnSucceedOpenStoreEvent(object sender, GeneralEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -556,7 +556,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnFailedOpenStoreEvent(object sender,GeneralEventArgs e)
|
public void OnFailedOpenStoreEvent(object sender, GeneralEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -564,7 +564,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnBeforeBuyItemEvent(object sender,GeneralEventArgs e)
|
public void OnBeforeBuyItemEvent(object sender, GeneralEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -572,7 +572,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnAfterBuyItemEvent(object sender,GeneralEventArgs e)
|
public void OnAfterBuyItemEvent(object sender, GeneralEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -580,7 +580,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnSucceedBuyItemEvent(object sender,GeneralEventArgs e)
|
public void OnSucceedBuyItemEvent(object sender, GeneralEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -588,7 +588,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnFailedBuyItemEvent(object sender,GeneralEventArgs e)
|
public void OnFailedBuyItemEvent(object sender, GeneralEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -596,7 +596,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnBeforeShowRankingEvent(object sender,GeneralEventArgs e)
|
public void OnBeforeShowRankingEvent(object sender, GeneralEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -604,7 +604,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnAfterShowRankingEvent(object sender,GeneralEventArgs e)
|
public void OnAfterShowRankingEvent(object sender, GeneralEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -612,7 +612,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnSucceedShowRankingEvent(object sender,GeneralEventArgs e)
|
public void OnSucceedShowRankingEvent(object sender, GeneralEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -620,7 +620,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnFailedShowRankingEvent(object sender,GeneralEventArgs e)
|
public void OnFailedShowRankingEvent(object sender, GeneralEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -628,7 +628,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnBeforeUseItemEvent(object sender,GeneralEventArgs e)
|
public void OnBeforeUseItemEvent(object sender, GeneralEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -636,7 +636,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnAfterUseItemEvent(object sender,GeneralEventArgs e)
|
public void OnAfterUseItemEvent(object sender, GeneralEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -644,7 +644,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnSucceedUseItemEvent(object sender,GeneralEventArgs e)
|
public void OnSucceedUseItemEvent(object sender, GeneralEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -652,7 +652,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnFailedUseItemEvent(object sender,GeneralEventArgs e)
|
public void OnFailedUseItemEvent(object sender, GeneralEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -660,7 +660,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnBeforeEndGameEvent(object sender,GeneralEventArgs e)
|
public void OnBeforeEndGameEvent(object sender, GeneralEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -668,7 +668,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnAfterEndGameEvent(object sender,GeneralEventArgs e)
|
public void OnAfterEndGameEvent(object sender, GeneralEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -676,7 +676,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnSucceedEndGameEvent(object sender,GeneralEventArgs e)
|
public void OnSucceedEndGameEvent(object sender, GeneralEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
@ -684,7 +684,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnFailedEndGameEvent(object sender,GeneralEventArgs e)
|
public void OnFailedEndGameEvent(object sender, GeneralEventArgs e)
|
||||||
{
|
{
|
||||||
Parallel.ForEach(Plugins.Values, plugin =>
|
Parallel.ForEach(Plugins.Values, plugin =>
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,6 +1,4 @@
|
|||||||
using System.IO;
|
using System.Runtime.InteropServices;
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
using System.Text;
|
|
||||||
using Milimoe.FunGame.Core.Library.Constant;
|
using Milimoe.FunGame.Core.Library.Constant;
|
||||||
|
|
||||||
namespace Milimoe.FunGame.Core.Api.Utility
|
namespace Milimoe.FunGame.Core.Api.Utility
|
||||||
@ -138,7 +136,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
public static string ReadTXT(string filename, string path = "")
|
public static string ReadTXT(string filename, string path = "")
|
||||||
{
|
{
|
||||||
if (path.Trim() != "") path = Path.Combine(path, filename);
|
if (path.Trim() != "") path = Path.Combine(path, filename);
|
||||||
else path = $@"{Environment.CurrentDirectory}\{filename}";
|
else path = $@"{Environment.CurrentDirectory}\{filename}";
|
||||||
if (File.Exists(path))
|
if (File.Exists(path))
|
||||||
{
|
{
|
||||||
string s = "";
|
string s = "";
|
||||||
|
|||||||
@ -19,7 +19,7 @@ namespace Milimoe.FunGame.Core.Api.Utility
|
|||||||
/// 不使用SQL模式
|
/// 不使用SQL模式
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public TwoFactorAuthenticator() { }
|
public TwoFactorAuthenticator() { }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 使用SQL模式 记录对应账号的密文到数据库中
|
/// 使用SQL模式 记录对应账号的密文到数据库中
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@ -167,7 +167,7 @@ namespace Milimoe.FunGame.Core.Controller
|
|||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 此方法将在连接服务器后触发(Connect结果返回前)<para/>
|
/// 此方法将在连接服务器后触发(Connect结果返回前)<para/>
|
||||||
/// 客户端可以重写此方法
|
/// 客户端可以重写此方法
|
||||||
@ -240,7 +240,7 @@ namespace Milimoe.FunGame.Core.Controller
|
|||||||
}
|
}
|
||||||
throw new ConnectFailedException();
|
throw new ConnectFailedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 基于本地已连接的Socket创建长时间运行的数据请求
|
/// 基于本地已连接的Socket创建长时间运行的数据请求
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -310,7 +310,7 @@ namespace Milimoe.FunGame.Core.Controller
|
|||||||
Close();
|
Close();
|
||||||
SocketHandler_Disconnect(ServerMessage);
|
SocketHandler_Disconnect(ServerMessage);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SocketMessageType.System:
|
case SocketMessageType.System:
|
||||||
SocketHandler_System(ServerMessage);
|
SocketHandler_System(ServerMessage);
|
||||||
break;
|
break;
|
||||||
@ -318,23 +318,35 @@ namespace Milimoe.FunGame.Core.Controller
|
|||||||
case SocketMessageType.HeartBeat:
|
case SocketMessageType.HeartBeat:
|
||||||
SocketHandler_HeartBeat(ServerMessage);
|
SocketHandler_HeartBeat(ServerMessage);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SocketMessageType.ForceLogout:
|
case SocketMessageType.ForceLogout:
|
||||||
SocketHandler_ForceLogout(ServerMessage);
|
SocketHandler_ForceLogout(ServerMessage);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SocketMessageType.Chat:
|
case SocketMessageType.Chat:
|
||||||
SocketHandler_Chat(ServerMessage);
|
SocketHandler_Chat(ServerMessage);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SocketMessageType.UpdateRoomMaster:
|
case SocketMessageType.UpdateRoomMaster:
|
||||||
SocketHandler_UpdateRoomMaster(ServerMessage);
|
SocketHandler_UpdateRoomMaster(ServerMessage);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SocketMessageType.MatchRoom:
|
case SocketMessageType.MatchRoom:
|
||||||
SocketHandler_MatchRoom(ServerMessage);
|
SocketHandler_MatchRoom(ServerMessage);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case SocketMessageType.StartGame:
|
||||||
|
SocketHandler_StartGame(ServerMessage);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SocketMessageType.EndGame:
|
||||||
|
SocketHandler_EndGame(ServerMessage);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SocketMessageType.Gaming:
|
||||||
|
SocketHandler_Gaming(ServerMessage);
|
||||||
|
break;
|
||||||
|
|
||||||
case SocketMessageType.Unknown:
|
case SocketMessageType.Unknown:
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
@ -390,5 +402,23 @@ namespace Milimoe.FunGame.Core.Controller
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="ServerMessage"></param>
|
/// <param name="ServerMessage"></param>
|
||||||
protected abstract void SocketHandler_MatchRoom(SocketObject ServerMessage);
|
protected abstract void SocketHandler_MatchRoom(SocketObject ServerMessage);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 客户端接收到开始游戏信息后的处理方法
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="ServerMessage"></param>
|
||||||
|
protected abstract void SocketHandler_StartGame(SocketObject ServerMessage);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 客户端接收到游戏结束信息后的处理方法
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="ServerMessage"></param>
|
||||||
|
protected abstract void SocketHandler_EndGame(SocketObject ServerMessage);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 客户端接收到局内消息后的处理方法
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="ServerMessage"></param>
|
||||||
|
protected abstract void SocketHandler_Gaming(SocketObject ServerMessage);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
using System.Collections;
|
using Milimoe.FunGame.Core.Interface.Entity;
|
||||||
using Milimoe.FunGame.Core.Interface.Entity;
|
|
||||||
|
|
||||||
namespace Milimoe.FunGame.Core.Entity
|
namespace Milimoe.FunGame.Core.Entity
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
using Milimoe.FunGame.Core.Library.Constant;
|
using System.Collections;
|
||||||
using System.Collections;
|
using Milimoe.FunGame.Core.Library.Constant;
|
||||||
|
|
||||||
namespace Milimoe.FunGame.Core.Entity
|
namespace Milimoe.FunGame.Core.Entity
|
||||||
{
|
{
|
||||||
@ -55,7 +55,7 @@ namespace Milimoe.FunGame.Core.Entity
|
|||||||
|
|
||||||
internal Character()
|
internal Character()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,7 +6,7 @@ namespace Milimoe.FunGame.Core.Entity
|
|||||||
public class Room : BaseEntity
|
public class Room : BaseEntity
|
||||||
{
|
{
|
||||||
public static readonly Room Empty = new();
|
public static readonly Room Empty = new();
|
||||||
public override long Id { get => base.Id ; set => base.Id = value; }
|
public override long Id { get => base.Id; set => base.Id = value; }
|
||||||
public string Roomid { get; set; } = "-1";
|
public string Roomid { get; set; } = "-1";
|
||||||
public DateTime CreateTime { get; set; } = General.DefaultTime;
|
public DateTime CreateTime { get; set; } = General.DefaultTime;
|
||||||
public User RoomMaster { get; set; } = General.UnknownUserInstance;
|
public User RoomMaster { get; set; } = General.UnknownUserInstance;
|
||||||
|
|||||||
@ -52,5 +52,15 @@ namespace Milimoe.FunGame.Core.Entity
|
|||||||
if (((User)other).Id == Id) return true;
|
if (((User)other).Id == Id) return true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override string ToString()
|
||||||
|
{
|
||||||
|
string str = Username;
|
||||||
|
if (NickName != "")
|
||||||
|
{
|
||||||
|
str += " ( " + NickName + " ) ";
|
||||||
|
}
|
||||||
|
return str;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,4 @@
|
|||||||
using Milimoe.FunGame.Core.Library.Constant;
|
namespace Milimoe.FunGame.Core.Interface.Base
|
||||||
|
|
||||||
namespace Milimoe.FunGame.Core.Interface.Base
|
|
||||||
{
|
{
|
||||||
public interface IMailSender
|
public interface IMailSender
|
||||||
{
|
{
|
||||||
|
|||||||
@ -25,10 +25,10 @@ namespace Milimoe.FunGame.Core.Interface
|
|||||||
public event SucceedEventHandler? SucceedConnect;
|
public event SucceedEventHandler? SucceedConnect;
|
||||||
public event FailedEventHandler? FailedConnect;
|
public event FailedEventHandler? FailedConnect;
|
||||||
|
|
||||||
public void OnBeforeConnectEvent(object sender,ConnectEventArgs e);
|
public void OnBeforeConnectEvent(object sender, ConnectEventArgs e);
|
||||||
public void OnAfterConnectEvent(object sender,ConnectEventArgs e);
|
public void OnAfterConnectEvent(object sender, ConnectEventArgs e);
|
||||||
public void OnSucceedConnectEvent(object sender,ConnectEventArgs e);
|
public void OnSucceedConnectEvent(object sender, ConnectEventArgs e);
|
||||||
public void OnFailedConnectEvent(object sender,ConnectEventArgs e);
|
public void OnFailedConnectEvent(object sender, ConnectEventArgs e);
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface IDisconnectEventHandler : IEventHandler
|
public interface IDisconnectEventHandler : IEventHandler
|
||||||
@ -38,10 +38,10 @@ namespace Milimoe.FunGame.Core.Interface
|
|||||||
public event SucceedEventHandler? SucceedDisconnect;
|
public event SucceedEventHandler? SucceedDisconnect;
|
||||||
public event FailedEventHandler? FailedDisconnect;
|
public event FailedEventHandler? FailedDisconnect;
|
||||||
|
|
||||||
public void OnBeforeDisconnectEvent(object sender,GeneralEventArgs e);
|
public void OnBeforeDisconnectEvent(object sender, GeneralEventArgs e);
|
||||||
public void OnAfterDisconnectEvent(object sender,GeneralEventArgs e);
|
public void OnAfterDisconnectEvent(object sender, GeneralEventArgs e);
|
||||||
public void OnSucceedDisconnectEvent(object sender,GeneralEventArgs e);
|
public void OnSucceedDisconnectEvent(object sender, GeneralEventArgs e);
|
||||||
public void OnFailedDisconnectEvent(object sender,GeneralEventArgs e);
|
public void OnFailedDisconnectEvent(object sender, GeneralEventArgs e);
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface ILoginEventHandler : IEventHandler
|
public interface ILoginEventHandler : IEventHandler
|
||||||
@ -56,10 +56,10 @@ namespace Milimoe.FunGame.Core.Interface
|
|||||||
public event SucceedEventHandler? SucceedLogin;
|
public event SucceedEventHandler? SucceedLogin;
|
||||||
public event FailedEventHandler? FailedLogin;
|
public event FailedEventHandler? FailedLogin;
|
||||||
|
|
||||||
public void OnBeforeLoginEvent(object sender,LoginEventArgs e);
|
public void OnBeforeLoginEvent(object sender, LoginEventArgs e);
|
||||||
public void OnAfterLoginEvent(object sender,LoginEventArgs e);
|
public void OnAfterLoginEvent(object sender, LoginEventArgs e);
|
||||||
public void OnSucceedLoginEvent(object sender,LoginEventArgs e);
|
public void OnSucceedLoginEvent(object sender, LoginEventArgs e);
|
||||||
public void OnFailedLoginEvent(object sender,LoginEventArgs e);
|
public void OnFailedLoginEvent(object sender, LoginEventArgs e);
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface ILogoutEventHandler : IEventHandler
|
public interface ILogoutEventHandler : IEventHandler
|
||||||
@ -69,10 +69,10 @@ namespace Milimoe.FunGame.Core.Interface
|
|||||||
public event SucceedEventHandler? SucceedLogout;
|
public event SucceedEventHandler? SucceedLogout;
|
||||||
public event FailedEventHandler? FailedLogout;
|
public event FailedEventHandler? FailedLogout;
|
||||||
|
|
||||||
public void OnBeforeLogoutEvent(object sender,GeneralEventArgs e);
|
public void OnBeforeLogoutEvent(object sender, GeneralEventArgs e);
|
||||||
public void OnAfterLogoutEvent(object sender,GeneralEventArgs e);
|
public void OnAfterLogoutEvent(object sender, GeneralEventArgs e);
|
||||||
public void OnSucceedLogoutEvent(object sender,GeneralEventArgs e);
|
public void OnSucceedLogoutEvent(object sender, GeneralEventArgs e);
|
||||||
public void OnFailedLogoutEvent(object sender,GeneralEventArgs e);
|
public void OnFailedLogoutEvent(object sender, GeneralEventArgs e);
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface IRegEventHandler : IEventHandler
|
public interface IRegEventHandler : IEventHandler
|
||||||
@ -87,10 +87,10 @@ namespace Milimoe.FunGame.Core.Interface
|
|||||||
public event SucceedEventHandler? SucceedReg;
|
public event SucceedEventHandler? SucceedReg;
|
||||||
public event FailedEventHandler? FailedReg;
|
public event FailedEventHandler? FailedReg;
|
||||||
|
|
||||||
public void OnBeforeRegEvent(object sender,RegisterEventArgs e);
|
public void OnBeforeRegEvent(object sender, RegisterEventArgs e);
|
||||||
public void OnAfterRegEvent(object sender,RegisterEventArgs e);
|
public void OnAfterRegEvent(object sender, RegisterEventArgs e);
|
||||||
public void OnSucceedRegEvent(object sender,RegisterEventArgs e);
|
public void OnSucceedRegEvent(object sender, RegisterEventArgs e);
|
||||||
public void OnFailedRegEvent(object sender,RegisterEventArgs e);
|
public void OnFailedRegEvent(object sender, RegisterEventArgs e);
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface IIntoRoomEventHandler : IEventHandler
|
public interface IIntoRoomEventHandler : IEventHandler
|
||||||
@ -105,10 +105,10 @@ namespace Milimoe.FunGame.Core.Interface
|
|||||||
public event SucceedEventHandler? SucceedIntoRoom;
|
public event SucceedEventHandler? SucceedIntoRoom;
|
||||||
public event FailedEventHandler? FailedIntoRoom;
|
public event FailedEventHandler? FailedIntoRoom;
|
||||||
|
|
||||||
public void OnBeforeIntoRoomEvent(object sender,RoomEventArgs e);
|
public void OnBeforeIntoRoomEvent(object sender, RoomEventArgs e);
|
||||||
public void OnAfterIntoRoomEvent(object sender,RoomEventArgs e);
|
public void OnAfterIntoRoomEvent(object sender, RoomEventArgs e);
|
||||||
public void OnSucceedIntoRoomEvent(object sender,RoomEventArgs e);
|
public void OnSucceedIntoRoomEvent(object sender, RoomEventArgs e);
|
||||||
public void OnFailedIntoRoomEvent(object sender,RoomEventArgs e);
|
public void OnFailedIntoRoomEvent(object sender, RoomEventArgs e);
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface ISendTalkEventHandler : IEventHandler
|
public interface ISendTalkEventHandler : IEventHandler
|
||||||
@ -123,10 +123,10 @@ namespace Milimoe.FunGame.Core.Interface
|
|||||||
public event SucceedEventHandler? SucceedSendTalk;
|
public event SucceedEventHandler? SucceedSendTalk;
|
||||||
public event FailedEventHandler? FailedSendTalk;
|
public event FailedEventHandler? FailedSendTalk;
|
||||||
|
|
||||||
public void OnBeforeSendTalkEvent(object sender,SendTalkEventArgs e);
|
public void OnBeforeSendTalkEvent(object sender, SendTalkEventArgs e);
|
||||||
public void OnAfterSendTalkEvent(object sender,SendTalkEventArgs e);
|
public void OnAfterSendTalkEvent(object sender, SendTalkEventArgs e);
|
||||||
public void OnSucceedSendTalkEvent(object sender,SendTalkEventArgs e);
|
public void OnSucceedSendTalkEvent(object sender, SendTalkEventArgs e);
|
||||||
public void OnFailedSendTalkEvent(object sender,SendTalkEventArgs e);
|
public void OnFailedSendTalkEvent(object sender, SendTalkEventArgs e);
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface ICreateRoomEventHandler : IEventHandler
|
public interface ICreateRoomEventHandler : IEventHandler
|
||||||
@ -141,10 +141,10 @@ namespace Milimoe.FunGame.Core.Interface
|
|||||||
public event SucceedEventHandler? SucceedCreateRoom;
|
public event SucceedEventHandler? SucceedCreateRoom;
|
||||||
public event FailedEventHandler? FailedCreateRoom;
|
public event FailedEventHandler? FailedCreateRoom;
|
||||||
|
|
||||||
public void OnBeforeCreateRoomEvent(object sender,RoomEventArgs e);
|
public void OnBeforeCreateRoomEvent(object sender, RoomEventArgs e);
|
||||||
public void OnAfterCreateRoomEvent(object sender,RoomEventArgs e);
|
public void OnAfterCreateRoomEvent(object sender, RoomEventArgs e);
|
||||||
public void OnSucceedCreateRoomEvent(object sender,RoomEventArgs e);
|
public void OnSucceedCreateRoomEvent(object sender, RoomEventArgs e);
|
||||||
public void OnFailedCreateRoomEvent(object sender,RoomEventArgs e);
|
public void OnFailedCreateRoomEvent(object sender, RoomEventArgs e);
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface IQuitRoomEventHandler : IEventHandler
|
public interface IQuitRoomEventHandler : IEventHandler
|
||||||
@ -159,10 +159,10 @@ namespace Milimoe.FunGame.Core.Interface
|
|||||||
public event SucceedEventHandler? SucceedQuitRoom;
|
public event SucceedEventHandler? SucceedQuitRoom;
|
||||||
public event FailedEventHandler? FailedQuitRoom;
|
public event FailedEventHandler? FailedQuitRoom;
|
||||||
|
|
||||||
public void OnBeforeQuitRoomEvent(object sender,RoomEventArgs e);
|
public void OnBeforeQuitRoomEvent(object sender, RoomEventArgs e);
|
||||||
public void OnAfterQuitRoomEvent(object sender,RoomEventArgs e);
|
public void OnAfterQuitRoomEvent(object sender, RoomEventArgs e);
|
||||||
public void OnSucceedQuitRoomEvent(object sender,RoomEventArgs e);
|
public void OnSucceedQuitRoomEvent(object sender, RoomEventArgs e);
|
||||||
public void OnFailedQuitRoomEvent(object sender,RoomEventArgs e);
|
public void OnFailedQuitRoomEvent(object sender, RoomEventArgs e);
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface IChangeRoomSettingEventHandler : IEventHandler
|
public interface IChangeRoomSettingEventHandler : IEventHandler
|
||||||
@ -172,10 +172,10 @@ namespace Milimoe.FunGame.Core.Interface
|
|||||||
public event SucceedEventHandler? SucceedChangeRoomSetting;
|
public event SucceedEventHandler? SucceedChangeRoomSetting;
|
||||||
public event FailedEventHandler? FailedChangeRoomSetting;
|
public event FailedEventHandler? FailedChangeRoomSetting;
|
||||||
|
|
||||||
public void OnBeforeChangeRoomSettingEvent(object sender,GeneralEventArgs e);
|
public void OnBeforeChangeRoomSettingEvent(object sender, GeneralEventArgs e);
|
||||||
public void OnAfterChangeRoomSettingEvent(object sender,GeneralEventArgs e);
|
public void OnAfterChangeRoomSettingEvent(object sender, GeneralEventArgs e);
|
||||||
public void OnSucceedChangeRoomSettingEvent(object sender,GeneralEventArgs e);
|
public void OnSucceedChangeRoomSettingEvent(object sender, GeneralEventArgs e);
|
||||||
public void OnFailedChangeRoomSettingEvent(object sender,GeneralEventArgs e);
|
public void OnFailedChangeRoomSettingEvent(object sender, GeneralEventArgs e);
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface IStartMatchEventHandler : IEventHandler
|
public interface IStartMatchEventHandler : IEventHandler
|
||||||
@ -185,10 +185,10 @@ namespace Milimoe.FunGame.Core.Interface
|
|||||||
public event SucceedEventHandler? SucceedStartMatch;
|
public event SucceedEventHandler? SucceedStartMatch;
|
||||||
public event FailedEventHandler? FailedStartMatch;
|
public event FailedEventHandler? FailedStartMatch;
|
||||||
|
|
||||||
public void OnBeforeStartMatchEvent(object sender,GeneralEventArgs e);
|
public void OnBeforeStartMatchEvent(object sender, GeneralEventArgs e);
|
||||||
public void OnAfterStartMatchEvent(object sender,GeneralEventArgs e);
|
public void OnAfterStartMatchEvent(object sender, GeneralEventArgs e);
|
||||||
public void OnSucceedStartMatchEvent(object sender,GeneralEventArgs e);
|
public void OnSucceedStartMatchEvent(object sender, GeneralEventArgs e);
|
||||||
public void OnFailedStartMatchEvent(object sender,GeneralEventArgs e);
|
public void OnFailedStartMatchEvent(object sender, GeneralEventArgs e);
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface IStartGameEventHandler : IEventHandler
|
public interface IStartGameEventHandler : IEventHandler
|
||||||
@ -198,10 +198,10 @@ namespace Milimoe.FunGame.Core.Interface
|
|||||||
public event SucceedEventHandler? SucceedStartGame;
|
public event SucceedEventHandler? SucceedStartGame;
|
||||||
public event FailedEventHandler? FailedStartGame;
|
public event FailedEventHandler? FailedStartGame;
|
||||||
|
|
||||||
public void OnBeforeStartGameEvent(object sender,GeneralEventArgs e);
|
public void OnBeforeStartGameEvent(object sender, GeneralEventArgs e);
|
||||||
public void OnAfterStartGameEvent(object sender,GeneralEventArgs e);
|
public void OnAfterStartGameEvent(object sender, GeneralEventArgs e);
|
||||||
public void OnSucceedStartGameEvent(object sender,GeneralEventArgs e);
|
public void OnSucceedStartGameEvent(object sender, GeneralEventArgs e);
|
||||||
public void OnFailedStartGameEvent(object sender,GeneralEventArgs e);
|
public void OnFailedStartGameEvent(object sender, GeneralEventArgs e);
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface IChangeProfileEventHandler : IEventHandler
|
public interface IChangeProfileEventHandler : IEventHandler
|
||||||
@ -211,10 +211,10 @@ namespace Milimoe.FunGame.Core.Interface
|
|||||||
public event SucceedEventHandler? SucceedChangeProfile;
|
public event SucceedEventHandler? SucceedChangeProfile;
|
||||||
public event FailedEventHandler? FailedChangeProfile;
|
public event FailedEventHandler? FailedChangeProfile;
|
||||||
|
|
||||||
public void OnBeforeChangeProfileEvent(object sender,GeneralEventArgs e);
|
public void OnBeforeChangeProfileEvent(object sender, GeneralEventArgs e);
|
||||||
public void OnAfterChangeProfileEvent(object sender,GeneralEventArgs e);
|
public void OnAfterChangeProfileEvent(object sender, GeneralEventArgs e);
|
||||||
public void OnSucceedChangeProfileEvent(object sender,GeneralEventArgs e);
|
public void OnSucceedChangeProfileEvent(object sender, GeneralEventArgs e);
|
||||||
public void OnFailedChangeProfileEvent(object sender,GeneralEventArgs e);
|
public void OnFailedChangeProfileEvent(object sender, GeneralEventArgs e);
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface IChangeAccountSettingEventHandler : IEventHandler
|
public interface IChangeAccountSettingEventHandler : IEventHandler
|
||||||
@ -224,10 +224,10 @@ namespace Milimoe.FunGame.Core.Interface
|
|||||||
public event SucceedEventHandler? SucceedChangeAccountSetting;
|
public event SucceedEventHandler? SucceedChangeAccountSetting;
|
||||||
public event FailedEventHandler? FailedChangeAccountSetting;
|
public event FailedEventHandler? FailedChangeAccountSetting;
|
||||||
|
|
||||||
public void OnBeforeChangeAccountSettingEvent(object sender,GeneralEventArgs e);
|
public void OnBeforeChangeAccountSettingEvent(object sender, GeneralEventArgs e);
|
||||||
public void OnAfterChangeAccountSettingEvent(object sender,GeneralEventArgs e);
|
public void OnAfterChangeAccountSettingEvent(object sender, GeneralEventArgs e);
|
||||||
public void OnSucceedChangeAccountSettingEvent(object sender,GeneralEventArgs e);
|
public void OnSucceedChangeAccountSettingEvent(object sender, GeneralEventArgs e);
|
||||||
public void OnFailedChangeAccountSettingEvent(object sender,GeneralEventArgs e);
|
public void OnFailedChangeAccountSettingEvent(object sender, GeneralEventArgs e);
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface IOpenInventoryEventHandler : IEventHandler
|
public interface IOpenInventoryEventHandler : IEventHandler
|
||||||
@ -237,10 +237,10 @@ namespace Milimoe.FunGame.Core.Interface
|
|||||||
public event SucceedEventHandler? SucceedOpenInventory;
|
public event SucceedEventHandler? SucceedOpenInventory;
|
||||||
public event FailedEventHandler? FailedOpenInventory;
|
public event FailedEventHandler? FailedOpenInventory;
|
||||||
|
|
||||||
public void OnBeforeOpenInventoryEvent(object sender,GeneralEventArgs e);
|
public void OnBeforeOpenInventoryEvent(object sender, GeneralEventArgs e);
|
||||||
public void OnAfterOpenInventoryEvent(object sender,GeneralEventArgs e);
|
public void OnAfterOpenInventoryEvent(object sender, GeneralEventArgs e);
|
||||||
public void OnSucceedOpenInventoryEvent(object sender,GeneralEventArgs e);
|
public void OnSucceedOpenInventoryEvent(object sender, GeneralEventArgs e);
|
||||||
public void OnFailedOpenInventoryEvent(object sender,GeneralEventArgs e);
|
public void OnFailedOpenInventoryEvent(object sender, GeneralEventArgs e);
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface ISignInEventHandler : IEventHandler
|
public interface ISignInEventHandler : IEventHandler
|
||||||
@ -250,10 +250,10 @@ namespace Milimoe.FunGame.Core.Interface
|
|||||||
public event SucceedEventHandler? SucceedSignIn;
|
public event SucceedEventHandler? SucceedSignIn;
|
||||||
public event FailedEventHandler? FailedSignIn;
|
public event FailedEventHandler? FailedSignIn;
|
||||||
|
|
||||||
public void OnBeforeSignInEvent(object sender,GeneralEventArgs e);
|
public void OnBeforeSignInEvent(object sender, GeneralEventArgs e);
|
||||||
public void OnAfterSignInEvent(object sender,GeneralEventArgs e);
|
public void OnAfterSignInEvent(object sender, GeneralEventArgs e);
|
||||||
public void OnSucceedSignInEvent(object sender,GeneralEventArgs e);
|
public void OnSucceedSignInEvent(object sender, GeneralEventArgs e);
|
||||||
public void OnFailedSignInEvent(object sender,GeneralEventArgs e);
|
public void OnFailedSignInEvent(object sender, GeneralEventArgs e);
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface IOpenStoreEventHandler : IEventHandler
|
public interface IOpenStoreEventHandler : IEventHandler
|
||||||
@ -263,10 +263,10 @@ namespace Milimoe.FunGame.Core.Interface
|
|||||||
public event SucceedEventHandler? SucceedOpenStore;
|
public event SucceedEventHandler? SucceedOpenStore;
|
||||||
public event FailedEventHandler? FailedOpenStore;
|
public event FailedEventHandler? FailedOpenStore;
|
||||||
|
|
||||||
public void OnBeforeOpenStoreEvent(object sender,GeneralEventArgs e);
|
public void OnBeforeOpenStoreEvent(object sender, GeneralEventArgs e);
|
||||||
public void OnAfterOpenStoreEvent(object sender,GeneralEventArgs e);
|
public void OnAfterOpenStoreEvent(object sender, GeneralEventArgs e);
|
||||||
public void OnSucceedOpenStoreEvent(object sender,GeneralEventArgs e);
|
public void OnSucceedOpenStoreEvent(object sender, GeneralEventArgs e);
|
||||||
public void OnFailedOpenStoreEvent(object sender,GeneralEventArgs e);
|
public void OnFailedOpenStoreEvent(object sender, GeneralEventArgs e);
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface IBuyItemEventHandler : IEventHandler
|
public interface IBuyItemEventHandler : IEventHandler
|
||||||
@ -276,10 +276,10 @@ namespace Milimoe.FunGame.Core.Interface
|
|||||||
public event SucceedEventHandler? SucceedBuyItem;
|
public event SucceedEventHandler? SucceedBuyItem;
|
||||||
public event FailedEventHandler? FailedBuyItem;
|
public event FailedEventHandler? FailedBuyItem;
|
||||||
|
|
||||||
public void OnBeforeBuyItemEvent(object sender,GeneralEventArgs e);
|
public void OnBeforeBuyItemEvent(object sender, GeneralEventArgs e);
|
||||||
public void OnAfterBuyItemEvent(object sender,GeneralEventArgs e);
|
public void OnAfterBuyItemEvent(object sender, GeneralEventArgs e);
|
||||||
public void OnSucceedBuyItemEvent(object sender,GeneralEventArgs e);
|
public void OnSucceedBuyItemEvent(object sender, GeneralEventArgs e);
|
||||||
public void OnFailedBuyItemEvent(object sender,GeneralEventArgs e);
|
public void OnFailedBuyItemEvent(object sender, GeneralEventArgs e);
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface IShowRankingEventHandler : IEventHandler
|
public interface IShowRankingEventHandler : IEventHandler
|
||||||
@ -289,10 +289,10 @@ namespace Milimoe.FunGame.Core.Interface
|
|||||||
public event SucceedEventHandler? SucceedShowRanking;
|
public event SucceedEventHandler? SucceedShowRanking;
|
||||||
public event FailedEventHandler? FailedShowRanking;
|
public event FailedEventHandler? FailedShowRanking;
|
||||||
|
|
||||||
public void OnBeforeShowRankingEvent(object sender,GeneralEventArgs e);
|
public void OnBeforeShowRankingEvent(object sender, GeneralEventArgs e);
|
||||||
public void OnAfterShowRankingEvent(object sender,GeneralEventArgs e);
|
public void OnAfterShowRankingEvent(object sender, GeneralEventArgs e);
|
||||||
public void OnSucceedShowRankingEvent(object sender,GeneralEventArgs e);
|
public void OnSucceedShowRankingEvent(object sender, GeneralEventArgs e);
|
||||||
public void OnFailedShowRankingEvent(object sender,GeneralEventArgs e);
|
public void OnFailedShowRankingEvent(object sender, GeneralEventArgs e);
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface IUseItemEventHandler : IEventHandler
|
public interface IUseItemEventHandler : IEventHandler
|
||||||
@ -302,10 +302,10 @@ namespace Milimoe.FunGame.Core.Interface
|
|||||||
public event SucceedEventHandler? SucceedUseItem;
|
public event SucceedEventHandler? SucceedUseItem;
|
||||||
public event FailedEventHandler? FailedUseItem;
|
public event FailedEventHandler? FailedUseItem;
|
||||||
|
|
||||||
public void OnBeforeUseItemEvent(object sender,GeneralEventArgs e);
|
public void OnBeforeUseItemEvent(object sender, GeneralEventArgs e);
|
||||||
public void OnAfterUseItemEvent(object sender,GeneralEventArgs e);
|
public void OnAfterUseItemEvent(object sender, GeneralEventArgs e);
|
||||||
public void OnSucceedUseItemEvent(object sender,GeneralEventArgs e);
|
public void OnSucceedUseItemEvent(object sender, GeneralEventArgs e);
|
||||||
public void OnFailedUseItemEvent(object sender,GeneralEventArgs e);
|
public void OnFailedUseItemEvent(object sender, GeneralEventArgs e);
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface IEndGameEventHandler : IEventHandler
|
public interface IEndGameEventHandler : IEventHandler
|
||||||
@ -315,9 +315,9 @@ namespace Milimoe.FunGame.Core.Interface
|
|||||||
public event SucceedEventHandler? SucceedEndGame;
|
public event SucceedEventHandler? SucceedEndGame;
|
||||||
public event FailedEventHandler? FailedEndGame;
|
public event FailedEventHandler? FailedEndGame;
|
||||||
|
|
||||||
public void OnBeforeEndGameEvent(object sender,GeneralEventArgs e);
|
public void OnBeforeEndGameEvent(object sender, GeneralEventArgs e);
|
||||||
public void OnAfterEndGameEvent(object sender,GeneralEventArgs e);
|
public void OnAfterEndGameEvent(object sender, GeneralEventArgs e);
|
||||||
public void OnSucceedEndGameEvent(object sender,GeneralEventArgs e);
|
public void OnSucceedEndGameEvent(object sender, GeneralEventArgs e);
|
||||||
public void OnFailedEndGameEvent(object sender,GeneralEventArgs e);
|
public void OnFailedEndGameEvent(object sender, GeneralEventArgs e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,4 @@
|
|||||||
using Milimoe.FunGame.Core.Model;
|
namespace Milimoe.FunGame.Core.Library.Common.Architecture
|
||||||
|
|
||||||
namespace Milimoe.FunGame.Core.Library.Common.Architecture
|
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 继承这个类可以获得异步等待的功能
|
/// 继承这个类可以获得异步等待的功能
|
||||||
|
|||||||
@ -53,7 +53,7 @@ namespace Milimoe.FunGame.Core.Library.Common.Architecture
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool Authenticate(string username, string password)
|
public bool Authenticate(string username, string password)
|
||||||
{
|
{
|
||||||
if (!BeforeAuthenticator(AuthenticationType.Username, username, password)) return false;
|
if (!BeforeAuthenticator(AuthenticationType.Username, username, password)) return false;
|
||||||
|
|||||||
@ -11,7 +11,7 @@ namespace Milimoe.FunGame.Core.Library.Common.Architecture
|
|||||||
/// 任务是否完成
|
/// 任务是否完成
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public readonly bool IsCompleted => awaiter.IsCompleted;
|
public readonly bool IsCompleted => awaiter.IsCompleted;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 捕获到的异常
|
/// 捕获到的异常
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@ -25,7 +25,7 @@ namespace Milimoe.FunGame.Core.Library.Common.Network
|
|||||||
|
|
||||||
public ClientSocket(System.Net.Sockets.Socket Instance, int ServerPort, string ClientIP, string ClientName, Guid Token)
|
public ClientSocket(System.Net.Sockets.Socket Instance, int ServerPort, string ClientIP, string ClientName, Guid Token)
|
||||||
{
|
{
|
||||||
this.Instance= Instance;
|
this.Instance = Instance;
|
||||||
this.ServerPort = ServerPort;
|
this.ServerPort = ServerPort;
|
||||||
this.ClientIP = ClientIP;
|
this.ClientIP = ClientIP;
|
||||||
this._ClientName = ClientName;
|
this._ClientName = ClientName;
|
||||||
@ -49,7 +49,7 @@ namespace Milimoe.FunGame.Core.Library.Common.Network
|
|||||||
throw new SocketWrongInfoException();
|
throw new SocketWrongInfoException();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public SocketObject[] ReceiveArray()
|
public SocketObject[] ReceiveArray()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
|||||||
@ -65,7 +65,7 @@ namespace Milimoe.FunGame.Core.Library.Common.Network
|
|||||||
this.Sender = Sender.SmtpClientInfo.SenderMailAddress;
|
this.Sender = Sender.SmtpClientInfo.SenderMailAddress;
|
||||||
this.SenderName = Sender.SmtpClientInfo.SenderName;
|
this.SenderName = Sender.SmtpClientInfo.SenderName;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 使用地址和名称创建邮件对象
|
/// 使用地址和名称创建邮件对象
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@ -65,43 +65,43 @@ namespace Milimoe.FunGame.Core.Library.Common.Network
|
|||||||
name = name.ToLower();
|
name = name.ToLower();
|
||||||
return OnlineClients.Add(name, t);
|
return OnlineClients.Add(name, t);
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool RemoveClient(string name)
|
public bool RemoveClient(string name)
|
||||||
{
|
{
|
||||||
name = name.ToLower();
|
name = name.ToLower();
|
||||||
return OnlineClients.Remove(name);
|
return OnlineClients.Remove(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool ContainsClient(string name)
|
public bool ContainsClient(string name)
|
||||||
{
|
{
|
||||||
name = name.ToLower();
|
name = name.ToLower();
|
||||||
return OnlineClients.ContainsKey(name);
|
return OnlineClients.ContainsKey(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
public IServerModel GetClient(string name)
|
public IServerModel GetClient(string name)
|
||||||
{
|
{
|
||||||
name = name.ToLower();
|
name = name.ToLower();
|
||||||
return OnlineClients[name];
|
return OnlineClients[name];
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool AddUser(string name, IServerModel t)
|
public bool AddUser(string name, IServerModel t)
|
||||||
{
|
{
|
||||||
name = name.ToLower();
|
name = name.ToLower();
|
||||||
return OnlineUsers.Add(name, t);
|
return OnlineUsers.Add(name, t);
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool RemoveUser(string name)
|
public bool RemoveUser(string name)
|
||||||
{
|
{
|
||||||
name = name.ToLower();
|
name = name.ToLower();
|
||||||
return OnlineUsers.Remove(name);
|
return OnlineUsers.Remove(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool ContainsUser(string name)
|
public bool ContainsUser(string name)
|
||||||
{
|
{
|
||||||
name = name.ToLower();
|
name = name.ToLower();
|
||||||
return OnlineUsers.ContainsKey(name);
|
return OnlineUsers.ContainsKey(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
public IServerModel GetUser(string name)
|
public IServerModel GetUser(string name)
|
||||||
{
|
{
|
||||||
name = name.ToLower();
|
name = name.ToLower();
|
||||||
@ -113,9 +113,6 @@ namespace Milimoe.FunGame.Core.Library.Common.Network
|
|||||||
Instance?.Close();
|
Instance?.Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string GetTypeString(SocketMessageType type)
|
public static string GetTypeString(SocketMessageType type) => SocketSet.GetTypeString(type);
|
||||||
{
|
|
||||||
return Socket.GetTypeString(type);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -29,7 +29,7 @@ namespace Milimoe.FunGame.Core.Library.Common.Network
|
|||||||
private Socket(System.Net.Sockets.Socket Instance, string ServerIP, int ServerPort)
|
private Socket(System.Net.Sockets.Socket Instance, string ServerIP, int ServerPort)
|
||||||
{
|
{
|
||||||
this.Instance = Instance;
|
this.Instance = Instance;
|
||||||
this.ServerIP= ServerIP;
|
this.ServerIP = ServerIP;
|
||||||
this.ServerPort = ServerPort;
|
this.ServerPort = ServerPort;
|
||||||
this.StartSendingHeartBeat();
|
this.StartSendingHeartBeat();
|
||||||
}
|
}
|
||||||
@ -40,7 +40,7 @@ namespace Milimoe.FunGame.Core.Library.Common.Network
|
|||||||
if (socket != null) return new Socket(socket, IP, Port);
|
if (socket != null) return new Socket(socket, IP, Port);
|
||||||
else throw new ConnectFailedException();
|
else throw new ConnectFailedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
public SocketResult Send(SocketMessageType type, params object[] objs)
|
public SocketResult Send(SocketMessageType type, params object[] objs)
|
||||||
{
|
{
|
||||||
if (Instance != null)
|
if (Instance != null)
|
||||||
@ -71,7 +71,7 @@ namespace Milimoe.FunGame.Core.Library.Common.Network
|
|||||||
throw new SocketWrongInfoException();
|
throw new SocketWrongInfoException();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public SocketObject[] ReceiveArray()
|
public SocketObject[] ReceiveArray()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@ -156,7 +156,7 @@ namespace Milimoe.FunGame.Core.Library.Common.Network
|
|||||||
Thread.Sleep(100);
|
Thread.Sleep(100);
|
||||||
while (Connected)
|
while (Connected)
|
||||||
{
|
{
|
||||||
if (!SendingHeartBeat) _SendingHeartBeat= true;
|
if (!SendingHeartBeat) _SendingHeartBeat = true;
|
||||||
// 发送心跳包
|
// 发送心跳包
|
||||||
if (Send(SocketMessageType.HeartBeat) == SocketResult.Success)
|
if (Send(SocketMessageType.HeartBeat) == SocketResult.Success)
|
||||||
{
|
{
|
||||||
@ -179,9 +179,6 @@ namespace Milimoe.FunGame.Core.Library.Common.Network
|
|||||||
throw new LostConnectException();
|
throw new LostConnectException();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string GetTypeString(SocketMessageType type)
|
public static string GetTypeString(SocketMessageType type) => SocketSet.GetTypeString(type);
|
||||||
{
|
|
||||||
return SocketManager.GetTypeString(type);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -34,7 +34,7 @@ namespace Milimoe.FunGame.Core.Library.Common.Plugin
|
|||||||
|
|
||||||
public void SucceedLoginEvent(object sender, LoginEventArgs e)
|
public void SucceedLoginEvent(object sender, LoginEventArgs e)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -20,9 +20,7 @@ namespace Milimoe.FunGame.Core.Library.Constant
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 需要同步更新
|
/// 需要同步更新 <see cref="SocketMessageType"/>
|
||||||
/// Milimoe.FunGame.Core.Library.Constant.SocketMessageType,
|
|
||||||
/// Milimoe.FunGame.Core.Service.SocketManager.GetTypeString(SocketMessageType type)
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class SocketSet
|
public class SocketSet
|
||||||
{
|
{
|
||||||
@ -36,16 +34,44 @@ namespace Milimoe.FunGame.Core.Library.Constant
|
|||||||
public const string DataRequest = "DataRequest";
|
public const string DataRequest = "DataRequest";
|
||||||
public const string Connect = "Connect";
|
public const string Connect = "Connect";
|
||||||
public const string Disconnect = "Disconnect";
|
public const string Disconnect = "Disconnect";
|
||||||
|
public const string System = "System";
|
||||||
public const string HeartBeat = "HeartBeat";
|
public const string HeartBeat = "HeartBeat";
|
||||||
public const string ForceLogout = "ForceLogout";
|
public const string ForceLogout = "ForceLogout";
|
||||||
public const string Chat = "Chat";
|
public const string Chat = "Chat";
|
||||||
public const string UpdateRoomMaster = "UpdateRoomMaster";
|
public const string UpdateRoomMaster = "UpdateRoomMaster";
|
||||||
|
public const string MatchRoom = "MatchRoom";
|
||||||
|
public const string StartGame = "StartGame";
|
||||||
|
public const string EndGame = "EndGame";
|
||||||
|
public const string Gaming = "Gaming";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 将通信类型的枚举转换为字符串
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="type">通信类型</param>
|
||||||
|
/// <returns>等效字符串</returns>
|
||||||
|
public static string GetTypeString(SocketMessageType type)
|
||||||
|
{
|
||||||
|
return type switch
|
||||||
|
{
|
||||||
|
SocketMessageType.DataRequest => DataRequest,
|
||||||
|
SocketMessageType.Connect => Connect,
|
||||||
|
SocketMessageType.Disconnect => Disconnect,
|
||||||
|
SocketMessageType.System => System,
|
||||||
|
SocketMessageType.HeartBeat => HeartBeat,
|
||||||
|
SocketMessageType.ForceLogout => ForceLogout,
|
||||||
|
SocketMessageType.Chat => Chat,
|
||||||
|
SocketMessageType.UpdateRoomMaster => UpdateRoomMaster,
|
||||||
|
SocketMessageType.MatchRoom => MatchRoom,
|
||||||
|
SocketMessageType.StartGame => StartGame,
|
||||||
|
SocketMessageType.EndGame => EndGame,
|
||||||
|
SocketMessageType.Gaming => Gaming,
|
||||||
|
_ => Unknown
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 需要同步更新
|
/// 需要同步更新 <see cref="DataRequestType"/>
|
||||||
/// Milimoe.FunGame.Core.Library.Constant.DataRequestType,
|
|
||||||
/// Milimoe.FunGame.Core.Api.Transmittal.DataRequest.GetTypeString(DataRequestType type)
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class DataRequestSet
|
public class DataRequestSet
|
||||||
{
|
{
|
||||||
@ -64,6 +90,9 @@ namespace Milimoe.FunGame.Core.Library.Constant
|
|||||||
public const string Main_UpdateRoom = "Main::UpdateRoom";
|
public const string Main_UpdateRoom = "Main::UpdateRoom";
|
||||||
public const string Main_MatchRoom = "Main::MatchRoom";
|
public const string Main_MatchRoom = "Main::MatchRoom";
|
||||||
public const string Main_Chat = "Main::Chat";
|
public const string Main_Chat = "Main::Chat";
|
||||||
|
public const string Main_Ready = "Main::Ready";
|
||||||
|
public const string Main_CancelReady = "Main::CancelReady";
|
||||||
|
public const string Main_StartGame = "Main::StartGame";
|
||||||
/**
|
/**
|
||||||
* Register
|
* Register
|
||||||
*/
|
*/
|
||||||
@ -80,6 +109,75 @@ namespace Milimoe.FunGame.Core.Library.Constant
|
|||||||
public const string Room_GetRoomSettings = "Room::GetRoomSettings";
|
public const string Room_GetRoomSettings = "Room::GetRoomSettings";
|
||||||
public const string Room_GetRoomPlayerCount = "Room::GetRoomPlayerCount";
|
public const string Room_GetRoomPlayerCount = "Room::GetRoomPlayerCount";
|
||||||
public const string Room_UpdateRoomMaster = "Room::UpdateRoomMaster";
|
public const string Room_UpdateRoomMaster = "Room::UpdateRoomMaster";
|
||||||
|
/**
|
||||||
|
* Gaming
|
||||||
|
*/
|
||||||
|
public const string Gaming_Connect = "Gaming::Connect";
|
||||||
|
public const string Gaming_Disconnect = "Gaming::Disconnect";
|
||||||
|
public const string Gaming_Reconnect = "Gaming::Reconnect";
|
||||||
|
public const string Gaming_Ban = "Gaming::Ban";
|
||||||
|
public const string Gaming_Pick = "Gaming::Pick";
|
||||||
|
public const string Gaming_Random = "Gaming::Random";
|
||||||
|
public const string Gaming_Move = "Gaming::Move";
|
||||||
|
public const string Gaming_Attack = "Gaming::Attack";
|
||||||
|
public const string Gaming_Skill = "Gaming::Skill";
|
||||||
|
public const string Gaming_Item = "Gaming::Item";
|
||||||
|
public const string Gaming_Magic = "Gaming::Magic";
|
||||||
|
public const string Gaming_Buy = "Gaming::Buy";
|
||||||
|
public const string Gaming_SuperSkill = "Gaming::SuperSkill";
|
||||||
|
public const string Gaming_Pause = "Gaming::Pause";
|
||||||
|
public const string Gaming_Unpause = "Gaming::Unpause";
|
||||||
|
public const string Gaming_Surrender = "Gaming::Surrender";
|
||||||
|
public const string Gaming_UpdateUserInfo = "Gaming::UpdateUserInfo";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取Type的等效字符串
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="type"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static string GetTypeString(DataRequestType type)
|
||||||
|
{
|
||||||
|
return type switch
|
||||||
|
{
|
||||||
|
DataRequestType.RunTime_Logout => RunTime_Logout,
|
||||||
|
DataRequestType.Main_GetNotice => Main_GetNotice,
|
||||||
|
DataRequestType.Main_CreateRoom => Main_CreateRoom,
|
||||||
|
DataRequestType.Main_UpdateRoom => Main_UpdateRoom,
|
||||||
|
DataRequestType.Main_IntoRoom => Main_IntoRoom,
|
||||||
|
DataRequestType.Main_QuitRoom => Main_QuitRoom,
|
||||||
|
DataRequestType.Main_MatchRoom => Main_MatchRoom,
|
||||||
|
DataRequestType.Main_Chat => Main_Chat,
|
||||||
|
DataRequestType.Main_Ready => Main_Ready,
|
||||||
|
DataRequestType.Main_CancelReady => Main_CancelReady,
|
||||||
|
DataRequestType.Main_StartGame => Main_StartGame,
|
||||||
|
DataRequestType.Reg_GetRegVerifyCode => Reg_GetRegVerifyCode,
|
||||||
|
DataRequestType.Login_Login => Login_Login,
|
||||||
|
DataRequestType.Login_GetFindPasswordVerifyCode => Login_GetFindPasswordVerifyCode,
|
||||||
|
DataRequestType.Login_UpdatePassword => Login_UpdatePassword,
|
||||||
|
DataRequestType.Room_GetRoomSettings => Room_GetRoomSettings,
|
||||||
|
DataRequestType.Room_GetRoomPlayerCount => Room_GetRoomPlayerCount,
|
||||||
|
DataRequestType.Room_UpdateRoomMaster => Room_UpdateRoomMaster,
|
||||||
|
DataRequestType.Gaming_Connect => Gaming_Connect,
|
||||||
|
DataRequestType.Gaming_Disconnect => Gaming_Disconnect,
|
||||||
|
DataRequestType.Gaming_Reconnect => Gaming_Reconnect,
|
||||||
|
DataRequestType.Gaming_Ban => Gaming_Ban,
|
||||||
|
DataRequestType.Gaming_Pick => Gaming_Pick,
|
||||||
|
DataRequestType.Gaming_Random => Gaming_Random,
|
||||||
|
DataRequestType.Gaming_Move => Gaming_Move,
|
||||||
|
DataRequestType.Gaming_Attack => Gaming_Attack,
|
||||||
|
DataRequestType.Gaming_Skill => Gaming_Skill,
|
||||||
|
DataRequestType.Gaming_Item => Gaming_Item,
|
||||||
|
DataRequestType.Gaming_Magic => Gaming_Magic,
|
||||||
|
DataRequestType.Gaming_Buy => Gaming_Buy,
|
||||||
|
DataRequestType.Gaming_SuperSkill => Gaming_SuperSkill,
|
||||||
|
DataRequestType.Gaming_Pause => Gaming_Pause,
|
||||||
|
DataRequestType.Gaming_Unpause => Gaming_Unpause,
|
||||||
|
DataRequestType.Gaming_Surrender => Gaming_Surrender,
|
||||||
|
DataRequestType.Gaming_UpdateUserInfo => Gaming_UpdateUserInfo,
|
||||||
|
_ => UnKnown
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class ReflectionSet
|
public class ReflectionSet
|
||||||
@ -108,5 +206,41 @@ namespace Milimoe.FunGame.Core.Library.Constant
|
|||||||
public const string MixHasPass = "带密码的混战模式";
|
public const string MixHasPass = "带密码的混战模式";
|
||||||
public const string Team = "团队模式";
|
public const string Team = "团队模式";
|
||||||
public const string TeamHasPass = "带密码的团队模式";
|
public const string TeamHasPass = "带密码的团队模式";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取Type的等效字符串
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="type"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static string GetTypeString(RoomType type)
|
||||||
|
{
|
||||||
|
return type switch
|
||||||
|
{
|
||||||
|
RoomType.Mix => Mix,
|
||||||
|
RoomType.Team => Team,
|
||||||
|
RoomType.MixHasPass => MixHasPass,
|
||||||
|
RoomType.TeamHasPass => TeamHasPass,
|
||||||
|
RoomType.AllHasPass => AllHasPass,
|
||||||
|
_ => All
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取字符串对应的枚举
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="type"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static RoomType GetRoomType(string typestring)
|
||||||
|
{
|
||||||
|
return typestring switch
|
||||||
|
{
|
||||||
|
Mix => RoomType.Mix,
|
||||||
|
Team => RoomType.Team,
|
||||||
|
MixHasPass => RoomType.MixHasPass,
|
||||||
|
TeamHasPass => RoomType.TeamHasPass,
|
||||||
|
AllHasPass => RoomType.AllHasPass,
|
||||||
|
_ => RoomType.All
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -26,7 +26,7 @@ namespace Milimoe.FunGame.Core.Library.Constant
|
|||||||
NotSent,
|
NotSent,
|
||||||
NotReceived
|
NotReceived
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum RequestResult
|
public enum RequestResult
|
||||||
{
|
{
|
||||||
Success,
|
Success,
|
||||||
|
|||||||
@ -20,6 +20,15 @@ namespace Milimoe.FunGame.Core.Library.Constant
|
|||||||
Complete
|
Complete
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public enum SelectState
|
||||||
|
{
|
||||||
|
None,
|
||||||
|
SelectingOne,
|
||||||
|
SelectingMultiple,
|
||||||
|
SelectingRange,
|
||||||
|
SelectingLine
|
||||||
|
}
|
||||||
|
|
||||||
public enum OnlineState
|
public enum OnlineState
|
||||||
{
|
{
|
||||||
Offline,
|
Offline,
|
||||||
|
|||||||
@ -54,7 +54,7 @@ namespace Milimoe.FunGame.Core.Library.Constant
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 需要同步更新Milimoe.FunGame.Core.Library.Constant.SocketSet
|
/// 需要同步更新 <see cref="SocketSet"/>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public enum SocketMessageType
|
public enum SocketMessageType
|
||||||
{
|
{
|
||||||
@ -67,11 +67,14 @@ namespace Milimoe.FunGame.Core.Library.Constant
|
|||||||
ForceLogout,
|
ForceLogout,
|
||||||
Chat,
|
Chat,
|
||||||
UpdateRoomMaster,
|
UpdateRoomMaster,
|
||||||
MatchRoom
|
MatchRoom,
|
||||||
|
StartGame,
|
||||||
|
EndGame,
|
||||||
|
Gaming
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 需要同步更新Milimoe.FunGame.Core.Library.Constant.DataRequestSet
|
/// 需要同步更新 <see cref="DataRequestSet"/>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public enum DataRequestType
|
public enum DataRequestType
|
||||||
{
|
{
|
||||||
@ -93,7 +96,25 @@ namespace Milimoe.FunGame.Core.Library.Constant
|
|||||||
Login_UpdatePassword,
|
Login_UpdatePassword,
|
||||||
Room_GetRoomSettings,
|
Room_GetRoomSettings,
|
||||||
Room_GetRoomPlayerCount,
|
Room_GetRoomPlayerCount,
|
||||||
Room_UpdateRoomMaster
|
Room_UpdateRoomMaster,
|
||||||
|
Gaming_Connect,
|
||||||
|
Gaming_Disconnect,
|
||||||
|
Gaming_Reconnect,
|
||||||
|
Gaming_Ban,
|
||||||
|
Gaming_Pick,
|
||||||
|
Gaming_Random,
|
||||||
|
Gaming_Move,
|
||||||
|
Gaming_Attack,
|
||||||
|
Gaming_Skill,
|
||||||
|
Gaming_Item,
|
||||||
|
Gaming_Magic,
|
||||||
|
Gaming_Buy,
|
||||||
|
Gaming_SuperSkill,
|
||||||
|
Gaming_Pause,
|
||||||
|
Gaming_Unpause,
|
||||||
|
Gaming_Surrender,
|
||||||
|
Gaming_UpdateUserInfo,
|
||||||
|
Gaming_Punish
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum SocketRuntimeType
|
public enum SocketRuntimeType
|
||||||
@ -208,6 +229,26 @@ namespace Milimoe.FunGame.Core.Library.Constant
|
|||||||
Particle
|
Particle
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public enum ActionType
|
||||||
|
{
|
||||||
|
None,
|
||||||
|
Ban,
|
||||||
|
Pick,
|
||||||
|
Random,
|
||||||
|
Move,
|
||||||
|
Attack,
|
||||||
|
Skill,
|
||||||
|
Item,
|
||||||
|
Magic,
|
||||||
|
Buy,
|
||||||
|
SuperSkill,
|
||||||
|
Pause,
|
||||||
|
Unpause,
|
||||||
|
Surrender,
|
||||||
|
UpdateUserInfo,
|
||||||
|
Punish
|
||||||
|
}
|
||||||
|
|
||||||
public enum VerifyCodeType
|
public enum VerifyCodeType
|
||||||
{
|
{
|
||||||
NumberVerifyCode,
|
NumberVerifyCode,
|
||||||
@ -302,7 +343,9 @@ namespace Milimoe.FunGame.Core.Library.Constant
|
|||||||
Chat,
|
Chat,
|
||||||
MatchRoom,
|
MatchRoom,
|
||||||
UpdateRoomMaster,
|
UpdateRoomMaster,
|
||||||
GetRoomPlayerCount
|
GetRoomPlayerCount,
|
||||||
|
StartGame,
|
||||||
|
EndGame
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum RegInvokeType
|
public enum RegInvokeType
|
||||||
|
|||||||
@ -149,7 +149,7 @@
|
|||||||
{
|
{
|
||||||
public override string Message => "退出房间失败 (#10030)";
|
public override string Message => "退出房间失败 (#10030)";
|
||||||
}
|
}
|
||||||
|
|
||||||
public class CreateRoomException : Exception
|
public class CreateRoomException : Exception
|
||||||
{
|
{
|
||||||
public override string Message => "创建房间失败 (#10031)";
|
public override string Message => "创建房间失败 (#10031)";
|
||||||
|
|||||||
@ -32,12 +32,12 @@
|
|||||||
{
|
{
|
||||||
return $"{Constant.Command_Delete} {Constant.Command_From} {TableName} {Constant.Command_Where} {Column_RoomID} = '{RoomID}' {Constant.Command_And} {Column_RoomMaster} = {RoomMaster}";
|
return $"{Constant.Command_Delete} {Constant.Command_From} {TableName} {Constant.Command_Where} {Column_RoomID} = '{RoomID}' {Constant.Command_And} {Column_RoomMaster} = {RoomMaster}";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string Update_QuitRoom(string RoomID, long OldRoomMaster, long NewRoomMaster)
|
public static string Update_QuitRoom(string RoomID, long OldRoomMaster, long NewRoomMaster)
|
||||||
{
|
{
|
||||||
return $"{Constant.Command_Update} {TableName} {Constant.Command_Set} {Column_RoomMaster} = {NewRoomMaster} {Constant.Command_Where} {Column_RoomID} = '{RoomID}' {Constant.Command_And} {Column_RoomMaster} = {OldRoomMaster}";
|
return $"{Constant.Command_Update} {TableName} {Constant.Command_Set} {Column_RoomMaster} = {NewRoomMaster} {Constant.Command_Where} {Column_RoomID} = '{RoomID}' {Constant.Command_And} {Column_RoomMaster} = {OldRoomMaster}";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string Select_IsExistRoom(string RoomID)
|
public static string Select_IsExistRoom(string RoomID)
|
||||||
{
|
{
|
||||||
return $"{Constant.Command_Select} {Constant.Command_All} {Constant.Command_From} {TableName} {Constant.Command_Where} {Column_RoomID} = '{RoomID}'";
|
return $"{Constant.Command_Select} {Constant.Command_All} {Constant.Command_From} {TableName} {Constant.Command_Where} {Column_RoomID} = '{RoomID}'";
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
public class UserQuery
|
public class UserQuery
|
||||||
{
|
{
|
||||||
public const string TableName= "Users";
|
public const string TableName = "Users";
|
||||||
public const string Column_UID = "UID";
|
public const string Column_UID = "UID";
|
||||||
public const string Column_Username = "Username";
|
public const string Column_Username = "Username";
|
||||||
public const string Column_Password = "Password";
|
public const string Column_Password = "Password";
|
||||||
@ -24,17 +24,17 @@
|
|||||||
{
|
{
|
||||||
return $"{Select_Users} {Constant.Command_Where} {Column_Username} = '{Username}' and {Column_Password} = '{Password}'";
|
return $"{Select_Users} {Constant.Command_Where} {Column_Username} = '{Username}' and {Column_Password} = '{Password}'";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string Select_IsExistEmail(string Email)
|
public static string Select_IsExistEmail(string Email)
|
||||||
{
|
{
|
||||||
return $"{Select_Users} {Constant.Command_Where} {Column_Email} = '{Email}'";
|
return $"{Select_Users} {Constant.Command_Where} {Column_Email} = '{Email}'";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string Select_IsExistUsername(string Username)
|
public static string Select_IsExistUsername(string Username)
|
||||||
{
|
{
|
||||||
return $"{Select_Users} {Constant.Command_Where} {Column_Username} = '{Username}'";
|
return $"{Select_Users} {Constant.Command_Where} {Column_Username} = '{Username}'";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string Select_CheckEmailWithUsername(string Username, string email)
|
public static string Select_CheckEmailWithUsername(string Username, string email)
|
||||||
{
|
{
|
||||||
return $"{Select_Users} {Constant.Command_Where} {Column_Username} = '{Username}' and {Column_Email} = '{email}'";
|
return $"{Select_Users} {Constant.Command_Where} {Column_Username} = '{Username}' and {Column_Email} = '{email}'";
|
||||||
@ -54,12 +54,12 @@
|
|||||||
{
|
{
|
||||||
return $"{Constant.Command_Update} {TableName} {Constant.Command_Set} {Column_LastTime} = '{DateTime.Now}', {Column_LastIP} = '{IP}' {Constant.Command_Where} {Column_Username} = '{Username}'";
|
return $"{Constant.Command_Update} {TableName} {Constant.Command_Set} {Column_LastTime} = '{DateTime.Now}', {Column_LastIP} = '{IP}' {Constant.Command_Where} {Column_Username} = '{Username}'";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string Update_Password(string Username, string Password)
|
public static string Update_Password(string Username, string Password)
|
||||||
{
|
{
|
||||||
return $"{Constant.Command_Update} {TableName} {Constant.Command_Set} {Column_Password} = '{Password}' {Constant.Command_Where} {Column_Username} = '{Username}'";
|
return $"{Constant.Command_Update} {TableName} {Constant.Command_Set} {Column_Password} = '{Password}' {Constant.Command_Where} {Column_Username} = '{Username}'";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string Update_GameTime(string Username, int GameTimeMinutes)
|
public static string Update_GameTime(string Username, int GameTimeMinutes)
|
||||||
{
|
{
|
||||||
return $"{Constant.Command_Update} {TableName} {Constant.Command_Set} {Column_GameTime} = {Column_GameTime} + {GameTimeMinutes} {Constant.Command_Where} {Column_Username} = '{Username}'";
|
return $"{Constant.Command_Update} {TableName} {Constant.Command_Set} {Column_GameTime} = {Column_GameTime} + {GameTimeMinutes} {Constant.Command_Where} {Column_Username} = '{Username}'";
|
||||||
|
|||||||
@ -33,7 +33,7 @@ namespace Milimoe.FunGame.Core.Model
|
|||||||
/// 是否自动重连
|
/// 是否自动重连
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool FunGame_isAutoRetry { get; set; } = true;
|
public bool FunGame_isAutoRetry { get; set; } = true;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否在房间中
|
/// 是否在房间中
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@ -63,7 +63,7 @@ namespace Milimoe.FunGame.Core.Service
|
|||||||
{
|
{
|
||||||
return JsonSerializer.Deserialize<T>(json, options);
|
return JsonSerializer.Deserialize<T>(json, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 反序列化Json对象,此方法可能无法返回正确的类型,请注意辨别
|
/// 反序列化Json对象,此方法可能无法返回正确的类型,请注意辨别
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -101,7 +101,7 @@ namespace Milimoe.FunGame.Core.Service
|
|||||||
T? result = element.Deserialize<T>(GeneralOptions);
|
T? result = element.Deserialize<T>(GeneralOptions);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 反序列化Hashtable中Key对应的Json对象
|
/// 反序列化Hashtable中Key对应的Json对象
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -115,7 +115,7 @@ namespace Milimoe.FunGame.Core.Service
|
|||||||
{
|
{
|
||||||
JsonElement? element = (JsonElement?)table[key];
|
JsonElement? element = (JsonElement?)table[key];
|
||||||
if (element != null)
|
if (element != null)
|
||||||
{
|
{
|
||||||
T? result = ((JsonElement)element).Deserialize<T>(GeneralOptions);
|
T? result = ((JsonElement)element).Deserialize<T>(GeneralOptions);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -137,7 +137,7 @@ namespace Milimoe.FunGame.Core.Service
|
|||||||
{
|
{
|
||||||
JsonElement? element = (JsonElement?)table[key];
|
JsonElement? element = (JsonElement?)table[key];
|
||||||
if (element != null)
|
if (element != null)
|
||||||
{
|
{
|
||||||
T? result = ((JsonElement)element).Deserialize<T>(options);
|
T? result = ((JsonElement)element).Deserialize<T>(options);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -15,7 +15,7 @@ namespace Milimoe.FunGame.Core.Service
|
|||||||
/// 一个邮件服务对应一个Smtp客户端
|
/// 一个邮件服务对应一个Smtp客户端
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal static Dictionary<Guid, SmtpClient> SmtpClients { get; } = new();
|
internal static Dictionary<Guid, SmtpClient> SmtpClients { get; } = new();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 用于保存邮件服务
|
/// 用于保存邮件服务
|
||||||
/// 允许服务器同时存在多个服务
|
/// 允许服务器同时存在多个服务
|
||||||
|
|||||||
@ -72,7 +72,7 @@ namespace Milimoe.FunGame.Core.Service
|
|||||||
{
|
{
|
||||||
return Models.TryRemove(name, out t);
|
return Models.TryRemove(name, out t);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 将Model移除,并取得这个Model
|
/// 将Model移除,并取得这个Model
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -96,7 +96,7 @@ namespace Milimoe.FunGame.Core.Service
|
|||||||
{
|
{
|
||||||
Models.Clear();
|
Models.Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取Model对象的列表
|
/// 获取Model对象的列表
|
||||||
|
|||||||
@ -172,7 +172,7 @@ namespace Milimoe.FunGame.Core.Service
|
|||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 用于服务器接收客户端信息
|
/// 用于服务器接收客户端信息
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -195,7 +195,7 @@ namespace Milimoe.FunGame.Core.Service
|
|||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 用于客户端接收服务器信息(数组版)
|
/// 用于客户端接收服务器信息(数组版)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -247,26 +247,6 @@ namespace Milimoe.FunGame.Core.Service
|
|||||||
return result.ToArray();
|
return result.ToArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 将通信类型的枚举转换为字符串
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="type">通信类型</param>
|
|
||||||
/// <returns>等效字符串</returns>
|
|
||||||
internal static string GetTypeString(SocketMessageType type)
|
|
||||||
{
|
|
||||||
return type switch
|
|
||||||
{
|
|
||||||
SocketMessageType.DataRequest => SocketSet.DataRequest,
|
|
||||||
SocketMessageType.Connect => SocketSet.Connect,
|
|
||||||
SocketMessageType.Disconnect => SocketSet.Disconnect,
|
|
||||||
SocketMessageType.HeartBeat => SocketSet.HeartBeat,
|
|
||||||
SocketMessageType.ForceLogout => SocketSet.ForceLogout,
|
|
||||||
SocketMessageType.Chat => SocketSet.Chat,
|
|
||||||
SocketMessageType.UpdateRoomMaster => SocketSet.UpdateRoomMaster,
|
|
||||||
_ => SocketSet.Unknown,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 事件
|
#region 事件
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user