修改崩溃bug
This commit is contained in:
parent
d1326b7776
commit
873dd45584
Binary file not shown.
Binary file not shown.
@ -1,5 +1,6 @@
|
||||
#include "Definations.h"
|
||||
|
||||
FString FNetCommand::CharacterList = TEXT("CharacterList");
|
||||
FString FNetCommand::RequestCharacterInfos = TEXT("RequestCharacterInfos");
|
||||
FString FNetCommand::RequestCharacterNames = TEXT("RequestCharacterNames");
|
||||
FString FNetCommand::AddCharacter = TEXT("AddCharacter");
|
||||
FString FNetCommand::AiChatGenerate = TEXT("AiChatGenerate");
|
@ -122,12 +122,12 @@ EActiveTimerReturnType SAIGCWindow::OnPostPaint(double X, float Arg)
|
||||
}
|
||||
else
|
||||
{
|
||||
WebSocketManager->SendData(FNetCommand::CharacterList, TEXT(""));
|
||||
WebSocketManager->SendData(FNetCommand::RequestCharacterNames, TEXT(""));
|
||||
}
|
||||
WebSocketManager->OnConnectDelegate.AddLambda([this, WebSocketManager](bool bSuccess)
|
||||
{
|
||||
GenerateButton->SetEnabled(bSuccess);
|
||||
WebSocketManager->SendData(FNetCommand::CharacterList, TEXT(""));
|
||||
WebSocketManager->SendData(FNetCommand::RequestCharacterNames, TEXT(""));
|
||||
});
|
||||
WebSocketManager->OnDataReceiveDelaget.AddRaw(this, &SAIGCWindow::HandleReceiveData);
|
||||
|
||||
@ -168,7 +168,7 @@ void SAIGCWindow::OnAIGenerateClicked()
|
||||
|
||||
void SAIGCWindow::HandleReceiveData(FNetProtocol protocol)
|
||||
{
|
||||
if (protocol.cmd == FNetCommand::CharacterList)
|
||||
if (protocol.cmd == FNetCommand::RequestCharacterNames)
|
||||
{
|
||||
|
||||
//解析json角色信息
|
||||
|
@ -128,12 +128,12 @@ EActiveTimerReturnType SCharacterWindow::OnPostPaint(double X, float Arg)
|
||||
}
|
||||
else
|
||||
{
|
||||
WebSocketManager->SendData(FNetCommand::CharacterList, TEXT(""));
|
||||
WebSocketManager->SendData(FNetCommand::RequestCharacterInfos, TEXT(""));
|
||||
}
|
||||
WebSocketManager->OnDataReceiveDelaget.AddRaw(this, &SCharacterWindow::HandleReceiveData);
|
||||
WebSocketManager->OnConnectDelegate.AddLambda([this, WebSocketManager](bool bSuccess)
|
||||
{
|
||||
WebSocketManager->SendData(FNetCommand::CharacterList, TEXT(""));
|
||||
WebSocketManager->SendData(FNetCommand::RequestCharacterInfos, TEXT(""));
|
||||
});
|
||||
}
|
||||
return EActiveTimerReturnType::Stop;
|
||||
@ -141,7 +141,7 @@ EActiveTimerReturnType SCharacterWindow::OnPostPaint(double X, float Arg)
|
||||
|
||||
void SCharacterWindow::HandleReceiveData(FNetProtocol protocol)
|
||||
{
|
||||
if (protocol.cmd == FNetCommand::CharacterList)
|
||||
if (protocol.cmd == FNetCommand::RequestCharacterInfos)
|
||||
{
|
||||
|
||||
//解析json角色信息
|
||||
|
@ -85,7 +85,8 @@ USTRUCT()
|
||||
struct FNetCommand
|
||||
{
|
||||
GENERATED_BODY()
|
||||
static FString CharacterList;
|
||||
static FString RequestCharacterInfos;
|
||||
static FString RequestCharacterNames;
|
||||
static FString AddCharacter;
|
||||
static FString AiChatGenerate;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user