mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 18:52:22 +00:00
Reworked ClientVersion into EQEmu::versions; Added EQEmu::versions::InventoryVersion
This commit is contained in:
+19
-19
@@ -32,7 +32,7 @@
|
||||
#include "../common/skills.h"
|
||||
#include "../common/extprofile.h"
|
||||
#include "../common/string_util.h"
|
||||
#include "../common/clientversions.h"
|
||||
#include "../common/client_version.h" // inv2 watch
|
||||
#include "../common/random.h"
|
||||
#include "../common/shareddb.h"
|
||||
|
||||
@@ -106,8 +106,8 @@ Client::Client(EQStreamInterface* ieqs)
|
||||
pwaitingforbootup = 0;
|
||||
StartInTutorial = false;
|
||||
|
||||
m_ClientVersion = eqs->GetClientVersion();
|
||||
m_ClientVersionBit = ClientBitFromVersion(m_ClientVersion);
|
||||
m_ClientVersion = eqs->ClientVersion();
|
||||
m_ClientVersionBit = EQEmu::versions::ConvertClientVersionToClientVersionBit(m_ClientVersion);
|
||||
|
||||
numclients++;
|
||||
}
|
||||
@@ -171,7 +171,7 @@ void Client::SendExpansionInfo() {
|
||||
auto outapp = new EQApplicationPacket(OP_ExpansionInfo, sizeof(ExpansionInfo_Struct));
|
||||
ExpansionInfo_Struct *eis = (ExpansionInfo_Struct*)outapp->pBuffer;
|
||||
if(RuleB(World, UseClientBasedExpansionSettings)) {
|
||||
eis->Expansions = ExpansionFromClientVersion(eqs->GetClientVersion());
|
||||
eis->Expansions = EQEmu::versions::ConvertClientVersionToExpansion(eqs->ClientVersion());
|
||||
//eis->Expansions = ExpansionFromClientVersion(this->GetCLE.
|
||||
} else {
|
||||
eis->Expansions = (RuleI(World, ExpansionSettings));
|
||||
@@ -186,7 +186,7 @@ void Client::SendCharInfo() {
|
||||
cle->SetOnline(CLE_Status_CharSelect);
|
||||
}
|
||||
|
||||
if (m_ClientVersionBit & BIT_RoFAndLater) {
|
||||
if (m_ClientVersionBit & EQEmu::versions::bit_RoFAndLater) {
|
||||
SendMaxCharCreate();
|
||||
SendMembership();
|
||||
SendMembershipSettings();
|
||||
@@ -212,8 +212,8 @@ void Client::SendMaxCharCreate() {
|
||||
MaxCharacters_Struct* mc = (MaxCharacters_Struct*)outapp->pBuffer;
|
||||
|
||||
mc->max_chars = EQEmu::limits::CharacterCreationLimit(m_ClientVersion);
|
||||
if (mc->max_chars > EQEmu::constants::CHARACTER_CREATION_LIMIT)
|
||||
mc->max_chars = EQEmu::constants::CHARACTER_CREATION_LIMIT;
|
||||
if (mc->max_chars > EQEmu::constants::CharacterCreationLimit)
|
||||
mc->max_chars = EQEmu::constants::CharacterCreationLimit;
|
||||
|
||||
QueuePacket(outapp);
|
||||
safe_delete(outapp);
|
||||
@@ -698,7 +698,7 @@ bool Client::HandleCharacterCreatePacket(const EQApplicationPacket *app) {
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_ClientVersionBit & BIT_TitaniumAndEarlier)
|
||||
if (m_ClientVersionBit & EQEmu::versions::bit_TitaniumAndEarlier)
|
||||
StartInTutorial = true;
|
||||
SendCharInfo();
|
||||
}
|
||||
@@ -746,9 +746,9 @@ bool Client::HandleEnterWorldPacket(const EQApplicationPacket *app) {
|
||||
// This can probably be moved outside and have another method return requested info (don't forget to remove the #include "../common/shareddb.h" above)
|
||||
// (This is a literal translation of the original process..I don't see why it can't be changed to a single-target query over account iteration)
|
||||
if (!pZoning) {
|
||||
size_t character_limit = EQEmu::limits::CharacterCreationLimit(eqs->GetClientVersion());
|
||||
if (character_limit > EQEmu::constants::CHARACTER_CREATION_LIMIT) { character_limit = EQEmu::constants::CHARACTER_CREATION_LIMIT; }
|
||||
if (eqs->GetClientVersion() == ClientVersion::Titanium) { character_limit = 8; }
|
||||
size_t character_limit = EQEmu::limits::CharacterCreationLimit(eqs->ClientVersion());
|
||||
if (character_limit > EQEmu::constants::CharacterCreationLimit) { character_limit = EQEmu::constants::CharacterCreationLimit; }
|
||||
if (eqs->ClientVersion() == EQEmu::versions::ClientVersion::Titanium) { character_limit = 8; }
|
||||
|
||||
std::string tgh_query = StringFormat(
|
||||
"SELECT "
|
||||
@@ -879,9 +879,9 @@ bool Client::HandleEnterWorldPacket(const EQApplicationPacket *app) {
|
||||
|
||||
char ConnectionType;
|
||||
|
||||
if (m_ClientVersionBit & BIT_UFAndLater)
|
||||
if (m_ClientVersionBit & EQEmu::versions::bit_UFAndLater)
|
||||
ConnectionType = 'U';
|
||||
else if (m_ClientVersionBit & BIT_SoFAndLater)
|
||||
else if (m_ClientVersionBit & EQEmu::versions::bit_SoFAndLater)
|
||||
ConnectionType = 'S';
|
||||
else
|
||||
ConnectionType = 'C';
|
||||
@@ -905,7 +905,7 @@ bool Client::HandleEnterWorldPacket(const EQApplicationPacket *app) {
|
||||
|
||||
outapp2 = new EQApplicationPacket(OP_SetChatServer2);
|
||||
|
||||
if (m_ClientVersionBit & BIT_TitaniumAndEarlier)
|
||||
if (m_ClientVersionBit & EQEmu::versions::bit_TitaniumAndEarlier)
|
||||
ConnectionType = 'M';
|
||||
|
||||
sprintf(buffer,"%s,%i,%s.%s,%c%08X",
|
||||
@@ -939,7 +939,7 @@ bool Client::HandleDeleteCharacterPacket(const EQApplicationPacket *app) {
|
||||
|
||||
bool Client::HandleZoneChangePacket(const EQApplicationPacket *app) {
|
||||
// HoT sends this to world while zoning and wants it echoed back.
|
||||
if (m_ClientVersionBit & BIT_RoFAndLater)
|
||||
if (m_ClientVersionBit & EQEmu::versions::bit_RoFAndLater)
|
||||
{
|
||||
QueuePacket(app);
|
||||
}
|
||||
@@ -1412,7 +1412,7 @@ bool Client::OPCharCreate(char *name, CharCreate_Struct *cc)
|
||||
Log.Out(Logs::Detail, Logs::World_Server, "Beard: %d Beardcolor: %d", cc->beard, cc->beardcolor);
|
||||
|
||||
/* Validate the char creation struct */
|
||||
if (m_ClientVersionBit & BIT_SoFAndLater) {
|
||||
if (m_ClientVersionBit & EQEmu::versions::bit_SoFAndLater) {
|
||||
if (!CheckCharCreateInfoSoF(cc)) {
|
||||
Log.Out(Logs::Detail, Logs::World_Server,"CheckCharCreateInfo did not validate the request (bad race/class/stats)");
|
||||
return false;
|
||||
@@ -1483,7 +1483,7 @@ bool Client::OPCharCreate(char *name, CharCreate_Struct *cc)
|
||||
pp.pvp = database.GetServerType() == 1 ? 1 : 0;
|
||||
|
||||
/* If it is an SoF Client and the SoF Start Zone rule is set, send new chars there */
|
||||
if (m_ClientVersionBit & BIT_SoFAndLater) {
|
||||
if (m_ClientVersionBit & EQEmu::versions::bit_SoFAndLater) {
|
||||
Log.Out(Logs::Detail, Logs::World_Server,"Found 'SoFStartZoneID' rule setting: %i", RuleI(World, SoFStartZoneID));
|
||||
if (RuleI(World, SoFStartZoneID) > 0) {
|
||||
pp.zone_id = RuleI(World, SoFStartZoneID);
|
||||
@@ -1499,7 +1499,7 @@ bool Client::OPCharCreate(char *name, CharCreate_Struct *cc)
|
||||
}
|
||||
}
|
||||
/* use normal starting zone logic to either get defaults, or if startzone was set, load that from the db table.*/
|
||||
bool ValidStartZone = database.GetStartZone(&pp, cc, m_ClientVersionBit & BIT_TitaniumAndEarlier);
|
||||
bool ValidStartZone = database.GetStartZone(&pp, cc, m_ClientVersionBit & EQEmu::versions::bit_TitaniumAndEarlier);
|
||||
|
||||
if (!ValidStartZone){
|
||||
return false;
|
||||
@@ -1833,7 +1833,7 @@ void Client::SetClassStartingSkills(PlayerProfile_Struct *pp)
|
||||
}
|
||||
}
|
||||
|
||||
if (cle->GetClientVersion() < static_cast<uint8>(ClientVersion::RoF2) && pp->class_ == BERSERKER) {
|
||||
if (cle->GetClientVersion() < static_cast<uint8>(EQEmu::versions::ClientVersion::RoF2) && pp->class_ == BERSERKER) {
|
||||
pp->skills[Skill1HPiercing] = pp->skills[Skill2HPiercing];
|
||||
pp->skills[Skill2HPiercing] = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user