From be33e12b35d7223bad25b754a8422ea83b8b0cde Mon Sep 17 00:00:00 2001 From: BobSong <605277374@qq.com> Date: Sun, 27 Jul 2025 23:46:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8D=8F=E8=AE=AE=E5=B7=A5?= =?UTF-8?q?=E5=85=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Config/Binary/SceneConfigData.bytes | 11 +- Config/Excel/Server/SceneConfig.xlsx | Bin 16935 -> 16921 bytes Config/Excel/Version.txt | 2 +- Config/Json/Server/SceneConfigData.Json | 12 +- Config/Json/Server/WorldConfigData.Json | 2 +- .../NetworkProtocol/Inner/InnerMessage.proto | 73 ---- .../NetworkProtocol/Outer/OuterMessage.proto | 66 ---- Entity/Game/Item/ItemComponent.cs | 8 - Entity/Game/Role/RoleComAttribute.cs | 2 +- Entity/Game/Role/RoleManagerComponent.cs | 3 + Entity/Gate/Entity/Player.cs | 1 - Entity/Gate/Entity/PlayerFlagComponent.cs | 2 +- Entity/Generate/CustomExport/SceneType.cs | 16 +- .../Generate/NetworkProtocol/InnerMessage.cs | 313 +----------------- .../Generate/NetworkProtocol/InnerOpcode.cs | 16 - .../Generate/NetworkProtocol/OuterMessage.cs | 303 +---------------- .../Generate/NetworkProtocol/OuterOpcode.cs | 27 +- .../Handler/C2A_LoginRequestHandler.cs | 0 .../Authentication/System/AccountSystem.cs | 0 .../System/AuthenticationComponentSystem.cs | 0 .../System/AuthenticationHelper.cs | 0 .../Jwt/AuthenticationJwtComponentSystem.cs | 0 .../System/Jwt/AuthenticationJwtHelper.cs | 0 .../TimeOut/AccountCacheInfoTimeOutSystem.cs | 0 .../System/TimeOut/AccountTimeOutSystem.cs | 0 .../Game/Container/ContainerSystem.cs | 0 .../{Outer => }/Game/Handler/ItemFactory.cs | 0 .../Game/Role/RoleManagerComponentSystem.cs | 49 +++ .../Game/System/ItemManagerComponentSystem.cs | 0 .../Outer/C2G_GetAccountInfoRequestHandler.cs | 2 +- .../Handler/Outer/C2G_LoginRequestHandler.cs | 6 +- .../Gate/System/JWT/GateJWTComponentSystem.cs | 0 .../Gate/System/JWT/GateJWTHelper.cs | 0 .../Gate/System/Player/PlayerDestroySystem.cs | 0 .../Gate/System/Player/PlayerFactory.cs | 0 .../Player/PlayerFlagComponentSystem.cs | 2 +- .../Gate/System/Player/PlayerHelper.cs | 4 +- .../System/PlayerManageComponentSystem.cs | 0 Hotfix/Hotfix.csproj | 4 - Hotfix/Inner/G2A_TestMessageHandler.cs | 15 - Hotfix/Inner/G2A_TestRequestHandler.cs | 19 -- .../G2Chat_CreateRouteRequestHandler.cs | 23 -- Hotfix/OnSceneCreate_Init.cs | 8 +- Tools/ConfigTable/ExporterSettings.json | 16 +- .../Exporter/NetworkProtocol/CommandLine.dll | Bin 0 -> 225280 bytes .../NetworkProtocol/ExporterSettings.json | 29 ++ .../Fantasy.Tools.NetworkProtocol.deps.json | 206 ++++++++++++ .../Fantasy.Tools.NetworkProtocol.dll | Bin 0 -> 49664 bytes .../Fantasy.Tools.NetworkProtocol.exe | Bin 0 -> 147968 bytes .../Fantasy.Tools.NetworkProtocol.pdb | Bin 0 -> 25616 bytes ...y.Tools.NetworkProtocol.runtimeconfig.json | 12 + ....Extensions.Configuration.Abstractions.dll | Bin 0 -> 29448 bytes ...xtensions.Configuration.FileExtensions.dll | Bin 0 -> 29496 bytes ...icrosoft.Extensions.Configuration.Json.dll | Bin 0 -> 28456 bytes .../Microsoft.Extensions.Configuration.dll | Bin 0 -> 45336 bytes ....Extensions.FileProviders.Abstractions.dll | Bin 0 -> 23816 bytes ...soft.Extensions.FileProviders.Physical.dll | Bin 0 -> 46368 bytes ...icrosoft.Extensions.FileSystemGlobbing.dll | Bin 0 -> 46872 bytes .../Microsoft.Extensions.Primitives.dll | Bin 0 -> 45320 bytes .../NetworkProtocol/Newtonsoft.Json.dll | Bin 0 -> 712464 bytes Tools/Exporter/NetworkProtocol/Run.bat | 21 ++ Tools/Exporter/NetworkProtocol/Run.sh | 24 ++ .../NetworkProtocol/System.IO.Pipelines.dll | Bin 0 -> 77616 bytes .../System.Text.Encodings.Web.dll | Bin 0 -> 70968 bytes .../NetworkProtocol/System.Text.Json.dll | Bin 0 -> 643848 bytes Tools/Exporter/NetworkProtocol/Template.txt | 33 ++ .../lib/net8.0/System.Text.Encodings.Web.dll | Bin 0 -> 70936 bytes .../Fantasy.Tools.NetworkProtocol.deps.json | 80 +---- .../Fantasy.Tools.NetworkProtocol.dll | Bin 51200 -> 49664 bytes .../Fantasy.Tools.NetworkProtocol.exe | Bin 0 -> 147968 bytes .../Fantasy.Tools.NetworkProtocol.pdb | Bin 25840 -> 25616 bytes ...y.Tools.NetworkProtocol.runtimeconfig.json | 4 +- ....Extensions.Configuration.Abstractions.dll | Bin 28424 -> 29448 bytes ...xtensions.Configuration.FileExtensions.dll | Bin 28432 -> 29496 bytes ...icrosoft.Extensions.Configuration.Json.dll | Bin 27400 -> 28456 bytes .../Microsoft.Extensions.Configuration.dll | Bin 44328 -> 45336 bytes ....Extensions.FileProviders.Abstractions.dll | Bin 22832 -> 23816 bytes ...soft.Extensions.FileProviders.Physical.dll | Bin 45336 -> 46368 bytes ...icrosoft.Extensions.FileSystemGlobbing.dll | Bin 45832 -> 46872 bytes .../Microsoft.Extensions.Primitives.dll | Bin 44336 -> 45320 bytes Tools/NetworkProtocol/Run.bat | 4 +- Tools/NetworkProtocol/Template.txt | 34 ++ Tools/NetworkProtocol2/CommandLine.dll | Bin 0 -> 225280 bytes Tools/NetworkProtocol2/ExporterSettings.json | 29 ++ .../Fantasy.Tools.NetworkProtocol | Bin .../Fantasy.Tools.NetworkProtocol.deps.json | 264 +++++++++++++++ .../Fantasy.Tools.NetworkProtocol.dll | Bin 0 -> 51200 bytes .../Fantasy.Tools.NetworkProtocol.pdb | Bin 0 -> 25840 bytes ...y.Tools.NetworkProtocol.runtimeconfig.json | 12 + ....Extensions.Configuration.Abstractions.dll | Bin 0 -> 28424 bytes ...xtensions.Configuration.FileExtensions.dll | Bin 0 -> 28432 bytes ...icrosoft.Extensions.Configuration.Json.dll | Bin 0 -> 27400 bytes .../Microsoft.Extensions.Configuration.dll | Bin 0 -> 44328 bytes ....Extensions.FileProviders.Abstractions.dll | Bin 0 -> 22832 bytes ...soft.Extensions.FileProviders.Physical.dll | Bin 0 -> 45336 bytes ...icrosoft.Extensions.FileSystemGlobbing.dll | Bin 0 -> 45832 bytes .../Microsoft.Extensions.Primitives.dll | Bin 0 -> 44336 bytes Tools/NetworkProtocol2/Newtonsoft.Json.dll | Bin 0 -> 712464 bytes Tools/NetworkProtocol2/Run.bat | 23 ++ Tools/NetworkProtocol2/Run.sh | 24 ++ .../NetworkProtocol2/System.IO.Pipelines.dll | Bin 0 -> 77616 bytes .../System.Text.Encodings.Web.dll | Bin 0 -> 70968 bytes Tools/NetworkProtocol2/System.Text.Json.dll | Bin 0 -> 643848 bytes .../lib/net8.0/System.Text.Encodings.Web.dll | Bin 0 -> 70936 bytes .../Fantasy.Tools.ConfigTable.csproj | 45 ++- .../Exporter/NetworkProtocolTemplate.cs | 40 --- .../Exporter/ProtocolExporter.cs | 180 +++++++--- .../ExporterSettings.json | 6 +- .../Fantasy.Tools.NetworkProtocol.csproj | 15 +- .../Template.txt | 33 ++ Tools/SourceCode/Fantasy.Tools.SourceCode.sln | 16 - ...tasy.Tools.SourceCode.sln.DotSettings.user | 1 + 112 files changed, 1021 insertions(+), 1119 deletions(-) delete mode 100644 Entity/Game/Item/ItemComponent.cs rename Hotfix/{Outer => }/Authentication/Handler/C2A_LoginRequestHandler.cs (100%) rename Hotfix/{Outer => }/Authentication/System/AccountSystem.cs (100%) rename Hotfix/{Outer => }/Authentication/System/AuthenticationComponentSystem.cs (100%) rename Hotfix/{Outer => }/Authentication/System/AuthenticationHelper.cs (100%) rename Hotfix/{Outer => }/Authentication/System/Jwt/AuthenticationJwtComponentSystem.cs (100%) rename Hotfix/{Outer => }/Authentication/System/Jwt/AuthenticationJwtHelper.cs (100%) rename Hotfix/{Outer => }/Authentication/System/TimeOut/AccountCacheInfoTimeOutSystem.cs (100%) rename Hotfix/{Outer => }/Authentication/System/TimeOut/AccountTimeOutSystem.cs (100%) rename Hotfix/{Outer => }/Game/Container/ContainerSystem.cs (100%) rename Hotfix/{Outer => }/Game/Handler/ItemFactory.cs (100%) create mode 100644 Hotfix/Game/Role/RoleManagerComponentSystem.cs rename Hotfix/{Outer => }/Game/System/ItemManagerComponentSystem.cs (100%) rename Hotfix/{Outer => }/Gate/Handler/Outer/C2G_GetAccountInfoRequestHandler.cs (94%) rename Hotfix/{Outer => }/Gate/Handler/Outer/C2G_LoginRequestHandler.cs (97%) rename Hotfix/{Outer => }/Gate/System/JWT/GateJWTComponentSystem.cs (100%) rename Hotfix/{Outer => }/Gate/System/JWT/GateJWTHelper.cs (100%) rename Hotfix/{Outer => }/Gate/System/Player/PlayerDestroySystem.cs (100%) rename Hotfix/{Outer => }/Gate/System/Player/PlayerFactory.cs (100%) rename Hotfix/{Outer => }/Gate/System/Player/PlayerFlagComponentSystem.cs (95%) rename Hotfix/{Outer => }/Gate/System/Player/PlayerHelper.cs (96%) rename Hotfix/{Outer => }/Gate/System/PlayerManageComponentSystem.cs (100%) delete mode 100644 Hotfix/Inner/G2A_TestMessageHandler.cs delete mode 100644 Hotfix/Inner/G2A_TestRequestHandler.cs delete mode 100644 Hotfix/Inner/RouteMessage/G2Chat_CreateRouteRequestHandler.cs create mode 100644 Tools/Exporter/NetworkProtocol/CommandLine.dll create mode 100644 Tools/Exporter/NetworkProtocol/ExporterSettings.json create mode 100644 Tools/Exporter/NetworkProtocol/Fantasy.Tools.NetworkProtocol.deps.json create mode 100644 Tools/Exporter/NetworkProtocol/Fantasy.Tools.NetworkProtocol.dll create mode 100644 Tools/Exporter/NetworkProtocol/Fantasy.Tools.NetworkProtocol.exe create mode 100644 Tools/Exporter/NetworkProtocol/Fantasy.Tools.NetworkProtocol.pdb create mode 100644 Tools/Exporter/NetworkProtocol/Fantasy.Tools.NetworkProtocol.runtimeconfig.json create mode 100644 Tools/Exporter/NetworkProtocol/Microsoft.Extensions.Configuration.Abstractions.dll create mode 100644 Tools/Exporter/NetworkProtocol/Microsoft.Extensions.Configuration.FileExtensions.dll create mode 100644 Tools/Exporter/NetworkProtocol/Microsoft.Extensions.Configuration.Json.dll create mode 100644 Tools/Exporter/NetworkProtocol/Microsoft.Extensions.Configuration.dll create mode 100644 Tools/Exporter/NetworkProtocol/Microsoft.Extensions.FileProviders.Abstractions.dll create mode 100644 Tools/Exporter/NetworkProtocol/Microsoft.Extensions.FileProviders.Physical.dll create mode 100644 Tools/Exporter/NetworkProtocol/Microsoft.Extensions.FileSystemGlobbing.dll create mode 100644 Tools/Exporter/NetworkProtocol/Microsoft.Extensions.Primitives.dll create mode 100644 Tools/Exporter/NetworkProtocol/Newtonsoft.Json.dll create mode 100644 Tools/Exporter/NetworkProtocol/Run.bat create mode 100644 Tools/Exporter/NetworkProtocol/Run.sh create mode 100644 Tools/Exporter/NetworkProtocol/System.IO.Pipelines.dll create mode 100644 Tools/Exporter/NetworkProtocol/System.Text.Encodings.Web.dll create mode 100644 Tools/Exporter/NetworkProtocol/System.Text.Json.dll create mode 100644 Tools/Exporter/NetworkProtocol/Template.txt create mode 100644 Tools/Exporter/NetworkProtocol/runtimes/browser/lib/net8.0/System.Text.Encodings.Web.dll create mode 100644 Tools/NetworkProtocol/Fantasy.Tools.NetworkProtocol.exe create mode 100644 Tools/NetworkProtocol/Template.txt create mode 100644 Tools/NetworkProtocol2/CommandLine.dll create mode 100644 Tools/NetworkProtocol2/ExporterSettings.json rename Tools/{NetworkProtocol => NetworkProtocol2}/Fantasy.Tools.NetworkProtocol (100%) create mode 100644 Tools/NetworkProtocol2/Fantasy.Tools.NetworkProtocol.deps.json create mode 100644 Tools/NetworkProtocol2/Fantasy.Tools.NetworkProtocol.dll create mode 100644 Tools/NetworkProtocol2/Fantasy.Tools.NetworkProtocol.pdb create mode 100644 Tools/NetworkProtocol2/Fantasy.Tools.NetworkProtocol.runtimeconfig.json create mode 100644 Tools/NetworkProtocol2/Microsoft.Extensions.Configuration.Abstractions.dll create mode 100644 Tools/NetworkProtocol2/Microsoft.Extensions.Configuration.FileExtensions.dll create mode 100644 Tools/NetworkProtocol2/Microsoft.Extensions.Configuration.Json.dll create mode 100644 Tools/NetworkProtocol2/Microsoft.Extensions.Configuration.dll create mode 100644 Tools/NetworkProtocol2/Microsoft.Extensions.FileProviders.Abstractions.dll create mode 100644 Tools/NetworkProtocol2/Microsoft.Extensions.FileProviders.Physical.dll create mode 100644 Tools/NetworkProtocol2/Microsoft.Extensions.FileSystemGlobbing.dll create mode 100644 Tools/NetworkProtocol2/Microsoft.Extensions.Primitives.dll create mode 100644 Tools/NetworkProtocol2/Newtonsoft.Json.dll create mode 100644 Tools/NetworkProtocol2/Run.bat create mode 100644 Tools/NetworkProtocol2/Run.sh create mode 100644 Tools/NetworkProtocol2/System.IO.Pipelines.dll create mode 100644 Tools/NetworkProtocol2/System.Text.Encodings.Web.dll create mode 100644 Tools/NetworkProtocol2/System.Text.Json.dll create mode 100644 Tools/NetworkProtocol2/runtimes/browser/lib/net8.0/System.Text.Encodings.Web.dll delete mode 100644 Tools/SourceCode/Fantasy.Tools.NetworkProtocol/Exporter/NetworkProtocolTemplate.cs create mode 100644 Tools/SourceCode/Fantasy.Tools.NetworkProtocol/Template.txt diff --git a/Config/Binary/SceneConfigData.bytes b/Config/Binary/SceneConfigData.bytes index b58e4b5..861e2d9 100644 --- a/Config/Binary/SceneConfigData.bytes +++ b/Config/Binary/SceneConfigData.bytes @@ -1,6 +1,7 @@ -&" MultiThread* Addressable@UH -(" MultiThread*Gate2KCP8@UH -" MultiThread*Map@UH -" MultiThread*Chat@UH -" MultiThread*Map@UH \ No newline at end of file +/" MultiThread* Addressable2KCP8@UH +&" MultiThread* Addressable@VH +(" MultiThread*Gate2KCP8@VH +" MultiThread*Map@VH +" MultiThread*Map@VH +" MultiThread*Chat@VH \ No newline at end of file diff --git a/Config/Excel/Server/SceneConfig.xlsx b/Config/Excel/Server/SceneConfig.xlsx index 343902b3ab4b223cead4c68a3e1d2a0eaa238212..5a8a5e6ead2f36518cc1da1ea231b7d30626fa97 100644 GIT binary patch delta 4386 zcmZWtcTm$^vrZs%DWQZaAOZpsK&n!c&><+jNKrb1^j?2R7X^XP6{PoGMS2qukP?~# zh9*^{i5TkTop0uQ=ia-2?3{Ua&+g8dJbRusm#QZx^oEkh z{N8aBA_0M5Y?yskX5gNXpY!v66KB_XNt#Rfr&mb2*xY{I`G%XFqdpUJsXx*n-ARpS zWrJRVN|FZZ@oz6rZz?C!K8j5uW`gCU1f47#{K~$~li2$RchYg7);nk&ov7|eiOnHN zb8hRs7(73lIh_-W^Tq`ttc+)>&|v#`*?71 zqMdHq7(t!$wa#s?Z(ppfS{135rDfG{vNNiZuZNTQ-c8R=yzCTIvpeItmE1BQC)d}b zt`>YJ>TiA)qtfL3$!PhxGin3U^4ZVh*272@{Ow&-P~aG)NnexusO{ND(#mw(&hN8_ z3#~+|JpJEfmV1GFe@WvB)qZ_BYX8fxZbYoKIx@E9RhAW2vd%uq=Rw4^C>?iafY0u% zlul;dFI~j#CJREW-Q!Q!Hszh9^y34!RiwGU7}KrA_>nQ28eXj`wbvbfzv+McisN{_ z>uNSY!m-8{pnB1<(souVZr7dZvPyQ0w4%chD+w4(Ko4R8G=E7U6S1UF%;89ueh-v8qGrc2E-Eg!3`dcZP z*^ihkMs$}YK+A2Whw&*+jhx%kC;6&Ax}2Gbd3Y3gtJ_-i+Va+-b>{Px0WVp(x)qht z0~@+;MR|f z(Ykpr79EY`Z#ZGI3(=EKexIVH7kG}74R~Qbg{UXZEo3IG7i7%RZhP6(X7~jede;+ zz=CQ0E>1axku=B59gBtPy$I!F$g93>rwl>9!Wa-B%du@tWXNHR`3g}r1rLpQY1*}t zGUB0`s@tJeGc=8plfNslKI&h2Hqr(KqWoP*x$JcbkU!C{5_qlb4X;neJT!e@+8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bf4!3ObMXhTSX&B`Sawj64lciHC73(_icuL>Yi zD^(3?r1KCNShhTHOMkR1j}i+Z`iNWj)%$w><9r9>uM43-8sWrLAw1m|QVEq?a@h#m z;e`)SeR6Ck9STb_e6@*Kwts}4*t+SwC!Ho%`CYlB@0C!zSgY&Z$S;R_;4?VsSZ&Y& z8uL&dKuYv~L1&J)A}%6|(U6z3I8*ZKH2dCB32 zmEc8T#PO=%h6rJp7msPb6`f+#x0^X{;$ydsM*G_=`+o|z?tt!R2?!Clp5bvqK))^~*i*{DiN_KSZik}fZaYe4V9aNT zc&Dvk*(2Bez`KKMG{#?Iq5bl-?YO-1WI#`-x{LzWGcf=F$}C3(eI-K+d;xtY1O4~- z!B}<-I0~hc6T>(XhyE0&Z}*o21L^+vH~s@U00?0EV-e6-@`}J4=#IP;Fa*k=AOrVs(7h8ik@p`3E0P%TMP!vFRfDvII%XN&>OQIw_sPtWxyj{0xt hpY`wTt8~zFI$A0NZR|f~;;)k$u>VJhJTiYz{{lvzC6fRE diff --git a/Config/Excel/Version.txt b/Config/Excel/Version.txt index c84cb4b..12888c8 100644 --- a/Config/Excel/Version.txt +++ b/Config/Excel/Version.txt @@ -1 +1 @@ -{"WorksheetNames":[-8419147776733210060,-3495952183970875596,-1088042625810372120,1720330851179383898],"Tables":{"-3495952183970875596":1750919742778,"-1088042625810372120":1731573652950,"1720330851179383898":1728449870789,"3730651590607244245":1731575713470,"5812538452563588342":1748394916174}} \ No newline at end of file +{"WorksheetNames":[-8419147776733210060,-3495952183970875596,1720330851179383898,3730651590607244245],"Tables":{"-3495952183970875596":1753598025078,"-1088042625810372120":1753532052628,"1720330851179383898":1753532052630,"3730651590607244245":1753532052629,"5812538452563588342":1753532052630}} \ No newline at end of file diff --git a/Config/Json/Server/SceneConfigData.Json b/Config/Json/Server/SceneConfigData.Json index f34067d..d4e9f4a 100644 --- a/Config/Json/Server/SceneConfigData.Json +++ b/Config/Json/Server/SceneConfigData.Json @@ -1,8 +1,8 @@ {"List":[ -{"Id":1001,"ProcessConfigId":1,"WorldConfigId":1,"SceneRuntimeMode":"MultiThread","SceneTypeString":"Authentication","NetworkProtocol":"KCP","OuterPort":20001,"InnerPort":11001,"SceneType":1}, -{"Id":1006,"ProcessConfigId":1,"WorldConfigId":1,"SceneRuntimeMode":"MultiThread","SceneTypeString":"Addressable","NetworkProtocol":null,"OuterPort":0,"InnerPort":11006,"SceneType":2}, -{"Id":1002,"ProcessConfigId":1,"WorldConfigId":1,"SceneRuntimeMode":"MultiThread","SceneTypeString":"Gate","NetworkProtocol":"KCP","OuterPort":20000,"InnerPort":11002,"SceneType":3}, -{"Id":1003,"ProcessConfigId":1,"WorldConfigId":1,"SceneRuntimeMode":"MultiThread","SceneTypeString":"Map","NetworkProtocol":null,"OuterPort":0,"InnerPort":11003,"SceneType":4}, -{"Id":1004,"ProcessConfigId":1,"WorldConfigId":1,"SceneRuntimeMode":"MultiThread","SceneTypeString":"Chat","NetworkProtocol":null,"OuterPort":0,"InnerPort":11004,"SceneType":8}, -{"Id":1005,"ProcessConfigId":1,"WorldConfigId":1,"SceneRuntimeMode":"MultiThread","SceneTypeString":"Map","NetworkProtocol":null,"OuterPort":0,"InnerPort":11005,"SceneType":4} +{"Id":1001,"ProcessConfigId":1,"WorldConfigId":1,"SceneRuntimeMode":"MultiThread","SceneTypeString":"Addressable","NetworkProtocol":"KCP","OuterPort":20001,"InnerPort":11001,"SceneType":1}, +{"Id":1002,"ProcessConfigId":1,"WorldConfigId":1,"SceneRuntimeMode":"MultiThread","SceneTypeString":"Addressable","NetworkProtocol":null,"OuterPort":0,"InnerPort":11011,"SceneType":2}, +{"Id":1003,"ProcessConfigId":1,"WorldConfigId":1,"SceneRuntimeMode":"MultiThread","SceneTypeString":"Gate","NetworkProtocol":"KCP","OuterPort":20000,"InnerPort":11021,"SceneType":3}, +{"Id":1004,"ProcessConfigId":1,"WorldConfigId":1,"SceneRuntimeMode":"MultiThread","SceneTypeString":"Map","NetworkProtocol":null,"OuterPort":0,"InnerPort":11031,"SceneType":5}, +{"Id":1005,"ProcessConfigId":1,"WorldConfigId":1,"SceneRuntimeMode":"MultiThread","SceneTypeString":"Map","NetworkProtocol":null,"OuterPort":0,"InnerPort":11041,"SceneType":5}, +{"Id":1006,"ProcessConfigId":1,"WorldConfigId":1,"SceneRuntimeMode":"MultiThread","SceneTypeString":"Chat","NetworkProtocol":null,"OuterPort":0,"InnerPort":11051,"SceneType":8} ]} diff --git a/Config/Json/Server/WorldConfigData.Json b/Config/Json/Server/WorldConfigData.Json index 580dfa9..60dd090 100644 --- a/Config/Json/Server/WorldConfigData.Json +++ b/Config/Json/Server/WorldConfigData.Json @@ -1,3 +1,3 @@ {"List":[ -{"Id":1,"WorldName":"测试服","DbConnection":"mongodb://127.0.0.1","DbName":"fantasy_main","DbType":"MongoDB"} +{"Id":1,"WorldName":"测试服","DbConnection":null,"DbName":"fantasy_main","DbType":"MongoDB"} ]} diff --git a/Config/NetworkProtocol/Inner/InnerMessage.proto b/Config/NetworkProtocol/Inner/InnerMessage.proto index 496ddba..b4bd449 100644 --- a/Config/NetworkProtocol/Inner/InnerMessage.proto +++ b/Config/NetworkProtocol/Inner/InnerMessage.proto @@ -1,75 +1,2 @@ syntax = "proto3"; package Sining.Message; -message G2A_TestMessage // IRouteMessage -{ - string Tag = 1; -} -message G2A_TestRequest // IRouteRequest,G2A_TestResponse -{ - -} -message G2A_TestResponse // IRouteResponse -{ - -} -message G2M_RequestAddressableId // IRouteRequest,M2G_ResponseAddressableId -{ - -} -message M2G_ResponseAddressableId // IRouteResponse -{ - int64 AddressableId = 1; // Map服务器返回的AddressableId -} -/// 通知Chat服务器创建一个RouteId -message G2Chat_CreateRouteRequest // IRouteRequest,Chat2G_CreateRouteResponse -{ - int64 GateRouteId = 1; -} -message Chat2G_CreateRouteResponse // IRouteResponse -{ - int64 ChatRouteId = 1; -} -/// Map给另外一个Map发送Unit数据 -// Protocol Bson -message M2M_SendUnitRequest // IRouteRequest,M2M_SendUnitResponse -{ - -} -// Protocol Bson -message M2M_SendUnitResponse // IRouteResponse -{ - -} -/// Gate发送Addressable消息给MAP -message G2M_SendAddressableMessage // IAddressableRouteMessage -{ - string Tag = 1; -} -// Gate通知Map创建一个SubScene -message G2M_CreateSubSceneRequest // IRouteRequest,M2G_CreateSubSceneResponse -{ - -} -message M2G_CreateSubSceneResponse // IRouteResponse -{ - int64 SubSceneRouteId = 1; -} -// Gate给SubScene发送一个消息 -message G2SubScene_SentMessage // IRouteMessage -{ - string Tag = 1; -} -/// Gate通知SubScene创建一个Addressable消息 -message G2SubScene_AddressableIdRequest // IRouteRequest,SubScene2G_AddressableIdResponse -{ - -} -message SubScene2G_AddressableIdResponse // IRouteResponse -{ - int64 AddressableId = 1; // SubScene服务器返回的AddressableId -} -/// Chat发送一个漫游消息给Map -message Chat2M_TestMessage // IRoamingMessage,MapRoamingType -{ - string Tag = 1; -} \ No newline at end of file diff --git a/Config/NetworkProtocol/Outer/OuterMessage.proto b/Config/NetworkProtocol/Outer/OuterMessage.proto index 19da9f3..c17ad74 100644 --- a/Config/NetworkProtocol/Outer/OuterMessage.proto +++ b/Config/NetworkProtocol/Outer/OuterMessage.proto @@ -7,15 +7,6 @@ package Fantasy.Network.Message; // 使用方式: // 在message协议上方添加// Protocol+空格+协议名字 // 例如:// Protocol ProtoBuf 或 // Protocol MemoryPack -message C2A_RegisterRequest // IRequest,A2C_RegisterResponse -{ - string Username = 1; - string Password = 2; -} -message A2C_RegisterResponse // IResponse -{ - -} message C2A_LoginRequest // IRequest,A2C_LoginResponse { string Username = 1; @@ -54,61 +45,4 @@ message C2G_GetAccountInfoRequest // IRequest,G2C_GetAccountInfoResponse message G2C_GetAccountInfoResponse // IResponse { GameAccountInfo GameAccountInfo = 1; -} - - -message C2G_TestMessage // IMessage -{ - string Tag = 1; -} -message C2G_TestRequest // IRequest,G2C_TestResponse -{ - string Tag = 1; -} -message G2C_TestResponse // IResponse -{ - string Tag = 1; -} -message C2G_CreateAddressableRequest // IRequest,G2C_CreateAddressableResponse -{ - -} -message G2C_CreateAddressableResponse // IResponse -{ - -} -message C2M_TestMessage // IAddressableRouteMessage -{ - string Tag = 1; -} -message C2M_TestRequest // IAddressableRouteRequest,M2C_TestResponse -{ - string Tag = 1; -} -message M2C_TestResponse // IAddressableRouteResponse -{ - string Tag = 1; -} -/// 通知Gate服务器创建一个Chat的Route连接 -message C2G_CreateChatRouteRequest // IRequest,G2C_CreateChatRouteResponse -{ - -} -message G2C_CreateChatRouteResponse // IResponse -{ - -} -/// 发送一个Route消息给Chat -message C2Chat_TestMessage // ICustomRouteMessage,ChatRoute -{ - string Tag = 1; -} -/// 发送一个RPCRoute消息给Chat -message C2Chat_TestMessageRequest // ICustomRouteRequest,Chat2C_TestMessageResponse,ChatRoute -{ - string Tag = 1; -} -message Chat2C_TestMessageResponse // ICustomRouteResponse -{ - string Tag = 1; } \ No newline at end of file diff --git a/Entity/Game/Item/ItemComponent.cs b/Entity/Game/Item/ItemComponent.cs deleted file mode 100644 index 724ab73..0000000 --- a/Entity/Game/Item/ItemComponent.cs +++ /dev/null @@ -1,8 +0,0 @@ -using Fantasy.Entitas; - -namespace NB.Game; - -public class ItemComponent : Entity -{ - -} \ No newline at end of file diff --git a/Entity/Game/Role/RoleComAttribute.cs b/Entity/Game/Role/RoleComAttribute.cs index f3ca35f..326c94d 100644 --- a/Entity/Game/Role/RoleComAttribute.cs +++ b/Entity/Game/Role/RoleComAttribute.cs @@ -3,7 +3,7 @@ namespace NB; /// -/// 挂这个 玩家Role创建时会自动添加此组件 +/// 挂这个 玩家Unit创建时会自动添加此组件 /// public class RoleComAttribute : BaseAttribute { diff --git a/Entity/Game/Role/RoleManagerComponent.cs b/Entity/Game/Role/RoleManagerComponent.cs index 689a052..4cc9859 100644 --- a/Entity/Game/Role/RoleManagerComponent.cs +++ b/Entity/Game/Role/RoleManagerComponent.cs @@ -4,5 +4,8 @@ namespace NB; public class RoleManagerComponent : Entity { + /// + /// 游戏列表 + /// public readonly Dictionary Roles = new(); } \ No newline at end of file diff --git a/Entity/Gate/Entity/Player.cs b/Entity/Gate/Entity/Player.cs index 2d89780..af984f7 100644 --- a/Entity/Gate/Entity/Player.cs +++ b/Entity/Gate/Entity/Player.cs @@ -9,6 +9,5 @@ public sealed class Player : Entity public long LoginTime; [BsonIgnore] - // BsonIgnore特性是让Bson保存到数据库中忽略掉这个字段。 public long SessionRunTimeId; } \ No newline at end of file diff --git a/Entity/Gate/Entity/PlayerFlagComponent.cs b/Entity/Gate/Entity/PlayerFlagComponent.cs index b24e251..68a43d5 100644 --- a/Entity/Gate/Entity/PlayerFlagComponent.cs +++ b/Entity/Gate/Entity/PlayerFlagComponent.cs @@ -11,5 +11,5 @@ public sealed class PlayerFlagComponent : Entity // 有一种可能,当在Account在其他地方被销毁 // 这时候因为这个Account是会回收到池子中,所以这个引用还是有效的 // 那这时候就会出现这个引用的Account可能是其他用户的了。 - public EntityReference Account; + public EntityReference Player; } \ No newline at end of file diff --git a/Entity/Generate/CustomExport/SceneType.cs b/Entity/Generate/CustomExport/SceneType.cs index de34ed9..692a905 100644 --- a/Entity/Generate/CustomExport/SceneType.cs +++ b/Entity/Generate/CustomExport/SceneType.cs @@ -6,10 +6,10 @@ namespace Fantasy public const int Authentication = 1; public const int Addressable = 2; public const int Gate = 3; - public const int Map = 4; - public const int CopyDispatcher = 5; - public const int CopyManager = 6; - public const int Copy = 7; + public const int Game = 4; + public const int Map = 5; + public const int Activity = 6; + public const int Cache = 7; public const int Chat = 8; public static readonly Dictionary SceneTypeDic = new Dictionary() @@ -17,10 +17,10 @@ namespace Fantasy { "Authentication", 1 }, { "Addressable", 2 }, { "Gate", 3 }, - { "Map", 4 }, - { "CopyDispatcher", 5 }, - { "CopyManager", 6 }, - { "Copy", 7 }, + { "Game", 4 }, + { "Map", 5 }, + { "Activity", 6 }, + { "Cache", 7 }, { "Chat", 8 }, }; } diff --git a/Entity/Generate/NetworkProtocol/InnerMessage.cs b/Entity/Generate/NetworkProtocol/InnerMessage.cs index c4f2a7e..586abde 100644 --- a/Entity/Generate/NetworkProtocol/InnerMessage.cs +++ b/Entity/Generate/NetworkProtocol/InnerMessage.cs @@ -15,317 +15,6 @@ using Fantasy.Serialize; #pragma warning disable CS8625 // Cannot convert null literal to non-nullable reference type. #pragma warning disable CS8618 -namespace Fantasy +namespace NBC { - [ProtoContract] - public partial class G2A_TestMessage : AMessage, IRouteMessage, IProto - { - public static G2A_TestMessage Create(Scene scene) - { - return scene.MessagePoolComponent.Rent(); - } - public override void Dispose() - { - Tag = default; -#if FANTASY_NET || FANTASY_UNITY - GetScene().MessagePoolComponent.Return(this); -#endif - } - public uint OpCode() { return InnerOpcode.G2A_TestMessage; } - [ProtoMember(1)] - public string Tag { get; set; } - } - [ProtoContract] - public partial class G2A_TestRequest : AMessage, IRouteRequest, IProto - { - public static G2A_TestRequest Create(Scene scene) - { - return scene.MessagePoolComponent.Rent(); - } - public override void Dispose() - { -#if FANTASY_NET || FANTASY_UNITY - GetScene().MessagePoolComponent.Return(this); -#endif - } - [ProtoIgnore] - public G2A_TestResponse ResponseType { get; set; } - public uint OpCode() { return InnerOpcode.G2A_TestRequest; } - } - [ProtoContract] - public partial class G2A_TestResponse : AMessage, IRouteResponse, IProto - { - public static G2A_TestResponse Create(Scene scene) - { - return scene.MessagePoolComponent.Rent(); - } - public override void Dispose() - { - ErrorCode = default; -#if FANTASY_NET || FANTASY_UNITY - GetScene().MessagePoolComponent.Return(this); -#endif - } - public uint OpCode() { return InnerOpcode.G2A_TestResponse; } - [ProtoMember(1)] - public uint ErrorCode { get; set; } - } - [ProtoContract] - public partial class G2M_RequestAddressableId : AMessage, IRouteRequest, IProto - { - public static G2M_RequestAddressableId Create(Scene scene) - { - return scene.MessagePoolComponent.Rent(); - } - public override void Dispose() - { -#if FANTASY_NET || FANTASY_UNITY - GetScene().MessagePoolComponent.Return(this); -#endif - } - [ProtoIgnore] - public M2G_ResponseAddressableId ResponseType { get; set; } - public uint OpCode() { return InnerOpcode.G2M_RequestAddressableId; } - } - [ProtoContract] - public partial class M2G_ResponseAddressableId : AMessage, IRouteResponse, IProto - { - public static M2G_ResponseAddressableId Create(Scene scene) - { - return scene.MessagePoolComponent.Rent(); - } - public override void Dispose() - { - ErrorCode = default; - AddressableId = default; -#if FANTASY_NET || FANTASY_UNITY - GetScene().MessagePoolComponent.Return(this); -#endif - } - public uint OpCode() { return InnerOpcode.M2G_ResponseAddressableId; } - [ProtoMember(1)] - public long AddressableId { get; set; } - [ProtoMember(2)] - public uint ErrorCode { get; set; } - } - /// - /// 通知Chat服务器创建一个RouteId - /// - [ProtoContract] - public partial class G2Chat_CreateRouteRequest : AMessage, IRouteRequest, IProto - { - public static G2Chat_CreateRouteRequest Create(Scene scene) - { - return scene.MessagePoolComponent.Rent(); - } - public override void Dispose() - { - GateRouteId = default; -#if FANTASY_NET || FANTASY_UNITY - GetScene().MessagePoolComponent.Return(this); -#endif - } - [ProtoIgnore] - public Chat2G_CreateRouteResponse ResponseType { get; set; } - public uint OpCode() { return InnerOpcode.G2Chat_CreateRouteRequest; } - [ProtoMember(1)] - public long GateRouteId { get; set; } - } - [ProtoContract] - public partial class Chat2G_CreateRouteResponse : AMessage, IRouteResponse, IProto - { - public static Chat2G_CreateRouteResponse Create(Scene scene) - { - return scene.MessagePoolComponent.Rent(); - } - public override void Dispose() - { - ErrorCode = default; - ChatRouteId = default; -#if FANTASY_NET || FANTASY_UNITY - GetScene().MessagePoolComponent.Return(this); -#endif - } - public uint OpCode() { return InnerOpcode.Chat2G_CreateRouteResponse; } - [ProtoMember(1)] - public long ChatRouteId { get; set; } - [ProtoMember(2)] - public uint ErrorCode { get; set; } - } - /// - /// Map给另外一个Map发送Unit数据 - /// - public partial class M2M_SendUnitRequest : AMessage, IRouteRequest - { - public static M2M_SendUnitRequest Create(Scene scene) - { - return scene.MessagePoolComponent.Rent(); - } - public override void Dispose() - { -#if FANTASY_NET || FANTASY_UNITY - GetScene().MessagePoolComponent.Return(this); -#endif - } - [BsonIgnore] - public M2M_SendUnitResponse ResponseType { get; set; } - public uint OpCode() { return InnerOpcode.M2M_SendUnitRequest; } - } - public partial class M2M_SendUnitResponse : AMessage, IRouteResponse - { - public static M2M_SendUnitResponse Create(Scene scene) - { - return scene.MessagePoolComponent.Rent(); - } - public override void Dispose() - { - ErrorCode = default; -#if FANTASY_NET || FANTASY_UNITY - GetScene().MessagePoolComponent.Return(this); -#endif - } - public uint OpCode() { return InnerOpcode.M2M_SendUnitResponse; } - public uint ErrorCode { get; set; } - } - /// - /// Gate发送Addressable消息给MAP - /// - [ProtoContract] - public partial class G2M_SendAddressableMessage : AMessage, IAddressableRouteMessage, IProto - { - public static G2M_SendAddressableMessage Create(Scene scene) - { - return scene.MessagePoolComponent.Rent(); - } - public override void Dispose() - { - Tag = default; -#if FANTASY_NET || FANTASY_UNITY - GetScene().MessagePoolComponent.Return(this); -#endif - } - public uint OpCode() { return InnerOpcode.G2M_SendAddressableMessage; } - [ProtoMember(1)] - public string Tag { get; set; } - } - [ProtoContract] - public partial class G2M_CreateSubSceneRequest : AMessage, IRouteRequest, IProto - { - public static G2M_CreateSubSceneRequest Create(Scene scene) - { - return scene.MessagePoolComponent.Rent(); - } - public override void Dispose() - { -#if FANTASY_NET || FANTASY_UNITY - GetScene().MessagePoolComponent.Return(this); -#endif - } - [ProtoIgnore] - public M2G_CreateSubSceneResponse ResponseType { get; set; } - public uint OpCode() { return InnerOpcode.G2M_CreateSubSceneRequest; } - } - [ProtoContract] - public partial class M2G_CreateSubSceneResponse : AMessage, IRouteResponse, IProto - { - public static M2G_CreateSubSceneResponse Create(Scene scene) - { - return scene.MessagePoolComponent.Rent(); - } - public override void Dispose() - { - ErrorCode = default; - SubSceneRouteId = default; -#if FANTASY_NET || FANTASY_UNITY - GetScene().MessagePoolComponent.Return(this); -#endif - } - public uint OpCode() { return InnerOpcode.M2G_CreateSubSceneResponse; } - [ProtoMember(1)] - public long SubSceneRouteId { get; set; } - [ProtoMember(2)] - public uint ErrorCode { get; set; } - } - [ProtoContract] - public partial class G2SubScene_SentMessage : AMessage, IRouteMessage, IProto - { - public static G2SubScene_SentMessage Create(Scene scene) - { - return scene.MessagePoolComponent.Rent(); - } - public override void Dispose() - { - Tag = default; -#if FANTASY_NET || FANTASY_UNITY - GetScene().MessagePoolComponent.Return(this); -#endif - } - public uint OpCode() { return InnerOpcode.G2SubScene_SentMessage; } - [ProtoMember(1)] - public string Tag { get; set; } - } - /// - /// Gate通知SubScene创建一个Addressable消息 - /// - [ProtoContract] - public partial class G2SubScene_AddressableIdRequest : AMessage, IRouteRequest, IProto - { - public static G2SubScene_AddressableIdRequest Create(Scene scene) - { - return scene.MessagePoolComponent.Rent(); - } - public override void Dispose() - { -#if FANTASY_NET || FANTASY_UNITY - GetScene().MessagePoolComponent.Return(this); -#endif - } - [ProtoIgnore] - public SubScene2G_AddressableIdResponse ResponseType { get; set; } - public uint OpCode() { return InnerOpcode.G2SubScene_AddressableIdRequest; } - } - [ProtoContract] - public partial class SubScene2G_AddressableIdResponse : AMessage, IRouteResponse, IProto - { - public static SubScene2G_AddressableIdResponse Create(Scene scene) - { - return scene.MessagePoolComponent.Rent(); - } - public override void Dispose() - { - ErrorCode = default; - AddressableId = default; -#if FANTASY_NET || FANTASY_UNITY - GetScene().MessagePoolComponent.Return(this); -#endif - } - public uint OpCode() { return InnerOpcode.SubScene2G_AddressableIdResponse; } - [ProtoMember(1)] - public long AddressableId { get; set; } - [ProtoMember(2)] - public uint ErrorCode { get; set; } - } - /// - /// Chat发送一个漫游消息给Map - /// - [ProtoContract] - public partial class Chat2M_TestMessage : AMessage, IRoamingMessage, IProto - { - public static Chat2M_TestMessage Create(Scene scene) - { - return scene.MessagePoolComponent.Rent(); - } - public override void Dispose() - { - Tag = default; -#if FANTASY_NET || FANTASY_UNITY - GetScene().MessagePoolComponent.Return(this); -#endif - } - public uint OpCode() { return InnerOpcode.Chat2M_TestMessage; } - [ProtoIgnore] - public int RouteType => Fantasy.RoamingType.MapRoamingType; - [ProtoMember(1)] - public string Tag { get; set; } - } } diff --git a/Entity/Generate/NetworkProtocol/InnerOpcode.cs b/Entity/Generate/NetworkProtocol/InnerOpcode.cs index a6128fe..ce1590d 100644 --- a/Entity/Generate/NetworkProtocol/InnerOpcode.cs +++ b/Entity/Generate/NetworkProtocol/InnerOpcode.cs @@ -2,21 +2,5 @@ namespace Fantasy { public static partial class InnerOpcode { - public const uint G2A_TestMessage = 939534097; - public const uint G2A_TestRequest = 1073751825; - public const uint G2A_TestResponse = 1207969553; - public const uint G2M_RequestAddressableId = 1073751826; - public const uint M2G_ResponseAddressableId = 1207969554; - public const uint G2Chat_CreateRouteRequest = 1073751827; - public const uint Chat2G_CreateRouteResponse = 1207969555; - public const uint M2M_SendUnitRequest = 1082140436; - public const uint M2M_SendUnitResponse = 1216358164; - public const uint G2M_SendAddressableMessage = 1744840465; - public const uint G2M_CreateSubSceneRequest = 1073751829; - public const uint M2G_CreateSubSceneResponse = 1207969557; - public const uint G2SubScene_SentMessage = 939534098; - public const uint G2SubScene_AddressableIdRequest = 1073751830; - public const uint SubScene2G_AddressableIdResponse = 1207969558; - public const uint Chat2M_TestMessage = 2952800017; } } diff --git a/Entity/Generate/NetworkProtocol/OuterMessage.cs b/Entity/Generate/NetworkProtocol/OuterMessage.cs index 3cb1015..2461e93 100644 --- a/Entity/Generate/NetworkProtocol/OuterMessage.cs +++ b/Entity/Generate/NetworkProtocol/OuterMessage.cs @@ -15,49 +15,8 @@ using Fantasy.Serialize; #pragma warning disable CS8625 // Cannot convert null literal to non-nullable reference type. #pragma warning disable CS8618 -namespace Fantasy +namespace NBC { - [ProtoContract] - public partial class C2A_RegisterRequest : AMessage, IRequest, IProto - { - public static C2A_RegisterRequest Create(Scene scene) - { - return scene.MessagePoolComponent.Rent(); - } - public override void Dispose() - { - Username = default; - Password = default; -#if FANTASY_NET || FANTASY_UNITY - GetScene().MessagePoolComponent.Return(this); -#endif - } - [ProtoIgnore] - public A2C_RegisterResponse ResponseType { get; set; } - public uint OpCode() { return OuterOpcode.C2A_RegisterRequest; } - [ProtoMember(1)] - public string Username { get; set; } - [ProtoMember(2)] - public string Password { get; set; } - } - [ProtoContract] - public partial class A2C_RegisterResponse : AMessage, IResponse, IProto - { - public static A2C_RegisterResponse Create(Scene scene) - { - return scene.MessagePoolComponent.Rent(); - } - public override void Dispose() - { - ErrorCode = default; -#if FANTASY_NET || FANTASY_UNITY - GetScene().MessagePoolComponent.Return(this); -#endif - } - public uint OpCode() { return OuterOpcode.A2C_RegisterResponse; } - [ProtoMember(1)] - public uint ErrorCode { get; set; } - } [ProtoContract] public partial class C2A_LoginRequest : AMessage, IRequest, IProto { @@ -231,264 +190,4 @@ namespace Fantasy [ProtoMember(2)] public uint ErrorCode { get; set; } } - [ProtoContract] - public partial class C2G_TestMessage : AMessage, IMessage, IProto - { - public static C2G_TestMessage Create(Scene scene) - { - return scene.MessagePoolComponent.Rent(); - } - public override void Dispose() - { - Tag = default; -#if FANTASY_NET || FANTASY_UNITY - GetScene().MessagePoolComponent.Return(this); -#endif - } - public uint OpCode() { return OuterOpcode.C2G_TestMessage; } - [ProtoMember(1)] - public string Tag { get; set; } - } - [ProtoContract] - public partial class C2G_TestRequest : AMessage, IRequest, IProto - { - public static C2G_TestRequest Create(Scene scene) - { - return scene.MessagePoolComponent.Rent(); - } - public override void Dispose() - { - Tag = default; -#if FANTASY_NET || FANTASY_UNITY - GetScene().MessagePoolComponent.Return(this); -#endif - } - [ProtoIgnore] - public G2C_TestResponse ResponseType { get; set; } - public uint OpCode() { return OuterOpcode.C2G_TestRequest; } - [ProtoMember(1)] - public string Tag { get; set; } - } - [ProtoContract] - public partial class G2C_TestResponse : AMessage, IResponse, IProto - { - public static G2C_TestResponse Create(Scene scene) - { - return scene.MessagePoolComponent.Rent(); - } - public override void Dispose() - { - ErrorCode = default; - Tag = default; -#if FANTASY_NET || FANTASY_UNITY - GetScene().MessagePoolComponent.Return(this); -#endif - } - public uint OpCode() { return OuterOpcode.G2C_TestResponse; } - [ProtoMember(1)] - public string Tag { get; set; } - [ProtoMember(2)] - public uint ErrorCode { get; set; } - } - [ProtoContract] - public partial class C2G_CreateAddressableRequest : AMessage, IRequest, IProto - { - public static C2G_CreateAddressableRequest Create(Scene scene) - { - return scene.MessagePoolComponent.Rent(); - } - public override void Dispose() - { -#if FANTASY_NET || FANTASY_UNITY - GetScene().MessagePoolComponent.Return(this); -#endif - } - [ProtoIgnore] - public G2C_CreateAddressableResponse ResponseType { get; set; } - public uint OpCode() { return OuterOpcode.C2G_CreateAddressableRequest; } - } - [ProtoContract] - public partial class G2C_CreateAddressableResponse : AMessage, IResponse, IProto - { - public static G2C_CreateAddressableResponse Create(Scene scene) - { - return scene.MessagePoolComponent.Rent(); - } - public override void Dispose() - { - ErrorCode = default; -#if FANTASY_NET || FANTASY_UNITY - GetScene().MessagePoolComponent.Return(this); -#endif - } - public uint OpCode() { return OuterOpcode.G2C_CreateAddressableResponse; } - [ProtoMember(1)] - public uint ErrorCode { get; set; } - } - [ProtoContract] - public partial class C2M_TestMessage : AMessage, IAddressableRouteMessage, IProto - { - public static C2M_TestMessage Create(Scene scene) - { - return scene.MessagePoolComponent.Rent(); - } - public override void Dispose() - { - Tag = default; -#if FANTASY_NET || FANTASY_UNITY - GetScene().MessagePoolComponent.Return(this); -#endif - } - public uint OpCode() { return OuterOpcode.C2M_TestMessage; } - [ProtoMember(1)] - public string Tag { get; set; } - } - [ProtoContract] - public partial class C2M_TestRequest : AMessage, IAddressableRouteRequest, IProto - { - public static C2M_TestRequest Create(Scene scene) - { - return scene.MessagePoolComponent.Rent(); - } - public override void Dispose() - { - Tag = default; -#if FANTASY_NET || FANTASY_UNITY - GetScene().MessagePoolComponent.Return(this); -#endif - } - [ProtoIgnore] - public M2C_TestResponse ResponseType { get; set; } - public uint OpCode() { return OuterOpcode.C2M_TestRequest; } - [ProtoMember(1)] - public string Tag { get; set; } - } - [ProtoContract] - public partial class M2C_TestResponse : AMessage, IAddressableRouteResponse, IProto - { - public static M2C_TestResponse Create(Scene scene) - { - return scene.MessagePoolComponent.Rent(); - } - public override void Dispose() - { - ErrorCode = default; - Tag = default; -#if FANTASY_NET || FANTASY_UNITY - GetScene().MessagePoolComponent.Return(this); -#endif - } - public uint OpCode() { return OuterOpcode.M2C_TestResponse; } - [ProtoMember(1)] - public string Tag { get; set; } - [ProtoMember(2)] - public uint ErrorCode { get; set; } - } - /// - /// 通知Gate服务器创建一个Chat的Route连接 - /// - [ProtoContract] - public partial class C2G_CreateChatRouteRequest : AMessage, IRequest, IProto - { - public static C2G_CreateChatRouteRequest Create(Scene scene) - { - return scene.MessagePoolComponent.Rent(); - } - public override void Dispose() - { -#if FANTASY_NET || FANTASY_UNITY - GetScene().MessagePoolComponent.Return(this); -#endif - } - [ProtoIgnore] - public G2C_CreateChatRouteResponse ResponseType { get; set; } - public uint OpCode() { return OuterOpcode.C2G_CreateChatRouteRequest; } - } - [ProtoContract] - public partial class G2C_CreateChatRouteResponse : AMessage, IResponse, IProto - { - public static G2C_CreateChatRouteResponse Create(Scene scene) - { - return scene.MessagePoolComponent.Rent(); - } - public override void Dispose() - { - ErrorCode = default; -#if FANTASY_NET || FANTASY_UNITY - GetScene().MessagePoolComponent.Return(this); -#endif - } - public uint OpCode() { return OuterOpcode.G2C_CreateChatRouteResponse; } - [ProtoMember(1)] - public uint ErrorCode { get; set; } - } - /// - /// 发送一个Route消息给Chat - /// - [ProtoContract] - public partial class C2Chat_TestMessage : AMessage, ICustomRouteMessage, IProto - { - public static C2Chat_TestMessage Create(Scene scene) - { - return scene.MessagePoolComponent.Rent(); - } - public override void Dispose() - { - Tag = default; -#if FANTASY_NET || FANTASY_UNITY - GetScene().MessagePoolComponent.Return(this); -#endif - } - public uint OpCode() { return OuterOpcode.C2Chat_TestMessage; } - [ProtoIgnore] - public int RouteType => Fantasy.RouteType.ChatRoute; - [ProtoMember(1)] - public string Tag { get; set; } - } - /// - /// 发送一个RPCRoute消息给Chat - /// - [ProtoContract] - public partial class C2Chat_TestMessageRequest : AMessage, ICustomRouteRequest, IProto - { - public static C2Chat_TestMessageRequest Create(Scene scene) - { - return scene.MessagePoolComponent.Rent(); - } - public override void Dispose() - { - Tag = default; -#if FANTASY_NET || FANTASY_UNITY - GetScene().MessagePoolComponent.Return(this); -#endif - } - [ProtoIgnore] - public Chat2C_TestMessageResponse ResponseType { get; set; } - public uint OpCode() { return OuterOpcode.C2Chat_TestMessageRequest; } - [ProtoIgnore] - public int RouteType => Fantasy.RouteType.ChatRoute; - [ProtoMember(1)] - public string Tag { get; set; } - } - [ProtoContract] - public partial class Chat2C_TestMessageResponse : AMessage, ICustomRouteResponse, IProto - { - public static Chat2C_TestMessageResponse Create(Scene scene) - { - return scene.MessagePoolComponent.Rent(); - } - public override void Dispose() - { - ErrorCode = default; - Tag = default; -#if FANTASY_NET || FANTASY_UNITY - GetScene().MessagePoolComponent.Return(this); -#endif - } - public uint OpCode() { return OuterOpcode.Chat2C_TestMessageResponse; } - [ProtoMember(1)] - public string Tag { get; set; } - [ProtoMember(2)] - public uint ErrorCode { get; set; } - } } diff --git a/Entity/Generate/NetworkProtocol/OuterOpcode.cs b/Entity/Generate/NetworkProtocol/OuterOpcode.cs index 9dd0ec8..4648e95 100644 --- a/Entity/Generate/NetworkProtocol/OuterOpcode.cs +++ b/Entity/Generate/NetworkProtocol/OuterOpcode.cs @@ -2,27 +2,12 @@ namespace Fantasy { public static partial class OuterOpcode { - public const uint C2A_RegisterRequest = 268445457; - public const uint A2C_RegisterResponse = 402663185; - public const uint C2A_LoginRequest = 268445458; - public const uint A2C_LoginResponse = 402663186; - public const uint C2G_LoginRequest = 268445459; - public const uint G2C_LoginResponse = 402663187; + public const uint C2A_LoginRequest = 268445457; + public const uint A2C_LoginResponse = 402663185; + public const uint C2G_LoginRequest = 268445458; + public const uint G2C_LoginResponse = 402663186; public const uint G2C_RepeatLogin = 134227729; - public const uint C2G_GetAccountInfoRequest = 268445460; - public const uint G2C_GetAccountInfoResponse = 402663188; - public const uint C2G_TestMessage = 134227730; - public const uint C2G_TestRequest = 268445461; - public const uint G2C_TestResponse = 402663189; - public const uint C2G_CreateAddressableRequest = 268445462; - public const uint G2C_CreateAddressableResponse = 402663190; - public const uint C2M_TestMessage = 1342187281; - public const uint C2M_TestRequest = 1476405009; - public const uint M2C_TestResponse = 1610622737; - public const uint C2G_CreateChatRouteRequest = 268445463; - public const uint G2C_CreateChatRouteResponse = 402663191; - public const uint C2Chat_TestMessage = 2147493649; - public const uint C2Chat_TestMessageRequest = 2281711377; - public const uint Chat2C_TestMessageResponse = 2415929105; + public const uint C2G_GetAccountInfoRequest = 268445459; + public const uint G2C_GetAccountInfoResponse = 402663187; } } diff --git a/Hotfix/Outer/Authentication/Handler/C2A_LoginRequestHandler.cs b/Hotfix/Authentication/Handler/C2A_LoginRequestHandler.cs similarity index 100% rename from Hotfix/Outer/Authentication/Handler/C2A_LoginRequestHandler.cs rename to Hotfix/Authentication/Handler/C2A_LoginRequestHandler.cs diff --git a/Hotfix/Outer/Authentication/System/AccountSystem.cs b/Hotfix/Authentication/System/AccountSystem.cs similarity index 100% rename from Hotfix/Outer/Authentication/System/AccountSystem.cs rename to Hotfix/Authentication/System/AccountSystem.cs diff --git a/Hotfix/Outer/Authentication/System/AuthenticationComponentSystem.cs b/Hotfix/Authentication/System/AuthenticationComponentSystem.cs similarity index 100% rename from Hotfix/Outer/Authentication/System/AuthenticationComponentSystem.cs rename to Hotfix/Authentication/System/AuthenticationComponentSystem.cs diff --git a/Hotfix/Outer/Authentication/System/AuthenticationHelper.cs b/Hotfix/Authentication/System/AuthenticationHelper.cs similarity index 100% rename from Hotfix/Outer/Authentication/System/AuthenticationHelper.cs rename to Hotfix/Authentication/System/AuthenticationHelper.cs diff --git a/Hotfix/Outer/Authentication/System/Jwt/AuthenticationJwtComponentSystem.cs b/Hotfix/Authentication/System/Jwt/AuthenticationJwtComponentSystem.cs similarity index 100% rename from Hotfix/Outer/Authentication/System/Jwt/AuthenticationJwtComponentSystem.cs rename to Hotfix/Authentication/System/Jwt/AuthenticationJwtComponentSystem.cs diff --git a/Hotfix/Outer/Authentication/System/Jwt/AuthenticationJwtHelper.cs b/Hotfix/Authentication/System/Jwt/AuthenticationJwtHelper.cs similarity index 100% rename from Hotfix/Outer/Authentication/System/Jwt/AuthenticationJwtHelper.cs rename to Hotfix/Authentication/System/Jwt/AuthenticationJwtHelper.cs diff --git a/Hotfix/Outer/Authentication/System/TimeOut/AccountCacheInfoTimeOutSystem.cs b/Hotfix/Authentication/System/TimeOut/AccountCacheInfoTimeOutSystem.cs similarity index 100% rename from Hotfix/Outer/Authentication/System/TimeOut/AccountCacheInfoTimeOutSystem.cs rename to Hotfix/Authentication/System/TimeOut/AccountCacheInfoTimeOutSystem.cs diff --git a/Hotfix/Outer/Authentication/System/TimeOut/AccountTimeOutSystem.cs b/Hotfix/Authentication/System/TimeOut/AccountTimeOutSystem.cs similarity index 100% rename from Hotfix/Outer/Authentication/System/TimeOut/AccountTimeOutSystem.cs rename to Hotfix/Authentication/System/TimeOut/AccountTimeOutSystem.cs diff --git a/Hotfix/Outer/Game/Container/ContainerSystem.cs b/Hotfix/Game/Container/ContainerSystem.cs similarity index 100% rename from Hotfix/Outer/Game/Container/ContainerSystem.cs rename to Hotfix/Game/Container/ContainerSystem.cs diff --git a/Hotfix/Outer/Game/Handler/ItemFactory.cs b/Hotfix/Game/Handler/ItemFactory.cs similarity index 100% rename from Hotfix/Outer/Game/Handler/ItemFactory.cs rename to Hotfix/Game/Handler/ItemFactory.cs diff --git a/Hotfix/Game/Role/RoleManagerComponentSystem.cs b/Hotfix/Game/Role/RoleManagerComponentSystem.cs new file mode 100644 index 0000000..9858365 --- /dev/null +++ b/Hotfix/Game/Role/RoleManagerComponentSystem.cs @@ -0,0 +1,49 @@ +using Fantasy.Entitas.Interface; + +namespace NB; + +public sealed class RoleManagerComponentDestroySystem : DestroySystem +{ + protected override void Destroy(RoleManagerComponent self) + { + foreach (var (_, role) in self.Roles) + { + role.Dispose(); + } + + self.Roles.Clear(); + } +} + +public static class RoleManagerComponentSystem +{ + public static void Add(this RoleManagerComponent self, Role account) + { + self.Roles.Add(account.Id, account); + } + + public static Role Get(this RoleManagerComponent self, long accountId) + { + return self.Roles.GetValueOrDefault(accountId); + } + + public static bool TryGet(this RoleManagerComponent self, long accountId, out Role account) + { + return self.Roles.TryGetValue(accountId, out account); + } + + public static void Remove(this RoleManagerComponent self, long accountId, bool isDispose = true) + { + if (!self.Roles.Remove(accountId, out var account)) + { + return; + } + + if (!isDispose) + { + return; + } + + account.Dispose(); + } +} \ No newline at end of file diff --git a/Hotfix/Outer/Game/System/ItemManagerComponentSystem.cs b/Hotfix/Game/System/ItemManagerComponentSystem.cs similarity index 100% rename from Hotfix/Outer/Game/System/ItemManagerComponentSystem.cs rename to Hotfix/Game/System/ItemManagerComponentSystem.cs diff --git a/Hotfix/Outer/Gate/Handler/Outer/C2G_GetAccountInfoRequestHandler.cs b/Hotfix/Gate/Handler/Outer/C2G_GetAccountInfoRequestHandler.cs similarity index 94% rename from Hotfix/Outer/Gate/Handler/Outer/C2G_GetAccountInfoRequestHandler.cs rename to Hotfix/Gate/Handler/Outer/C2G_GetAccountInfoRequestHandler.cs index e04c32c..05decaf 100644 --- a/Hotfix/Outer/Gate/Handler/Outer/C2G_GetAccountInfoRequestHandler.cs +++ b/Hotfix/Gate/Handler/Outer/C2G_GetAccountInfoRequestHandler.cs @@ -19,7 +19,7 @@ public sealed class C2G_GetAccountInfoRequestHandler : MessageRPC(); gameAccountFlagComponent.AccountID = 0; - gameAccountFlagComponent.Account = null; + gameAccountFlagComponent.Player = null; // 给客户端发送一个重复登录的消息,如果当前客户端是自己上次登录的,发送也不会收到。 oldSession.Send(new G2C_RepeatLogin()); // 给当前Session做一个定时销毁的任务,因为不做这个定时销毁,直接销毁的话,有可能消息还没有发送过去就销毁了 @@ -90,10 +90,12 @@ public sealed class C2G_LoginRequestHandler : MessageRPC(); accountFlagComponent.AccountID = accountId; - accountFlagComponent.Account = account; + accountFlagComponent.Player = account; account.SessionRunTimeId = session.RuntimeId; response.GameAccountInfo = account.GetGameAccountInfo(); Log.Debug($"当前的Gate服务器:{session.Scene.SceneConfigId} accountId:{accountId}"); + + //连接到游戏中心服 } } \ No newline at end of file diff --git a/Hotfix/Outer/Gate/System/JWT/GateJWTComponentSystem.cs b/Hotfix/Gate/System/JWT/GateJWTComponentSystem.cs similarity index 100% rename from Hotfix/Outer/Gate/System/JWT/GateJWTComponentSystem.cs rename to Hotfix/Gate/System/JWT/GateJWTComponentSystem.cs diff --git a/Hotfix/Outer/Gate/System/JWT/GateJWTHelper.cs b/Hotfix/Gate/System/JWT/GateJWTHelper.cs similarity index 100% rename from Hotfix/Outer/Gate/System/JWT/GateJWTHelper.cs rename to Hotfix/Gate/System/JWT/GateJWTHelper.cs diff --git a/Hotfix/Outer/Gate/System/Player/PlayerDestroySystem.cs b/Hotfix/Gate/System/Player/PlayerDestroySystem.cs similarity index 100% rename from Hotfix/Outer/Gate/System/Player/PlayerDestroySystem.cs rename to Hotfix/Gate/System/Player/PlayerDestroySystem.cs diff --git a/Hotfix/Outer/Gate/System/Player/PlayerFactory.cs b/Hotfix/Gate/System/Player/PlayerFactory.cs similarity index 100% rename from Hotfix/Outer/Gate/System/Player/PlayerFactory.cs rename to Hotfix/Gate/System/Player/PlayerFactory.cs diff --git a/Hotfix/Outer/Gate/System/Player/PlayerFlagComponentSystem.cs b/Hotfix/Gate/System/Player/PlayerFlagComponentSystem.cs similarity index 95% rename from Hotfix/Outer/Gate/System/Player/PlayerFlagComponentSystem.cs rename to Hotfix/Gate/System/Player/PlayerFlagComponentSystem.cs index e6ada07..81f9028 100644 --- a/Hotfix/Outer/Gate/System/Player/PlayerFlagComponentSystem.cs +++ b/Hotfix/Gate/System/Player/PlayerFlagComponentSystem.cs @@ -14,6 +14,6 @@ public sealed class PlayerFlagComponentDestroySystem : DestroySystem /// 账号Id /// - public static async FTask LoadDataBase(Scene scene, long accountId) + public static async FTask LoadDataBase(Scene scene, long accountId) { var account = await scene.World.DataBase.First(d => d.Id == accountId); if (account == null) @@ -29,7 +29,7 @@ public static class PlayerHelper /// 保存账号到数据库中 /// /// - public static async FTask SaveDataBase(this Player self) + public static async FTask SaveDataBase(this Player self) { await self.Scene.World.DataBase.Save(self); } diff --git a/Hotfix/Outer/Gate/System/PlayerManageComponentSystem.cs b/Hotfix/Gate/System/PlayerManageComponentSystem.cs similarity index 100% rename from Hotfix/Outer/Gate/System/PlayerManageComponentSystem.cs rename to Hotfix/Gate/System/PlayerManageComponentSystem.cs diff --git a/Hotfix/Hotfix.csproj b/Hotfix/Hotfix.csproj index 5151c65..a86e143 100644 --- a/Hotfix/Hotfix.csproj +++ b/Hotfix/Hotfix.csproj @@ -12,8 +12,4 @@ - - - - diff --git a/Hotfix/Inner/G2A_TestMessageHandler.cs b/Hotfix/Inner/G2A_TestMessageHandler.cs deleted file mode 100644 index 57bf196..0000000 --- a/Hotfix/Inner/G2A_TestMessageHandler.cs +++ /dev/null @@ -1,15 +0,0 @@ -using Fantasy.Async; -using Fantasy.Network.Interface; - -namespace Fantasy; - -public class G2A_TestMessageHandler : Route -{ - protected override async FTask Run(Scene entity, G2A_TestMessage message) - { - - - Log.Debug($"G2A_TestMessageHandler :{message.Tag}"); - await FTask.CompletedTask; - } -} \ No newline at end of file diff --git a/Hotfix/Inner/G2A_TestRequestHandler.cs b/Hotfix/Inner/G2A_TestRequestHandler.cs deleted file mode 100644 index 75f33e4..0000000 --- a/Hotfix/Inner/G2A_TestRequestHandler.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System; -using Fantasy.Async; -using Fantasy.Network.Interface; - -namespace Fantasy; - -public class G2A_TestRequestHandler : RouteRPC -{ - private static int Count; - protected override async FTask Run(Scene entity, G2A_TestRequest request, G2A_TestResponse response, Action reply) - { - if (++Count % 1000000 == 0) - { - Log.Debug($"count:1000000"); - } - // Log.Debug($"{Count}"); - await FTask.CompletedTask; - } -} \ No newline at end of file diff --git a/Hotfix/Inner/RouteMessage/G2Chat_CreateRouteRequestHandler.cs b/Hotfix/Inner/RouteMessage/G2Chat_CreateRouteRequestHandler.cs deleted file mode 100644 index 801acba..0000000 --- a/Hotfix/Inner/RouteMessage/G2Chat_CreateRouteRequestHandler.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System; -using Fantasy.Async; -using Fantasy.Entitas; -using Fantasy.Network.Interface; - -namespace Fantasy; - -public sealed class G2Chat_CreateRouteRequestHandler : RouteRPC -{ - protected override async FTask Run(Scene scene, G2Chat_CreateRouteRequest request, Chat2G_CreateRouteResponse response, Action reply) - { - // 接收到Gate消息后,首先建立一个实体用来后面接收Route消息。 - // 这里就拿ChatUnit来做这个。 - var chatUnit = Entity.Create(scene, true, true); - // 把Gate传递过来的RouteId保存住,以便后面可以直接给Gate发送消息。 - // 例如断线等操作,都可以通过这个GateRouteId发送到Gate的Session上。 - chatUnit.GateRouteId = request.GateRouteId; - // 把chatUnit的RunTimeId发送给Gate。 - // 正如之前所说任何实体的RunTimeId都可以当做RouteId使用。 - response.ChatRouteId = chatUnit.RouteId; - await FTask.CompletedTask; - } -} \ No newline at end of file diff --git a/Hotfix/OnSceneCreate_Init.cs b/Hotfix/OnSceneCreate_Init.cs index 2315536..9b76ede 100644 --- a/Hotfix/OnSceneCreate_Init.cs +++ b/Hotfix/OnSceneCreate_Init.cs @@ -26,10 +26,16 @@ public class OnSceneCreate_Init : AsyncEventSystem { // 用于验证JWT是否合法的组件 scene.AddComponent(); - // 用于管理GameAccount的组件 + // 用于管理玩家的组件 scene.AddComponent(); break; } + case SceneType.Game: + { + //游戏服用于管理用户的组件 + scene.AddComponent(); + break; + } } await FTask.CompletedTask; diff --git a/Tools/ConfigTable/ExporterSettings.json b/Tools/ConfigTable/ExporterSettings.json index 7499bd6..b4af6ff 100644 --- a/Tools/ConfigTable/ExporterSettings.json +++ b/Tools/ConfigTable/ExporterSettings.json @@ -1,23 +1,23 @@ { "Export": { "ExcelProgramPath": { - "Value": "../../../Examples/Config/Excel/", + "Value": "../../Config/Excel/", "Comment": "Excel文件夹的根目录" }, "ExcelVersionFile": { - "Value": "../../../Examples/Config/Excel/Version.txt", + "Value": "../../Config/Excel/Version.txt", "Comment": "Excel的Version文件位置、这个文件用于记录每次导出对比是否需要再次导出的文件" }, "ExcelServerFileDirectory": { - "Value": "../../../Examples/Server/Entity/Generate/ConfigTable/Entity/", + "Value": "../../Entity/Generate/ConfigTable/Entity/", "Comment": "Excel生成的代码文件、在服务端文件夹位置" }, "ExcelClientFileDirectory": { - "Value": "../../../Examples/Client/Unity/Assets/Scripts/Hotfix/Generate/ConfigTable/Entity/", + "Value": "../../../Fishing2/Assets/Scripts/Generate/ConfigTable/Entity/", "Comment": "Excel生成的代码文件、在客户端文件夹位置" }, "ExcelServerBinaryDirectory": { - "Value": "../../../Examples/Config/Binary/", + "Value": "../../Config/Binary/", "Comment": "Excel生成服务器二进制数据文件夹位置" }, "ExcelClientBinaryDirectory": { @@ -25,15 +25,15 @@ "Comment": "Excel生成在客户端的二进制数据文件夹位置" }, "ExcelServerJsonDirectory": { - "Value": "../../../Examples/Config/Json/Server/", + "Value": "../../Config/Json/Server/", "Comment": "Excel生成在服务端的Json数据文件夹位置" }, "ExcelClientJsonDirectory": { - "Value": "../../../Examples/Config/Json/Client/", + "Value": "../../Config/Json/Client/", "Comment": "Excel生成在客户端的Json数据文件夹位置" }, "ServerCustomExportDirectory": { - "Value": "../../../Examples/Server/Entity/Generate/CustomExport/", + "Value": "../../Entity/Generate/CustomExport/", "Comment": "Excel在服务端生成自定义代码的文件夹位置" }, "ClientCustomExportDirectory": { diff --git a/Tools/Exporter/NetworkProtocol/CommandLine.dll b/Tools/Exporter/NetworkProtocol/CommandLine.dll new file mode 100644 index 0000000000000000000000000000000000000000..3eab2be274359223f5640b0af04b2af375cce752 GIT binary patch literal 225280 zcmeFa2bdhi)i&DOJ=-%o8>HD?&8*_CfLV$OivkEqfDjoI1c)TbN<(I#=fCv1Z*DRFl$O}oz z|3lx8YHDK|`0mRv_`cEX1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