Skip to content

Commit 4a4cb06

Browse files
committed
[修改]1. 修改示例代码的结构
# Conflicts: # GameFrameX.Hotfix/GlobalUsings.cs # GameFrameX.Hotfix/Logic/Http/GetOnlinePlayerHttpHandler.cs # GameFrameX.Hotfix/Logic/Http/KickOffLineByUserIdPlayerHttpHandler.cs # GameFrameX.Hotfix/Logic/Http/Player/GetOnlinePlayerListHttpHandler.cs # GameFrameX.Hotfix/Logic/Http/Player/ReqLoginHttpHandler.cs # GameFrameX.Hotfix/Logic/Http/Player/ReqPlayerCreateHttpHandler.cs # GameFrameX.Hotfix/Logic/Http/Player/ReqPlayerListHttpHandler.cs # GameFrameX.Hotfix/Logic/Http/ReloadHttpHandler.cs # GameFrameX.Hotfix/Logic/Http/TestHttpHandler.cs # GameFrameX.Hotfix/Logic/Role/Bag/BagComponentAgent.cs # GameFrameX.Hotfix/Logic/Role/Bag/ReqBagInfoHandler.cs # GameFrameX.Hotfix/Logic/Role/Bag/ReqComposePetHandler.cs
1 parent da5c2c1 commit 4a4cb06

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+765
-341
lines changed

GameFrameX.Apps/ActorType.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
using GameFrameX.Utility.Setting;
1+
// GameFrameX 组织下的以及组织衍生的项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
2+
//
3+
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE 文件。
4+
//
5+
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
26

37
namespace GameFrameX.Apps;
48

GameFrameX.Apps/AppsHandler.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
namespace GameFrameX.Apps;
1+
// GameFrameX 组织下的以及组织衍生的项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
2+
//
3+
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE 文件。
4+
//
5+
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
6+
7+
namespace GameFrameX.Apps;
28

