Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
guo450212436
et
提交
97f8dc7d
E
et
项目概览
guo450212436
/
et
与 Fork 源项目一致
从无法访问的项目Fork
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
E
et
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
97f8dc7d
编写于
5月 23, 2018
作者:
T
tanghai
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
加入断线处理,断线后的玩家不在一直发送战斗消息
上级
75e20ae3
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
68 addition
and
14 deletion
+68
-14
Client-Server.sln.DotSettings.user
Client-Server.sln.DotSettings.user
+11
-0
Proto/InnerMessage.proto
Proto/InnerMessage.proto
+4
-0
Server/Hotfix/Module/FrameSync/G2M_SessionDisconnectHandler.cs
...r/Hotfix/Module/FrameSync/G2M_SessionDisconnectHandler.cs
+15
-0
Server/Hotfix/Module/FrameSync/MessageHelper.cs
Server/Hotfix/Module/FrameSync/MessageHelper.cs
+7
-2
Server/Hotfix/Module/FrameSync/SessionPlayerComponentSystem.cs
...r/Hotfix/Module/FrameSync/SessionPlayerComponentSystem.cs
+16
-0
Server/Hotfix/Module/Message/InnerMessage.cs
Server/Hotfix/Module/Message/InnerMessage.cs
+12
-0
Server/Hotfix/Module/Message/InnerOpcode.cs
Server/Hotfix/Module/Message/InnerOpcode.cs
+1
-0
Server/Model/Module/FrameSync/SessionPlayerComponent.cs
Server/Model/Module/FrameSync/SessionPlayerComponent.cs
+0
-12
Server/Model/Module/FrameSync/UnitGateComponent.cs
Server/Model/Module/FrameSync/UnitGateComponent.cs
+2
-0
未找到文件。
Client-Server.sln.DotSettings.user
浏览文件 @
97f8dc7d
...
...
@@ -2,12 +2,20 @@
<s:String x:Key="/Default/CodeEditing/Intellisense/CodeCompletion/IntelliSenseCompletingCharacters/CSharpCompletingCharacters/NonCompletingCharacters/@EntryValue"></s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=40533600_002D4E69_002D4F7D_002DA924_002DE1A3B4127255_002Fd_003ABase_002Fd_003AObject_002Ff_003AComponentWithId_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=40533600_002D4E69_002D4F7D_002DA924_002DE1A3B4127255_002Fd_003ABase_002Fd_003AObject_002Ff_003AEntity_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=40533600_002D4E69_002D4F7D_002DA924_002DE1A3B4127255_002Fd_003AEntity_002Fd_003AConfig_002Ff_003AUnitConfig_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=40533600_002D4E69_002D4F7D_002DA924_002DE1A3B4127255_002Fd_003AEntity_002Ff_003AGame_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=40533600_002D4E69_002D4F7D_002DA924_002DE1A3B4127255_002Fd_003AModule_002Fd_003AConfig_002Ff_003AConfigComponent_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=40533600_002D4E69_002D4F7D_002DA924_002DE1A3B4127255_002Fd_003AModule_002Fd_003AUI_002Ff_003AUI_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=40533600_002D4E69_002D4F7D_002DA924_002DE1A3B4127255_002Fd_003AModule_002Fd_003AUI_002Ff_003AUIComponent_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=40533600_002D4E69_002D4F7D_002DA924_002DE1A3B4127255_002Fd_003AUI_002Fd_003AUILogin_002Fd_003AEvent_002Ff_003AInitSceneStart_005FCreateLoginUI_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=40533600_002D4E69_002D4F7D_002DA924_002DE1A3B4127255_002Ff_003AInit_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AC2G_005FEnterMapHandler_002Ecs_002Fl_003AServer_003FHotfix_003FHandler_003FC2G_005FEnterMapHandler_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AInnerOpcode_002Ecs_002Fl_003AServer_003FModel_003FEntity_003FMessage_003FInnerOpcode_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003APlayer_002Ecs_002Fl_003AUnity_003FAssets_003FScripts_003FEntity_003FPlayer_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003APlayerComponent_002Ecs_002Fl_003AUnity_003FAssets_003FScripts_003FComponent_003FPlayerComponent_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003APlayerFactory_002Ecs_002Fl_003AUnity_003FAssets_003FScripts_003FFactory_003FPlayerFactory_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AUnitComponent_002Ecs_002Fl_003AUnity_003FAssets_003FScripts_003FComponent_003FUnitComponent_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=C305ED5B_002D8425_002D47A1_002DBEE1_002D85830CADC27A_002Fd_003AModule_002Fd_003ABenchmark_002Ff_003ABenchmarkComponentSystem_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=CF118143_002D7E37_002D744F_002DBE45_002D3F55345FEC40_002Fd_003AAssets_002Fd_003AScripts_002Fd_003ABase_002Fd_003AObject_002Ff_003AComponent_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=CF118143_002D7E37_002D744F_002DBE45_002D3F55345FEC40_002Fd_003AAssets_002Fd_003AScripts_002Fd_003ABase_002Fd_003AObject_002Ff_003AComponentWithId_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=CF118143_002D7E37_002D744F_002DBE45_002D3F55345FEC40_002Fd_003AAssets_002Fd_003AScripts_002Fd_003ABase_002Fd_003AObject_002Ff_003AEntity_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
...
...
@@ -16,9 +24,12 @@
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=CF118143_002D7E37_002D744F_002DBE45_002D3F55345FEC40_002Fd_003AAssets_002Fd_003AScripts_002Fd_003ABase_002Fd_003AObject_002Ff_003AObjectPool_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=CF118143_002D7E37_002D744F_002DBE45_002D3F55345FEC40_002Fd_003AAssets_002Fd_003AScripts_002Fd_003AComponent_002Fd_003AConfig_002Ff_003AClientConfig_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=CF118143_002D7E37_002D744F_002DBE45_002D3F55345FEC40_002Fd_003AAssets_002Fd_003AScripts_002Fd_003AComponent_002Fd_003AConfig_002Ff_003AInnerConfig_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=CF118143_002D7E37_002D744F_002DBE45_002D3F55345FEC40_002Fd_003AAssets_002Fd_003AScripts_002Fd_003AEntity_002Ff_003AHotfix_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=CF118143_002D7E37_002D744F_002DBE45_002D3F55345FEC40_002Fd_003AAssets_002Fd_003AScripts_002Fd_003AModule_002Fd_003AMessage_002Fd_003ANetwork_002Fd_003ATCP_002Ff_003ATChannel_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=CF118143_002D7E37_002D744F_002DBE45_002D3F55345FEC40_002Fd_003AAssets_002Fd_003AScripts_002Fd_003AModule_002Fd_003AMessage_002Fd_003ANetwork_002Fd_003ATCP_002Ff_003ATService_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=CF118143_002D7E37_002D744F_002DBE45_002D3F55345FEC40_002Fd_003AAssets_002Fd_003AScripts_002Fd_003AModule_002Fd_003AMessage_002Fd_003ANetwork_002Ff_003AAChannel_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=CF118143_002D7E37_002D744F_002DBE45_002D3F55345FEC40_002Fd_003AAssets_002Fd_003AScripts_002Fd_003AModule_002Fd_003AMessage_002Ff_003AErrorCode_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=CF118143_002D7E37_002D744F_002DBE45_002D3F55345FEC40_002Fd_003AAssets_002Fd_003AThirdParty_002Fd_003AILRuntime_002Fd_003AILRuntime_002Fd_003ARuntime_002Fd_003AIntepreter_002Ff_003AILIntepreter_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=EE38E3D2_002D3D2A_002D4061_002DBD50_002DAE8568126C7D_002Fd_003ABase_002Fd_003AObject_002Ff_003AEntityType_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=EE38E3D2_002D3D2A_002D4061_002DBD50_002DAE8568126C7D_002Fd_003AEntity_002Fd_003AConfig_002Ff_003AStartConfig_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=EE38E3D2_002D3D2A_002D4061_002DBD50_002DAE8568126C7D_002Fd_003AModule_002Fd_003AMessage_002Ff_003AAMRpcHandler_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
...
...
Proto/InnerMessage.proto
浏览文件 @
97f8dc7d
...
...
@@ -171,4 +171,8 @@
required
int64
UnitId
=
1
;
required
int
Count
=
2
;
}
message
G2M_SessionDisconnect
// IActorMessage
{
}
}
\ No newline at end of file
Server/Hotfix/Module/FrameSync/G2M_SessionDisconnectHandler.cs
0 → 100644
浏览文件 @
97f8dc7d
using
System.Threading.Tasks
;
using
ETModel
;
namespace
ETHotfix
{
[
ActorMessageHandler
(
AppType
.
Map
)]
public
class
G2M_SessionDisconnectHandler
:
AMActorHandler
<
Unit
,
G2M_SessionDisconnect
>
{
protected
override
async
Task
Run
(
Unit
unit
,
G2M_SessionDisconnect
message
)
{
unit
.
GetComponent
<
UnitGateComponent
>().
IsDisconnect
=
true
;
await
Task
.
CompletedTask
;
}
}
}
\ No newline at end of file
Server/Hotfix/
Helper
/MessageHelper.cs
→
Server/Hotfix/
Module/FrameSync
/MessageHelper.cs
浏览文件 @
97f8dc7d
...
...
@@ -10,8 +10,13 @@ namespace ETHotfix
ActorMessageSenderComponent
actorMessageSenderComponent
=
Game
.
Scene
.
GetComponent
<
ActorMessageSenderComponent
>();
foreach
(
Unit
unit
in
units
)
{
long
gateSessionActorId
=
unit
.
GetComponent
<
UnitGateComponent
>().
GateSessionActorId
;
actorMessageSenderComponent
.
GetWithActorId
(
gateSessionActorId
).
Send
(
message
);
UnitGateComponent
unitGateComponent
=
unit
.
GetComponent
<
UnitGateComponent
>();
if
(
unitGateComponent
.
IsDisconnect
)
{
continue
;
}
actorMessageSenderComponent
.
GetWithActorId
(
unitGateComponent
.
GateSessionActorId
).
Send
(
message
);
}
}
}
...
...
Server/Hotfix/Module/FrameSync/SessionPlayerComponentSystem.cs
0 → 100644
浏览文件 @
97f8dc7d
using
ETModel
;
namespace
ETHotfix
{
[
ObjectSystem
]
public
class
SessionPlayerComponentDestroySystem
:
DestroySystem
<
SessionPlayerComponent
>
{
public
override
void
Destroy
(
SessionPlayerComponent
self
)
{
// 发送断线消息
ActorMessageSender
actorMessageSender
=
Game
.
Scene
.
GetComponent
<
ActorMessageSenderComponent
>().
Get
(
self
.
Player
.
UnitId
);
actorMessageSender
.
Send
(
new
G2M_SessionDisconnect
());
Game
.
Scene
.
GetComponent
<
PlayerComponent
>()?.
Remove
(
self
.
Player
.
Id
);
}
}
}
\ No newline at end of file
Server/Hotfix/Module/Message/InnerMessage.cs
浏览文件 @
97f8dc7d
...
...
@@ -511,4 +511,16 @@ namespace ETHotfix
}
[
Message
(
InnerOpcode
.
G2M_SessionDisconnect
)]
[
ProtoContract
]
public
partial
class
G2M_SessionDisconnect
:
IActorMessage
{
[
ProtoMember
(
90
,
IsRequired
=
true
)]
public
int
RpcId
{
get
;
set
;
}
[
ProtoMember
(
93
,
IsRequired
=
true
)]
public
long
ActorId
{
get
;
set
;
}
}
}
Server/Hotfix/Module/Message/InnerOpcode.cs
浏览文件 @
97f8dc7d
...
...
@@ -34,5 +34,6 @@ namespace ETHotfix
public
const
ushort
G2R_GetLoginKey
=
1030
;
public
const
ushort
G2M_CreateUnit
=
1031
;
public
const
ushort
M2G_CreateUnit
=
1032
;
public
const
ushort
G2M_SessionDisconnect
=
1033
;
}
}
Server/Model/Module/FrameSync/SessionPlayerComponent.cs
浏览文件 @
97f8dc7d
...
...
@@ -3,17 +3,5 @@
public
class
SessionPlayerComponent
:
Component
{
public
Player
Player
;
public
override
void
Dispose
()
{
if
(
this
.
IsDisposed
)
{
return
;
}
base
.
Dispose
();
Game
.
Scene
.
GetComponent
<
PlayerComponent
>()?.
Remove
(
this
.
Player
.
Id
);
}
}
}
\ No newline at end of file
Server/Model/Module/FrameSync/UnitGateComponent.cs
浏览文件 @
97f8dc7d
...
...
@@ -13,6 +13,8 @@
{
public
long
GateSessionActorId
;
public
bool
IsDisconnect
;
public
void
Awake
(
long
gateSessionId
)
{
this
.
GateSessionActorId
=
gateSessionId
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录