Skip to content

Commit d9add69

Browse files
committed
up
1 parent 1806eaf commit d9add69

File tree

7 files changed

+56
-8
lines changed

7 files changed

+56
-8
lines changed

Plugins/kbengine_ue4_plugins/Source/KBEnginePlugins/Engine/AccountBase.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,19 @@ void AccountBase::onRemoteMethodCall(MemoryStream& stream)
4848
uint16 methodUtype = 0;
4949
uint16 componentPropertyUType = 0;
5050

51-
if (sm->useMethodDescrAlias)
51+
if (sm->usePropertyDescrAlias)
5252
{
5353
componentPropertyUType = stream.readUint8();
54-
methodUtype = stream.read<uint8>();
5554
}
5655
else
5756
{
5857
componentPropertyUType = stream.readUint16();
58+
if (sm->useMethodDescrAlias)
59+
{
60+
methodUtype = stream.read<uint8>();
61+
}
62+
else
63+
{
5964
methodUtype = stream.read<uint16>();
6065
}
6166

Plugins/kbengine_ue4_plugins/Source/KBEnginePlugins/Engine/AvatarBase.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,19 @@ void AvatarBase::onRemoteMethodCall(MemoryStream& stream)
5050
uint16 methodUtype = 0;
5151
uint16 componentPropertyUType = 0;
5252

53-
if (sm->useMethodDescrAlias)
53+
if (sm->usePropertyDescrAlias)
5454
{
5555
componentPropertyUType = stream.readUint8();
56-
methodUtype = stream.read<uint8>();
5756
}
5857
else
5958
{
6059
componentPropertyUType = stream.readUint16();
60+
if (sm->useMethodDescrAlias)
61+
{
62+
methodUtype = stream.read<uint8>();
63+
}
64+
else
65+
{
6166
methodUtype = stream.read<uint16>();
6267
}
6368

Plugins/kbengine_ue4_plugins/Source/KBEnginePlugins/Engine/KBEngine.cpp

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ void KBEngineApp::reset()
217217
serverdatas_.Empty();
218218

219219
serverVersion_ = TEXT("");
220-
clientVersion_ = TEXT("2.3.5");
220+
clientVersion_ = TEXT("2.4.1");
221221
serverScriptVersion_ = TEXT("");
222222
clientScriptVersion_ = TEXT("0.1.0");
223223

@@ -558,6 +558,18 @@ void KBEngineApp::Client_onScriptVersionNotMatch(MemoryStream& stream)
558558
KBENGINE_EVENT_FIRE(KBEventTypes::onScriptVersionNotMatch, pEventData);
559559
}
560560

561+
void KBEngineApp::Client_onImportClientSDK(MemoryStream& stream)
562+
{
563+
UKBEventData_onImportClientSDK* pEventData = NewObject<UKBEventData_onImportClientSDK>();
564+
565+
pEventData->remainingFiles = stream.readInt32();
566+
pEventData->fileName = stream.readString();
567+
pEventData->fileSize = stream.readInt32();
568+
stream.readBlob(pEventData->fileDatas);
569+
570+
KBENGINE_EVENT_FIRE("onImportClientSDK", pEventData);
571+
}
572+
561573
void KBEngineApp::Client_onKicked(uint16 failedcode)
562574
{
563575
DEBUG_MSG("KBEngineApp::Client_onKicked(): failedcode=%d, %s", failedcode, *serverErr(failedcode));

Plugins/kbengine_ue4_plugins/Source/KBEnginePlugins/Engine/KBEngine.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ class KBENGINEPLUGINS_API KBEngineApp : public InterfaceConnect
9898
// 无需实现,已由插件生成静态代码
9999
}
100100

101+
void Client_onImportClientSDK(MemoryStream& stream);
102+
101103
/**
102104
插件的主循环处理函数
103105
*/

Plugins/kbengine_ue4_plugins/Source/KBEnginePlugins/Engine/KBEvent.h

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -607,3 +607,22 @@ class KBENGINEPLUGINS_API UKBEventData_onStreamDataCompleted : public UKBEventDa
607607
int resID;
608608
};
609609

610+
UCLASS(Blueprintable, BlueprintType)
611+
class KBENGINEPLUGINS_API UKBEventData_onImportClientSDK : public UKBEventData
612+
{
613+
GENERATED_BODY()
614+
615+
public:
616+
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = KBEngine)
617+
int remainingFiles;
618+
619+
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = KBEngine)
620+
int fileSize;
621+
622+
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = KBEngine)
623+
FString fileName;
624+
625+
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = KBEngine)
626+
TArray<uint8> fileDatas;
627+
};
628+

Plugins/kbengine_ue4_plugins/Source/KBEnginePlugins/Engine/Messages.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ void Message_Client_onImportServerErrorsDescr::handleMessage(MemoryStream& msgst
295295

296296
void Message_Client_onImportClientSDK::handleMessage(MemoryStream& msgstream)
297297
{
298-
//KBEngineApp::getSingleton().Client_onImportClientSDK(msgstream);
298+
KBEngineApp::getSingleton().Client_onImportClientSDK(msgstream);
299299
}
300300

301301
void Message_Client_initSpaceData::handleMessage(MemoryStream& msgstream)

Plugins/kbengine_ue4_plugins/Source/KBEnginePlugins/Engine/MonsterBase.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,19 @@ void MonsterBase::onRemoteMethodCall(MemoryStream& stream)
4848
uint16 methodUtype = 0;
4949
uint16 componentPropertyUType = 0;
5050

51-
if (sm->useMethodDescrAlias)
51+
if (sm->usePropertyDescrAlias)
5252
{
5353
componentPropertyUType = stream.readUint8();
54-
methodUtype = stream.read<uint8>();
5554
}
5655
else
5756
{
5857
componentPropertyUType = stream.readUint16();
58+
if (sm->useMethodDescrAlias)
59+
{
60+
methodUtype = stream.read<uint8>();
61+
}
62+
else
63+
{
5964
methodUtype = stream.read<uint16>();
6065
}
6166

0 commit comments

Comments
 (0)