39
public class AppsHandler
410
{

GameFrameX.Apps/CacheStateTypeManager.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
using GameFrameX.Foundation.Hash;
1+
// GameFrameX 组织下的以及组织衍生的项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
2+
//
3+
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE 文件。
4+
//
5+
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
6+
7+
using GameFrameX.Foundation.Hash;
28
using GameFrameX.Utility.Extensions;
39

410
namespace GameFrameX.Apps;

GameFrameX.Apps/GlobalUsings.cs

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,38 @@
1-
global using System;
1+
// GameFrameX 组织下的以及组织衍生的项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
2+
//
3+
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE 文件。
4+
//
5+
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
6+
7+
global using System;
8+
global using System.Threading.Tasks;
29
global using MongoDB.Bson;
310
global using MongoDB.Driver;
411
global using MongoDB.Bson.Serialization;
512
global using MongoDB.Bson.Serialization.Attributes;
613
global using GameFrameX.Core;
714
global using GameFrameX.Core.Utility;
15+
global using GameFrameX.Core.Components;
816
global using GameFrameX.Core.Events;
917
global using GameFrameX.Core.Hotfix.Agent;
1018
global using GameFrameX.Core.Hotfix;
1119
global using GameFrameX.Core.Actors;
1220
global using GameFrameX.Core.Timer;
21+
global using GameFrameX.Core.Abstractions.Attribute;
1322
global using GameFrameX.Proto.Proto;
1423
global using GameFrameX.DataBase;
24+
global using GameFrameX.DataBase.Mongo;
1525
global using GameFrameX.DataBase.Abstractions;
26+
global using GameFrameX.Utility.Extensions;
27+
global using GameFrameX.Utility.Setting;
28+
global using GameFrameX.Apps.Common.Event;
1629
global using GameFrameX.Utility;
1730
global using System.Collections;
1831
global using System.Collections.Concurrent;
1932
global using System.Collections.Generic;
2033
global using System.Reflection;
2134
global using MongoDB.Bson.Serialization.Conventions;
22-
global using MongoDB.Bson.Serialization.Options;
35+
global using MongoDB.Bson.Serialization.Options;
36+
global using System.Text.Json.Serialization;
37+
global using GameFrameX.NetWork.Abstractions;
38+
global using GameFrameX.NetWork.Messages;
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// GameFrameX 组织下的以及组织衍生的项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
2+
//
3+
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE 文件。
4+
//
5+
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
6+
7+
using GameFrameX.Apps.Player.Bag.Entity;
8+
9+
namespace GameFrameX.Apps.Player.Bag.Component;
10+
11+
[ComponentType(GlobalConst.ActorTypePlayer)]
12+
public sealed class BagComponent : StateComponent<BagState>
13+
{
14+
/// <summary>
15+
/// 修改背包状态
16+
/// </summary>
17+
/// <returns></returns>
18+
/// <exception cref="NotImplementedException"></exception>
19+
public async Task<BagState> Save()
20+
{
21+
await WriteStateAsync();
22+
return State;
23+
}
24+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// GameFrameX 组织下的以及组织衍生的项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
2+
//
3+
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE 文件。
4+
//
5+
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
6+
7+
namespace GameFrameX.Apps.Player.Bag.Entity;
8+
9+
public sealed class BagState : CacheState
10+
{
11+
/// <summary>
12+
/// 背包物品
13+
/// </summary>
14+
public Dictionary<int, BagItemState> List { get; set; } = new Dictionary<int, BagItemState>();
15+
}
16+
17+
public sealed class BagItemState
18+
{
19+
/// <summary>
20+
/// 物品ID
21+
/// </summary>
22+
public long ItemId { get; set; }
23+
24+
/// <summary>
25+
/// 物品数量
26+
/// </summary>
27+
public long Count { get; set; }
28+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// GameFrameX 组织下的以及组织衍生的项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
2+
//
3+
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE 文件。
4+
//
5+
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
6+
7+
using GameFrameX.Apps.Player.Pet.Entity;
8+
using GameFrameX.Core.Abstractions.Attribute;
9+
using GameFrameX.Core.Components;
10+
using GameFrameX.Utility.Setting;
11+
12+
namespace GameFrameX.Apps.Player.Pet.Component;
13+
14+
[ComponentType(GlobalConst.ActorTypePlayer)]
15+
public class PetComponent : StateComponent<PetState>
16+
{
17+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// GameFrameX 组织下的以及组织衍生的项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
2+
//
3+
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE 文件。
4+
//
5+
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
6+
7+
namespace GameFrameX.Apps.Player.Pet.Entity;
8+
9+
public class PetState : CacheState
10+
{
11+
}

GameFrameX.Apps/Player/Player/Component/PlayerComponent.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
using System.Threading.Tasks;
1+
// GameFrameX 组织下的以及组织衍生的项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
2+
//
3+
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE 文件。
4+
//
5+
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
6+
27
using GameFrameX.Apps.Player.Player.Entity;
3-
using GameFrameX.Core.Abstractions.Attribute;
4-
using GameFrameX.Core.Components;
58
using GameFrameX.Monitor.Player;
6-
using GameFrameX.Utility.Setting;
79

810
namespace GameFrameX.Apps.Player.Player.Component;
911

GameFrameX.Apps/Player/Player/Entity/PlayerState.cs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1-
using GameFrameX.DataBase.Mongo;
1+
// GameFrameX 组织下的以及组织衍生的项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
2+
//
3+
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE 文件。
4+
//
5+
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
26

37
namespace GameFrameX.Apps.Player.Player.Entity;
48

5-
public class PlayerState : CacheState
9+
public sealed class PlayerState : CacheState
610
{
7-
public long RoleId
8-
{
9-
get { return Id; }
10-
}
11-
1211
/// <summary>
1312
/// 账号ID
1413
/// </summary>

0 commit comments

Comments
 (0)