mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-03 05:16:37 +00:00
Implemented 'enum class ClientVersion' -- added 'RoF2' to lua client version enumeration
This commit is contained in:
+3
-3
@@ -155,7 +155,7 @@ void Client::CalcItemBonuses(StatBonuses* newbon) {
|
||||
}
|
||||
|
||||
//Power Source Slot
|
||||
if (GetClientVersion() >= EQClientSoF)
|
||||
if (GetClientVersion() >= ClientVersion::SoF)
|
||||
{
|
||||
const ItemInst* inst = m_inv[MainPowerSource];
|
||||
if(inst)
|
||||
@@ -3086,7 +3086,7 @@ void Client::CalcItemScale() {
|
||||
changed = true;
|
||||
|
||||
//Power Source Slot
|
||||
if (GetClientVersion() >= EQClientSoF)
|
||||
if (GetClientVersion() >= ClientVersion::SoF)
|
||||
{
|
||||
if(CalcItemScale(MainPowerSource, MainPowerSource))
|
||||
changed = true;
|
||||
@@ -3180,7 +3180,7 @@ void Client::DoItemEnterZone() {
|
||||
changed = true;
|
||||
|
||||
//Power Source Slot
|
||||
if (GetClientVersion() >= EQClientSoF)
|
||||
if (GetClientVersion() >= ClientVersion::SoF)
|
||||
{
|
||||
if(DoItemEnterZone(MainPowerSource, MainPowerSource))
|
||||
changed = true;
|
||||
|
||||
+5
-5
@@ -1375,7 +1375,7 @@ int32 Bot::GenerateBaseHitPoints()
|
||||
uint32 Post255;
|
||||
uint32 NormalSTA = GetSTA();
|
||||
|
||||
if(GetOwner() && GetOwner()->CastToClient() && GetOwner()->CastToClient()->GetClientVersion() >= EQClientSoD && RuleB(Character, SoDClientUseSoDHPManaEnd))
|
||||
if(GetOwner() && GetOwner()->CastToClient() && GetOwner()->CastToClient()->GetClientVersion() >= ClientVersion::SoD && RuleB(Character, SoDClientUseSoDHPManaEnd))
|
||||
{
|
||||
float SoDPost255;
|
||||
|
||||
@@ -9332,7 +9332,7 @@ int32 Bot::GenerateBaseManaPoints()
|
||||
{
|
||||
case 'I':
|
||||
WisInt = INT;
|
||||
if(GetOwner() && GetOwner()->CastToClient() && GetOwner()->CastToClient()->GetClientVersion() >= EQClientSoD && RuleB(Character, SoDClientUseSoDHPManaEnd)) {
|
||||
if(GetOwner() && GetOwner()->CastToClient() && GetOwner()->CastToClient()->GetClientVersion() >= ClientVersion::SoD && RuleB(Character, SoDClientUseSoDHPManaEnd)) {
|
||||
if(WisInt > 100) {
|
||||
ConvertedWisInt = (((WisInt - 100) * 5 / 2) + 100);
|
||||
if(WisInt > 201) {
|
||||
@@ -9375,7 +9375,7 @@ int32 Bot::GenerateBaseManaPoints()
|
||||
|
||||
case 'W':
|
||||
WisInt = WIS;
|
||||
if(GetOwner() && GetOwner()->CastToClient() && GetOwner()->CastToClient()->GetClientVersion() >= EQClientSoD && RuleB(Character, SoDClientUseSoDHPManaEnd)) {
|
||||
if(GetOwner() && GetOwner()->CastToClient() && GetOwner()->CastToClient()->GetClientVersion() >= ClientVersion::SoD && RuleB(Character, SoDClientUseSoDHPManaEnd)) {
|
||||
if(WisInt > 100) {
|
||||
ConvertedWisInt = (((WisInt - 100) * 5 / 2) + 100);
|
||||
if(WisInt > 201) {
|
||||
@@ -9614,7 +9614,7 @@ int32 Bot::GetMaxStat() {
|
||||
if (level < 61) {
|
||||
base = 255;
|
||||
}
|
||||
else if (GetOwner() && GetOwner()->CastToClient() && GetOwner()->CastToClient()->GetClientVersion() >= EQClientSoF) {
|
||||
else if (GetOwner() && GetOwner()->CastToClient() && GetOwner()->CastToClient()->GetClientVersion() >= ClientVersion::SoF) {
|
||||
base = 255 + 5 * (level - 60);
|
||||
}
|
||||
else if (level < 71) {
|
||||
@@ -10234,7 +10234,7 @@ int32 Bot::CalcBaseEndurance()
|
||||
int32 sta_end = 0;
|
||||
int Stats = 0;
|
||||
|
||||
if(GetOwner() && GetOwner()->CastToClient() && GetOwner()->CastToClient()->GetClientVersion() >= EQClientSoD && RuleB(Character, SoDClientUseSoDHPManaEnd)) {
|
||||
if(GetOwner() && GetOwner()->CastToClient() && GetOwner()->CastToClient()->GetClientVersion() >= ClientVersion::SoD && RuleB(Character, SoDClientUseSoDHPManaEnd)) {
|
||||
int HeroicStats = 0;
|
||||
|
||||
Stats = ((GetSTR() + GetSTA() + GetDEX() + GetAGI()) / 4);
|
||||
|
||||
+13
-13
@@ -246,7 +246,7 @@ Client::Client(EQStreamInterface* ieqs)
|
||||
GlobalChatLimiterTimer = new Timer(RuleI(Chat, IntervalDurationMS));
|
||||
AttemptedMessages = 0;
|
||||
TotalKarma = 0;
|
||||
ClientVersion = EQClientUnknown;
|
||||
ClientVersion = ClientVersion::Unknown;
|
||||
ClientVersionBit = 0;
|
||||
AggroCount = 0;
|
||||
RestRegenHP = 0;
|
||||
@@ -1440,7 +1440,7 @@ void Client::UpdateWho(uint8 remove) {
|
||||
else if (m_pp.anon >= 2)
|
||||
scl->anon = 2;
|
||||
|
||||
scl->ClientVersion = GetClientVersion();
|
||||
scl->ClientVersion = static_cast<unsigned int>(GetClientVersion());
|
||||
scl->tellsoff = tellsoff;
|
||||
scl->guild_id = guild_id;
|
||||
scl->LFG = LFG;
|
||||
@@ -1698,7 +1698,7 @@ void Client::SendManaUpdatePacket() {
|
||||
if (!Connected() || IsCasting())
|
||||
return;
|
||||
|
||||
if (GetClientVersion() >= EQClientSoD) {
|
||||
if (GetClientVersion() >= ClientVersion::SoD) {
|
||||
SendManaUpdate();
|
||||
SendEnduranceUpdate();
|
||||
}
|
||||
@@ -1734,7 +1734,7 @@ void Client::SendManaUpdatePacket() {
|
||||
|
||||
|
||||
for(int i = 0; i < MAX_GROUP_MEMBERS; ++i)
|
||||
if(g->members[i] && g->members[i]->IsClient() && (g->members[i] != this) && (g->members[i]->CastToClient()->GetClientVersion() >= EQClientSoD))
|
||||
if(g->members[i] && g->members[i]->IsClient() && (g->members[i] != this) && (g->members[i]->CastToClient()->GetClientVersion() >= ClientVersion::SoD))
|
||||
{
|
||||
g->members[i]->CastToClient()->QueuePacket(outapp);
|
||||
g->members[i]->CastToClient()->QueuePacket(outapp2);
|
||||
@@ -1914,7 +1914,7 @@ void Client::ReadBook(BookRequest_Struct *book) {
|
||||
|
||||
BookText_Struct *out = (BookText_Struct *) outapp->pBuffer;
|
||||
out->window = book->window;
|
||||
if(GetClientVersion() >= EQClientSoF)
|
||||
if(GetClientVersion() >= ClientVersion::SoF)
|
||||
{
|
||||
const ItemInst *inst = m_inv[book->invslot];
|
||||
if(inst)
|
||||
@@ -4065,7 +4065,7 @@ bool Client::GroupFollow(Client* inviter) {
|
||||
group->UpdateGroupAAs();
|
||||
|
||||
//Invite the inviter into the group first.....dont ask
|
||||
if (inviter->GetClientVersion() < EQClientSoD)
|
||||
if (inviter->GetClientVersion() < ClientVersion::SoD)
|
||||
{
|
||||
EQApplicationPacket* outapp = new EQApplicationPacket(OP_GroupUpdate, sizeof(GroupJoin_Struct));
|
||||
GroupJoin_Struct* outgj = (GroupJoin_Struct*)outapp->pBuffer;
|
||||
@@ -4111,13 +4111,13 @@ bool Client::GroupFollow(Client* inviter) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (GetClientVersion() >= EQClientSoD)
|
||||
if (GetClientVersion() >= ClientVersion::SoD)
|
||||
{
|
||||
SendGroupJoinAcknowledge();
|
||||
}
|
||||
|
||||
// Temporary hack for SoD, as things seem to work quite differently
|
||||
if (inviter->IsClient() && inviter->GetClientVersion() >= EQClientSoD)
|
||||
if (inviter->IsClient() && inviter->GetClientVersion() >= ClientVersion::SoD)
|
||||
{
|
||||
database.RefreshGroupFromDB(inviter);
|
||||
}
|
||||
@@ -4351,7 +4351,7 @@ void Client::IncrementAggroCount() {
|
||||
if (AggroCount == 1)
|
||||
SavedRaidRestTimer = rest_timer.GetRemainingTime();
|
||||
|
||||
if(GetClientVersion() >= EQClientSoF) {
|
||||
if(GetClientVersion() >= ClientVersion::SoF) {
|
||||
|
||||
EQApplicationPacket *outapp = new EQApplicationPacket(OP_RestState, 1);
|
||||
char *Buffer = (char *)outapp->pBuffer;
|
||||
@@ -4396,7 +4396,7 @@ void Client::DecrementAggroCount() {
|
||||
|
||||
rest_timer.Start(time_until_rest);
|
||||
|
||||
if(GetClientVersion() >= EQClientSoF) {
|
||||
if(GetClientVersion() >= ClientVersion::SoF) {
|
||||
|
||||
EQApplicationPacket *outapp = new EQApplicationPacket(OP_RestState, 5);
|
||||
char *Buffer = (char *)outapp->pBuffer;
|
||||
@@ -6805,7 +6805,7 @@ void Client::SendStatsWindow(Client* client, bool use_window)
|
||||
if(use_window) {
|
||||
if(final_stats.size() < 4096)
|
||||
{
|
||||
uint32 Buttons = (client->GetClientVersion() < EQClientSoD) ? 0 : 1;
|
||||
uint32 Buttons = (client->GetClientVersion() < ClientVersion::SoD) ? 0 : 1;
|
||||
client->SendWindow(0, POPUPID_UPDATE_SHOWSTATSWINDOW, Buttons, "Cancel", "Update", 0, 1, this, "", "%s", final_stats.c_str());
|
||||
goto Extra_Info;
|
||||
}
|
||||
@@ -6841,7 +6841,7 @@ void Client::SendStatsWindow(Client* client, bool use_window)
|
||||
}
|
||||
|
||||
void Client::SendAltCurrencies() {
|
||||
if(GetClientVersion() >= EQClientSoF) {
|
||||
if(GetClientVersion() >= ClientVersion::SoF) {
|
||||
uint32 count = zone->AlternateCurrencies.size();
|
||||
if(count == 0) {
|
||||
return;
|
||||
@@ -7332,7 +7332,7 @@ void Client::SendMercPersonalInfo()
|
||||
|
||||
if(mercData)
|
||||
{
|
||||
if (GetClientVersion() >= EQClientRoF)
|
||||
if (GetClientVersion() >= ClientVersion::RoF)
|
||||
{
|
||||
if (mercCount > 0)
|
||||
{
|
||||
|
||||
+2
-2
@@ -1019,7 +1019,7 @@ public:
|
||||
inline int ActiveTasksInSet(int TaskSet) { return (taskstate ? taskstate->ActiveTasksInSet(TaskSet) :0); }
|
||||
inline int CompletedTasksInSet(int TaskSet) { return (taskstate ? taskstate->CompletedTasksInSet(TaskSet) :0); }
|
||||
|
||||
inline const EQClientVersion GetClientVersion() const { return ClientVersion; }
|
||||
inline const ClientVersion GetClientVersion() const { return ClientVersion; }
|
||||
inline const uint32 GetClientVersionBit() const { return ClientVersionBit; }
|
||||
|
||||
/** Adventure Stuff **/
|
||||
@@ -1506,7 +1506,7 @@ private:
|
||||
Timer *GlobalChatLimiterTimer; //60 seconds
|
||||
uint32 AttemptedMessages;
|
||||
|
||||
EQClientVersion ClientVersion;
|
||||
ClientVersion ClientVersion;
|
||||
uint32 ClientVersionBit;
|
||||
|
||||
int XPRate;
|
||||
|
||||
@@ -43,7 +43,7 @@ int32 Client::GetMaxStat() const {
|
||||
if (level < 61) {
|
||||
base = 255;
|
||||
}
|
||||
else if (GetClientVersion() >= EQClientSoF) {
|
||||
else if (GetClientVersion() >= ClientVersion::SoF) {
|
||||
base = 255 + 5 * (level - 60);
|
||||
}
|
||||
else if (level < 71) {
|
||||
@@ -367,7 +367,7 @@ uint32 Mob::GetClassLevelFactor(){
|
||||
|
||||
int32 Client::CalcBaseHP()
|
||||
{
|
||||
if(GetClientVersion() >= EQClientSoF && RuleB(Character, SoDClientUseSoDHPManaEnd)) {
|
||||
if(GetClientVersion() >= ClientVersion::SoF && RuleB(Character, SoDClientUseSoDHPManaEnd)) {
|
||||
int stats = GetSTA();
|
||||
if(stats > 255) {
|
||||
stats = (stats - 255) / 2;
|
||||
@@ -973,7 +973,7 @@ int32 Client::CalcBaseMana()
|
||||
case 'I':
|
||||
WisInt = GetINT();
|
||||
|
||||
if (GetClientVersion() >= EQClientSoF && RuleB(Character, SoDClientUseSoDHPManaEnd)) {
|
||||
if (GetClientVersion() >= ClientVersion::SoF && RuleB(Character, SoDClientUseSoDHPManaEnd)) {
|
||||
|
||||
if (WisInt > 100) {
|
||||
ConvertedWisInt = (((WisInt - 100) * 5 / 2) + 100);
|
||||
@@ -1008,7 +1008,7 @@ int32 Client::CalcBaseMana()
|
||||
case 'W':
|
||||
WisInt = GetWIS();
|
||||
|
||||
if (GetClientVersion() >= EQClientSoF && RuleB(Character, SoDClientUseSoDHPManaEnd)) {
|
||||
if (GetClientVersion() >= ClientVersion::SoF && RuleB(Character, SoDClientUseSoDHPManaEnd)) {
|
||||
|
||||
if (WisInt > 100) {
|
||||
ConvertedWisInt = (((WisInt - 100) * 5 / 2) + 100);
|
||||
@@ -1925,7 +1925,7 @@ int32 Client::CalcBaseEndurance()
|
||||
{
|
||||
int32 base_end = 0;
|
||||
|
||||
if(GetClientVersion() >= EQClientSoF && RuleB(Character, SoDClientUseSoDHPManaEnd)) {
|
||||
if(GetClientVersion() >= ClientVersion::SoF && RuleB(Character, SoDClientUseSoDHPManaEnd)) {
|
||||
double heroic_stats = (GetHeroicSTR() + GetHeroicSTA() + GetHeroicDEX() + GetHeroicAGI()) / 4.0f;
|
||||
double stats = (GetSTR() + GetSTA() + GetDEX() + GetAGI()) / 4.0f;
|
||||
|
||||
|
||||
+24
-26
@@ -509,7 +509,7 @@ void Client::CompleteConnect()
|
||||
|
||||
if (IsInAGuild()){
|
||||
uint8 rank = GuildRank();
|
||||
if (GetClientVersion() >= EQClientRoF)
|
||||
if (GetClientVersion() >= ClientVersion::RoF)
|
||||
{
|
||||
switch (rank) {
|
||||
case 0: { rank = 5; break; } // GUILD_MEMBER 0
|
||||
@@ -823,7 +823,7 @@ void Client::CompleteConnect()
|
||||
if (zone->GetZoneID() == RuleI(World, GuildBankZoneID) && GuildBanks)
|
||||
GuildBanks->SendGuildBank(this);
|
||||
|
||||
if (GetClientVersion() >= EQClientSoD)
|
||||
if (GetClientVersion() >= ClientVersion::SoD)
|
||||
entity_list.SendFindableNPCList(this);
|
||||
|
||||
if (IsInAGuild()) {
|
||||
@@ -1035,7 +1035,7 @@ void Client::Handle_Connect_OP_ReqClientSpawn(const EQApplicationPacket *app)
|
||||
outapp = new EQApplicationPacket(OP_SendExpZonein, 0);
|
||||
FastQueuePacket(&outapp);
|
||||
|
||||
if (GetClientVersion() >= EQClientRoF)
|
||||
if (GetClientVersion() >= ClientVersion::RoF)
|
||||
{
|
||||
outapp = new EQApplicationPacket(OP_ClientReady, 0);
|
||||
FastQueuePacket(&outapp);
|
||||
@@ -1309,14 +1309,12 @@ void Client::Handle_Connect_OP_ZoneEntry(const EQApplicationPacket *app)
|
||||
|
||||
conn_state = ReceivedZoneEntry;
|
||||
|
||||
ClientVersion = Connection()->ClientVersion();
|
||||
if (ClientVersion != EQClientUnknown)
|
||||
ClientVersionBit = 1 << (ClientVersion - 1);
|
||||
else
|
||||
ClientVersionBit = 0;
|
||||
ClientVersion = Connection()->GetClientVersion();
|
||||
if (ClientVersion != ClientVersion::Unknown)
|
||||
ClientVersionBit = 1 << (static_cast<unsigned int>(ClientVersion) - 1);
|
||||
|
||||
bool siv = m_inv.SetInventoryVersion(ClientVersion);
|
||||
LogFile->write(EQEmuLog::Debug, "%s inventory version to %s(%i)", (siv ? "Succeeded in setting" : "Failed to set"), EQClientVersionName(ClientVersion), ClientVersion);
|
||||
LogFile->write(EQEmuLog::Debug, "%s inventory version to %s(%i)", (siv ? "Succeeded in setting" : "Failed to set"), ClientVersionName(ClientVersion), ClientVersion);
|
||||
|
||||
/* Antighost code
|
||||
tmp var is so the search doesnt find this object
|
||||
@@ -1499,7 +1497,7 @@ void Client::Handle_Connect_OP_ZoneEntry(const EQApplicationPacket *app)
|
||||
m_pp.guild_id = GuildID();
|
||||
uint8 rank = guild_mgr.GetDisplayedRank(GuildID(), GuildRank(), CharacterID());
|
||||
// FIXME: RoF guild rank
|
||||
if (GetClientVersion() >= EQClientRoF) {
|
||||
if (GetClientVersion() >= ClientVersion::RoF) {
|
||||
switch (rank) {
|
||||
case 0:
|
||||
rank = 5;
|
||||
@@ -1850,7 +1848,7 @@ void Client::Handle_Connect_OP_ZoneEntry(const EQApplicationPacket *app)
|
||||
/* Task Packets */
|
||||
LoadClientTaskState();
|
||||
|
||||
if (GetClientVersion() >= EQClientRoF) {
|
||||
if (GetClientVersion() >= ClientVersion::RoF) {
|
||||
outapp = new EQApplicationPacket(OP_ReqNewZone, 0);
|
||||
Handle_Connect_OP_ReqNewZone(outapp);
|
||||
safe_delete(outapp);
|
||||
@@ -3079,7 +3077,7 @@ void Client::Handle_OP_AugmentItem(const EQApplicationPacket *app)
|
||||
// Delegate to tradeskill object to perform combine
|
||||
AugmentItem_Struct* in_augment = (AugmentItem_Struct*)app->pBuffer;
|
||||
bool deleteItems = false;
|
||||
if (GetClientVersion() >= EQClientRoF)
|
||||
if (GetClientVersion() >= ClientVersion::RoF)
|
||||
{
|
||||
ItemInst *itemOneToPush = nullptr, *itemTwoToPush = nullptr;
|
||||
|
||||
@@ -5162,7 +5160,7 @@ void Client::Handle_OP_DeleteItem(const EQApplicationPacket *app)
|
||||
int16 AlcoholTolerance = GetSkill(SkillAlcoholTolerance);
|
||||
int16 IntoxicationIncrease;
|
||||
|
||||
if (GetClientVersion() < EQClientSoD)
|
||||
if (GetClientVersion() < ClientVersion::SoD)
|
||||
IntoxicationIncrease = (200 - AlcoholTolerance) * 30 / 200 + 10;
|
||||
else
|
||||
IntoxicationIncrease = (270 - AlcoholTolerance) * 0.111111108 + 10;
|
||||
@@ -5479,7 +5477,7 @@ void Client::Handle_OP_EndLootRequest(const EQApplicationPacket *app)
|
||||
Entity* entity = entity_list.GetID(*((uint16*)app->pBuffer));
|
||||
if (entity == 0) {
|
||||
Message(13, "Error: OP_EndLootRequest: Corpse not found (ent = 0)");
|
||||
if (GetClientVersion() >= EQClientSoD)
|
||||
if (GetClientVersion() >= ClientVersion::SoD)
|
||||
Corpse::SendEndLootErrorPacket(this);
|
||||
else
|
||||
Corpse::SendLootReqErrorPacket(this);
|
||||
@@ -6845,7 +6843,7 @@ void Client::Handle_OP_GuildBank(const EQApplicationPacket *app)
|
||||
uint32 Action = VARSTRUCT_DECODE_TYPE(uint32, Buffer);
|
||||
uint32 sentAction = Action;
|
||||
|
||||
if (GetClientVersion() >= EQClientRoF)
|
||||
if (GetClientVersion() >= ClientVersion::RoF)
|
||||
{
|
||||
Action += 1;
|
||||
/*
|
||||
@@ -7412,7 +7410,7 @@ void Client::Handle_OP_GuildInviteAccept(const EQApplicationPacket *app)
|
||||
|
||||
GuildInviteAccept_Struct* gj = (GuildInviteAccept_Struct*)app->pBuffer;
|
||||
|
||||
if (GetClientVersion() >= EQClientRoF)
|
||||
if (GetClientVersion() >= ClientVersion::RoF)
|
||||
{
|
||||
if (gj->response > 9)
|
||||
{
|
||||
@@ -7472,7 +7470,7 @@ void Client::Handle_OP_GuildInviteAccept(const EQApplicationPacket *app)
|
||||
|
||||
uint32 guildrank = gj->response;
|
||||
|
||||
if (GetClientVersion() >= EQClientRoF)
|
||||
if (GetClientVersion() >= ClientVersion::RoF)
|
||||
{
|
||||
if (gj->response == 8)
|
||||
{
|
||||
@@ -8081,7 +8079,7 @@ void Client::Handle_OP_InspectRequest(const EQApplicationPacket *app)
|
||||
Mob* tmp = entity_list.GetMob(ins->TargetID);
|
||||
|
||||
if (tmp != 0 && tmp->IsClient()) {
|
||||
if (tmp->CastToClient()->GetClientVersion() < EQClientSoF) { tmp->CastToClient()->QueuePacket(app); } // Send request to target
|
||||
if (tmp->CastToClient()->GetClientVersion() < ClientVersion::SoF) { tmp->CastToClient()->QueuePacket(app); } // Send request to target
|
||||
// Inspecting an SoF or later client will make the server handle the request
|
||||
else { ProcessInspectRequest(tmp->CastToClient(), this); }
|
||||
}
|
||||
@@ -8601,7 +8599,7 @@ void Client::Handle_OP_ItemVerifyRequest(const EQApplicationPacket *app)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (GetClientVersion() >= EQClientSoD && !inst->IsEquipable(GetBaseRace(), GetClass()))
|
||||
if (GetClientVersion() >= ClientVersion::SoD && !inst->IsEquipable(GetBaseRace(), GetClass()))
|
||||
{
|
||||
if (item->ItemType != ItemTypeFood && item->ItemType != ItemTypeDrink && item->ItemType != ItemTypeAlcohol)
|
||||
{
|
||||
@@ -9436,14 +9434,14 @@ void Client::Handle_OP_MercenaryDataRequest(const EQApplicationPacket *app)
|
||||
return;
|
||||
}
|
||||
|
||||
mercTypeCount = tar->GetNumMercTypes(GetClientVersion());
|
||||
mercCount = tar->GetNumMercs(GetClientVersion());
|
||||
mercTypeCount = tar->GetNumMercTypes(static_cast<unsigned int>(GetClientVersion()));
|
||||
mercCount = tar->GetNumMercs(static_cast<unsigned int>(GetClientVersion()));
|
||||
|
||||
if (mercCount > MAX_MERC)
|
||||
return;
|
||||
|
||||
std::list<MercType> mercTypeList = tar->GetMercTypesList(GetClientVersion());
|
||||
std::list<MercData> mercDataList = tar->GetMercsList(GetClientVersion());
|
||||
std::list<MercType> mercTypeList = tar->GetMercTypesList(static_cast<unsigned int>(GetClientVersion()));
|
||||
std::list<MercData> mercDataList = tar->GetMercsList(static_cast<unsigned int>(GetClientVersion()));
|
||||
|
||||
int i = 0;
|
||||
int StanceCount = 0;
|
||||
@@ -11343,7 +11341,7 @@ void Client::Handle_OP_ReadBook(const EQApplicationPacket *app)
|
||||
}
|
||||
BookRequest_Struct* book = (BookRequest_Struct*)app->pBuffer;
|
||||
ReadBook(book);
|
||||
if (GetClientVersion() >= EQClientSoF)
|
||||
if (GetClientVersion() >= ClientVersion::SoF)
|
||||
{
|
||||
EQApplicationPacket EndOfBook(OP_FinishWindow, 0);
|
||||
QueuePacket(&EndOfBook);
|
||||
@@ -12660,7 +12658,7 @@ void Client::Handle_OP_SpawnAppearance(const EQApplicationPacket *app)
|
||||
{
|
||||
if (!HasSkill(SkillHide) && GetSkill(SkillHide) == 0)
|
||||
{
|
||||
if (GetClientVersion() < EQClientSoF)
|
||||
if (GetClientVersion() < ClientVersion::SoF)
|
||||
{
|
||||
char *hack_str = nullptr;
|
||||
MakeAnyLenString(&hack_str, "Player sent OP_SpawnAppearance with AT_Invis: %i", sa->parameter);
|
||||
@@ -13497,7 +13495,7 @@ void Client::Handle_OP_Trader(const EQApplicationPacket *app)
|
||||
|
||||
this->Trader_StartTrader();
|
||||
|
||||
if (GetClientVersion() >= EQClientRoF)
|
||||
if (GetClientVersion() >= ClientVersion::RoF)
|
||||
{
|
||||
EQApplicationPacket* outapp = new EQApplicationPacket(OP_Trader, sizeof(TraderStatus_Struct));
|
||||
TraderStatus_Struct* tss = (TraderStatus_Struct*)outapp->pBuffer;
|
||||
|
||||
@@ -124,7 +124,7 @@ bool Client::Process() {
|
||||
HandleRespawnFromHover(0);
|
||||
}
|
||||
|
||||
if(IsTracking() && (GetClientVersion() >= EQClientSoD) && TrackingTimer.Check())
|
||||
if(IsTracking() && (GetClientVersion() >= ClientVersion::SoD) && TrackingTimer.Check())
|
||||
DoTracking();
|
||||
|
||||
if(hpupdate_timer.Check())
|
||||
@@ -871,7 +871,7 @@ void Client::BulkSendInventoryItems() {
|
||||
}
|
||||
|
||||
// Power Source
|
||||
if(GetClientVersion() >= EQClientSoF) {
|
||||
if(GetClientVersion() >= ClientVersion::SoF) {
|
||||
const ItemInst* inst = m_inv[MainPowerSource];
|
||||
if(inst) {
|
||||
std::string packet = inst->Serialize(MainPowerSource);
|
||||
@@ -1792,7 +1792,7 @@ void Client::OPGMTrainSkill(const EQApplicationPacket *app)
|
||||
}
|
||||
}
|
||||
|
||||
if(GetClientVersion() >= EQClientSoF) {
|
||||
if(GetClientVersion() >= ClientVersion::SoF) {
|
||||
// The following packet decreases the skill points left in the Training Window and
|
||||
// produces the 'You have increased your skill / learned the basics of' message.
|
||||
//
|
||||
|
||||
+1
-1
@@ -2632,7 +2632,7 @@ void command_peekinv(Client *c, const Seperator *sep)
|
||||
indexMain, ((item_data == nullptr) ? 0 : item_data->ID), item_link.c_str(), ((inst_main == nullptr) ? 0 : inst_main->GetCharges()));
|
||||
}
|
||||
|
||||
if ((scopeWhere & peekWorn) && (targetClient->GetClientVersion() >= EQClientSoF)) {
|
||||
if ((scopeWhere & peekWorn) && (targetClient->GetClientVersion() >= ClientVersion::SoF)) {
|
||||
inst_main = targetClient->GetInv().GetItem(MainPowerSource);
|
||||
item_data = (inst_main == nullptr) ? nullptr : inst_main->GetItem();
|
||||
linker.SetItemInst(inst_main);
|
||||
|
||||
+3
-3
@@ -298,7 +298,7 @@ Corpse::Corpse(Client* client, int32 in_rezexp) : Mob (
|
||||
// cash
|
||||
// Let's not move the cash when 'RespawnFromHover = true' && 'client->GetClientVersion() < EQClientSoF' since the client doesn't.
|
||||
// (change to first client that supports 'death hover' mode, if not SoF.)
|
||||
if (!RuleB(Character, RespawnFromHover) || client->GetClientVersion() < EQClientSoF) {
|
||||
if (!RuleB(Character, RespawnFromHover) || client->GetClientVersion() < ClientVersion::SoF) {
|
||||
SetCash(pp->copper, pp->silver, pp->gold, pp->platinum);
|
||||
pp->copper = 0;
|
||||
pp->silver = 0;
|
||||
@@ -317,7 +317,7 @@ Corpse::Corpse(Client* client, int32 in_rezexp) : Mob (
|
||||
std::list<uint32> removed_list;
|
||||
//bool cursor = false;
|
||||
for(i = MAIN_BEGIN; i < EmuConstants::MAP_POSSESSIONS_SIZE; i++) {
|
||||
if(i == MainAmmo && client->GetClientVersion() >= EQClientSoF) {
|
||||
if(i == MainAmmo && client->GetClientVersion() >= ClientVersion::SoF) {
|
||||
item = client->GetInv().GetItem(MainPowerSource);
|
||||
if((item && (!client->IsBecomeNPC())) || (item && client->IsBecomeNPC() && !item->GetItem()->NoRent)) {
|
||||
std::list<uint32> slot_list = MoveItemToCorpse(client, item, MainPowerSource);
|
||||
@@ -1041,7 +1041,7 @@ void Corpse::MakeLootRequestPackets(Client* client, const EQApplicationPacket* a
|
||||
|
||||
// This is required for the 'Loot All' feature to work for SoD clients. I expect it is to tell the client that the
|
||||
// server has now sent all the items on the corpse.
|
||||
if(client->GetClientVersion() >= EQClientSoD) { SendLootReqErrorPacket(client, 6); }
|
||||
if(client->GetClientVersion() >= ClientVersion::SoD) { SendLootReqErrorPacket(client, 6); }
|
||||
}
|
||||
|
||||
void Corpse::LootItem(Client* client, const EQApplicationPacket* app) {
|
||||
|
||||
+1
-1
@@ -4378,7 +4378,7 @@ void EntityList::UpdateFindableNPCState(NPC *n, bool Remove)
|
||||
auto it = client_list.begin();
|
||||
while (it != client_list.end()) {
|
||||
Client *c = it->second;
|
||||
if (c && (c->GetClientVersion() >= EQClientSoD))
|
||||
if (c && (c->GetClientVersion() >= ClientVersion::SoD))
|
||||
c->QueuePacket(outapp);
|
||||
|
||||
++it;
|
||||
|
||||
+8
-8
@@ -393,7 +393,7 @@ void Group::SendHPPacketsTo(Mob *member)
|
||||
{
|
||||
members[i]->CreateHPPacket(&hpapp);
|
||||
member->CastToClient()->QueuePacket(&hpapp, false);
|
||||
if(member->CastToClient()->GetClientVersion() >= EQClientSoD)
|
||||
if(member->CastToClient()->GetClientVersion() >= ClientVersion::SoD)
|
||||
{
|
||||
outapp.SetOpcode(OP_MobManaUpdate);
|
||||
MobManaUpdate_Struct *mmus = (MobManaUpdate_Struct *)outapp.pBuffer;
|
||||
@@ -424,7 +424,7 @@ void Group::SendHPPacketsFrom(Mob *member)
|
||||
if(members[i] && members[i] != member && members[i]->IsClient())
|
||||
{
|
||||
members[i]->CastToClient()->QueuePacket(&hp_app);
|
||||
if(members[i]->CastToClient()->GetClientVersion() >= EQClientSoD)
|
||||
if(members[i]->CastToClient()->GetClientVersion() >= ClientVersion::SoD)
|
||||
{
|
||||
outapp.SetOpcode(OP_MobManaUpdate);
|
||||
MobManaUpdate_Struct *mmus = (MobManaUpdate_Struct *)outapp.pBuffer;
|
||||
@@ -564,7 +564,7 @@ bool Group::DelMemberOOZ(const char *Name) {
|
||||
if(GroupCount() < 3)
|
||||
{
|
||||
UnDelegateMarkNPC(NPCMarkerName.c_str());
|
||||
if(GetLeader() && GetLeader()->IsClient() && GetLeader()->CastToClient()->GetClientVersion() < EQClientSoD) {
|
||||
if(GetLeader() && GetLeader()->IsClient() && GetLeader()->CastToClient()->GetClientVersion() < ClientVersion::SoD) {
|
||||
UnDelegateMainAssist(MainAssistName.c_str());
|
||||
}
|
||||
ClearAllNPCMarks();
|
||||
@@ -722,7 +722,7 @@ bool Group::DelMember(Mob* oldmember, bool ignoresender)
|
||||
if(GroupCount() < 3)
|
||||
{
|
||||
UnDelegateMarkNPC(NPCMarkerName.c_str());
|
||||
if(GetLeader() && GetLeader()->IsClient() && GetLeader()->CastToClient()->GetClientVersion() < EQClientSoD) {
|
||||
if(GetLeader() && GetLeader()->IsClient() && GetLeader()->CastToClient()->GetClientVersion() < ClientVersion::SoD) {
|
||||
UnDelegateMainAssist(MainAssistName.c_str());
|
||||
}
|
||||
ClearAllNPCMarks();
|
||||
@@ -1567,7 +1567,7 @@ void Group::NotifyMainTank(Client *c, uint8 toggle)
|
||||
if(!MainTankName.size())
|
||||
return;
|
||||
|
||||
if(c->GetClientVersion() < EQClientSoD)
|
||||
if(c->GetClientVersion() < ClientVersion::SoD)
|
||||
{
|
||||
if(toggle)
|
||||
c->Message(0, "%s is now Main Tank.", MainTankName.c_str());
|
||||
@@ -1607,7 +1607,7 @@ void Group::NotifyMainAssist(Client *c, uint8 toggle)
|
||||
if(!MainAssistName.size())
|
||||
return;
|
||||
|
||||
if(c->GetClientVersion() < EQClientSoD)
|
||||
if(c->GetClientVersion() < ClientVersion::SoD)
|
||||
{
|
||||
EQApplicationPacket *outapp = new EQApplicationPacket(OP_DelegateAbility, sizeof(DelegateAbility_Struct));
|
||||
|
||||
@@ -1662,7 +1662,7 @@ void Group::NotifyPuller(Client *c, uint8 toggle)
|
||||
if(!PullerName.size())
|
||||
return;
|
||||
|
||||
if(c->GetClientVersion() < EQClientSoD)
|
||||
if(c->GetClientVersion() < ClientVersion::SoD)
|
||||
{
|
||||
if(toggle)
|
||||
c->Message(0, "%s is now Puller.", PullerName.c_str());
|
||||
@@ -2228,7 +2228,7 @@ void Group::ChangeLeader(Mob* newleader)
|
||||
for (uint32 i = 0; i < MAX_GROUP_MEMBERS; i++) {
|
||||
if (members[i] && members[i]->IsClient())
|
||||
{
|
||||
if(members[i]->CastToClient()->GetClientVersion() >= EQClientSoD)
|
||||
if(members[i]->CastToClient()->GetClientVersion() >= ClientVersion::SoD)
|
||||
members[i]->CastToClient()->SendGroupLeaderChangePacket(newleader->GetName());
|
||||
|
||||
members[i]->CastToClient()->QueuePacket(outapp);
|
||||
|
||||
+4
-4
@@ -64,7 +64,7 @@ void Client::SendGuildMOTD(bool GetGuildMOTDReply) {
|
||||
|
||||
void Client::SendGuildURL()
|
||||
{
|
||||
if(GetClientVersion() < EQClientSoF)
|
||||
if(GetClientVersion() < ClientVersion::SoF)
|
||||
return;
|
||||
|
||||
if(IsInAGuild())
|
||||
@@ -85,7 +85,7 @@ void Client::SendGuildURL()
|
||||
|
||||
void Client::SendGuildChannel()
|
||||
{
|
||||
if(GetClientVersion() < EQClientSoF)
|
||||
if(GetClientVersion() < ClientVersion::SoF)
|
||||
return;
|
||||
|
||||
if(IsInAGuild())
|
||||
@@ -107,7 +107,7 @@ void Client::SendGuildChannel()
|
||||
|
||||
void Client::SendGuildRanks()
|
||||
{
|
||||
if(GetClientVersion() < EQClientRoF)
|
||||
if(GetClientVersion() < ClientVersion::RoF)
|
||||
return;
|
||||
|
||||
int permissions = 30 + 1; //Static number of permissions in all EQ clients as of May 2014
|
||||
@@ -150,7 +150,7 @@ void Client::SendGuildSpawnAppearance() {
|
||||
uint8 rank = guild_mgr.GetDisplayedRank(GuildID(), GuildRank(), CharacterID());
|
||||
mlog(GUILDS__OUT_PACKETS, "Sending spawn appearance for guild %d at rank %d", GuildID(), rank);
|
||||
SendAppearancePacket(AT_GuildID, GuildID());
|
||||
if(GetClientVersion() >= EQClientRoF)
|
||||
if(GetClientVersion() >= ClientVersion::RoF)
|
||||
{
|
||||
switch (rank) {
|
||||
case 0: { rank = 5; break; } // GUILD_MEMBER 0
|
||||
|
||||
+1
-1
@@ -322,7 +322,7 @@ void ZoneGuildManager::ProcessWorldPacket(ServerPacket *pack) {
|
||||
else if(c != nullptr && s->guild_id != GUILD_NONE) {
|
||||
//char is in zone, and has changed into a new guild, send MOTD.
|
||||
c->SendGuildMOTD();
|
||||
if(c->GetClientVersion() >= EQClientRoF)
|
||||
if(c->GetClientVersion() >= ClientVersion::RoF)
|
||||
{
|
||||
c->SendGuildRanks();
|
||||
}
|
||||
|
||||
+5
-5
@@ -55,7 +55,7 @@ uint32 Client::NukeItem(uint32 itemnum, uint8 where_to_check) {
|
||||
x++;
|
||||
}
|
||||
|
||||
if (GetClientVersion() >= EQClientSoF)
|
||||
if (GetClientVersion() >= ClientVersion::SoF)
|
||||
DeleteItemInInventory(MainPowerSource, 0, true);
|
||||
else
|
||||
DeleteItemInInventory(MainPowerSource, 0, false); // Prevents Titanium crash
|
||||
@@ -683,7 +683,7 @@ void Client::SendCursorBuffer() {
|
||||
// Temporary work-around for the RoF+ Client Buffer
|
||||
// Instead of dealing with client moving items in cursor buffer,
|
||||
// we can just send the next item in the cursor buffer to the cursor.
|
||||
if (GetClientVersion() >= EQClientRoF)
|
||||
if (GetClientVersion() >= ClientVersion::RoF)
|
||||
{
|
||||
if (!GetInv().CursorEmpty())
|
||||
{
|
||||
@@ -937,7 +937,7 @@ bool Client::AutoPutLootInInventory(ItemInst& inst, bool try_worn, bool try_curs
|
||||
for (int16 i = EmuConstants::EQUIPMENT_BEGIN; i < MainPowerSource; i++) { // originally (i < 22)
|
||||
if (i == EmuConstants::GENERAL_BEGIN) {
|
||||
// added power source check for SoF+ clients
|
||||
if (this->GetClientVersion() >= EQClientSoF)
|
||||
if (this->GetClientVersion() >= ClientVersion::SoF)
|
||||
i = MainPowerSource;
|
||||
else
|
||||
break;
|
||||
@@ -2083,7 +2083,7 @@ void Client::RemoveNoRent(bool client_update)
|
||||
auto inst = m_inv[MainPowerSource];
|
||||
if (inst && !inst->GetItem()->NoRent) {
|
||||
mlog(INVENTORY__SLOTS, "NoRent Timer Lapse: Deleting %s from slot %i", inst->GetItem()->Name, MainPowerSource);
|
||||
DeleteItemInInventory(MainPowerSource, 0, (GetClientVersion() >= EQClientSoF) ? client_update : false); // Ti slot non-existent
|
||||
DeleteItemInInventory(MainPowerSource, 0, (GetClientVersion() >= ClientVersion::SoF) ? client_update : false); // Ti slot non-existent
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2301,7 +2301,7 @@ void Client::MoveSlotNotAllowed(bool client_update)
|
||||
bool is_arrow = (inst->GetItem()->ItemType == ItemTypeArrow) ? true : false;
|
||||
int16 free_slot_id = m_inv.FindFreeSlot(inst->IsType(ItemClassContainer), true, inst->GetItem()->Size, is_arrow);
|
||||
mlog(INVENTORY__ERROR, "Slot Assignment Error: Moving %s from slot %i to %i", inst->GetItem()->Name, MainPowerSource, free_slot_id);
|
||||
PutItemInInventory(free_slot_id, *inst, (GetClientVersion() >= EQClientSoF) ? client_update : false);
|
||||
PutItemInInventory(free_slot_id, *inst, (GetClientVersion() >= ClientVersion::SoF) ? client_update : false);
|
||||
database.SaveInventory(character_id, nullptr, MainPowerSource);
|
||||
safe_delete(inst);
|
||||
}
|
||||
|
||||
+1
-1
@@ -834,7 +834,7 @@ void Lua_Client::SetAATitle(const char *title) {
|
||||
|
||||
int Lua_Client::GetClientVersion() {
|
||||
Lua_Safe_Call_Int();
|
||||
return self->GetClientVersion();
|
||||
return static_cast<unsigned int>(self->GetClientVersion());
|
||||
}
|
||||
|
||||
uint32 Lua_Client::GetClientVersionBit() {
|
||||
|
||||
@@ -1758,12 +1758,15 @@ luabind::scope lua_register_client_version() {
|
||||
return luabind::class_<ClientVersions>("ClientVersion")
|
||||
.enum_("constants")
|
||||
[
|
||||
luabind::value("Unknown", static_cast<int>(EQClientUnknown)),
|
||||
luabind::value("Titanium", static_cast<int>(EQClientTitanium)),
|
||||
luabind::value("SoF", static_cast<int>(EQClientSoF)),
|
||||
luabind::value("SoD", static_cast<int>(EQClientSoD)),
|
||||
luabind::value("Underfoot", static_cast<int>(EQClientUnderfoot)),
|
||||
luabind::value("RoF", static_cast<int>(EQClientRoF))
|
||||
luabind::value("Unknown", static_cast<int>(ClientVersion::Unknown)),
|
||||
luabind::value("Titanium", static_cast<int>(ClientVersion::Tit)), // deprecated
|
||||
luabind::value("Tit", static_cast<int>(ClientVersion::Tit)),
|
||||
luabind::value("SoF", static_cast<int>(ClientVersion::SoF)),
|
||||
luabind::value("SoD", static_cast<int>(ClientVersion::SoD)),
|
||||
luabind::value("Underfoot", static_cast<int>(ClientVersion::Und)), // deprecated
|
||||
luabind::value("Und", static_cast<int>(ClientVersion::Und)),
|
||||
luabind::value("RoF", static_cast<int>(ClientVersion::RoF)),
|
||||
luabind::value("RoF2", static_cast<int>(ClientVersion::RoF2))
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
+21
-21
@@ -41,7 +41,7 @@ Merc::Merc(const NPCType* d, float x, float y, float z, float heading)
|
||||
_baseFR = d->FR;
|
||||
_basePR = d->PR;
|
||||
_baseCorrup = d->Corrup;
|
||||
_OwnerClientVersion = EQClientTitanium;
|
||||
_OwnerClientVersion = static_cast<unsigned int>(ClientVersion::Tit);
|
||||
RestRegenHP = 0;
|
||||
RestRegenMana = 0;
|
||||
RestRegenEndurance = 0;
|
||||
@@ -1008,7 +1008,7 @@ int32 Merc::CalcBaseEndurance()
|
||||
int32 sta_end = 0;
|
||||
int Stats = 0;
|
||||
|
||||
if(GetClientVersion() >= EQClientSoD && RuleB(Character, SoDClientUseSoDHPManaEnd)) {
|
||||
if(GetClientVersion() >= static_cast<unsigned int>(ClientVersion::SoD) && RuleB(Character, SoDClientUseSoDHPManaEnd)) {
|
||||
int HeroicStats = 0;
|
||||
|
||||
Stats = ((GetSTR() + GetSTA() + GetDEX() + GetAGI()) / 4);
|
||||
@@ -4956,109 +4956,109 @@ void Client::SendMercResponsePackets(uint32 ResponseType)
|
||||
SendMercMerchantResponsePacket(6);
|
||||
break;
|
||||
case 7: //You must dismiss your suspended mercenary before purchasing a new one!
|
||||
if (GetClientVersion() < EQClientRoF)
|
||||
if (GetClientVersion() < ClientVersion::RoF)
|
||||
SendMercMerchantResponsePacket(7);
|
||||
else
|
||||
//You have the maximum number of mercenaries. You must dismiss one before purchasing a new one!
|
||||
SendMercMerchantResponsePacket(6);
|
||||
break;
|
||||
case 8: //You can not purchase a mercenary because your group is full!
|
||||
if (GetClientVersion() < EQClientRoF)
|
||||
if (GetClientVersion() < ClientVersion::RoF)
|
||||
SendMercMerchantResponsePacket(8);
|
||||
else
|
||||
SendMercMerchantResponsePacket(7);
|
||||
break;
|
||||
case 9: //You can not purchase a mercenary because you are in combat!
|
||||
if (GetClientVersion() < EQClientRoF)
|
||||
if (GetClientVersion() < ClientVersion::RoF)
|
||||
//Mercenary failed to spawn!
|
||||
SendMercMerchantResponsePacket(3);
|
||||
else
|
||||
SendMercMerchantResponsePacket(8);
|
||||
break;
|
||||
case 10: //You have recently dismissed a mercenary and must wait a few more seconds before you can purchase a new one!
|
||||
if (GetClientVersion() < EQClientRoF)
|
||||
if (GetClientVersion() < ClientVersion::RoF)
|
||||
//Mercenary failed to spawn!
|
||||
SendMercMerchantResponsePacket(3);
|
||||
else
|
||||
SendMercMerchantResponsePacket(9);
|
||||
break;
|
||||
case 11: //An error occurred created your mercenary!
|
||||
if (GetClientVersion() < EQClientRoF)
|
||||
if (GetClientVersion() < ClientVersion::RoF)
|
||||
SendMercMerchantResponsePacket(9);
|
||||
else
|
||||
SendMercMerchantResponsePacket(10);
|
||||
break;
|
||||
case 12: //Upkeep Charge Message
|
||||
if (GetClientVersion() < EQClientRoF)
|
||||
if (GetClientVersion() < ClientVersion::RoF)
|
||||
SendMercMerchantResponsePacket(10);
|
||||
else
|
||||
SendMercMerchantResponsePacket(11);
|
||||
break;
|
||||
case 13: // ???
|
||||
if (GetClientVersion() < EQClientRoF)
|
||||
if (GetClientVersion() < ClientVersion::RoF)
|
||||
SendMercMerchantResponsePacket(11);
|
||||
else
|
||||
SendMercMerchantResponsePacket(12);
|
||||
break;
|
||||
case 14: //You ran out of funds to pay for your mercenary!
|
||||
if (GetClientVersion() < EQClientRoF)
|
||||
if (GetClientVersion() < ClientVersion::RoF)
|
||||
SendMercMerchantResponsePacket(12);
|
||||
else
|
||||
SendMercMerchantResponsePacket(13);
|
||||
break;
|
||||
case 15: // ???
|
||||
if (GetClientVersion() < EQClientRoF)
|
||||
if (GetClientVersion() < ClientVersion::RoF)
|
||||
SendMercMerchantResponsePacket(13);
|
||||
else
|
||||
SendMercMerchantResponsePacket(14);
|
||||
break;
|
||||
case 16: //Your mercenary is about to be suspended due to insufficient funds!
|
||||
if (GetClientVersion() < EQClientRoF)
|
||||
if (GetClientVersion() < ClientVersion::RoF)
|
||||
SendMercMerchantResponsePacket(14);
|
||||
else
|
||||
SendMercMerchantResponsePacket(15);
|
||||
break;
|
||||
case 17: //There is no mercenary liaison nearby!
|
||||
if (GetClientVersion() < EQClientRoF)
|
||||
if (GetClientVersion() < ClientVersion::RoF)
|
||||
SendMercMerchantResponsePacket(15);
|
||||
else
|
||||
SendMercMerchantResponsePacket(16);
|
||||
break;
|
||||
case 18: //You are too far from the liaison!
|
||||
if (GetClientVersion() < EQClientRoF)
|
||||
if (GetClientVersion() < ClientVersion::RoF)
|
||||
SendMercMerchantResponsePacket(16);
|
||||
else
|
||||
SendMercMerchantResponsePacket(17);
|
||||
break;
|
||||
case 19: //You do not meet the requirements for that mercenary!
|
||||
if (GetClientVersion() < EQClientRoF)
|
||||
if (GetClientVersion() < ClientVersion::RoF)
|
||||
SendMercMerchantResponsePacket(17);
|
||||
else
|
||||
SendMercMerchantResponsePacket(18);
|
||||
break;
|
||||
case 20: //You are unable to interact with the liaison!
|
||||
if (GetClientVersion() < EQClientRoF)
|
||||
if (GetClientVersion() < ClientVersion::RoF)
|
||||
//You are too far from the liaison!
|
||||
SendMercMerchantResponsePacket(16);
|
||||
else
|
||||
SendMercMerchantResponsePacket(19);
|
||||
break;
|
||||
case 21: //You do not have a high enough membership level to purchase this mercenary!
|
||||
if (GetClientVersion() < EQClientRoF)
|
||||
if (GetClientVersion() < ClientVersion::RoF)
|
||||
//You do not meet the requirements for that mercenary!
|
||||
SendMercMerchantResponsePacket(17);
|
||||
else
|
||||
SendMercMerchantResponsePacket(20);
|
||||
break;
|
||||
case 22: //Your purchase has failed because this mercenary requires a Gold membership!
|
||||
if (GetClientVersion() < EQClientRoF)
|
||||
if (GetClientVersion() < ClientVersion::RoF)
|
||||
//You do not meet the requirements for that mercenary!
|
||||
SendMercMerchantResponsePacket(17);
|
||||
else
|
||||
SendMercMerchantResponsePacket(21);
|
||||
break;
|
||||
case 23: //Your purchase has failed because this mercenary requires at least a Silver membership!
|
||||
if (GetClientVersion() < EQClientRoF)
|
||||
if (GetClientVersion() < ClientVersion::RoF)
|
||||
//You do not meet the requirements for that mercenary!
|
||||
SendMercMerchantResponsePacket(17);
|
||||
else
|
||||
@@ -5211,7 +5211,7 @@ bool Client::CheckCanSpawnMerc(uint32 template_id) {
|
||||
}
|
||||
|
||||
// Check client version
|
||||
if(GetClientVersion() < mercTemplate->ClientVersion)
|
||||
if(static_cast<unsigned int>(GetClientVersion()) < mercTemplate->ClientVersion)
|
||||
{
|
||||
SendMercResponsePackets(3);
|
||||
return false;
|
||||
@@ -5904,7 +5904,7 @@ void Client::UpdateMercLevel() {
|
||||
|
||||
void Client::SendMercMerchantResponsePacket(int32 response_type) {
|
||||
// This response packet brings up the Mercenary Manager window
|
||||
if(GetClientVersion() >= EQClientSoD)
|
||||
if(GetClientVersion() >= ClientVersion::SoD)
|
||||
{
|
||||
EQApplicationPacket *outapp = new EQApplicationPacket(OP_MercenaryHire, sizeof(MercenaryMerchantResponse_Struct));
|
||||
MercenaryMerchantResponse_Struct* mmr = (MercenaryMerchantResponse_Struct*)outapp->pBuffer;
|
||||
|
||||
+1
-1
@@ -118,7 +118,7 @@ Object::Object(Client* client, const ItemInst* inst)
|
||||
m_data.heading = client->GetHeading();
|
||||
m_data.x = client->GetX();
|
||||
m_data.y = client->GetY();
|
||||
if (client->GetClientVersion() >= EQClientRoF2)
|
||||
if (client->GetClientVersion() >= ClientVersion::RoF2)
|
||||
{
|
||||
// RoF2 places items at player's Z, which is 0.625 of their height.
|
||||
m_data.z = client->GetZ() - (client->GetSize() * 0.625f);
|
||||
|
||||
@@ -3899,7 +3899,7 @@ XS(XS_Client_GetClientVersion)
|
||||
if(THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetClientVersion();
|
||||
RETVAL = static_cast<unsigned int>(THIS->GetClientVersion());
|
||||
XSprePUSH; PUSHu((UV)RETVAL);
|
||||
}
|
||||
XSRETURN(1);
|
||||
|
||||
+2
-2
@@ -1529,7 +1529,7 @@ void Raid::SendHPPacketsTo(Client *c)
|
||||
{
|
||||
members[x].member->CreateHPPacket(&hpapp);
|
||||
c->QueuePacket(&hpapp, false);
|
||||
if(c->GetClientVersion() >= EQClientSoD)
|
||||
if(c->GetClientVersion() >= ClientVersion::SoD)
|
||||
{
|
||||
outapp.SetOpcode(OP_MobManaUpdate);
|
||||
MobManaUpdate_Struct *mmus = (MobManaUpdate_Struct *)outapp.pBuffer;
|
||||
@@ -1565,7 +1565,7 @@ void Raid::SendHPPacketsFrom(Mob *m)
|
||||
if(!m->IsClient() || ((members[x].member != m->CastToClient()) && (members[x].GroupNumber == gid)))
|
||||
{
|
||||
members[x].member->QueuePacket(&hpapp, false);
|
||||
if(members[x].member->GetClientVersion() >= EQClientSoD)
|
||||
if(members[x].member->GetClientVersion() >= ClientVersion::SoD)
|
||||
{
|
||||
outapp.SetOpcode(OP_MobManaUpdate);
|
||||
MobManaUpdate_Struct *mmus = (MobManaUpdate_Struct *)outapp.pBuffer;
|
||||
|
||||
@@ -3408,7 +3408,7 @@ void Mob::BuffProcess()
|
||||
{
|
||||
CastToClient()->SendBuffDurationPacket(buffs[buffs_i]);
|
||||
// Hack to get UF to play nicer, RoF seems fine without it
|
||||
if (CastToClient()->GetClientVersion() == EQClientUnderfoot && buffs[buffs_i].numhits > 0)
|
||||
if (CastToClient()->GetClientVersion() == ClientVersion::Und && buffs[buffs_i].numhits > 0)
|
||||
CastToClient()->SendBuffNumHitPacket(buffs[buffs_i], buffs_i);
|
||||
buffs[buffs_i].UpdateClient = false;
|
||||
}
|
||||
|
||||
+5
-5
@@ -255,7 +255,7 @@ bool Mob::CastSpell(uint16 spell_id, uint16 target_id, uint16 slot,
|
||||
bitmask = bitmask << (CastToClient()->GetClass() - 1);
|
||||
if( itm && itm->GetItem()->Classes != 65535 ) {
|
||||
if ((itm->GetItem()->Click.Type == ET_EquipClick) && !(itm->GetItem()->Classes & bitmask)) {
|
||||
if (CastToClient()->GetClientVersion() < EQClientSoF) {
|
||||
if (CastToClient()->GetClientVersion() < ClientVersion::SoF) {
|
||||
// They are casting a spell from an item that requires equipping but shouldn't let them equip it
|
||||
LogFile->write(EQEmuLog::Error, "HACKER: %s (account: %s) attempted to click an equip-only effect on item %s (id: %d) which they shouldn't be able to equip!",
|
||||
CastToClient()->GetCleanName(), CastToClient()->AccountName(), itm->GetItem()->Name, itm->GetItem()->ID);
|
||||
@@ -267,14 +267,14 @@ bool Mob::CastSpell(uint16 spell_id, uint16 target_id, uint16 slot,
|
||||
return(false);
|
||||
}
|
||||
if ((itm->GetItem()->Click.Type == ET_ClickEffect2) && !(itm->GetItem()->Classes & bitmask)) {
|
||||
if (CastToClient()->GetClientVersion() < EQClientSoF) {
|
||||
if (CastToClient()->GetClientVersion() < ClientVersion::SoF) {
|
||||
// They are casting a spell from an item that they don't meet the race/class requirements to cast
|
||||
LogFile->write(EQEmuLog::Error, "HACKER: %s (account: %s) attempted to click a race/class restricted effect on item %s (id: %d) which they shouldn't be able to click!",
|
||||
CastToClient()->GetCleanName(), CastToClient()->AccountName(), itm->GetItem()->Name, itm->GetItem()->ID);
|
||||
database.SetHackerFlag(CastToClient()->AccountName(), CastToClient()->GetCleanName(), "Clicking race/class restricted item with an invalid class");
|
||||
}
|
||||
else {
|
||||
if (CastToClient()->GetClientVersion() >= EQClientRoF)
|
||||
if (CastToClient()->GetClientVersion() >= ClientVersion::RoF)
|
||||
{
|
||||
// Line 181 in eqstr_us.txt was changed in RoF+
|
||||
Message(15, "Your race, class, or deity cannot use this item.");
|
||||
@@ -288,7 +288,7 @@ bool Mob::CastSpell(uint16 spell_id, uint16 target_id, uint16 slot,
|
||||
}
|
||||
}
|
||||
if( itm && (itm->GetItem()->Click.Type == ET_EquipClick) && !(item_slot <= MainAmmo || item_slot == MainPowerSource) ){
|
||||
if (CastToClient()->GetClientVersion() < EQClientSoF) {
|
||||
if (CastToClient()->GetClientVersion() < ClientVersion::SoF) {
|
||||
// They are attempting to cast a must equip clicky without having it equipped
|
||||
LogFile->write(EQEmuLog::Error, "HACKER: %s (account: %s) attempted to click an equip-only effect on item %s (id: %d) without equiping it!", CastToClient()->GetCleanName(), CastToClient()->AccountName(), itm->GetItem()->Name, itm->GetItem()->ID);
|
||||
database.SetHackerFlag(CastToClient()->AccountName(), CastToClient()->GetCleanName(), "Clicking equip-only item without equiping it");
|
||||
@@ -5251,7 +5251,7 @@ void Client::SendBuffDurationPacket(Buffs_Struct &buff)
|
||||
void Client::SendBuffNumHitPacket(Buffs_Struct &buff, int slot)
|
||||
{
|
||||
// UF+ use this packet
|
||||
if (GetClientVersion() < EQClientUnderfoot)
|
||||
if (GetClientVersion() < ClientVersion::Und)
|
||||
return;
|
||||
EQApplicationPacket *outapp;
|
||||
outapp = new EQApplicationPacket(OP_BuffCreate, sizeof(BuffIcon_Struct) + sizeof(BuffIconEntry_Struct));
|
||||
|
||||
+2
-2
@@ -975,7 +975,7 @@ void TaskManager::TaskSetSelector(Client *c, ClientTaskState *state, Mob *mob, i
|
||||
|
||||
void TaskManager::SendTaskSelector(Client *c, Mob *mob, int TaskCount, int *TaskList) {
|
||||
|
||||
if (c->GetClientVersion() >= EQClientRoF)
|
||||
if (c->GetClientVersion() >= ClientVersion::RoF)
|
||||
{
|
||||
SendTaskSelectorNew(c, mob, TaskCount, TaskList);
|
||||
return;
|
||||
@@ -2516,7 +2516,7 @@ void TaskManager::SendTaskActivityShort(Client *c, int TaskID, int ActivityID, i
|
||||
|
||||
void TaskManager::SendTaskActivityLong(Client *c, int TaskID, int ActivityID, int ClientTaskIndex, bool Optional, bool TaskComplete) {
|
||||
|
||||
if (c->GetClientVersion() >= EQClientRoF)
|
||||
if (c->GetClientVersion() >= ClientVersion::RoF)
|
||||
{
|
||||
SendTaskActivityNew(c, TaskID, ActivityID, ClientTaskIndex, Optional, TaskComplete);
|
||||
return;
|
||||
|
||||
+2
-2
@@ -2665,7 +2665,7 @@ void Client::SellToBuyer(const EQApplicationPacket *app) {
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buf, Quantity);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buf, Quantity * Price);
|
||||
|
||||
if(GetClientVersion() >= EQClientSoD)
|
||||
if(GetClientVersion() >= ClientVersion::SoD)
|
||||
{
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buf, 0); // Think this is the upper 32 bits of a 64 bit price
|
||||
}
|
||||
@@ -2690,7 +2690,7 @@ void Client::SellToBuyer(const EQApplicationPacket *app) {
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buf, Quantity);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buf, Quantity * Price);
|
||||
|
||||
if(Buyer->GetClientVersion() >= EQClientSoD)
|
||||
if(Buyer->GetClientVersion() >= ClientVersion::SoD)
|
||||
{
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buf, 0); // Think this is the upper 32 bits of a 64 bit price
|
||||
}
|
||||
|
||||
@@ -874,7 +874,7 @@ void WorldServer::Process() {
|
||||
database.SetGroupLeaderName(group->GetID(), Inviter->GetName());
|
||||
group->UpdateGroupAAs();
|
||||
|
||||
if(Inviter->CastToClient()->GetClientVersion() < EQClientSoD)
|
||||
if(Inviter->CastToClient()->GetClientVersion() < ClientVersion::SoD)
|
||||
{
|
||||
EQApplicationPacket* outapp=new EQApplicationPacket(OP_GroupUpdate,sizeof(GroupJoin_Struct));
|
||||
GroupJoin_Struct* outgj=(GroupJoin_Struct*)outapp->pBuffer;
|
||||
|
||||
+1
-1
@@ -2631,7 +2631,7 @@ void ZoneDatabase::RefreshGroupFromDB(Client *client){
|
||||
client->QueuePacket(outapp);
|
||||
safe_delete(outapp);
|
||||
|
||||
if(client->GetClientVersion() >= EQClientSoD) {
|
||||
if(client->GetClientVersion() >= ClientVersion::SoD) {
|
||||
group->NotifyMainTank(client, 1);
|
||||
group->NotifyPuller(client, 1);
|
||||
}
|
||||
|
||||
+1
-1
@@ -555,7 +555,7 @@ void Client::ZonePC(uint32 zoneID, uint32 instance_id, float x, float y, float z
|
||||
if (entity == 0)
|
||||
{
|
||||
Message(13, "Error: OP_EndLootRequest: Corpse not found (ent = 0)");
|
||||
if (GetClientVersion() >= EQClientSoD)
|
||||
if (GetClientVersion() >= ClientVersion::SoD)
|
||||
Corpse::SendEndLootErrorPacket(this);
|
||||
else
|
||||
Corpse::SendLootReqErrorPacket(this);
|
||||
|
||||
Reference in New Issue
Block a user