mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 22:01:30 +00:00
Reorganized handling of Packets to be a bit cleaner.
This commit is contained in:
parent
ea606ef80d
commit
495510a02e
@ -907,14 +907,12 @@ bool Client::HandleDeleteCharacterPacket(const EQApplicationPacket *app) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool Client::HandlePacket(const EQApplicationPacket *app) {
|
bool Client::HandlePacket(const EQApplicationPacket *app) {
|
||||||
const WorldConfig *Config=WorldConfig::get();
|
|
||||||
EmuOpcode opcode = app->GetOpcode();
|
EmuOpcode opcode = app->GetOpcode();
|
||||||
|
|
||||||
clog(WORLD__CLIENT_TRACE,"Recevied EQApplicationPacket");
|
clog(WORLD__CLIENT_TRACE,"Recevied EQApplicationPacket");
|
||||||
_pkt(WORLD__CLIENT_TRACE,app);
|
_pkt(WORLD__CLIENT_TRACE,app);
|
||||||
|
|
||||||
bool ret = true;
|
|
||||||
|
|
||||||
if (!eqs->CheckState(ESTABLISHED)) {
|
if (!eqs->CheckState(ESTABLISHED)) {
|
||||||
clog(WORLD__CLIENT,"Client disconnected (net inactive on send)");
|
clog(WORLD__CLIENT,"Client disconnected (net inactive on send)");
|
||||||
return false;
|
return false;
|
||||||
@ -939,8 +937,14 @@ bool Client::HandlePacket(const EQApplicationPacket *app) {
|
|||||||
|
|
||||||
switch(opcode)
|
switch(opcode)
|
||||||
{
|
{
|
||||||
case OP_CrashDump:
|
case OP_World_Client_CRC1:
|
||||||
|
case OP_World_Client_CRC2:
|
||||||
{
|
{
|
||||||
|
// There is no obvious entry in the CC struct to indicate that the 'Start Tutorial button
|
||||||
|
// is selected when a character is created. I have observed that in this case, OP_EnterWorld is sent
|
||||||
|
// before OP_World_Client_CRC1. Therefore, if we receive OP_World_Client_CRC1 before OP_EnterWorld,
|
||||||
|
// then 'Start Tutorial' was not chosen.
|
||||||
|
StartInTutorial = false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
case OP_SendLoginInfo:
|
case OP_SendLoginInfo:
|
||||||
@ -968,36 +972,10 @@ bool Client::HandlePacket(const EQApplicationPacket *app) {
|
|||||||
{
|
{
|
||||||
return HandleEnterWorldPacket(app);
|
return HandleEnterWorldPacket(app);
|
||||||
}
|
}
|
||||||
case OP_LoginComplete:
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
case OP_DeleteCharacter:
|
case OP_DeleteCharacter:
|
||||||
{
|
{
|
||||||
return HandleDeleteCharacterPacket(app);
|
return HandleDeleteCharacterPacket(app);
|
||||||
}
|
}
|
||||||
case OP_ApproveWorld:
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
case OP_WorldClientReady:
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
case OP_World_Client_CRC1:
|
|
||||||
case OP_World_Client_CRC2:
|
|
||||||
{
|
|
||||||
// There is no obvious entry in the CC struct to indicate that the 'Start Tutorial button
|
|
||||||
// is selected when a character is created. I have observed that in this case, OP_EnterWorld is sent
|
|
||||||
// before OP_World_Client_CRC1. Therefore, if we receive OP_World_Client_CRC1 before OP_EnterWorld,
|
|
||||||
// then 'Start Tutorial' was not chosen.
|
|
||||||
StartInTutorial = false;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
case OP_WearChange:
|
|
||||||
{ // User has selected a different character
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
case OP_WorldComplete:
|
case OP_WorldComplete:
|
||||||
{
|
{
|
||||||
eqs->Close();
|
eqs->Close();
|
||||||
@ -1005,6 +983,11 @@ bool Client::HandlePacket(const EQApplicationPacket *app) {
|
|||||||
}
|
}
|
||||||
case OP_LoginUnknown1:
|
case OP_LoginUnknown1:
|
||||||
case OP_LoginUnknown2:
|
case OP_LoginUnknown2:
|
||||||
|
case OP_CrashDump:
|
||||||
|
case OP_WearChange:
|
||||||
|
case OP_LoginComplete:
|
||||||
|
case OP_ApproveWorld:
|
||||||
|
case OP_WorldClientReady:
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user