Added ClientVersion request system to UCS server (needed to fix saylinks)

This commit is contained in:
Uleat
2018-02-25 21:40:45 -05:00
parent 361937d443
commit 6c2a8edea6
13 changed files with 175 additions and 2 deletions
+8
View File
@@ -1215,6 +1215,14 @@ void Client::EnterWorld(bool TryBootup) {
wtz->response = 0;
zone_server->SendPacket(pack);
delete pack;
UCSClientVersionReply_Struct cvr;
cvr.character_id = GetCharID();
cvr.client_version = GetClientVersion();
EQ::Net::DynamicPacket dp_cvr;
dp_cvr.PutData(0, &cvr, sizeof(cvr));
zone_server->HandleMessage(ServerOP_UCSClientVersionReply, dp_cvr);
}
else { // if they havent seen character select screen, we can assume this is a zone
// to zone movement, which should be preauthorized before they leave the previous zone
+1
View File
@@ -68,6 +68,7 @@ public:
inline const char* GetLSKey() { if (cle) { return cle->GetLSKey(); } return "NOKEY"; }
inline uint32 GetCharID() { return charid; }
inline const char* GetCharName() { return char_name; }
inline EQEmu::versions::ClientVersion GetClientVersion() { return m_ClientVersion; }
inline ClientListEntry* GetCLE() { return cle; }
inline void SetCLE(ClientListEntry* iCLE) { cle = iCLE; }
private:
+8
View File
@@ -2,11 +2,14 @@
#include "../common/eqemu_logsys.h"
#include "ucs.h"
#include "world_config.h"
#include "zonelist.h"
#include "../common/misc_functions.h"
#include "../common/md5.h"
#include "../common/packet_dump.h"
extern ZSList zoneserver_list;
UCSConnection::UCSConnection()
{
Stream = 0;
@@ -49,6 +52,11 @@ void UCSConnection::ProcessPacket(uint16 opcode, EQ::Net::Packet &p)
Log(Logs::Detail, Logs::UCS_Server, "Got authentication from UCS when they are already authenticated.");
break;
}
case ServerOP_UCSClientVersionRequest:
{
zoneserver_list.SendPacket(pack);
break;
}
default:
{
Log(Logs::Detail, Logs::UCS_Server, "Unknown ServerOPcode from UCS 0x%04x, size %d", opcode, pack->size);
+1
View File
@@ -1262,6 +1262,7 @@ void ZoneServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) {
break;
}
case ServerOP_UCSClientVersionReply:
case ServerOP_UCSMailMessage:
{
UCSLink.SendPacket(pack);