-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPredictGeneratorKeyCommand.cpp
More file actions
38 lines (33 loc) · 1.01 KB
/
PredictGeneratorKeyCommand.cpp
File metadata and controls
38 lines (33 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*
Time : 2016/06/13
Author: Kay Yang (1025115216@qq.com)
*/
#include "PredictGeneratorKeyCommand.h"
#include "PredictMessage.h"
#include "PredictSession.h"
#include "PredictGeneratorKey.h"
#include "PredictGameThread.h"
#include "PredictPrint.h"
#include "FormatString.h"
PredictGeneratorKeyCommand::PredictGeneratorKeyCommand() : PredictCommand()
{
mCommandId = PMT_GeneratorKey;
}
PredictGeneratorKeyCommand::~PredictGeneratorKeyCommand()
{
}
void PredictGeneratorKeyCommand::ParseMessage(PredictMessage* message)
{
mKeyId = message->ReadUINT64();
mTimestamp = message->ReadUINT64();
__u64 temp = message->ReadUINT64();
//ClientPrint::PrintMessage("", FormatString("mTimestamp: 0x%llx, %llu, %llu\n", mKeyId, mTimestamp, temp));
mTimestamp = mTimestamp * 1000000 + temp;
// = message->ReadUINT64();
}
void PredictGeneratorKeyCommand::ExecuteSession(PredictSession* session)
{
__u32 id = session->GetSessionId();
PredictGameThread* thread = session->GetThreadHandle();
thread->AppendKeyPair(id, mKeyId, mTimestamp);
}