From 293361a1f72ee652b9a7faaee89ca92bb7b943c5 Mon Sep 17 00:00:00 2001 From: Kinglykrab <89047260+Kinglykrab@users.noreply.github.com> Date: Sun, 14 Nov 2021 22:01:13 -0500 Subject: [PATCH] [Cleanup] Make use of AccountStatus constants wherever status is checked or used. (#1764) * [Cleanup] Make use of AccountStatus constants wherever status is checked or used. - Cleanup all instances of SendEmoteMessage. - Cleanup all instances of SendEmoteMessageRaw. - Cleanup all instances of MessageStatus. - Convert Quest API method defaults to use constants. * Cleanup constant names. --- common/emu_constants.h | 58 +- common/guild_base.cpp | 2 +- common/net/console_server_connection.cpp | 4 +- common/net/websocket_server.cpp | 5 +- world/cliententry.cpp | 4 +- world/cliententry.h | 2 +- world/clientlist.cpp | 182 +++--- world/clientlist.h | 2 +- world/console.cpp | 45 +- world/console.old.cpp | 18 +- world/eqw.cpp | 9 +- world/login_server.cpp | 8 +- world/main.cpp | 16 +- world/world_event_scheduler.cpp | 8 +- world/zonelist.cpp | 118 +++- world/zoneserver.cpp | 179 ++++-- zone/bot_command.cpp | 99 +-- zone/client.cpp | 29 +- zone/client_packet.cpp | 50 +- zone/client_process.cpp | 4 +- zone/command.cpp | 730 +++++++++++------------ zone/corpse.cpp | 10 +- zone/embparser_api.cpp | 84 +-- zone/entity.cpp | 8 +- zone/entity.h | 2 +- zone/exp.cpp | 2 +- zone/guild_mgr.cpp | 12 +- zone/lua_entity_list.cpp | 7 +- zone/mob.cpp | 2 +- zone/pathing.cpp | 6 +- zone/perl_entity.cpp | 7 +- zone/questmgr.cpp | 122 +++- zone/questmgr.h | 18 +- zone/spells.cpp | 2 +- zone/trading.cpp | 48 +- zone/worldserver.cpp | 310 +++++++--- zone/zone.h | 21 +- zone/zoning.cpp | 6 +- 38 files changed, 1369 insertions(+), 870 deletions(-) diff --git a/common/emu_constants.h b/common/emu_constants.h index 806ce0a86..e071ca449 100644 --- a/common/emu_constants.h +++ b/common/emu_constants.h @@ -230,31 +230,6 @@ namespace EQ const int STANCE_TYPE_LAST = stanceBurnAE; const int STANCE_TYPE_COUNT = stanceBurnAE; - enum ServerLockType : int { - List, - Lock, - Unlock - }; - - enum AccountStatus : uint8 { - Player = 0, - Steward = 10, - ApprenticeGuide = 20, - Guide = 50, - QuestTroupe = 80, - SeniorGuide = 81, - GMTester = 85, - EQSupport = 90, - GMStaff = 95, - GMAdmin = 100, - GMLeadAdmin = 150, - QuestMaster = 160, - GMAreas = 170, - GMCoder = 180, - GMMgmt = 200, - GMImpossible = 250, - Max = 255 - }; } /*constants*/ namespace profile { @@ -353,13 +328,32 @@ namespace EQ Guild }; }; // namespace consent - } /*EQEmu*/ +enum ServerLockType : int { + List, + Lock, + Unlock +}; + +enum AccountStatus : uint8 { + Player = 0, + Steward = 10, + ApprenticeGuide = 20, + Guide = 50, + QuestTroupe = 80, + SeniorGuide = 81, + GMTester = 85, + EQSupport = 90, + GMStaff = 95, + GMAdmin = 100, + GMLeadAdmin = 150, + QuestMaster = 160, + GMAreas = 170, + GMCoder = 180, + GMMgmt = 200, + GMImpossible = 250, + Max = 255 +}; + #endif /*COMMON_EMU_CONSTANTS_H*/ - -/* hack list to prevent circular references - - eq_limits.h:EQ::inventory::LookupEntry::InventoryTypeSize[n]; - -*/ diff --git a/common/guild_base.cpp b/common/guild_base.cpp index b7ac8515c..198dd1c5a 100644 --- a/common/guild_base.cpp +++ b/common/guild_base.cpp @@ -1208,7 +1208,7 @@ BaseGuildManager::RankInfo::RankInfo() { BaseGuildManager::GuildInfo::GuildInfo() { leader_char_id = 0; - minstatus = 0; + minstatus = AccountStatus::Player; } uint32 BaseGuildManager::DoesAccountContainAGuildLeader(uint32 AccountID) diff --git a/common/net/console_server_connection.cpp b/common/net/console_server_connection.cpp index aab26d188..9e245a8f8 100644 --- a/common/net/console_server_connection.cpp +++ b/common/net/console_server_connection.cpp @@ -15,7 +15,7 @@ EQ::Net::ConsoleServerConnection::ConsoleServerConnection(ConsoleServer *parent, memset(m_line, 0, MaxConsoleLineLength); m_accept_messages = false; m_user_id = 0; - m_admin = 0; + m_admin = AccountStatus::Player; m_connection->OnRead(std::bind(&ConsoleServerConnection::OnRead, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)); m_connection->OnDisconnect(std::bind(&ConsoleServerConnection::OnDisconnect, this, std::placeholders::_1)); @@ -29,7 +29,7 @@ EQ::Net::ConsoleServerConnection::ConsoleServerConnection(ConsoleServer *parent, if (addr.find("127.0.0.1") != std::string::npos || addr.find("::0") != std::string::npos) { SendLine("Connection established from localhost, assuming admin"); m_status = ConsoleStatusLoggedIn; - m_admin = 255; + m_admin = AccountStatus::Max; SendPrompt(); } else { diff --git a/common/net/websocket_server.cpp b/common/net/websocket_server.cpp index dda1a4a96..f74f437ba 100644 --- a/common/net/websocket_server.cpp +++ b/common/net/websocket_server.cpp @@ -5,6 +5,7 @@ #include #include #include +#include "../emu_constants.h" struct MethodHandlerEntry { @@ -174,13 +175,13 @@ Json::Value EQ::Net::WebsocketServer::Login(WebsocketServerConnection *connectio auto r = _impl->login_handler(connection, user, pass); if (r.logged_in) { - connection->SetAuthorized(true, r.account_name, r.account_id, 255); + connection->SetAuthorized(true, r.account_name, r.account_id, AccountStatus::Max); ret["status"] = "Ok"; } else if (user == "admin" && (connection->RemoteIP() == "127.0.0.1" || connection->RemoteIP() == "::")) { r.logged_in = true; r.account_id = 0; - connection->SetAuthorized(true, r.account_name, r.account_id, 255); + connection->SetAuthorized(true, r.account_name, r.account_id, AccountStatus::Max); ret["status"] = "Ok"; } else { diff --git a/world/cliententry.cpp b/world/cliententry.cpp index 9e10f495d..68252c802 100644 --- a/world/cliententry.cpp +++ b/world/cliententry.cpp @@ -274,7 +274,7 @@ void ClientListEntry::ClearVars(bool iAll) paccountid = 0; memset(paccountname, 0, sizeof(paccountname)); - padmin = 0; + padmin = AccountStatus::Player; } pzoneserver = 0; pzone = 0; @@ -365,7 +365,7 @@ bool ClientListEntry::CheckAuth(uint32 loginserver_account_id, const char *key_p } std::string lsworldadmin; if (database.GetVariable("honorlsworldadmin", lsworldadmin)) { - if (atoi(lsworldadmin.c_str()) == 1 && pworldadmin != 0 && (padmin < pworldadmin || padmin == 0)) { + if (atoi(lsworldadmin.c_str()) == 1 && pworldadmin != 0 && (padmin < pworldadmin || padmin == AccountStatus::Player)) { padmin = pworldadmin; } } diff --git a/world/cliententry.h b/world/cliententry.h index 769700403..f3ce31dea 100644 --- a/world/cliententry.h +++ b/world/cliententry.h @@ -60,7 +60,7 @@ public: * @param scl * @param iOnline */ - ClientListEntry(uint32 id, uint32 iAccID, const char* iAccName, MD5& iMD5Pass, int16 iAdmin = 0); + ClientListEntry(uint32 id, uint32 iAccID, const char* iAccName, MD5& iMD5Pass, int16 iAdmin = AccountStatus::Player); ClientListEntry(uint32 id, ZoneServer* iZS, ServerClientList_Struct* scl, CLE_Status iOnline); ~ClientListEntry(); bool CheckStale(); diff --git a/world/clientlist.cpp b/world/clientlist.cpp index 7ce779130..1513cb2df 100644 --- a/world/clientlist.cpp +++ b/world/clientlist.cpp @@ -296,7 +296,13 @@ void ClientList::SendCLEList(const int16& admin, const char* to, WorldTCPConnect fmt:format_to(out, "{} CharID: {} CharName: {} Zone: {} ({})", newline, cle->CharID(), cle->name(), ZoneName(cle->zone()), cle->zone()); if (out.size() >= 3072) { auto output = fmt::to_string(out); - connection->SendEmoteMessageRaw(to, 0, 0, 10, output.c_str()); + connection->SendEmoteMessageRaw( + to, + 0, + AccountStatus::Player, + Chat::NPCQuestSay, + output.c_str() + ); addnewline = false; out.clear(); } else { @@ -309,7 +315,13 @@ void ClientList::SendCLEList(const int16& admin, const char* to, WorldTCPConnect } fmt::format_to(out, "{}{} CLEs in memory. {} CLEs listed. numplayers = {}.", newline, x, y, numplayers); auto output = fmt::to_string(out); - connection->SendEmoteMessageRaw(to, 0, 0, 10, output.c_str()); + connection->SendEmoteMessageRaw( + to, + 0, + AccountStatus::Player, + Chat::NPCQuestSay, + output.c_str() + ); } @@ -558,7 +570,7 @@ void ClientList::SendWhoAll(uint32 fromid,const char* to, int16 admin, Who_All_S (countcle->Online() >= CLE_Status::Zoning) && (!countcle->GetGM() || countcle->Anon() != 1 || admin >= countcle->Admin()) && (whom == 0 || ( - ((countcle->Admin() >= 80 && countcle->GetGM()) || whom->gmlookup == 0xFFFF) && + ((countcle->Admin() >= AccountStatus::QuestTroupe && countcle->GetGM()) || whom->gmlookup == 0xFFFF) && (whom->lvllow == 0xFFFF || (countcle->level() >= whom->lvllow && countcle->level() <= whom->lvlhigh && (countcle->Anon()==0 || admin > countcle->Admin()))) && (whom->wclass == 0xFFFF || (countcle->class_() == whom->wclass && (countcle->Anon()==0 || admin > countcle->Admin()))) && (whom->wrace == 0xFFFF || (countcle->race() == whom->wrace && (countcle->Anon()==0 || admin > countcle->Admin()))) && @@ -566,18 +578,18 @@ void ClientList::SendWhoAll(uint32 fromid,const char* to, int16 admin, Who_All_S (tmpZone != 0 && strncasecmp(tmpZone, whom->whom, whomlen) == 0) || strncasecmp(countcle->name(),whom->whom, whomlen) == 0 || (strncasecmp(guild_mgr.GetGuildName(countcle->GuildID()), whom->whom, whomlen) == 0) || - (admin >= 100 && strncasecmp(countcle->AccountName(), whom->whom, whomlen) == 0) + (admin >= AccountStatus::GMAdmin && strncasecmp(countcle->AccountName(), whom->whom, whomlen) == 0) )) )) ) { - if((countcle->Anon()>0 && admin>=countcle->Admin() && admin>0) || countcle->Anon()==0 ){ + if((countcle->Anon()>0 && admin >= countcle->Admin() && admin > AccountStatus::Player) || countcle->Anon()==0 ){ totalusers++; - if(totalusers<=20 || admin>=100) + if(totalusers<=20 || admin >= AccountStatus::GMAdmin) totallength=totallength+strlen(countcle->name())+strlen(countcle->AccountName())+strlen(guild_mgr.GetGuildName(countcle->GuildID()))+5; } else if((countcle->Anon()>0 && admin<=countcle->Admin()) || (countcle->Anon()==0 && !countcle->GetGM())) { totalusers++; - if(totalusers<=20 || admin>=100) + if(totalusers<=20 || admin >= AccountStatus::GMAdmin) totallength=totallength+strlen(countcle->name())+strlen(guild_mgr.GetGuildName(countcle->GuildID()))+5; } } @@ -589,7 +601,7 @@ void ClientList::SendWhoAll(uint32 fromid,const char* to, int16 admin, Who_All_S uint8 unknown35=0x0A; uint32 unknown36=0; uint32 playersinzonestring=5028; - if(totalusers>20 && admin<100){ + if(totalusers>20 && adminOnline() >= CLE_Status::Zoning) && (!cle->GetGM() || cle->Anon() != 1 || admin >= cle->Admin()) && (whom == 0 || ( - ((cle->Admin() >= 80 && cle->GetGM()) || whom->gmlookup == 0xFFFF) && + ((cle->Admin() >= AccountStatus::QuestTroupe && cle->GetGM()) || whom->gmlookup == 0xFFFF) && (whom->lvllow == 0xFFFF || (cle->level() >= whom->lvllow && cle->level() <= whom->lvlhigh && (cle->Anon()==0 || admin>cle->Admin()))) && (whom->wclass == 0xFFFF || (cle->class_() == whom->wclass && (cle->Anon()==0 || admin>cle->Admin()))) && (whom->wrace == 0xFFFF || (cle->race() == whom->wrace && (cle->Anon()==0 || admin>cle->Admin()))) && @@ -646,60 +658,60 @@ void ClientList::SendWhoAll(uint32 fromid,const char* to, int16 admin, Who_All_S (tmpZone != 0 && strncasecmp(tmpZone, whom->whom, whomlen) == 0) || strncasecmp(cle->name(),whom->whom, whomlen) == 0 || (strncasecmp(guild_mgr.GetGuildName(cle->GuildID()), whom->whom, whomlen) == 0) || - (admin >= 100 && strncasecmp(cle->AccountName(), whom->whom, whomlen) == 0) + (admin >= AccountStatus::GMAdmin && strncasecmp(cle->AccountName(), whom->whom, whomlen) == 0) )) )) ) { line[0] = 0; - uint32 rankstring=0xFFFFFFFF; - if((cle->Anon()==1 && cle->GetGM() && cle->Admin()>admin) || (idx>=20 && admin<100)){ //hide gms that are anon from lesser gms and normal players, cut off at 20 - rankstring=0; + uint32 rankstring = 0xFFFFFFFF; + if((cle->Anon()==1 && cle->GetGM() && cle->Admin()>admin) || (idx>=20 && admin < AccountStatus::GMAdmin)){ //hide gms that are anon from lesser gms and normal players, cut off at 20 + rankstring = 0; iterator.Advance(); continue; } else if (cle->GetGM()) { - if (cle->Admin() >=250) - rankstring=5021; - else if (cle->Admin() >= 200) - rankstring=5020; - else if (cle->Admin() >= 180) - rankstring=5019; - else if (cle->Admin() >= 170) - rankstring=5018; - else if (cle->Admin() >= 160) - rankstring=5017; - else if (cle->Admin() >= 150) - rankstring=5016; - else if (cle->Admin() >= 100) - rankstring=5015; - else if (cle->Admin() >= 95) - rankstring=5014; - else if (cle->Admin() >= 90) - rankstring=5013; - else if (cle->Admin() >= 85) - rankstring=5012; - else if (cle->Admin() >= 81) - rankstring=5011; - else if (cle->Admin() >= 80) - rankstring=5010; - else if (cle->Admin() >= 50) - rankstring=5009; - else if (cle->Admin() >= 20) - rankstring=5008; - else if (cle->Admin() >= 10) - rankstring=5007; + if (cle->Admin() >= AccountStatus::GMImpossible) + rankstring = 5021; + else if (cle->Admin() >= AccountStatus::GMMgmt) + rankstring = 5020; + else if (cle->Admin() >= AccountStatus::GMCoder) + rankstring = 5019; + else if (cle->Admin() >= AccountStatus::GMAreas) + rankstring = 5018; + else if (cle->Admin() >= AccountStatus::QuestMaster) + rankstring = 5017; + else if (cle->Admin() >= AccountStatus::GMLeadAdmin) + rankstring = 5016; + else if (cle->Admin() >= AccountStatus::GMAdmin) + rankstring = 5015; + else if (cle->Admin() >= AccountStatus::GMStaff) + rankstring = 5014; + else if (cle->Admin() >= AccountStatus::EQSupport) + rankstring = 5013; + else if (cle->Admin() >= AccountStatus::GMTester) + rankstring = 5012; + else if (cle->Admin() >= AccountStatus::SeniorGuide) + rankstring = 5011; + else if (cle->Admin() >= AccountStatus::QuestTroupe) + rankstring = 5010; + else if (cle->Admin() >= AccountStatus::Guide) + rankstring = 5009; + else if (cle->Admin() >= AccountStatus::ApprenticeGuide) + rankstring = 5008; + else if (cle->Admin() >= AccountStatus::Steward) + rankstring = 5007; } idx++; char guildbuffer[67]={0}; if (cle->GuildID() != GUILD_NONE && cle->GuildID()>0) sprintf(guildbuffer,"<%s>", guild_mgr.GetGuildName(cle->GuildID())); uint32 formatstring=5025; - if(cle->Anon()==1 && (adminAdmin() || admin==0)) + if(cle->Anon()==1 && (adminAdmin() || admin == AccountStatus::Player)) formatstring=5024; - else if(cle->Anon()==1 && admin>=cle->Admin() && admin>0) + else if(cle->Anon()==1 && admin>=cle->Admin() && admin > AccountStatus::Player) formatstring=5022; - else if(cle->Anon()==2 && (adminAdmin() || admin==0)) + else if(cle->Anon()==2 && (adminAdmin() || admin == AccountStatus::Player)) formatstring=5023;//display guild - else if(cle->Anon()==2 && admin>=cle->Admin() && admin>0) + else if(cle->Anon()==2 && admin>=cle->Admin() && admin > AccountStatus::Player) formatstring=5022;//display everything //war* wars2 = (war*)pack2->pBuffer; @@ -711,10 +723,10 @@ void ClientList::SendWhoAll(uint32 fromid,const char* to, int16 admin, Who_All_S uint32 zonestring=0xFFFFFFFF; uint32 plzone=0; uint32 unknown80[2]; - if(cle->Anon()==0 || (admin>=cle->Admin() && admin>0)){ + if(cle->Anon()==0 || (admin>=cle->Admin() && admin> AccountStatus::Player)){ plclass_=cle->class_(); pllevel=cle->level(); - if(admin>=100) + if(admin>=AccountStatus::GMAdmin) pidstring=5003; plrace=cle->race(); zonestring=5006; @@ -722,7 +734,7 @@ void ClientList::SendWhoAll(uint32 fromid,const char* to, int16 admin, Who_All_S } - if(admin>=cle->Admin() && admin>0) + if(admin>=cle->Admin() && admin > AccountStatus::Player) unknown80[0]=cle->Admin(); else unknown80[0]=0xFFFFFFFF; @@ -735,7 +747,7 @@ void ClientList::SendWhoAll(uint32 fromid,const char* to, int16 admin, Who_All_S strcpy(plname,cle->name()); char placcount[30]={0}; - if(admin>=cle->Admin() && admin>0) + if(admin>=cle->Admin() && admin > AccountStatus::Player) strcpy(placcount,cle->AccountName()); memcpy(bufptr,&formatstring, sizeof(uint32)); @@ -1020,7 +1032,7 @@ void ClientList::ConsoleSendWhoAll(const char* to, int16 admin, Who_All_Struct* if ( (cle->Online() >= CLE_Status::Zoning) && (whom == 0 || ( - ((cle->Admin() >= 80 && cle->GetGM()) || whom->gmlookup == 0xFFFF) && + ((cle->Admin() >= AccountStatus::QuestTroupe && cle->GetGM()) || whom->gmlookup == 0xFFFF) && (whom->lvllow == 0xFFFF || (cle->level() >= whom->lvllow && cle->level() <= whom->lvlhigh)) && (whom->wclass == 0xFFFF || cle->class_() == whom->wclass) && (whom->wrace == 0xFFFF || cle->race() == whom->wrace) && @@ -1028,41 +1040,41 @@ void ClientList::ConsoleSendWhoAll(const char* to, int16 admin, Who_All_Struct* (tmpZone != 0 && strncasecmp(tmpZone, whom->whom, whomlen) == 0) || strncasecmp(cle->name(), whom->whom, whomlen) == 0 || (strncasecmp(guild_mgr.GetGuildName(cle->GuildID()), whom->whom, whomlen) == 0) || - (admin >= 100 && strncasecmp(cle->AccountName(), whom->whom, whomlen) == 0) + (admin >= AccountStatus::GMAdmin && strncasecmp(cle->AccountName(), whom->whom, whomlen) == 0) )) )) ) { line[0] = 0; // MYRA - use new (5.x) Status labels in who for telnet connection - if (cle->Admin() >= 250) + if (cle->Admin() >= AccountStatus::GMImpossible) strcpy(tmpgm, "* GM-Impossible * "); - else if (cle->Admin() >= 200) + else if (cle->Admin() >= AccountStatus::GMMgmt) strcpy(tmpgm, "* GM-Mgmt * "); - else if (cle->Admin() >= 180) + else if (cle->Admin() >= AccountStatus::GMCoder) strcpy(tmpgm, "* GM-Coder * "); - else if (cle->Admin() >= 170) + else if (cle->Admin() >= AccountStatus::GMAreas) strcpy(tmpgm, "* GM-Areas * "); - else if (cle->Admin() >= 160) + else if (cle->Admin() >= AccountStatus::QuestMaster) strcpy(tmpgm, "* QuestMaster * "); - else if (cle->Admin() >= 150) + else if (cle->Admin() >= AccountStatus::GMLeadAdmin) strcpy(tmpgm, "* GM-Lead Admin * "); - else if (cle->Admin() >= 100) + else if (cle->Admin() >= AccountStatus::GMAdmin) strcpy(tmpgm, "* GM-Admin * "); - else if (cle->Admin() >= 95) + else if (cle->Admin() >= AccountStatus::GMStaff) strcpy(tmpgm, "* GM-Staff * "); - else if (cle->Admin() >= 90) + else if (cle->Admin() >= AccountStatus::EQSupport) strcpy(tmpgm, "* EQ Support * "); - else if (cle->Admin() >= 85) + else if (cle->Admin() >= AccountStatus::GMTester) strcpy(tmpgm, "* GM-Tester * "); - else if (cle->Admin() >= 81) + else if (cle->Admin() >= AccountStatus::SeniorGuide) strcpy(tmpgm, "* Senior Guide * "); - else if (cle->Admin() >= 80) + else if (cle->Admin() >= AccountStatus::QuestTroupe) strcpy(tmpgm, "* QuestTroupe * "); - else if (cle->Admin() >= 50) + else if (cle->Admin() >= AccountStatus::Guide) strcpy(tmpgm, "* Guide * "); - else if (cle->Admin() >= 20) + else if (cle->Admin() >= AccountStatus::ApprenticeGuide) strcpy(tmpgm, "* Apprentice Guide * "); - else if (cle->Admin() >= 10) + else if (cle->Admin() >= AccountStatus::Steward) strcpy(tmpgm, "* Steward * "); else tmpgm[0] = 0; @@ -1079,16 +1091,16 @@ void ClientList::ConsoleSendWhoAll(const char* to, int16 admin, Who_All_Struct* else LFG[0] = 0; - if (admin >= 150 && admin >= cle->Admin()) { + if (admin >= AccountStatus::GMLeadAdmin && admin >= cle->Admin()) { sprintf(accinfo, " AccID: %i AccName: %s LSID: %i Status: %i", cle->AccountID(), cle->AccountName(), cle->LSAccountID(), cle->Admin()); } else accinfo[0] = 0; if (cle->Anon() == 2) { // Roleplay - if (admin >= 100 && admin >= cle->Admin()) + if (admin >= AccountStatus::GMAdmin && admin >= cle->Admin()) sprintf(line, " %s[RolePlay %i %s] %s (%s)%s zone: %s%s%s", tmpgm, cle->level(), GetClassIDName(cle->class_(), cle->level()), cle->name(), GetRaceIDName(cle->race()), tmpguild, tmpZone, LFG, accinfo); - else if (cle->Admin() >= 80 && admin < 80 && cle->GetGM()) { + else if (cle->Admin() >= AccountStatus::QuestTroupe && admin < AccountStatus::QuestTroupe && cle->GetGM()) { iterator.Advance(); continue; } @@ -1096,9 +1108,9 @@ void ClientList::ConsoleSendWhoAll(const char* to, int16 admin, Who_All_Struct* sprintf(line, " %s[ANONYMOUS] %s%s%s%s", tmpgm, cle->name(), tmpguild, LFG, accinfo); } else if (cle->Anon() == 1) { // Anon - if (admin >= 100 && admin >= cle->Admin()) + if (admin >= AccountStatus::GMAdmin && admin >= cle->Admin()) sprintf(line, " %s[ANON %i %s] %s (%s)%s zone: %s%s%s", tmpgm, cle->level(), GetClassIDName(cle->class_(), cle->level()), cle->name(), GetRaceIDName(cle->race()), tmpguild, tmpZone, LFG, accinfo); - else if (cle->Admin() >= 80 && cle->GetGM()) { + else if (cle->Admin() >= AccountStatus::QuestTroupe && cle->GetGM()) { iterator.Advance(); continue; } @@ -1111,7 +1123,13 @@ void ClientList::ConsoleSendWhoAll(const char* to, int16 admin, Who_All_Struct* fmt::format_to(out, line); if (out.size() >= 3584) { auto output = fmt::to_string(out); - connection->SendEmoteMessageRaw(to, 0, 0, 10, output.c_str()); + connection->SendEmoteMessageRaw( + to, + 0, + AccountStatus::Player, + Chat::NPCQuestSay, + output.c_str() + ); out.clear(); } else { @@ -1121,17 +1139,17 @@ void ClientList::ConsoleSendWhoAll(const char* to, int16 admin, Who_All_Struct* fmt::format_to(out, "\n"); } x++; - if (x >= 20 && admin < 80) + if (x >= 20 && admin < AccountStatus::QuestTroupe) break; } iterator.Advance(); } - if (x >= 20 && admin < 80) + if (x >= 20 && admin < AccountStatus::QuestTroupe) fmt::format_to(out, "too many results...20 players shown"); else fmt::format_to(out, "{} players online", x); - if (admin >= 150 && (whom == 0 || whom->gmlookup != 0xFFFF)) { + if (admin >= AccountStatus::GMAdmin && (whom == 0 || whom->gmlookup != 0xFFFF)) { if (connection->IsConsole()) fmt::format_to(out, "\r\n"); else @@ -1140,7 +1158,13 @@ void ClientList::ConsoleSendWhoAll(const char* to, int16 admin, Who_All_Struct* //console_list.SendConsoleWho(connection, to, admin, &output, &outsize, &outlen); } auto output = fmt::to_string(out); - connection->SendEmoteMessageRaw(to, 0, 0, 10, output.c_str()); + connection->SendEmoteMessageRaw( + to, + 0, + AccountStatus::Player, + Chat::NPCQuestSay, + output.c_str() + ); } void ClientList::Add(Client* client) { @@ -1386,7 +1410,7 @@ void ClientList::SendClientVersionSummary(const char *Name) zoneserver_list.SendEmoteMessage( Name, 0, - 0, + AccountStatus::Player, Chat::White, fmt::format( "There {} {} Titanium, {} SoF, {} SoD, {} UF, {} RoF, and {} RoF2 Client{} currently connected for a total of {} Client{} and {} Unique IP{} connected.", diff --git a/world/clientlist.h b/world/clientlist.h index ed66a11c2..2f9583784 100644 --- a/world/clientlist.h +++ b/world/clientlist.h @@ -62,7 +62,7 @@ public: void DisconnectByIP(uint32 iIP); void CLCheckStale(); void CLEKeepAlive(uint32 numupdates, uint32* wid); - void CLEAdd(uint32 iLSID, const char* iLoginServerName, const char* iLoginName, const char* iLoginKey, int16 iWorldAdmin = 0, uint32 ip = 0, uint8 local=0); + void CLEAdd(uint32 iLSID, const char* iLoginServerName, const char* iLoginName, const char* iLoginKey, int16 iWorldAdmin = AccountStatus::Player, uint32 ip = 0, uint8 local=0); void UpdateClientGuild(uint32 char_id, uint32 guild_id); void RemoveCLEByLSID(uint32 iLSID); bool IsAccountInGame(uint32 iLSID); diff --git a/world/console.cpp b/world/console.cpp index f2cce0000..2fa162b98 100644 --- a/world/console.cpp +++ b/world/console.cpp @@ -280,20 +280,33 @@ void ConsoleEmote( join_args.erase(join_args.begin(), join_args.begin() + 2); if (strcasecmp(args[0].c_str(), "world") == 0) { - zoneserver_list.SendEmoteMessageRaw(0, 0, 0, atoi(args[1].c_str()), JoinString(join_args, " ").c_str()); + zoneserver_list.SendEmoteMessageRaw( + 0, + 0, + AccountStatus::Player, + atoi(args[1].c_str()), + JoinString(join_args, " ").c_str() + ); } else { ZoneServer *zs = zoneserver_list.FindByName(args[0].c_str()); if (zs != 0) { - zs->SendEmoteMessageRaw(0, 0, 0, atoi(args[1].c_str()), JoinString(join_args, " ").c_str()); + zs->SendEmoteMessageRaw( + 0, + 0, + AccountStatus::Player, + atoi(args[1].c_str()), + JoinString(join_args, " ").c_str() + ); } else { zoneserver_list.SendEmoteMessageRaw( args[0].c_str(), 0, - 0, + AccountStatus::Player, atoi(args[1].c_str()), - JoinString(join_args, " ").c_str()); + JoinString(join_args, " ").c_str() + ); } } } @@ -637,7 +650,16 @@ void ConsoleZoneLock( uint16 tmp = ZoneID(args[1].c_str()); if (tmp) { if (zoneserver_list.SetLockedZone(tmp, true)) { - zoneserver_list.SendEmoteMessage(0, 0, 80, 15, "Zone locked: %s", ZoneName(tmp)); + zoneserver_list.SendEmoteMessage( + 0, + 0, + AccountStatus::QuestTroupe, + Chat::Yellow, + fmt::format( + "Zone locked: {}", + ZoneName(tmp) + ).c_str() + ); } else { connection->SendLine("Failed to change lock"); @@ -655,7 +677,16 @@ void ConsoleZoneLock( uint16 tmp = ZoneID(args[1].c_str()); if (tmp) { if (zoneserver_list.SetLockedZone(tmp, false)) { - zoneserver_list.SendEmoteMessage(0, 0, 80, 15, "Zone unlocked: %s", ZoneName(tmp)); + zoneserver_list.SendEmoteMessage( + 0, + 0, + AccountStatus::QuestTroupe, + Chat::Yellow, + fmt::format( + "Zone unlocked: {}", + ZoneName(tmp) + ).c_str() + ); } else { connection->SendLine("Failed to change lock"); @@ -782,7 +813,7 @@ void ConsoleWorldShutdown( zoneserver_list.SendEmoteMessage( 0, 0, - 0, + AccountStatus::Player, Chat::Yellow, "[SYSTEM] World shutdown has been aborted." ); diff --git a/world/console.old.cpp b/world/console.old.cpp index 5917b506f..0bc08899c 100644 --- a/world/console.old.cpp +++ b/world/console.old.cpp @@ -481,10 +481,10 @@ void Console::ProcessCommand(const char* command) { SendMessage(1, " version"); SendMessage(1, " worldshutdown"); } - if (admin >= 201) { + if (admin >= AccountStatus::GMMgmt) { SendMessage(1, " IPLookup [name]"); } - if (admin >= 100) { + if (admin >= AccountStatus::GMAdmin) { SendMessage(1, " LSReconnect"); SendMessage(1, " signalcharbyname charname ID"); SendMessage(1, " reloadworld"); @@ -799,7 +799,7 @@ void Console::ProcessCommand(const char* command) { SendMessage(1, " Compiled on: %s at %s", COMPILE_DATE, COMPILE_TIME); SendMessage(1, " Last modified on: %s", LAST_MODIFIED); } - else if (strcasecmp(sep.arg[0], "serverinfo") == 0 && admin >= 200) { + else if (strcasecmp(sep.arg[0], "serverinfo") == 0 && admin >= AccountStatus::GMMgmt) { if (strcasecmp(sep.arg[1], "os") == 0) { #ifdef _WINDOWS GetOS(); @@ -821,10 +821,10 @@ void Console::ProcessCommand(const char* command) { SendMessage(1, " OS - Operating system version information."); } } - else if (strcasecmp(sep.arg[0], "IPLookup") == 0 && admin >= 201) { + else if (strcasecmp(sep.arg[0], "IPLookup") == 0 && admin >= AccountStatus::GMMgmt) { client_list.SendCLEList(admin, 0, this, sep.argplus[1]); } - else if (strcasecmp(sep.arg[0], "LSReconnect") == 0 && admin >= 100) { + else if (strcasecmp(sep.arg[0], "LSReconnect") == 0 && admin >= AccountStatus::GMAdmin) { #ifdef _WINDOWS _beginthread(AutoInitLoginServer, 0, nullptr); #else @@ -839,7 +839,7 @@ void Console::ProcessCommand(const char* command) { if (strcasecmp(sep.arg[1], "list") == 0) { zoneserver_list.ListLockedZones(0, this); } - else if (strcasecmp(sep.arg[1], "lock") == 0 && admin >= 101) { + else if (strcasecmp(sep.arg[1], "lock") == 0 && admin >= AccountStatus::GMAdmin) { uint16 tmp = ZoneID(sep.arg[2]); if (tmp) { if (zoneserver_list.SetLockedZone(tmp, true)) @@ -850,7 +850,7 @@ void Console::ProcessCommand(const char* command) { else SendMessage(1, "Usage: #zonelock lock [zonename]"); } - else if (strcasecmp(sep.arg[1], "unlock") == 0 && admin >= 101) { + else if (strcasecmp(sep.arg[1], "unlock") == 0 && admin >= AccountStatus::GMAdmin) { uint16 tmp = ZoneID(sep.arg[2]); if (tmp) { if (zoneserver_list.SetLockedZone(tmp, false)) @@ -864,13 +864,13 @@ void Console::ProcessCommand(const char* command) { else { SendMessage(1, "#zonelock sub-commands"); SendMessage(1, " list"); - if (admin >= 101) { + if (admin >= AccountStatus::GMAdmin) { SendMessage(1, " lock [zonename]"); SendMessage(1, " unlock [zonename]"); } } } - else if (strcasecmp(sep.arg[0], "reloadworld") == 0 && admin > 101) + else if (strcasecmp(sep.arg[0], "reloadworld") == 0 && admin > AccountStatus::GMAdmin) { SendEmoteMessage(0,0,0,15,"Reloading World..."); auto pack = new ServerPacket(ServerOP_ReloadWorld, sizeof(ReloadWorld_Struct)); diff --git a/world/eqw.cpp b/world/eqw.cpp index 8d997edca..3b480836d 100644 --- a/world/eqw.cpp +++ b/world/eqw.cpp @@ -37,6 +37,7 @@ #include "launcher_list.h" #include "launcher_link.h" #include "wguild_mgr.h" +#include "../common/emu_constants.h" #ifdef seed #undef seed @@ -360,7 +361,13 @@ void EQW::ResolveBug(const char *id) { } void EQW::SendMessage(uint32 type, const char *msg) { - zoneserver_list.SendEmoteMessage(0, 0, 0, type, msg); + zoneserver_list.SendEmoteMessage( + 0, + 0, + AccountStatus::Player, + type, + msg + ); } void EQW::WorldShutDown(uint32 time, uint32 interval) { diff --git a/world/login_server.cpp b/world/login_server.cpp index 796438f35..edcdacf23 100644 --- a/world/login_server.cpp +++ b/world/login_server.cpp @@ -306,7 +306,13 @@ void LoginServer::ProcessSystemwideMessage(uint16_t opcode, EQ::Net::Packet &p) LogNetcode("Received ServerPacket from LS OpCode {:#04x}", opcode); ServerSystemwideMessage *swm = (ServerSystemwideMessage *) p.Data(); - zoneserver_list.SendEmoteMessageRaw(0, 0, 0, swm->type, swm->message); + zoneserver_list.SendEmoteMessageRaw( + 0, + 0, + AccountStatus::Player, + swm->type, + swm->message + ); } void LoginServer::ProcessLSRemoteAddr(uint16_t opcode, EQ::Net::Packet &p) diff --git a/world/main.cpp b/world/main.cpp index 7d3da9bfd..1e7814a91 100644 --- a/world/main.cpp +++ b/world/main.cpp @@ -252,13 +252,15 @@ static void GMSayHookCallBackProcessWorld(uint16 log_category, std::string messa for (size_t iter = 0; iter < message_split.size(); ++iter) { zoneserver_list.SendEmoteMessage( - nullptr, 0, - 80, + 0, + AccountStatus::QuestTroupe, LogSys.GetGMSayColorFromCategory(log_category), - " %s%s", - (iter == 0 ? " ---" : ""), - message_split[iter].c_str() + fmt::format( + " {}{}", + (iter == 0 ? " ---" : ""), + message_split[iter] + ).c_str() ); } @@ -266,9 +268,9 @@ static void GMSayHookCallBackProcessWorld(uint16 log_category, std::string messa } zoneserver_list.SendEmoteMessage( - nullptr, 0, - 80, + 0, + AccountStatus::QuestTroupe, LogSys.GetGMSayColorFromCategory(log_category), "%s", message.c_str() diff --git a/world/world_event_scheduler.cpp b/world/world_event_scheduler.cpp index d32d44758..9b71a4bbd 100644 --- a/world/world_event_scheduler.cpp +++ b/world/world_event_scheduler.cpp @@ -45,7 +45,13 @@ void WorldEventScheduler::Process(ZSList *zs_list) if (ValidateEventReadyToActivate(e)) { if (e.event_type == ServerEvents::EVENT_TYPE_BROADCAST) { LogScheduler("Sending broadcast [{}]", e.event_data.c_str()); - zs_list->SendEmoteMessage(nullptr, 0, 0, 15, e.event_data.c_str()); + zs_list->SendEmoteMessage( + 0, + 0, + AccountStatus::Player, + Chat::Yellow, + e.event_data.c_str() + ); } if (e.event_type == ServerEvents::EVENT_TYPE_RELOAD_WORLD) { diff --git a/world/zonelist.cpp b/world/zonelist.cpp index a949a8bd5..c3aa358d3 100644 --- a/world/zonelist.cpp +++ b/world/zonelist.cpp @@ -51,19 +51,17 @@ ZSList::~ZSList() { void ZSList::ShowUpTime(WorldTCPConnection* con, const char* adminname) { uint32 ms = Timer::GetCurrentTime(); - uint32 d = ms / 86400000; - ms -= d * 86400000; - uint32 h = ms / 3600000; - ms -= h * 3600000; - uint32 m = ms / 60000; - ms -= m * 60000; - uint32 s = ms / 1000; - if (d) - con->SendEmoteMessage(adminname, 0, 0, 0, "Worldserver Uptime: %02id %02ih %02im %02is", d, h, m, s); - else if (h) - con->SendEmoteMessage(adminname, 0, 0, 0, "Worldserver Uptime: %02ih %02im %02is", h, m, s); - else - con->SendEmoteMessage(adminname, 0, 0, 0, "Worldserver Uptime: %02im %02is", m, s); + std::string time_string = ConvertSecondsToTime(ms); + con->SendEmoteMessage( + adminname, + 0, + AccountStatus::Player, + Chat::White, + fmt::format( + "Worldserver Uptime | {}", + time_string + ).c_str() + ); } void ZSList::Add(ZoneServer* zoneserver) { @@ -113,7 +111,7 @@ void ZSList::Process() { SendEmoteMessage( 0, 0, - 0, + AccountStatus::Player, Chat::Yellow, fmt::format( "[SYSTEM] World will be shutting down in {} minutes.", @@ -277,7 +275,7 @@ void ZSList::ListLockedZones(const char* to, WorldTCPConnection* connection) { connection->SendEmoteMessageRaw( to, 0, - EQ::constants::AccountStatus::Player, + AccountStatus::Player, Chat::White, fmt::format( "Zone {} | Name: {} ({}) ID: {}", @@ -299,7 +297,7 @@ void ZSList::ListLockedZones(const char* to, WorldTCPConnection* connection) { connection->SendEmoteMessage( to, 0, - EQ::constants::AccountStatus::Player, + AccountStatus::Player, Chat::White, zone_message.c_str() ); @@ -355,7 +353,7 @@ void ZSList::SendZoneStatus(const char* to, int16 admin, WorldTCPConnection* con else is_static_string[0] = 'D'; - if (admin >= 150) { + if (admin >= AccountStatus::GMLeadAdmin) { if (zone_server_data->GetZoneID()) { snprintf(zone_data_string, sizeof(zone_data_string), "%s (%i)", zone_server_data->GetZoneName(), zone_server_data->GetZoneID()); } @@ -381,7 +379,13 @@ void ZSList::SendZoneStatus(const char* to, int16 admin, WorldTCPConnection* con if (out.size() >= 3584) { auto output = fmt::to_string(out); - connection->SendEmoteMessageRaw(to, 0, 0, 10, output.c_str()); + connection->SendEmoteMessageRaw( + to, + 0, + AccountStatus::Player, + Chat::NPCQuestSay, + output.c_str() + ); out.clear(); } else { @@ -400,7 +404,13 @@ void ZSList::SendZoneStatus(const char* to, int16 admin, WorldTCPConnection* con fmt::format_to(out, " #{} {} {}", zone_server_data->GetID(), is_static_string, zone_data_string); if (out.size() >= 3584) { auto output = fmt::to_string(out); - connection->SendEmoteMessageRaw(to, 0, 0, 10, output.c_str()); + connection->SendEmoteMessageRaw( + to, + 0, + AccountStatus::Player, + Chat::NPCQuestSay, + output.c_str() + ); out.clear(); } else { @@ -427,7 +437,13 @@ void ZSList::SendZoneStatus(const char* to, int16 admin, WorldTCPConnection* con fmt::format_to(out, "{} zones are static zones, {} zones are booted zones, {} zones available.", z, w, v); auto output = fmt::to_string(out); - connection->SendEmoteMessageRaw(to, 0, 0, 10, output.c_str()); + connection->SendEmoteMessageRaw( + to, + 0, + AccountStatus::Player, + Chat::NPCQuestSay, + output.c_str() + ); } void ZSList::SendChannelMessage(const char* from, const char* to, uint8 chan_num, uint8 language, const char* message, ...) { @@ -558,20 +574,52 @@ void ZSList::SOPZoneBootup(const char* adminname, uint32 ZoneServerID, const cha ZoneServer* zs = 0; ZoneServer* zs2 = 0; uint32 zoneid; - if (!(zoneid = ZoneID(zonename))) - SendEmoteMessage(adminname, 0, 0, 0, "Error: SOP_ZoneBootup: zone '%s' not found in 'zone' table. Typo protection=ON.", zonename); - else { - if (ZoneServerID != 0) + if (!(zoneid = ZoneID(zonename))) { + SendEmoteMessage( + adminname, + 0, + AccountStatus::Player, + Chat::White, + fmt::format( + "Error: SOP_ZoneBootup: Zone '{}' not found in 'zone' table.", + zonename + ).c_str() + ); + } else { + if (ZoneServerID != 0) { zs = FindByID(ZoneServerID); - else - SendEmoteMessage(adminname, 0, 0, 0, "Error: SOP_ZoneBootup: ServerID must be specified"); + } else { + SendEmoteMessage( + adminname, + 0, + AccountStatus::Player, + Chat::White, + "Error: SOP_ZoneBootup: Server ID must be specified." + ); + } - if (zs == 0) - SendEmoteMessage(adminname, 0, 0, 0, "Error: SOP_ZoneBootup: zoneserver not found"); - else { + if (!zs) { + SendEmoteMessage( + adminname, + 0, + AccountStatus::Player, + Chat::White, + "Error: SOP_ZoneBootup: Zoneserver not found." + ); + } else { zs2 = FindByName(zonename); if (zs2 != 0) - SendEmoteMessage(adminname, 0, 0, 0, "Error: SOP_ZoneBootup: zone '%s' already being hosted by ZoneServer #%i", zonename, zs2->GetID()); + SendEmoteMessage( + adminname, + 0, + AccountStatus::Player, + Chat::White, + fmt::format( + "Error: SOP_ZoneBootup: Zone '{}' already being hosted by Zoneserver ID {}.", + zonename, + zs2->GetID() + ).c_str() + ); else { zs->TriggerBootup(zoneid, 0, adminname, iMakeStatic); } @@ -714,7 +762,7 @@ void ZSList::WorldShutDown(uint32 time, uint32 interval) SendEmoteMessage( 0, 0, - 0, + AccountStatus::Player, Chat::Yellow, fmt::format( "[SYSTEM] World will be shutting down in {} minutes.", @@ -733,7 +781,13 @@ void ZSList::WorldShutDown(uint32 time, uint32 interval) reminder->Start(); } else { - SendEmoteMessage(0, 0, 0, 15, "[SYSTEM] World is shutting down."); + SendEmoteMessage( + 0, + 0, + AccountStatus::Player, + Chat::Yellow, + "[SYSTEM] World is shutting down." + ); auto pack = new ServerPacket; pack->opcode = ServerOP_ShutdownAll; pack->size = 0; diff --git a/world/zoneserver.cpp b/world/zoneserver.cpp index 7f11dc8b3..ae0b2682b 100644 --- a/world/zoneserver.cpp +++ b/world/zoneserver.cpp @@ -438,7 +438,16 @@ void ZoneServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) { safe_delete(pack); }))) && (!scm->noreply)) { - zoneserver_list.SendEmoteMessage(scm->from, 0, 0, 0, "%s is not online at this time.", scm->to); + zoneserver_list.SendEmoteMessage( + scm->from, + 0, + AccountStatus::Player, + Chat::White, + fmt::format( + "{} is not online at this time.", + scm->to + ).c_str() + ); } } break; @@ -446,7 +455,7 @@ void ZoneServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) { ClientListEntry* cle = client_list.FindCharacter(scm->deliverto); if (cle == 0 || cle->Online() < CLE_Status::Zoning || - (cle->TellsOff() && ((cle->Anon() == 1 && scm->fromadmin < cle->Admin()) || scm->fromadmin < 80))) { + (cle->TellsOff() && ((cle->Anon() == 1 && scm->fromadmin < cle->Admin()) || scm->fromadmin < AccountStatus::QuestTroupe))) { if (!scm->noreply) { ClientListEntry* sender = client_list.FindCharacter(scm->from); if (!sender || !sender->Server()) @@ -491,7 +500,17 @@ void ZoneServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) { } else if (cle->Server() == 0) { if (!scm->noreply) - zoneserver_list.SendEmoteMessage(scm->from, 0, 0, 0, "You told %s, '%s is not contactable at this time'", scm->to, scm->to); + zoneserver_list.SendEmoteMessage( + scm->from, + 0, + AccountStatus::Player, + Chat::White, + fmt::format( + "You told {}, '{} is not contactable at this time'", + scm->to, + scm->to + ).c_str() + ); } else cle->Server()->SendPacket(pack); @@ -518,29 +537,36 @@ void ZoneServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) { } case ServerOP_EmoteMessage: { ServerEmoteMessage_Struct* sem = (ServerEmoteMessage_Struct*)pack->pBuffer; - zoneserver_list.SendEmoteMessageRaw(sem->to, sem->guilddbid, sem->minstatus, sem->type, sem->message); + zoneserver_list.SendEmoteMessageRaw( + sem->to, + sem->guilddbid, + sem->minstatus, + sem->type, + sem->message + ); break; } case ServerOP_VoiceMacro: { - ServerVoiceMacro_Struct* svm = (ServerVoiceMacro_Struct*)pack->pBuffer; - if (svm->Type == VoiceMacroTell) { - ClientListEntry* cle = client_list.FindCharacter(svm->To); - if (!cle || (cle->Online() < CLE_Status::Zoning) || !cle->Server()) { - - zoneserver_list.SendEmoteMessage(svm->From, 0, 0, 0, "'%s is not online at this time'", svm->To); - + zoneserver_list.SendEmoteMessage( + svm->From, + 0, + AccountStatus::Player, + Chat::White, + fmt::format( + "'{} is not online at this time'", + svm->To + ).c_str() + ); break; } - cle->Server()->SendPacket(pack); - } - else + } else { zoneserver_list.SendPacket(pack); - + } break; } @@ -656,17 +682,31 @@ void ZoneServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) { case ServerOP_ZoneShutdown: { ServerZoneStateChange_struct* s = (ServerZoneStateChange_struct *)pack->pBuffer; ZoneServer* zs = 0; - if (s->ZoneServerID != 0) + if (s->ZoneServerID != 0) { zs = zoneserver_list.FindByID(s->ZoneServerID); - else if (s->zoneid != 0) + } else if (s->zoneid != 0) { zs = zoneserver_list.FindByName(ZoneName(s->zoneid)); - else - zoneserver_list.SendEmoteMessage(s->adminname, 0, 0, 0, "Error: SOP_ZoneShutdown: neither ID nor name specified"); + } else { + zoneserver_list.SendEmoteMessage( + s->adminname, + 0, + AccountStatus::Player, + Chat::White, + "Error: SOP_ZoneShutdown: neither ID nor name specified" + ); + } - if (zs == 0) - zoneserver_list.SendEmoteMessage(s->adminname, 0, 0, 0, "Error: SOP_ZoneShutdown: zoneserver not found"); - else + if (!zs) { + zoneserver_list.SendEmoteMessage( + s->adminname, + 0, + AccountStatus::Player, + Chat::White, + "Error: SOP_ZoneShutdown: zoneserver not found" + ); + } else { zs->SendPacket(pack); + } break; } case ServerOP_ZoneBootup: { @@ -717,7 +757,7 @@ void ZoneServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) { if (GetZoneID() == ztz->current_zone_id && GetInstanceID() == ztz->current_instance_id) { LogInfo("Processing ZTZ for egress from zone for client [{}]", ztz->name); - if (ztz->admin < 80 && ztz->ignorerestrictions < 2 && zoneserver_list.IsZoneLocked(ztz->requested_zone_id)) { + if (ztz->admin < AccountStatus::QuestTroupe && ztz->ignorerestrictions < 2 && zoneserver_list.IsZoneLocked(ztz->requested_zone_id)) { ztz->response = 0; SendPacket(pack); break; @@ -909,15 +949,43 @@ void ZoneServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) { ServerGMGoto_Struct* gmg = (ServerGMGoto_Struct*)pack->pBuffer; ClientListEntry* cle = client_list.FindCharacter(gmg->gotoname); if (cle != 0) { - if (cle->Server() == 0) - this->SendEmoteMessage(gmg->myname, 0, 0, 13, "Error: Cannot identify %s's zoneserver.", gmg->gotoname); - else if (cle->Anon() == 1 && cle->Admin() > gmg->admin) // no snooping for anon GMs - this->SendEmoteMessage(gmg->myname, 0, 0, 13, "Error: %s not found", gmg->gotoname); - else + if (!cle->Server()) { + SendEmoteMessage( + gmg->myname, + 0, + AccountStatus::Player, + Chat::Red, + fmt::format( + "Error: Cannot identify {}'s zoneserver.", + gmg->gotoname + ).c_str() + ); + } else if (cle->Anon() == 1 && cle->Admin() > gmg->admin) { // no snooping for anon GMs + SendEmoteMessage( + gmg->myname, + 0, + AccountStatus::Player, + Chat::Red, + fmt::format( + "Error: {} not found.", + gmg->gotoname + ).c_str() + ); + } else { cle->Server()->SendPacket(pack); + } } else { - this->SendEmoteMessage(gmg->myname, 0, 0, 13, "Error: %s not found", gmg->gotoname); + SendEmoteMessage( + gmg->myname, + 0, + AccountStatus::Player, + Chat::Red, + fmt::format( + "Error: {} not found", + gmg->gotoname + ).c_str() + ); } break; } @@ -933,16 +1001,28 @@ void ZoneServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) { WorldConfig::UnlockWorld(); if (loginserverlist.Connected()) { loginserverlist.SendStatus(); - if (slock->mode >= 1) - this->SendEmoteMessage(slock->myname, 0, 0, 13, "World locked"); - else - this->SendEmoteMessage(slock->myname, 0, 0, 13, "World unlocked"); + SendEmoteMessage( + slock->myname, + 0, + AccountStatus::Player, + Chat::Red, + fmt::format( + "World {}.", + slock->mode ? "locked" : "unlocked" + ).c_str() + ); } else { - if (slock->mode >= 1) - this->SendEmoteMessage(slock->myname, 0, 0, 13, "World locked, but login server not connected."); - else - this->SendEmoteMessage(slock->myname, 0, 0, 13, "World unlocked, but login server not conencted."); + SendEmoteMessage( + slock->myname, + 0, + AccountStatus::Player, + Chat::Red, + fmt::format( + "World {}, but login server not connected.", + slock->mode ? "locked" : "unlocked" + ).c_str() + ); } break; } @@ -953,7 +1033,6 @@ void ZoneServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) { } ServerMotd_Struct* smotd = (ServerMotd_Struct*)pack->pBuffer; database.SetVariable("MOTD", smotd->motd); - //this->SendEmoteMessage(smotd->myname, 0, 0, 13, "Updated Motd."); zoneserver_list.SendPacket(pack); break; } @@ -1024,22 +1103,22 @@ void ZoneServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) { } ServerLockZone_Struct* lock_zone = (ServerLockZone_Struct*) pack->pBuffer; - if (lock_zone->op == EQ::constants::ServerLockType::List) { + if (lock_zone->op == ServerLockType::List) { zoneserver_list.ListLockedZones(lock_zone->adminname, this); break; } else if ( - lock_zone->op == EQ::constants::ServerLockType::Lock || - lock_zone->op == EQ::constants::ServerLockType::Unlock + lock_zone->op == ServerLockType::Lock || + lock_zone->op == ServerLockType::Unlock ) { - if (zoneserver_list.SetLockedZone(lock_zone->zoneID, lock_zone->op == EQ::constants::ServerLockType::Lock)) { + if (zoneserver_list.SetLockedZone(lock_zone->zoneID, lock_zone->op == ServerLockType::Lock)) { zoneserver_list.SendEmoteMessage( 0, 0, - EQ::constants::AccountStatus::QuestTroupe, + AccountStatus::QuestTroupe, Chat::White, fmt::format( "Zone {} | Name: {} ({}) ID: {}", - lock_zone->op == EQ::constants::ServerLockType::Lock ? "Locked" : "Unlocked", + lock_zone->op == ServerLockType::Lock ? "Locked" : "Unlocked", ZoneLongName(lock_zone->zoneID), ZoneName(lock_zone->zoneID), lock_zone->zoneID @@ -1049,11 +1128,11 @@ void ZoneServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) { SendEmoteMessageRaw( lock_zone->adminname, 0, - EQ::constants::AccountStatus::Player, + AccountStatus::Player, Chat::White, fmt::format( "Zone Failed to {} | Name: {} ({}) ID: {}", - lock_zone->op == EQ::constants::ServerLockType::Lock ? "Lock" : "Unlock", + lock_zone->op == ServerLockType::Lock ? "Lock" : "Unlock", ZoneLongName(lock_zone->zoneID), ZoneName(lock_zone->zoneID), lock_zone->zoneID @@ -1404,7 +1483,13 @@ void ZoneServer::SendEmoteMessage(const char* to, uint32 to_guilddbid, int16 to_ va_start(argptr, message); vsnprintf(buffer, sizeof(buffer), message, argptr); va_end(argptr); - SendEmoteMessageRaw(to, to_guilddbid, to_minstatus, type, buffer); + SendEmoteMessageRaw( + to, + to_guilddbid, + to_minstatus, + type, + buffer + ); } void ZoneServer::SendEmoteMessageRaw(const char* to, uint32 to_guilddbid, int16 to_minstatus, uint32 type, const char* message) { diff --git a/zone/bot_command.cpp b/zone/bot_command.cpp index bd826078b..fd476e83b 100644 --- a/zone/bot_command.cpp +++ b/zone/bot_command.cpp @@ -1652,47 +1652,68 @@ int bot_command_real_dispatch(Client *c, const char *message) void bot_command_log_command(Client *c, const char *message) { - int admin = c->Admin(); +int admin = c->Admin(); bool continueevents = false; - switch (zone->loglevelvar) { //catch failsafe - case 9: // log only LeadGM - if ((admin >= 150) && (admin <200)) + switch (zone->loglevelvar){ //catch failsafe + case 9: { // log only LeadGM + if ( + admin >= AccountStatus::GMLeadAdmin && + admin < AccountStatus::GMMgmt + ) { + continueevents = true; + } + break; + } + case 8: { // log only GM + if ( + admin >= AccountStatus::GMAdmin && + admin < AccountStatus::GMLeadAdmin + ) { + continueevents = true; + } + break; + } + case 1: { + if (admin >= AccountStatus::GMMgmt) { + continueevents = true; + } + break; + } + case 2: { + if (admin >= AccountStatus::GMLeadAdmin) { + continueevents = true; + } + break; + } + case 3: { + if (admin >= AccountStatus::GMAdmin) { + continueevents = true; + } + break; + } + case 4: { + if (admin >= AccountStatus::QuestTroupe) { + continueevents = true; + } + break; + } + case 5: { + if (admin >= AccountStatus::ApprenticeGuide) { + continueevents = true; + } + break; + } + case 6: { + if (admin >= AccountStatus::Steward) { + continueevents = true; + } + break; + } + case 7: { continueevents = true; - break; - case 8: // log only GM - if ((admin >= 100) && (admin <150)) - continueevents = true; - break; - case 1: - if ((admin >= 200)) - continueevents = true; - break; - case 2: - if ((admin >= 150)) - continueevents = true; - break; - case 3: - if ((admin >= 100)) - continueevents = true; - break; - case 4: - if ((admin >= 80)) - continueevents = true; - break; - case 5: - if ((admin >= 20)) - continueevents = true; - break; - case 6: - if ((admin >= 10)) - continueevents = true; - break; - case 7: - continueevents = true; - break; - default: - break; + break; + } } if (continueevents) @@ -3382,7 +3403,7 @@ void bot_command_heal_rotation(Client *c, const Seperator *sep) return; #if (EQDEBUG >= 12) - while (c->Admin() >= 250) { + while (c->Admin() >= AccountStatus::GMImpossible) { if (strcasecmp(sep->arg[1], "shone")) { break; } Bot* my_bot = ActionableBots::AsTarget_ByBot(c); if (!my_bot || !(my_bot->IsHealRotationMember())) { break; } diff --git a/zone/client.cpp b/zone/client.cpp index 1eadd3fcc..88f63508f 100644 --- a/zone/client.cpp +++ b/zone/client.cpp @@ -200,7 +200,7 @@ Client::Client(EQStreamInterface* ieqs) TrackingID = 0; WID = 0; account_id = 0; - admin = 0; + admin = AccountStatus::Player; lsaccountid = 0; guild_id = GUILD_NONE; guildrank = 0; @@ -1013,7 +1013,7 @@ void Client::ChannelMessageReceived(uint8 chan_num, uint8 language, uint8 lang_s else return; } - if(worldserver.IsOOCMuted() && admin < 100) + if(worldserver.IsOOCMuted() && admin < AccountStatus::GMAdmin) { Message(0,"OOC has been muted. Try again later."); return; @@ -1052,7 +1052,7 @@ void Client::ChannelMessageReceived(uint8 chan_num, uint8 language, uint8 lang_s } case ChatChannel_Broadcast: /* Broadcast */ case ChatChannel_GMSAY: { /* GM Say */ - if (!(admin >= 80)) + if (!(admin >= AccountStatus::QuestTroupe)) Message(0, "Error: Only GMs can use this channel"); else if (!worldserver.SendChannelMessage(this, targetname, chan_num, 0, language, lang_skill, message)) Message(0, "Error: World server disconnected"); @@ -1230,7 +1230,7 @@ void Client::ChannelMessageReceived(uint8 chan_num, uint8 language, uint8 lang_s } void Client::ChannelMessageSend(const char* from, const char* to, uint8 chan_num, uint8 language, uint8 lang_skill, const char* message, ...) { - if ((chan_num==11 && !(this->GetGM())) || (chan_num==10 && this->Admin()<80)) // dont need to send /pr & /petition to everybody + if ((chan_num==11 && !(this->GetGM())) || (chan_num==10 && this->Admin() < AccountStatus::QuestTroupe)) // dont need to send /pr & /petition to everybody return; va_list argptr; char buffer[4096]; @@ -2647,7 +2647,7 @@ void Client::GMKill() { } bool Client::CheckAccess(int16 iDBLevel, int16 iDefaultLevel) { - if ((admin >= iDBLevel) || (iDBLevel == 255 && admin >= iDefaultLevel)) + if ((admin >= iDBLevel) || (iDBLevel == AccountStatus::Max && admin >= iDefaultLevel)) return true; else return false; @@ -7007,7 +7007,7 @@ void Client::SendStatsWindow(Client* client, bool use_window) Extra_Info: client->Message(Chat::White, " BaseRace: %i Gender: %i BaseGender: %i Texture: %i HelmTexture: %i", GetBaseRace(), GetGender(), GetBaseGender(), GetTexture(), GetHelmTexture()); - if (client->Admin() >= 100) { + if (client->Admin() >= AccountStatus::GMAdmin) { client->Message(Chat::White, " CharID: %i EntityID: %i PetID: %i OwnerID: %i AIControlled: %i Targetted: %i", CharacterID(), GetID(), GetPetID(), GetOwnerID(), IsAIControlled(), targeted); } } @@ -8566,14 +8566,25 @@ void Client::ExpeditionSay(const char *str, int ExpID) { return; if(results.RowCount() == 0) { - this->Message(Chat::Lime, "You say to the expedition, '%s'", str); + Message(Chat::Lime, "You say to the expedition, '%s'", str); return; } for(auto row = results.begin(); row != results.end(); ++row) { const char* charName = row[0]; - if(strcmp(charName, this->GetCleanName()) != 0) - worldserver.SendEmoteMessage(charName, 0, 0, 14, "%s says to the expedition, '%s'", this->GetCleanName(), str); + if(strcmp(charName, GetCleanName()) != 0) { + worldserver.SendEmoteMessage( + charName, + 0, + AccountStatus::Player, + Chat::Lime, + fmt::format( + "{} says to the expedition, '{}'", + GetCleanName(), + str + ).c_str() + ); + } // ChannelList->CreateChannel(ChannelName, ChannelOwner, ChannelPassword, true, atoi(row[3])); } diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index 2372dd31c..b140934cb 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -4756,7 +4756,7 @@ void Client::Handle_OP_ClientUpdate(const EQApplicationPacket *app) { MakeSpawnUpdate(position_update); if (gm_hide_me) { - entity_list.QueueClientsStatus(this, outapp, true, Admin(), 255); + entity_list.QueueClientsStatus(this, outapp, true, Admin(), AccountStatus::Max); } else { entity_list.QueueCloseClients(this, outapp, true, RuleI(Range, ClientPositionUpdates), nullptr, true); } @@ -6667,7 +6667,7 @@ void Client::Handle_OP_GMZoneRequest(const EQApplicationPacket *app) GMZoneRequest_Struct* gmzr = (GMZoneRequest_Struct*)app->pBuffer; float target_x = -1, target_y = -1, target_z = -1, target_heading; - int16 min_status = 0; + int16 min_status = AccountStatus::Player; uint8 min_level = 0; char target_zone[32]; uint16 zone_id = gmzr->zone_id; @@ -7797,16 +7797,30 @@ void Client::Handle_OP_GuildInviteAccept(const EQApplicationPacket *app) { //dont care if the check fails (since we dont know the rank), just want to clear the entry. guild_mgr.VerifyAndClearInvite(CharacterID(), gj->guildeqid, gj->response); - worldserver.SendEmoteMessage(gj->inviter, 0, 0, "%s has declined to join the guild.", this->GetName()); + worldserver.SendEmoteMessage( + gj->inviter, + 0, + Chat::White, + fmt::format( + "{} has declined to join the guild.", + GetCleanName() + ).c_str() + ); return; } } if (gj->response == 5 || gj->response == 4) { //dont care if the check fails (since we dont know the rank), just want to clear the entry. guild_mgr.VerifyAndClearInvite(CharacterID(), gj->guildeqid, gj->response); - - worldserver.SendEmoteMessage(gj->inviter, 0, 0, "%s has declined to join the guild.", this->GetName()); - + worldserver.SendEmoteMessage( + gj->inviter, + 0, + Chat::White, + fmt::format( + "{} has declined to join the guild.", + GetCleanName() + ).c_str() + ); return; } @@ -7838,7 +7852,15 @@ void Client::Handle_OP_GuildInviteAccept(const EQApplicationPacket *app) //we dont really care a lot about what this packet means, as long as //it has been authorized with the guild manager if (!guild_mgr.VerifyAndClearInvite(CharacterID(), gj->guildeqid, guildrank)) { - worldserver.SendEmoteMessage(gj->inviter, 0, 0, "%s has sent an invalid response to your invite!", GetName()); + worldserver.SendEmoteMessage( + gj->inviter, + 0, + Chat::White, + fmt::format( + "{} has sent an invalid response to your invite!", + GetCleanName() + ).c_str() + ); Message(Chat::Red, "Invalid invite response packet!"); return; } @@ -10913,7 +10935,17 @@ void Client::Handle_OP_Petition(const EQApplicationPacket *app) database.InsertPetitionToDB(pet); petition_list.UpdateGMQueue(); petition_list.UpdateZoneListQueue(); - worldserver.SendEmoteMessage(0, 0, 80, 15, "%s has made a petition. #%i", GetName(), pet->GetID()); + worldserver.SendEmoteMessage( + 0, + 0, + AccountStatus::QuestTroupe, + Chat::Yellow, + fmt::format( + "{} has made a petition. ID: {}", + GetCleanName(), + pet->GetID() + ).c_str() + ); } return; } @@ -15300,7 +15332,7 @@ void Client::Handle_OP_YellForHelp(const EQApplicationPacket *app) void Client::Handle_OP_ResetAA(const EQApplicationPacket *app) { - if (Admin() >= 50) { + if (Admin() >= AccountStatus::Guide) { Message(0, "Resetting AA points."); ResetAA(); } diff --git a/zone/client_process.cpp b/zone/client_process.cpp index d4108a819..c014c5f0e 100644 --- a/zone/client_process.cpp +++ b/zone/client_process.cpp @@ -533,7 +533,7 @@ bool Client::Process() { OnDisconnect(true); LogInfo("Client linkdead: {}", name); - if (Admin() > 100) { + if (Admin() > AccountStatus::GMAdmin) { if (GetMerc()) { GetMerc()->Save(); GetMerc()->Depop(); @@ -1729,7 +1729,7 @@ void Client::OPGMSummon(const EQApplicationPacket *app) } else { - if(admin < 80) + if(admin < AccountStatus::QuestTroupe) { return; } diff --git a/zone/command.cpp b/zone/command.cpp index 0e8f204aa..e33e37cf9 100755 --- a/zone/command.cpp +++ b/zone/command.cpp @@ -162,310 +162,310 @@ int command_init(void) commandaliases.clear(); if ( - command_add("acceptrules", "[acceptrules] - Accept the EQEmu Agreement", 0, command_acceptrules) || - command_add("advnpcspawn", "[maketype|makegroup|addgroupentry|addgroupspawn][removegroupspawn|movespawn|editgroupbox|cleargroupbox]", 150, command_advnpcspawn) || - command_add("aggro", "(range) [-v] - Display aggro information for all mobs 'range' distance from your target. -v is verbose faction info.", 80, command_aggro) || - command_add("aggrozone", "[aggro] - Aggro every mob in the zone with X aggro. Default is 0. Not recommend if you're not invulnerable.", 100, command_aggrozone) || - command_add("ai", "[factionid/spellslist/con/guard/roambox/stop/start] - Modify AI on NPC target", 100, command_ai) || - command_add("appearance", "[type] [value] - Send an appearance packet for you or your target", 150, command_appearance) || - command_add("apply_shared_memory", "[shared_memory_name] - Tells every zone and world to apply a specific shared memory segment by name.", 250, command_apply_shared_memory) || - command_add("attack", "[targetname] - Make your NPC target attack targetname", 150, command_attack) || - command_add("augmentitem", "Force augments an item. Must have the augment item window open.", 250, command_augmentitem) || - command_add("ban", "[name] [reason]- Ban by character name", 150, command_ban) || - command_add("beard", "- Change the beard of your target", 80, command_beard) || - command_add("beardcolor", "- Change the beard color of your target", 80, command_beardcolor) || - command_add("bestz", "- Ask map for a good Z coord for your x,y coords.", 0, command_bestz) || - command_add("bind", "- Sets your targets bind spot to their current location", 200, command_bind) || + command_add("acceptrules", "[acceptrules] - Accept the EQEmu Agreement", AccountStatus::Player, command_acceptrules) || + command_add("advnpcspawn", "[maketype|makegroup|addgroupentry|addgroupspawn][removegroupspawn|movespawn|editgroupbox|cleargroupbox]", AccountStatus::GMLeadAdmin, command_advnpcspawn) || + command_add("aggro", "(range) [-v] - Display aggro information for all mobs 'range' distance from your target. -v is verbose faction info.", AccountStatus::QuestTroupe, command_aggro) || + command_add("aggrozone", "[aggro] - Aggro every mob in the zone with X aggro. Default is 0. Not recommend if you're not invulnerable.", AccountStatus::GMAdmin, command_aggrozone) || + command_add("ai", "[factionid/spellslist/con/guard/roambox/stop/start] - Modify AI on NPC target", AccountStatus::GMAdmin, command_ai) || + command_add("appearance", "[type] [value] - Send an appearance packet for you or your target", AccountStatus::GMLeadAdmin, command_appearance) || + command_add("apply_shared_memory", "[shared_memory_name] - Tells every zone and world to apply a specific shared memory segment by name.", AccountStatus::GMImpossible, command_apply_shared_memory) || + command_add("attack", "[targetname] - Make your NPC target attack targetname", AccountStatus::GMLeadAdmin, command_attack) || + command_add("augmentitem", "Force augments an item. Must have the augment item window open.", AccountStatus::GMImpossible, command_augmentitem) || + command_add("ban", "[name] [reason]- Ban by character name", AccountStatus::GMLeadAdmin, command_ban) || + command_add("beard", "- Change the beard of your target", AccountStatus::QuestTroupe, command_beard) || + command_add("beardcolor", "- Change the beard color of your target", AccountStatus::QuestTroupe, command_beardcolor) || + command_add("bestz", "- Ask map for a good Z coord for your x,y coords.", AccountStatus::Player, command_bestz) || + command_add("bind", "- Sets your targets bind spot to their current location", AccountStatus::GMMgmt, command_bind) || #ifdef BOTS - command_add("bot", "- Type \"#bot help\" or \"^help\" to the see the list of available commands for bots.", 0, command_bot) || + command_add("bot", "- Type \"#bot help\" or \"^help\" to the see the list of available commands for bots.", AccountStatus::Player, command_bot) || #endif - command_add("camerashake", "Shakes the camera on everyone's screen globally.", 80, command_camerashake) || - command_add("castspell", "[Spell ID] [Instant (0 = False, 1 = True, Default is 1 if Unused)] - Cast a spell", 50, command_castspell) || - command_add("chat", "[channel num] [message] - Send a channel message to all zones", 200, command_chat) || - command_add("checklos", "- Check for line of sight to your target", 50, command_checklos) || - command_add("copycharacter", "[source_char_name] [dest_char_name] [dest_account_name] Copies character to destination account", 250, command_copycharacter) || - command_add("corpse", "- Manipulate corpses, use with no arguments for help", 50, command_corpse) || - command_add("corpsefix", "Attempts to bring corpses from underneath the ground within close proximity of the player", 0, command_corpsefix) || - command_add("cvs", "- Summary of client versions currently online.", 200, command_cvs) || - command_add("damage", "[amount] - Damage your target", 100, command_damage) || - command_add("databuckets", "View|Delete [key] [limit]- View data buckets, limit 50 default or Delete databucket by key", 80, command_databuckets) || - command_add("date", "[yyyy] [mm] [dd] [HH] [MM] - Set EQ time", 90, command_date) || - command_add("dbspawn2", "[spawngroup] [respawn] [variance] - Spawn an NPC from a predefined row in the spawn2 table", 100, command_dbspawn2) || - command_add("delacct", "[accountname] - Delete an account", 150, command_delacct) || - command_add("deletegraveyard", "[zone name] - Deletes the graveyard for the specified zone.", 200, command_deletegraveyard) || - command_add("delpetition", "[petition number] - Delete a petition", 20, command_delpetition) || - command_add("depop", "- Depop your NPC target", 50, command_depop) || - command_add("depopzone", "- Depop the zone", 100, command_depopzone) || - command_add("devtools", "- Manages devtools", 200, command_devtools) || - command_add("details", "- Change the details of your target (Drakkin Only)", 80, command_details) || - command_add("disablerecipe", "[recipe_id] - Disables a recipe using the recipe id.", 80, command_disablerecipe) || - command_add("disarmtrap", "Analog for ldon disarm trap for the newer clients since we still don't have it working.", 80, command_disarmtrap) || - command_add("distance", "- Reports the distance between you and your target.", 80, command_distance) || - command_add("door", "Door editing command", 80, command_door) || - command_add("doanim", "[animnum] [type] - Send an EmoteAnim for you or your target", 50, command_doanim) || - command_add("dye", "[slot|'help'] [red] [green] [blue] [use_tint] - Dyes the specified armor slot to Red, Green, and Blue provided, allows you to bypass darkness limits.", 20, command_dye) || - command_add("dz", "Manage expeditions and dynamic zone instances", 80, command_dz) || - command_add("dzkickplayers", "Removes all players from current expedition. (/kickplayers alternative for pre-RoF clients)", 0, command_dzkickplayers) || - command_add("editmassrespawn", "[name-search] [second-value] - Mass (Zone wide) NPC respawn timer editing command", 100, command_editmassrespawn) || - command_add("emote", "['name'/'world'/'zone'] [type] [message] - Send an emote message", 80, command_emote) || - command_add("emotesearch", "Searches NPC Emotes", 80, command_emotesearch) || - command_add("emoteview", "Lists all NPC Emotes", 80, command_emoteview) || - command_add("emptyinventory", "- Clears you or your target's entire inventory (Equipment, General, Bank, and Shared Bank)", 250, command_emptyinventory) || - command_add("enablerecipe", "[recipe_id] - Enables a recipe using the recipe id.", 80, command_enablerecipe) || - command_add("endurance", "Restores you or your target's endurance.", 50, command_endurance) || - command_add("equipitem", "[slotid(0-21)] - Equip the item on your cursor into the specified slot", 50, command_equipitem) || - command_add("face", "- Change the face of your target", 80, command_face) || - command_add("faction", "[Find (criteria | all ) | Review (criteria | all) | Reset (id)] - Resets Player's Faction", 80, command_faction) || - command_add("findaliases", "[search criteria]- Searches for available command aliases, by alias or command", 0, command_findaliases) || - command_add("findclass", "[search criteria] - Search for a class", 50, command_findclass) || - command_add("findfaction", "[search criteria] - Search for a faction", 50, command_findfaction) || - command_add("findnpctype", "[search criteria] - Search database NPC types", 100, command_findnpctype) || - command_add("findrace", "[search criteria] - Search for a race", 50, command_findrace) || - command_add("findskill", "[search criteria] - Search for a skill", 50, command_findskill) || - command_add("findspell", "[search criteria] - Search for a spell", 50, command_findspell) || - command_add("findtask", "[search criteria] - Search for a task", 50, command_findtask) || - command_add("findzone", "[search criteria] - Search database zones", 100, command_findzone) || - command_add("fixmob", "[race|gender|texture|helm|face|hair|haircolor|beard|beardcolor|heritage|tattoo|detail] [next|prev] - Manipulate appearance of your target", 80, command_fixmob) || - command_add("flag", "[status] [acctname] - Refresh your admin status, or set an account's admin status if arguments provided", 0, command_flag) || - command_add("flagedit", "- Edit zone flags on your target", 100, command_flagedit) || - command_add("flags", "- displays the flags of you or your target", 0, command_flags) || - command_add("flymode", "[0/1/2/3/4/5] - Set your or your player target's flymode to ground/flying/levitate/water/floating/levitate_running", 50, command_flymode) || - command_add("fov", "- Check wether you're behind or in your target's field of view", 80, command_fov) || - command_add("freeze", "- Freeze your target", 80, command_freeze) || - command_add("gassign", "[id] - Assign targetted NPC to predefined wandering grid id", 100, command_gassign) || - command_add("gearup", "Developer tool to quickly equip a character", 200, command_gearup) || - command_add("gender", "[0/1/2] - Change your or your target's gender to male/female/neuter", 50, command_gender) || - command_add("getplayerburiedcorpsecount", "- Get the target's total number of buried player corpses.", 100, command_getplayerburiedcorpsecount) || - command_add("getvariable", "[varname] - Get the value of a variable from the database", 200, command_getvariable) || - command_add("ginfo", "- get group info on target.", 20, command_ginfo) || - command_add("giveitem", "[itemid] [charges] - Summon an item onto your target's cursor. Charges are optional.", 200, command_giveitem) || - command_add("givemoney", "[pp] [gp] [sp] [cp] - Gives specified amount of money to the target player.", 200, command_givemoney) || - command_add("globalview", "Lists all qglobals in cache if you were to do a quest with this target.", 80, command_globalview) || - command_add("gm", "- Turn player target's or your GM flag on or off", 80, command_gm) || - command_add("gmspeed", "[on/off] - Turn GM speed hack on/off for you or your player target", 100, command_gmspeed) || - command_add("gmzone", "[zone_short_name] [zone_version=0] [identifier=gmzone] - Zones to a private GM instance", 100, command_gmzone) || - command_add("goto", "[playername] or [x y z] [h] - Teleport to the provided coordinates or to your target", 10, command_goto) || - command_add("grid", "[add/delete] [grid_num] [wandertype] [pausetype] - Create/delete a wandering grid", 170, command_grid) || - command_add("guild", "- Guild manipulation commands. Use argument help for more info.", 10, command_guild) || - command_add("guildapprove", "[guildapproveid] - Approve a guild with specified ID (guild creator receives the id)", 0, command_guildapprove) || - command_add("guildcreate", "[guildname] - Creates an approval setup for guild name specified", 0, command_guildcreate) || - command_add("guildlist", "[guildapproveid] - Lists character names who have approved the guild specified by the approve id", 0, command_guildlist) || - command_add("hair", "- Change the hair style of your target", 80, command_hair) || - command_add("haircolor", "- Change the hair color of your target", 80, command_haircolor) || - command_add("haste", "[percentage] - Set your haste percentage", 100, command_haste) || - command_add("hatelist", " - Display hate list for target.", 80, command_hatelist) || - command_add("heal", "- Completely heal your target", 10, command_heal) || - command_add("helm", "- Change the helm of your target", 80, command_helm) || - command_add("help", "[search term] - List available commands and their description, specify partial command as argument to search", 0, command_help) || - command_add("heritage", "- Change the heritage of your target (Drakkin Only)", 80, command_heritage) || - command_add("heromodel", "[hero model] [slot] - Full set of Hero's Forge Armor appearance. If slot is set, sends exact model just to slot.", 200, command_heromodel) || - command_add("hideme", "[on/off] - Hide yourself from spawn lists.", 80, command_hideme) || - command_add("hotfix", "[hotfix_name] - Reloads shared memory into a hotfix, equiv to load_shared_memory followed by apply_shared_memory", 250, command_hotfix) || - command_add("hp", "- Refresh your HP bar from the server.", 0, command_hp) || - command_add("incstat", "- Increases or Decreases a client's stats permanently.", 200, command_incstat) || - command_add("instance", "- Modify Instances", 200, command_instance) || - command_add("interrogateinv", "- use [help] argument for available options", 0, command_interrogateinv) || - command_add("interrupt", "[message id] [color] - Interrupt your casting. Arguments are optional.", 50, command_interrupt) || - command_add("invsnapshot", "- Manipulates inventory snapshots for your current target", 80, command_invsnapshot) || - command_add("invul", "[on/off] - Turn player target's or your invulnerable flag on or off", 80, command_invul) || - command_add("ipban", "[IP address] - Ban IP by character name", 200, command_ipban) || - command_add("iplookup", "[charname] - Look up IP address of charname", 200, command_iplookup) || - command_add("iteminfo", "- Get information about the item on your cursor", 10, command_iteminfo) || - command_add("itemsearch", "[search criteria] - Search for an item", 10, command_itemsearch) || - command_add("kick", "[charname] - Disconnect charname", 150, command_kick) || - command_add("kill", "- Kill your target", 100, command_kill) || - command_add("killallnpcs", " [npc_name] Kills all npcs by search name, leave blank for all attackable NPC's", 200, command_killallnpcs) || - command_add("lastname", "[new lastname] - Set your or your player target's lastname", 50, command_lastname) || - command_add("level", "[level] - Set your or your target's level", 10, command_level) || - command_add("list", "[npcs|players|corpses|doors|objects] [search] - Search entities", 20, command_list) || - command_add("listpetition", "- List petitions", 50, command_listpetition) || - command_add("load_shared_memory", "[shared_memory_name] - Reloads shared memory and uses the input as output", 250, command_load_shared_memory) || - command_add("loc", "- Print out your or your target's current location and heading", 0, command_loc) || - command_add("lock", "- Lock the worldserver", 150, command_lock) || - command_add("logs", "Manage anything to do with logs", 250, command_logs) || - command_add("makepet", "[level] [class] [race] [texture] - Make a pet", 50, command_makepet) || - command_add("mana", "- Fill your or your target's mana", 50, command_mana) || - command_add("maxskills", "Maxes skills for you.", 200, command_max_all_skills) || - command_add("memspell", "[slotid] [spellid] - Memorize spellid in the specified slot", 50, command_memspell) || - command_add("merchant_close_shop", "Closes a merchant shop", 100, command_merchantcloseshop) || - command_add("merchant_open_shop", "Opens a merchants shop", 100, command_merchantopenshop) || - command_add("modifynpcstat", "- Modifys a NPC's stats", 150, command_modifynpcstat) || - command_add("motd", "[new motd] - Set message of the day", 150, command_motd) || - command_add("movechar", "[charname] [zonename] - Move charname to zonename", 50, command_movechar) || - command_add("movement", "Various movement commands", 200, command_movement) || - command_add("myskills", "- Show details about your current skill levels", 0, command_myskills) || - command_add("mysql", "Mysql CLI, see 'help' for options.", 250, command_mysql) || - command_add("mystats", "- Show details about you or your pet", 50, command_mystats) || - command_add("name", "[newname] - Rename your player target", 150, command_name) || - command_add("netstats", "- Gets the network stats for a stream.", 200, command_netstats) || - command_add("network", "- Admin commands for the udp network interface.", 250, command_network) || - command_add("npccast", "[targetname/entityid] [spellid] - Causes NPC target to cast spellid on targetname/entityid", 80, command_npccast) || - command_add("npcedit", "[column] [value] - Mega NPC editing command", 100, command_npcedit) || - command_add("npceditmass", "[name-search] [column] [value] - Mass (Zone wide) NPC data editing command", 100, command_npceditmass) || - command_add("npcemote", "[message] - Make your NPC target emote a message.", 150, command_npcemote) || - command_add("npcloot", "[show/money/add/remove] [itemid/all/money: pp gp sp cp] - Manipulate the loot an NPC is carrying", 80, command_npcloot) || - command_add("npcsay", "[message] - Make your NPC target say a message.", 150, command_npcsay) || - command_add("npcshout", "[message] - Make your NPC target shout a message.", 150, command_npcshout) || - command_add("npcspawn", "[create/add/update/remove/delete] - Manipulate spawn DB", 170, command_npcspawn) || - command_add("npcspecialattk", "[flagchar] [perm] - Set NPC special attack flags. Flags are E(nrage) F(lurry) R(ampage) S(ummon).", 80, command_npcspecialattk) || - command_add("npcstats", "- Show stats about target NPC", 80, command_npcstats) || - command_add("npctype_cache", "[id] or all - Clears the npc type cache for either the id or all npcs.", 250, command_npctype_cache) || - command_add("npctypespawn", "[npctypeid] [factionid] - Spawn an NPC from the db", 10, command_npctypespawn) || - command_add("nudge", "- Nudge your target's current position by specific values", 80, command_nudge) || - command_add("nukebuffs", "- Strip all buffs on you or your target", 50, command_nukebuffs) || - command_add("nukeitem", "[itemid] - Remove itemid from your player target's inventory", 150, command_nukeitem) || - command_add("object", "List|Add|Edit|Move|Rotate|Copy|Save|Undo|Delete - Manipulate static and tradeskill objects within the zone", 100, command_object) || - command_add("oocmute", "[1/0] - Mutes OOC chat", 200, command_oocmute) || - command_add("opcode", "- opcode management", 250, command_opcode) || + command_add("camerashake", "Shakes the camera on everyone's screen globally.", AccountStatus::QuestTroupe, command_camerashake) || + command_add("castspell", "[Spell ID] [Instant (0 = False, 1 = True, Default is 1 if Unused)] - Cast a spell", AccountStatus::Guide, command_castspell) || + command_add("chat", "[channel num] [message] - Send a channel message to all zones", AccountStatus::GMMgmt, command_chat) || + command_add("checklos", "- Check for line of sight to your target", AccountStatus::Guide, command_checklos) || + command_add("copycharacter", "[source_char_name] [dest_char_name] [dest_account_name] Copies character to destination account", AccountStatus::GMImpossible, command_copycharacter) || + command_add("corpse", "- Manipulate corpses, use with no arguments for help", AccountStatus::Guide, command_corpse) || + command_add("corpsefix", "Attempts to bring corpses from underneath the ground within close proximity of the player", AccountStatus::Player, command_corpsefix) || + command_add("cvs", "- Summary of client versions currently online.", AccountStatus::GMMgmt, command_cvs) || + command_add("damage", "[amount] - Damage your target", AccountStatus::GMAdmin, command_damage) || + command_add("databuckets", "View|Delete [key] [limit]- View data buckets, limit 50 default or Delete databucket by key", AccountStatus::QuestTroupe, command_databuckets) || + command_add("date", "[yyyy] [mm] [dd] [HH] [MM] - Set EQ time", AccountStatus::EQSupport, command_date) || + command_add("dbspawn2", "[spawngroup] [respawn] [variance] - Spawn an NPC from a predefined row in the spawn2 table", AccountStatus::GMAdmin, command_dbspawn2) || + command_add("delacct", "[accountname] - Delete an account", AccountStatus::GMLeadAdmin, command_delacct) || + command_add("deletegraveyard", "[zone name] - Deletes the graveyard for the specified zone.", AccountStatus::GMMgmt, command_deletegraveyard) || + command_add("delpetition", "[petition number] - Delete a petition", AccountStatus::ApprenticeGuide, command_delpetition) || + command_add("depop", "- Depop your NPC target", AccountStatus::Guide, command_depop) || + command_add("depopzone", "- Depop the zone", AccountStatus::GMAdmin, command_depopzone) || + command_add("devtools", "- Manages devtools", AccountStatus::GMMgmt, command_devtools) || + command_add("details", "- Change the details of your target (Drakkin Only)", AccountStatus::QuestTroupe, command_details) || + command_add("disablerecipe", "[recipe_id] - Disables a recipe using the recipe id.", AccountStatus::QuestTroupe, command_disablerecipe) || + command_add("disarmtrap", "Analog for ldon disarm trap for the newer clients since we still don't have it working.", AccountStatus::QuestTroupe, command_disarmtrap) || + command_add("distance", "- Reports the distance between you and your target.", AccountStatus::QuestTroupe, command_distance) || + command_add("door", "Door editing command", AccountStatus::QuestTroupe, command_door) || + command_add("doanim", "[animnum] [type] - Send an EmoteAnim for you or your target", AccountStatus::Guide, command_doanim) || + command_add("dye", "[slot|'help'] [red] [green] [blue] [use_tint] - Dyes the specified armor slot to Red, Green, and Blue provided, allows you to bypass darkness limits.", AccountStatus::ApprenticeGuide, command_dye) || + command_add("dz", "Manage expeditions and dynamic zone instances", AccountStatus::QuestTroupe, command_dz) || + command_add("dzkickplayers", "Removes all players from current expedition. (/kickplayers alternative for pre-RoF clients)", AccountStatus::Player, command_dzkickplayers) || + command_add("editmassrespawn", "[name-search] [second-value] - Mass (Zone wide) NPC respawn timer editing command", AccountStatus::GMAdmin, command_editmassrespawn) || + command_add("emote", "['name'/'world'/'zone'] [type] [message] - Send an emote message", AccountStatus::QuestTroupe, command_emote) || + command_add("emotesearch", "Searches NPC Emotes", AccountStatus::QuestTroupe, command_emotesearch) || + command_add("emoteview", "Lists all NPC Emotes", AccountStatus::QuestTroupe, command_emoteview) || + command_add("emptyinventory", "- Clears you or your target's entire inventory (Equipment, General, Bank, and Shared Bank)", AccountStatus::GMImpossible, command_emptyinventory) || + command_add("enablerecipe", "[recipe_id] - Enables a recipe using the recipe id.", AccountStatus::QuestTroupe, command_enablerecipe) || + command_add("endurance", "Restores you or your target's endurance.", AccountStatus::Guide, command_endurance) || + command_add("equipitem", "[slotid(0-21)] - Equip the item on your cursor into the specified slot", AccountStatus::Guide, command_equipitem) || + command_add("face", "- Change the face of your target", AccountStatus::QuestTroupe, command_face) || + command_add("faction", "[Find (criteria | all ) | Review (criteria | all) | Reset (id)] - Resets Player's Faction", AccountStatus::QuestTroupe, command_faction) || + command_add("findaliases", "[search criteria]- Searches for available command aliases, by alias or command", AccountStatus::Player, command_findaliases) || + command_add("findclass", "[search criteria] - Search for a class", AccountStatus::Guide, command_findclass) || + command_add("findfaction", "[search criteria] - Search for a faction", AccountStatus::Guide, command_findfaction) || + command_add("findnpctype", "[search criteria] - Search database NPC types", AccountStatus::GMAdmin, command_findnpctype) || + command_add("findrace", "[search criteria] - Search for a race", AccountStatus::Guide, command_findrace) || + command_add("findskill", "[search criteria] - Search for a skill", AccountStatus::Guide, command_findskill) || + command_add("findspell", "[search criteria] - Search for a spell", AccountStatus::Guide, command_findspell) || + command_add("findtask", "[search criteria] - Search for a task", AccountStatus::Guide, command_findtask) || + command_add("findzone", "[search criteria] - Search database zones", AccountStatus::GMAdmin, command_findzone) || + command_add("fixmob", "[race|gender|texture|helm|face|hair|haircolor|beard|beardcolor|heritage|tattoo|detail] [next|prev] - Manipulate appearance of your target", AccountStatus::QuestTroupe, command_fixmob) || + command_add("flag", "[status] [acctname] - Refresh your admin status, or set an account's admin status if arguments provided", AccountStatus::Player, command_flag) || + command_add("flagedit", "- Edit zone flags on your target", AccountStatus::GMAdmin, command_flagedit) || + command_add("flags", "- displays the flags of you or your target", AccountStatus::Player, command_flags) || + command_add("flymode", "[0/1/2/3/4/5] - Set your or your player target's flymode to ground/flying/levitate/water/floating/levitate_running", AccountStatus::Guide, command_flymode) || + command_add("fov", "- Check wether you're behind or in your target's field of view", AccountStatus::QuestTroupe, command_fov) || + command_add("freeze", "- Freeze your target", AccountStatus::QuestTroupe, command_freeze) || + command_add("gassign", "[id] - Assign targetted NPC to predefined wandering grid id", AccountStatus::GMAdmin, command_gassign) || + command_add("gearup", "Developer tool to quickly equip a character", AccountStatus::GMMgmt, command_gearup) || + command_add("gender", "[0/1/2] - Change your or your target's gender to male/female/neuter", AccountStatus::Guide, command_gender) || + command_add("getplayerburiedcorpsecount", "- Get the target's total number of buried player corpses.", AccountStatus::GMAdmin, command_getplayerburiedcorpsecount) || + command_add("getvariable", "[varname] - Get the value of a variable from the database", AccountStatus::GMMgmt, command_getvariable) || + command_add("ginfo", "- get group info on target.", AccountStatus::ApprenticeGuide, command_ginfo) || + command_add("giveitem", "[itemid] [charges] - Summon an item onto your target's cursor. Charges are optional.", AccountStatus::GMMgmt, command_giveitem) || + command_add("givemoney", "[pp] [gp] [sp] [cp] - Gives specified amount of money to the target player.", AccountStatus::GMMgmt, command_givemoney) || + command_add("globalview", "Lists all qglobals in cache if you were to do a quest with this target.", AccountStatus::QuestTroupe, command_globalview) || + command_add("gm", "- Turn player target's or your GM flag on or off", AccountStatus::QuestTroupe, command_gm) || + command_add("gmspeed", "[on/off] - Turn GM speed hack on/off for you or your player target", AccountStatus::GMAdmin, command_gmspeed) || + command_add("gmzone", "[zone_short_name] [zone_version=0] [identifier=gmzone] - Zones to a private GM instance", AccountStatus::GMAdmin, command_gmzone) || + command_add("goto", "[playername] or [x y z] [h] - Teleport to the provided coordinates or to your target", AccountStatus::Steward, command_goto) || + command_add("grid", "[add/delete] [grid_num] [wandertype] [pausetype] - Create/delete a wandering grid", AccountStatus::GMAreas, command_grid) || + command_add("guild", "- Guild manipulation commands. Use argument help for more info.", AccountStatus::Steward, command_guild) || + command_add("guildapprove", "[guildapproveid] - Approve a guild with specified ID (guild creator receives the id)", AccountStatus::Player, command_guildapprove) || + command_add("guildcreate", "[guildname] - Creates an approval setup for guild name specified", AccountStatus::Player, command_guildcreate) || + command_add("guildlist", "[guildapproveid] - Lists character names who have approved the guild specified by the approve id", AccountStatus::Player, command_guildlist) || + command_add("hair", "- Change the hair style of your target", AccountStatus::QuestTroupe, command_hair) || + command_add("haircolor", "- Change the hair color of your target", AccountStatus::QuestTroupe, command_haircolor) || + command_add("haste", "[percentage] - Set your haste percentage", AccountStatus::GMAdmin, command_haste) || + command_add("hatelist", " - Display hate list for target.", AccountStatus::QuestTroupe, command_hatelist) || + command_add("heal", "- Completely heal your target", AccountStatus::Steward, command_heal) || + command_add("helm", "- Change the helm of your target", AccountStatus::QuestTroupe, command_helm) || + command_add("help", "[search term] - List available commands and their description, specify partial command as argument to search", AccountStatus::Player, command_help) || + command_add("heritage", "- Change the heritage of your target (Drakkin Only)", AccountStatus::QuestTroupe, command_heritage) || + command_add("heromodel", "[hero model] [slot] - Full set of Hero's Forge Armor appearance. If slot is set, sends exact model just to slot.", AccountStatus::GMMgmt, command_heromodel) || + command_add("hideme", "[on/off] - Hide yourself from spawn lists.", AccountStatus::QuestTroupe, command_hideme) || + command_add("hotfix", "[hotfix_name] - Reloads shared memory into a hotfix, equiv to load_shared_memory followed by apply_shared_memory", AccountStatus::GMImpossible, command_hotfix) || + command_add("hp", "- Refresh your HP bar from the server.", AccountStatus::Player, command_hp) || + command_add("incstat", "- Increases or Decreases a client's stats permanently.", AccountStatus::GMMgmt, command_incstat) || + command_add("instance", "- Modify Instances", AccountStatus::GMMgmt, command_instance) || + command_add("interrogateinv", "- use [help] argument for available options", AccountStatus::Player, command_interrogateinv) || + command_add("interrupt", "[message id] [color] - Interrupt your casting. Arguments are optional.", AccountStatus::Guide, command_interrupt) || + command_add("invsnapshot", "- Manipulates inventory snapshots for your current target", AccountStatus::QuestTroupe, command_invsnapshot) || + command_add("invul", "[on/off] - Turn player target's or your invulnerable flag on or off", AccountStatus::QuestTroupe, command_invul) || + command_add("ipban", "[IP address] - Ban IP by character name", AccountStatus::GMMgmt, command_ipban) || + command_add("iplookup", "[charname] - Look up IP address of charname", AccountStatus::GMMgmt, command_iplookup) || + command_add("iteminfo", "- Get information about the item on your cursor", AccountStatus::Steward, command_iteminfo) || + command_add("itemsearch", "[search criteria] - Search for an item", AccountStatus::Steward, command_itemsearch) || + command_add("kick", "[charname] - Disconnect charname", AccountStatus::GMLeadAdmin, command_kick) || + command_add("kill", "- Kill your target", AccountStatus::GMAdmin, command_kill) || + command_add("killallnpcs", " [npc_name] Kills all npcs by search name, leave blank for all attackable NPC's", AccountStatus::GMMgmt, command_killallnpcs) || + command_add("lastname", "[new lastname] - Set your or your player target's lastname", AccountStatus::Guide, command_lastname) || + command_add("level", "[level] - Set your or your target's level", AccountStatus::Steward, command_level) || + command_add("list", "[npcs|players|corpses|doors|objects] [search] - Search entities", AccountStatus::ApprenticeGuide, command_list) || + command_add("listpetition", "- List petitions", AccountStatus::Guide, command_listpetition) || + command_add("load_shared_memory", "[shared_memory_name] - Reloads shared memory and uses the input as output", AccountStatus::GMImpossible, command_load_shared_memory) || + command_add("loc", "- Print out your or your target's current location and heading", AccountStatus::Player, command_loc) || + command_add("lock", "- Lock the worldserver", AccountStatus::GMLeadAdmin, command_lock) || + command_add("logs", "Manage anything to do with logs", AccountStatus::GMImpossible, command_logs) || + command_add("makepet", "[level] [class] [race] [texture] - Make a pet", AccountStatus::Guide, command_makepet) || + command_add("mana", "- Fill your or your target's mana", AccountStatus::Guide, command_mana) || + command_add("maxskills", "Maxes skills for you.", AccountStatus::GMMgmt, command_max_all_skills) || + command_add("memspell", "[slotid] [spellid] - Memorize spellid in the specified slot", AccountStatus::Guide, command_memspell) || + command_add("merchant_close_shop", "Closes a merchant shop", AccountStatus::GMAdmin, command_merchantcloseshop) || + command_add("merchant_open_shop", "Opens a merchants shop", AccountStatus::GMAdmin, command_merchantopenshop) || + command_add("modifynpcstat", "- Modifys a NPC's stats", AccountStatus::GMLeadAdmin, command_modifynpcstat) || + command_add("motd", "[new motd] - Set message of the day", AccountStatus::GMLeadAdmin, command_motd) || + command_add("movechar", "[charname] [zonename] - Move charname to zonename", AccountStatus::Guide, command_movechar) || + command_add("movement", "Various movement commands", AccountStatus::GMMgmt, command_movement) || + command_add("myskills", "- Show details about your current skill levels", AccountStatus::Player, command_myskills) || + command_add("mysql", "Mysql CLI, see 'help' for options.", AccountStatus::GMImpossible, command_mysql) || + command_add("mystats", "- Show details about you or your pet", AccountStatus::Guide, command_mystats) || + command_add("name", "[newname] - Rename your player target", AccountStatus::GMLeadAdmin, command_name) || + command_add("netstats", "- Gets the network stats for a stream.", AccountStatus::GMMgmt, command_netstats) || + command_add("network", "- Admin commands for the udp network interface.", AccountStatus::GMImpossible, command_network) || + command_add("npccast", "[targetname/entityid] [spellid] - Causes NPC target to cast spellid on targetname/entityid", AccountStatus::QuestTroupe, command_npccast) || + command_add("npcedit", "[column] [value] - Mega NPC editing command", AccountStatus::GMAdmin, command_npcedit) || + command_add("npceditmass", "[name-search] [column] [value] - Mass (Zone wide) NPC data editing command", AccountStatus::GMAdmin, command_npceditmass) || + command_add("npcemote", "[message] - Make your NPC target emote a message.", AccountStatus::GMLeadAdmin, command_npcemote) || + command_add("npcloot", "[show/money/add/remove] [itemid/all/money: pp gp sp cp] - Manipulate the loot an NPC is carrying", AccountStatus::QuestTroupe, command_npcloot) || + command_add("npcsay", "[message] - Make your NPC target say a message.", AccountStatus::GMLeadAdmin, command_npcsay) || + command_add("npcshout", "[message] - Make your NPC target shout a message.", AccountStatus::GMLeadAdmin, command_npcshout) || + command_add("npcspawn", "[create/add/update/remove/delete] - Manipulate spawn DB", AccountStatus::GMAreas, command_npcspawn) || + command_add("npcspecialattk", "[flagchar] [perm] - Set NPC special attack flags. Flags are E(nrage) F(lurry) R(ampage) S(ummon).", AccountStatus::QuestTroupe, command_npcspecialattk) || + command_add("npcstats", "- Show stats about target NPC", AccountStatus::QuestTroupe, command_npcstats) || + command_add("npctype_cache", "[id] or all - Clears the npc type cache for either the id or all npcs.", AccountStatus::GMImpossible, command_npctype_cache) || + command_add("npctypespawn", "[npctypeid] [factionid] - Spawn an NPC from the db", AccountStatus::Steward, command_npctypespawn) || + command_add("nudge", "- Nudge your target's current position by specific values", AccountStatus::QuestTroupe, command_nudge) || + command_add("nukebuffs", "- Strip all buffs on you or your target", AccountStatus::Guide, command_nukebuffs) || + command_add("nukeitem", "[itemid] - Remove itemid from your player target's inventory", AccountStatus::GMLeadAdmin, command_nukeitem) || + command_add("object", "List|Add|Edit|Move|Rotate|Copy|Save|Undo|Delete - Manipulate static and tradeskill objects within the zone", AccountStatus::GMAdmin, command_object) || + command_add("oocmute", "[1/0] - Mutes OOC chat", AccountStatus::GMMgmt, command_oocmute) || + command_add("opcode", "- opcode management", AccountStatus::GMImpossible, command_opcode) || #ifdef PACKET_PROFILER - command_add("packetprofile", "- Dump packet profile for target or self.", 250, command_packetprofile) || + command_add("packetprofile", "- Dump packet profile for target or self.", AccountStatus::GMImpossible, command_packetprofile) || #endif - command_add("path", "- view and edit pathing", 200, command_path) || - command_add("peekinv", "[equip/gen/cursor/poss/limbo/curlim/trib/bank/shbank/allbank/trade/world/all] - Print out contents of your player target's inventory", 100, command_peekinv) || - command_add("peqzone", "[zonename] - Go to specified zone, if you have > 75% health", 0, command_peqzone) || - command_add("permaclass", "[classnum] - Change your or your player target's class (target is disconnected)", 80, command_permaclass) || - command_add("permagender", "[gendernum] - Change your or your player target's gender (zone to take effect)", 80, command_permagender) || - command_add("permarace", "[racenum] - Change your or your player target's race (zone to take effect)", 80, command_permarace) || - command_add("petitioninfo", "[petition number] - Get info about a petition", 20, command_petitioninfo) || - command_add("pf", "- Display additional mob coordinate and wandering data", 0, command_pf) || - command_add("picklock", "Analog for ldon pick lock for the newer clients since we still don't have it working.", 0, command_picklock) || - command_add("profanity", "Manage censored language.", 150, command_profanity) || + command_add("path", "- view and edit pathing", AccountStatus::GMMgmt, command_path) || + command_add("peekinv", "[equip/gen/cursor/poss/limbo/curlim/trib/bank/shbank/allbank/trade/world/all] - Print out contents of your player target's inventory", AccountStatus::GMAdmin, command_peekinv) || + command_add("peqzone", "[zonename] - Go to specified zone, if you have > 75% health", AccountStatus::Player, command_peqzone) || + command_add("permaclass", "[classnum] - Change your or your player target's class (target is disconnected)", AccountStatus::QuestTroupe, command_permaclass) || + command_add("permagender", "[gendernum] - Change your or your player target's gender (zone to take effect)", AccountStatus::QuestTroupe, command_permagender) || + command_add("permarace", "[racenum] - Change your or your player target's race (zone to take effect)", AccountStatus::QuestTroupe, command_permarace) || + command_add("petitioninfo", "[petition number] - Get info about a petition", AccountStatus::ApprenticeGuide, command_petitioninfo) || + command_add("pf", "- Display additional mob coordinate and wandering data", AccountStatus::Player, command_pf) || + command_add("picklock", "Analog for ldon pick lock for the newer clients since we still don't have it working.", AccountStatus::Player, command_picklock) || + command_add("profanity", "Manage censored language.", AccountStatus::GMLeadAdmin, command_profanity) || #ifdef EQPROFILE - command_add("profiledump", "- Dump profiling info to logs", 250, command_profiledump) || - command_add("profilereset", "- Reset profiling info", 250, command_profilereset) || + command_add("profiledump", "- Dump profiling info to logs", AccountStatus::GMImpossible, command_profiledump) || + command_add("profilereset", "- Reset profiling info", AccountStatus::GMImpossible, command_profilereset) || #endif - command_add("push", "Lets you do spell push", 150, command_push) || - command_add("proximity", "Shows NPC proximity", 150, command_proximity) || - command_add("pvp", "[on/off] - Set your or your player target's PVP status", 100, command_pvp) || - command_add("qglobal", "[on/off/view] - Toggles qglobal functionality on an NPC", 100, command_qglobal) || - command_add("questerrors", "Shows quest errors.", 100, command_questerrors) || - command_add("race", "[racenum] - Change your or your target's race. Use racenum 0 to return to normal", 50, command_race) || - command_add("raidloot", "[All|GroupLeader|RaidLeader|Selected] - Sets your Raid Loot Type if you have permission to do so.", 0, command_raidloot) || - command_add("randomfeatures", "- Temporarily randomizes the Facial Features of your target", 80, command_randomfeatures) || - command_add("refreshgroup", "- Refreshes Group.", 0, command_refreshgroup) || - command_add("reloadaa", "Reloads AA data", 200, command_reloadaa) || - command_add("reloadallrules", "Executes a reload of all rules.", 80, command_reloadallrules) || - command_add("reloademote", "Reloads NPC Emotes", 80, command_reloademote) || - command_add("reloadlevelmods", nullptr, 255, command_reloadlevelmods) || - command_add("reloadmerchants", nullptr, 255, command_reloadmerchants) || - command_add("reloadperlexportsettings", nullptr, 255, command_reloadperlexportsettings) || - command_add("reloadqst", " - Clear quest cache (any argument causes it to also stop all timers)", 150, command_reloadqst) || - command_add("reloadrulesworld", "Executes a reload of all rules in world specifically.", 80, command_reloadworldrules) || - command_add("reloadstatic", "- Reload Static Zone Data", 150, command_reloadstatic) || - command_add("reloadtraps", "- Repops all traps in the current zone.", 80, command_reloadtraps) || - command_add("reloadtitles", "- Reload player titles from the database", 150, command_reloadtitles) || - command_add("reloadworld", "[0|1] - Clear quest cache (0 - no repop, 1 - repop)", 255, command_reloadworld) || - command_add("reloadzps", "- Reload zone points from database", 150, command_reloadzps) || - command_add("repop", "[delay] - Repop the zone with optional delay", 100, command_repop) || - command_add("resetaa", "- Resets a Player's AA in their profile and refunds spent AA's to unspent, may disconnect player.", 200, command_resetaa) || - command_add("resetaa_timer", "Command to reset AA cooldown timers.", 200, command_resetaa_timer) || - command_add("resetdisc_timer", "Command to reset all discipline cooldown timers.", 200, command_resetdisc_timer) || - command_add("revoke", "[charname] [1/0] - Makes charname unable to talk on OOC", 200, command_revoke) || - command_add("roambox", "Manages roambox settings for an NPC", 200, command_roambox) || - command_add("rules", "(subcommand) - Manage server rules", 250, command_rules) || - command_add("save", "- Force your player or player corpse target to be saved to the database", 50, command_save) || - command_add("scale", "- Handles npc scaling", 150, command_scale) || - command_add("scribespell", "[spellid] - Scribe specified spell in your target's spell book.", 180, command_scribespell) || - command_add("scribespells", "[max level] [min level] - Scribe all spells for you or your player target that are usable by them, up to level specified. (may freeze client for a few seconds)", 150, command_scribespells) || - command_add("sendzonespawns", "- Refresh spawn list for all clients in zone", 150, command_sendzonespawns) || - command_add("sensetrap", "Analog for ldon sense trap for the newer clients since we still don't have it working.", 0, command_sensetrap) || - command_add("serverinfo", "- Get OS info about server host", 200, command_serverinfo) || - command_add("serverrules", "- Read this server's rules", 0, command_serverrules) || - command_add("setaapts", "[AA|Group|Raid] [AA Amount] - Set your or your player target's Available AA Points by Type", 100, command_setaapts) || - command_add("setaaxp", "[AA|Group|Raid] [AA Experience] - Set your or your player target's AA Experience by Type", 100, command_setaaxp) || - command_add("setadventurepoints", "- Set your or your player target's available adventure points", 150, command_set_adventure_points) || - command_add("setanim", "[animnum] - Set target's appearance to animnum", 200, command_setanim) || - command_add("setcrystals", "[value] - Set your or your player target's available radiant or ebon crystals", 100, command_setcrystals) || - command_add("setfaction", "[faction number] - Sets targeted NPC's faction in the database", 170, command_setfaction) || - command_add("setgraveyard", "[zone name] - Creates a graveyard for the specified zone based on your target's LOC.", 200, command_setgraveyard) || - command_add("setlanguage", "[language ID] [value] - Set your target's language skillnum to value", 50, command_setlanguage) || - command_add("setlsinfo", "[email] [password] - Set login server email address and password (if supported by login server)", 10, command_setlsinfo) || - command_add("setpass", "[accountname] [password] - Set local password for accountname", 150, command_setpass) || - command_add("setpvppoints", "[Amount] - Set your or your player target's PVP points", 100, command_setpvppoints) || - command_add("setskill", "[skillnum] [value] - Set your target's skill skillnum to value", 50, command_setskill) || - command_add("setskillall", "[value] - Set all of your target's skills to value", 50, command_setskillall) || - command_add("setstartzone", "[zoneid] - Set target's starting zone. Set to zero to allow the player to use /setstartcity", 80, command_setstartzone) || - command_add("setstat", "- Sets the stats to a specific value.", 255, command_setstat) || - command_add("setxp", "[value] - Set your or your player target's experience", 100, command_setxp) || - command_add("showbonusstats", "[item|spell|all] Shows bonus stats for target from items or spells. Shows both by default.", 50, command_showbonusstats) || - command_add("showbuffs", "- List buffs active on your target or you if no target", 50, command_showbuffs) || - command_add("shownumhits", "Shows buffs numhits for yourself.", 0, command_shownumhits) || - command_add("shownpcgloballoot", "Show GlobalLoot entires on this npc", 50, command_shownpcgloballoot) || - command_add("showskills", "- Show the values of your or your player target's skills", 50, command_showskills) || - command_add("showspellslist", "Shows spell list of targeted NPC", 100, command_showspellslist) || - command_add("showstats", "- Show details about you or your target", 50, command_showstats) || - command_add("showzonegloballoot", "Show GlobalLoot entires on this zone", 50, command_showzonegloballoot) || - command_add("showzonepoints", "Show zone points for current zone", 50, command_showzonepoints) || - command_add("shutdown", "- Shut this zone process down", 150, command_shutdown) || - command_add("size", "[size] - Change size of you or your target", 50, command_size) || - command_add("spawn", "[name] [race] [level] [material] [hp] [gender] [class] [priweapon] [secweapon] [merchantid] - Spawn an NPC", 10, command_spawn) || - command_add("spawneditmass", "Mass editing spawn command", 150, command_spawneditmass) || - command_add("spawnfix", "- Find targeted NPC in database based on its X/Y/heading and update the database to make it spawn at your current location/heading.", 170, command_spawnfix) || - command_add("spawnstatus", "- Show respawn timer status", 100, command_spawnstatus) || - command_add("spellinfo", "[spellid] - Get detailed info about a spell", 10, command_spellinfo) || - command_add("stun", "[duration] - Stuns you or your target for duration", 100, command_stun) || - command_add("summon", "[charname] - Summons your player/npc/corpse target, or charname if specified", 80, command_summon) || - command_add("summonburiedplayercorpse", "- Summons the target's oldest buried corpse, if any exist.", 100, command_summonburiedplayercorpse) || - command_add("summonitem", "[itemid] [charges] - Summon an item onto your cursor. Charges are optional.", 200, command_summonitem) || - command_add("suspend", "[name] [days] [reason] - Suspend by character name and for specificed number of days", 150, command_suspend) || - command_add("task", "(subcommand) - Task system commands", 150, command_task) || - command_add("tattoo", "- Change the tattoo of your target (Drakkin Only)", 80, command_tattoo) || - command_add("tempname", "[newname] - Temporarily renames your target. Leave name blank to restore the original name.", 100, command_tempname) || - command_add("petname", "[newname] - Temporarily renames your pet. Leave name blank to restore the original name.", 100, command_petname) || - command_add("texture", "[texture] [helmtexture] - Change your or your target's appearance, use 255 to show equipment", 10, command_texture) || - command_add("time", "[HH] [MM] - Set EQ time", 90, command_time) || - command_add("timers", "- Display persistent timers for target", 200, command_timers) || - command_add("timezone", "[HH] [MM] - Set timezone. Minutes are optional", 90, command_timezone) || - command_add("title", "[text] [1 = create title table row] - Set your or your player target's title", 50, command_title) || - command_add("titlesuffix", "[text] [1 = create title table row] - Set your or your player target's title suffix", 50, command_titlesuffix) || - command_add("traindisc", "[level] - Trains all the disciplines usable by the target, up to level specified. (may freeze client for a few seconds)", 150, command_traindisc) || - command_add("trapinfo", "- Gets infomation about the traps currently spawned in the zone.", 81, command_trapinfo) || - command_add("tune", "Calculate statistical values related to combat.", 100, command_tune) || - command_add("ucs", "- Attempts to reconnect to the UCS server", 0, command_ucs) || - command_add("undyeme", "- Remove dye from all of your armor slots", 0, command_undyeme) || - command_add("unfreeze", "- Unfreeze your target", 80, command_unfreeze) || - command_add("unlock", "- Unlock the worldserver", 150, command_unlock) || - command_add("unscribespell", "[spellid] - Unscribe specified spell from your target's spell book.", 180, command_unscribespell) || - command_add("unscribespells", "- Clear out your or your player target's spell book.", 180, command_unscribespells) || - command_add("untraindisc", "[spellid] - Untrain specified discipline from your target.", 180, command_untraindisc) || - command_add("untraindiscs", "- Untrains all disciplines from your target.", 180, command_untraindiscs) || - command_add("uptime", "[zone server id] - Get uptime of worldserver, or zone server if argument provided", 10, command_uptime) || - command_add("version", "- Display current version of EQEmu server", 0, command_version) || - command_add("viewnpctype", "[NPC ID] - Show stats for an NPC by NPC ID", 100, command_viewnpctype) || - command_add("viewpetition", "[petition number] - View a petition", 20, command_viewpetition) || - command_add("viewzoneloot", "[item id] - Allows you to search a zone's loot for a specific item ID. (0 shows all loot in the zone)", 80, command_viewzoneloot) || - command_add("wc", "[wear slot] [material] - Sends an OP_WearChange for your target", 200, command_wc) || - command_add("weather", "[0/1/2/3] (Off/Rain/Snow/Manual) - Change the weather", 80, command_weather) || - command_add("who", "[search]", 20, command_who) || - command_add("worldshutdown", "- Shut down world and all zones", 200, command_worldshutdown) || - command_add("wp", "[add|delete] [grid_id] [pause] [waypoint_id] [-h] - Add or delete a waypoint by grid ID. (-h to use current heading)", 170, command_wp) || - command_add("wpadd", "[pause] [-h] - Add your current location as a waypoint to your NPC target's AI path. (-h to use current heading)", 170, command_wpadd) || - command_add("wpinfo", "- Show waypoint info about your NPC target", 170, command_wpinfo) || - command_add("worldwide", "Performs world-wide GM functions such as cast (can be extended for other commands). Use caution", 250, command_worldwide) || - command_add("xtargets", "Show your targets Extended Targets and optionally set how many xtargets they can have.", 250, command_xtargets) || - command_add("zclip", "[min] [max] - modifies and resends zhdr packet", 80, command_zclip) || - command_add("zcolor", "[red] [green] [blue] - Change sky color", 80, command_zcolor) || - command_add("zheader", "[zonename] - Load zheader for zonename from the database", 80, command_zheader) || - command_add("zone", "[zonename] [x] [y] [z] - Go to specified zone (coords optional)", 50, command_zone) || - command_add("zonebootup", "[ZoneServerID] [shortname] - Make a zone server boot a specific zone", 150, command_zonebootup) || - command_add("zoneinstance", "[instanceid] [x] [y] [z] - Go to specified instance zone (coords optional)", 50, command_zone_instance) || - command_add("zonelock", "[List|Lock|Unlock] [Zone ID|Zone Short Name] - Set or get lock status of a Zone by ID or Short Name", 100, command_zonelock) || - command_add("zoneshutdown", "[shortname] - Shut down a zone server", 150, command_zoneshutdown) || - command_add("zonespawn", "- Not implemented", 250, command_zonespawn) || - command_add("zonestatus", "- Show connected zoneservers, synonymous with /servers", 150, command_zonestatus) || - command_add("zopp", "Troubleshooting command - Sends a fake item packet to you. No server reference is created.", 250, command_zopp) || - command_add("zsafecoords", "[x] [y] [z] - Set safe coords", 80, command_zsafecoords) || - command_add("zsave", " - Saves zheader to the database", 80, command_zsave) || - command_add("zsky", "[skytype] - Change zone sky type", 80, command_zsky) || - command_add("zstats", "- Show info about zone header", 80, command_zstats) || - command_add("zunderworld", "[zcoord] - Sets the underworld using zcoord", 80, command_zunderworld) || - command_add("zuwcoords", "[z coord] - Set underworld coord", 80, command_zuwcoords) + command_add("push", "Lets you do spell push", AccountStatus::GMLeadAdmin, command_push) || + command_add("proximity", "Shows NPC proximity", AccountStatus::GMLeadAdmin, command_proximity) || + command_add("pvp", "[on/off] - Set your or your player target's PVP status", AccountStatus::GMAdmin, command_pvp) || + command_add("qglobal", "[on/off/view] - Toggles qglobal functionality on an NPC", AccountStatus::GMAdmin, command_qglobal) || + command_add("questerrors", "Shows quest errors.", AccountStatus::GMAdmin, command_questerrors) || + command_add("race", "[racenum] - Change your or your target's race. Use racenum 0 to return to normal", AccountStatus::Guide, command_race) || + command_add("raidloot", "[All|GroupLeader|RaidLeader|Selected] - Sets your Raid Loot Type if you have permission to do so.", AccountStatus::Player, command_raidloot) || + command_add("randomfeatures", "- Temporarily randomizes the Facial Features of your target", AccountStatus::QuestTroupe, command_randomfeatures) || + command_add("refreshgroup", "- Refreshes Group.", AccountStatus::Player, command_refreshgroup) || + command_add("reloadaa", "Reloads AA data", AccountStatus::GMMgmt, command_reloadaa) || + command_add("reloadallrules", "Executes a reload of all rules.", AccountStatus::QuestTroupe, command_reloadallrules) || + command_add("reloademote", "Reloads NPC Emotes", AccountStatus::QuestTroupe, command_reloademote) || + command_add("reloadlevelmods", nullptr, AccountStatus::Max, command_reloadlevelmods) || + command_add("reloadmerchants", nullptr, AccountStatus::Max, command_reloadmerchants) || + command_add("reloadperlexportsettings", nullptr, AccountStatus::Max, command_reloadperlexportsettings) || + command_add("reloadqst", " - Clear quest cache (any argument causes it to also stop all timers)", AccountStatus::GMLeadAdmin, command_reloadqst) || + command_add("reloadrulesworld", "Executes a reload of all rules in world specifically.", AccountStatus::QuestTroupe, command_reloadworldrules) || + command_add("reloadstatic", "- Reload Static Zone Data", AccountStatus::GMLeadAdmin, command_reloadstatic) || + command_add("reloadtraps", "- Repops all traps in the current zone.", AccountStatus::QuestTroupe, command_reloadtraps) || + command_add("reloadtitles", "- Reload player titles from the database", AccountStatus::GMLeadAdmin, command_reloadtitles) || + command_add("reloadworld", "[0|1] - Clear quest cache (0 - no repop, 1 - repop)", AccountStatus::Max, command_reloadworld) || + command_add("reloadzps", "- Reload zone points from database", AccountStatus::GMLeadAdmin, command_reloadzps) || + command_add("repop", "[delay] - Repop the zone with optional delay", AccountStatus::GMAdmin, command_repop) || + command_add("resetaa", "- Resets a Player's AA in their profile and refunds spent AA's to unspent, may disconnect player.", AccountStatus::GMMgmt, command_resetaa) || + command_add("resetaa_timer", "Command to reset AA cooldown timers.", AccountStatus::GMMgmt, command_resetaa_timer) || + command_add("resetdisc_timer", "Command to reset all discipline cooldown timers.", AccountStatus::GMMgmt, command_resetdisc_timer) || + command_add("revoke", "[charname] [1/0] - Makes charname unable to talk on OOC", AccountStatus::GMMgmt, command_revoke) || + command_add("roambox", "Manages roambox settings for an NPC", AccountStatus::GMMgmt, command_roambox) || + command_add("rules", "(subcommand) - Manage server rules", AccountStatus::GMImpossible, command_rules) || + command_add("save", "- Force your player or player corpse target to be saved to the database", AccountStatus::Guide, command_save) || + command_add("scale", "- Handles npc scaling", AccountStatus::GMLeadAdmin, command_scale) || + command_add("scribespell", "[spellid] - Scribe specified spell in your target's spell book.", AccountStatus::GMCoder, command_scribespell) || + command_add("scribespells", "[max level] [min level] - Scribe all spells for you or your player target that are usable by them, up to level specified. (may freeze client for a few seconds)", AccountStatus::GMLeadAdmin, command_scribespells) || + command_add("sendzonespawns", "- Refresh spawn list for all clients in zone", AccountStatus::GMLeadAdmin, command_sendzonespawns) || + command_add("sensetrap", "Analog for ldon sense trap for the newer clients since we still don't have it working.", AccountStatus::Player, command_sensetrap) || + command_add("serverinfo", "- Get OS info about server host", AccountStatus::GMMgmt, command_serverinfo) || + command_add("serverrules", "- Read this server's rules", AccountStatus::Player, command_serverrules) || + command_add("setaapts", "[AA|Group|Raid] [AA Amount] - Set your or your player target's Available AA Points by Type", AccountStatus::GMAdmin, command_setaapts) || + command_add("setaaxp", "[AA|Group|Raid] [AA Experience] - Set your or your player target's AA Experience by Type", AccountStatus::GMAdmin, command_setaaxp) || + command_add("setadventurepoints", "- Set your or your player target's available adventure points", AccountStatus::GMLeadAdmin, command_set_adventure_points) || + command_add("setanim", "[animnum] - Set target's appearance to animnum", AccountStatus::GMMgmt, command_setanim) || + command_add("setcrystals", "[value] - Set your or your player target's available radiant or ebon crystals", AccountStatus::GMAdmin, command_setcrystals) || + command_add("setfaction", "[faction number] - Sets targeted NPC's faction in the database", AccountStatus::GMAreas, command_setfaction) || + command_add("setgraveyard", "[zone name] - Creates a graveyard for the specified zone based on your target's LOC.", AccountStatus::GMMgmt, command_setgraveyard) || + command_add("setlanguage", "[language ID] [value] - Set your target's language skillnum to value", AccountStatus::Guide, command_setlanguage) || + command_add("setlsinfo", "[email] [password] - Set login server email address and password (if supported by login server)", AccountStatus::Steward, command_setlsinfo) || + command_add("setpass", "[accountname] [password] - Set local password for accountname", AccountStatus::GMLeadAdmin, command_setpass) || + command_add("setpvppoints", "[Amount] - Set your or your player target's PVP points", AccountStatus::GMAdmin, command_setpvppoints) || + command_add("setskill", "[skillnum] [value] - Set your target's skill skillnum to value", AccountStatus::Guide, command_setskill) || + command_add("setskillall", "[value] - Set all of your target's skills to value", AccountStatus::Guide, command_setskillall) || + command_add("setstartzone", "[zoneid] - Set target's starting zone. Set to zero to allow the player to use /setstartcity", AccountStatus::QuestTroupe, command_setstartzone) || + command_add("setstat", "- Sets the stats to a specific value.", AccountStatus::Max, command_setstat) || + command_add("setxp", "[value] - Set your or your player target's experience", AccountStatus::GMAdmin, command_setxp) || + command_add("showbonusstats", "[item|spell|all] Shows bonus stats for target from items or spells. Shows both by default.", AccountStatus::Guide, command_showbonusstats) || + command_add("showbuffs", "- List buffs active on your target or you if no target", AccountStatus::Guide, command_showbuffs) || + command_add("shownumhits", "Shows buffs numhits for yourself.", AccountStatus::Player, command_shownumhits) || + command_add("shownpcgloballoot", "Show GlobalLoot entires on this npc", AccountStatus::Guide, command_shownpcgloballoot) || + command_add("showskills", "- Show the values of your or your player target's skills", AccountStatus::Guide, command_showskills) || + command_add("showspellslist", "Shows spell list of targeted NPC", AccountStatus::GMAdmin, command_showspellslist) || + command_add("showstats", "- Show details about you or your target", AccountStatus::Guide, command_showstats) || + command_add("showzonegloballoot", "Show GlobalLoot entires on this zone", AccountStatus::Guide, command_showzonegloballoot) || + command_add("showzonepoints", "Show zone points for current zone", AccountStatus::Guide, command_showzonepoints) || + command_add("shutdown", "- Shut this zone process down", AccountStatus::GMLeadAdmin, command_shutdown) || + command_add("size", "[size] - Change size of you or your target", AccountStatus::Guide, command_size) || + command_add("spawn", "[name] [race] [level] [material] [hp] [gender] [class] [priweapon] [secweapon] [merchantid] - Spawn an NPC", AccountStatus::Steward, command_spawn) || + command_add("spawneditmass", "Mass editing spawn command", AccountStatus::GMLeadAdmin, command_spawneditmass) || + command_add("spawnfix", "- Find targeted NPC in database based on its X/Y/heading and update the database to make it spawn at your current location/heading.", AccountStatus::GMAreas, command_spawnfix) || + command_add("spawnstatus", "- Show respawn timer status", AccountStatus::GMAdmin, command_spawnstatus) || + command_add("spellinfo", "[spellid] - Get detailed info about a spell", AccountStatus::Steward, command_spellinfo) || + command_add("stun", "[duration] - Stuns you or your target for duration", AccountStatus::GMAdmin, command_stun) || + command_add("summon", "[charname] - Summons your player/npc/corpse target, or charname if specified", AccountStatus::QuestTroupe, command_summon) || + command_add("summonburiedplayercorpse", "- Summons the target's oldest buried corpse, if any exist.", AccountStatus::GMAdmin, command_summonburiedplayercorpse) || + command_add("summonitem", "[itemid] [charges] - Summon an item onto your cursor. Charges are optional.", AccountStatus::GMMgmt, command_summonitem) || + command_add("suspend", "[name] [days] [reason] - Suspend by character name and for specificed number of days", AccountStatus::GMLeadAdmin, command_suspend) || + command_add("task", "(subcommand) - Task system commands", AccountStatus::GMLeadAdmin, command_task) || + command_add("tattoo", "- Change the tattoo of your target (Drakkin Only)", AccountStatus::QuestTroupe, command_tattoo) || + command_add("tempname", "[newname] - Temporarily renames your target. Leave name blank to restore the original name.", AccountStatus::GMAdmin, command_tempname) || + command_add("petname", "[newname] - Temporarily renames your pet. Leave name blank to restore the original name.", AccountStatus::GMAdmin, command_petname) || + command_add("texture", "[texture] [helmtexture] - Change your or your target's appearance, use 255 to show equipment", AccountStatus::Steward, command_texture) || + command_add("time", "[HH] [MM] - Set EQ time", AccountStatus::EQSupport, command_time) || + command_add("timers", "- Display persistent timers for target", AccountStatus::GMMgmt, command_timers) || + command_add("timezone", "[HH] [MM] - Set timezone. Minutes are optional", AccountStatus::EQSupport, command_timezone) || + command_add("title", "[text] [1 = create title table row] - Set your or your player target's title", AccountStatus::Guide, command_title) || + command_add("titlesuffix", "[text] [1 = create title table row] - Set your or your player target's title suffix", AccountStatus::Guide, command_titlesuffix) || + command_add("traindisc", "[level] - Trains all the disciplines usable by the target, up to level specified. (may freeze client for a few seconds)", AccountStatus::GMLeadAdmin, command_traindisc) || + command_add("trapinfo", "- Gets infomation about the traps currently spawned in the zone.", AccountStatus::QuestTroupe, command_trapinfo) || + command_add("tune", "Calculate statistical values related to combat.", AccountStatus::GMAdmin, command_tune) || + command_add("ucs", "- Attempts to reconnect to the UCS server", AccountStatus::Player, command_ucs) || + command_add("undyeme", "- Remove dye from all of your armor slots", AccountStatus::Player, command_undyeme) || + command_add("unfreeze", "- Unfreeze your target", AccountStatus::QuestTroupe, command_unfreeze) || + command_add("unlock", "- Unlock the worldserver", AccountStatus::GMLeadAdmin, command_unlock) || + command_add("unscribespell", "[spellid] - Unscribe specified spell from your target's spell book.", AccountStatus::GMCoder, command_unscribespell) || + command_add("unscribespells", "- Clear out your or your player target's spell book.", AccountStatus::GMCoder, command_unscribespells) || + command_add("untraindisc", "[spellid] - Untrain specified discipline from your target.", AccountStatus::GMCoder, command_untraindisc) || + command_add("untraindiscs", "- Untrains all disciplines from your target.", AccountStatus::GMCoder, command_untraindiscs) || + command_add("uptime", "[zone server id] - Get uptime of worldserver, or zone server if argument provided", AccountStatus::Steward, command_uptime) || + command_add("version", "- Display current version of EQEmu server", AccountStatus::Player, command_version) || + command_add("viewnpctype", "[NPC ID] - Show stats for an NPC by NPC ID", AccountStatus::GMAdmin, command_viewnpctype) || + command_add("viewpetition", "[petition number] - View a petition", AccountStatus::ApprenticeGuide, command_viewpetition) || + command_add("viewzoneloot", "[item id] - Allows you to search a zone's loot for a specific item ID. (0 shows all loot in the zone)", AccountStatus::QuestTroupe, command_viewzoneloot) || + command_add("wc", "[wear slot] [material] - Sends an OP_WearChange for your target", AccountStatus::GMMgmt, command_wc) || + command_add("weather", "[0/1/2/3] (Off/Rain/Snow/Manual) - Change the weather", AccountStatus::QuestTroupe, command_weather) || + command_add("who", "[search]", AccountStatus::ApprenticeGuide, command_who) || + command_add("worldshutdown", "- Shut down world and all zones", AccountStatus::GMMgmt, command_worldshutdown) || + command_add("wp", "[add|delete] [grid_id] [pause] [waypoint_id] [-h] - Add or delete a waypoint by grid ID. (-h to use current heading)", AccountStatus::GMAreas, command_wp) || + command_add("wpadd", "[pause] [-h] - Add your current location as a waypoint to your NPC target's AI path. (-h to use current heading)", AccountStatus::GMAreas, command_wpadd) || + command_add("wpinfo", "- Show waypoint info about your NPC target", AccountStatus::GMAreas, command_wpinfo) || + command_add("worldwide", "Performs world-wide GM functions such as cast (can be extended for other commands). Use caution", AccountStatus::GMImpossible, command_worldwide) || + command_add("xtargets", "Show your targets Extended Targets and optionally set how many xtargets they can have.", AccountStatus::GMImpossible, command_xtargets) || + command_add("zclip", "[min] [max] - modifies and resends zhdr packet", AccountStatus::QuestTroupe, command_zclip) || + command_add("zcolor", "[red] [green] [blue] - Change sky color", AccountStatus::QuestTroupe, command_zcolor) || + command_add("zheader", "[zonename] - Load zheader for zonename from the database", AccountStatus::QuestTroupe, command_zheader) || + command_add("zone", "[zonename] [x] [y] [z] - Go to specified zone (coords optional)", AccountStatus::Guide, command_zone) || + command_add("zonebootup", "[ZoneServerID] [shortname] - Make a zone server boot a specific zone", AccountStatus::GMLeadAdmin, command_zonebootup) || + command_add("zoneinstance", "[instanceid] [x] [y] [z] - Go to specified instance zone (coords optional)", AccountStatus::Guide, command_zone_instance) || + command_add("zonelock", "[List|Lock|Unlock] [Zone ID|Zone Short Name] - Set or get lock status of a Zone by ID or Short Name", AccountStatus::GMAdmin, command_zonelock) || + command_add("zoneshutdown", "[shortname] - Shut down a zone server", AccountStatus::GMLeadAdmin, command_zoneshutdown) || + command_add("zonespawn", "- Not implemented", AccountStatus::GMImpossible, command_zonespawn) || + command_add("zonestatus", "- Show connected zoneservers, synonymous with /servers", AccountStatus::GMLeadAdmin, command_zonestatus) || + command_add("zopp", "Troubleshooting command - Sends a fake item packet to you. No server reference is created.", AccountStatus::GMImpossible, command_zopp) || + command_add("zsafecoords", "[x] [y] [z] - Set safe coords", AccountStatus::QuestTroupe, command_zsafecoords) || + command_add("zsave", " - Saves zheader to the database", AccountStatus::QuestTroupe, command_zsave) || + command_add("zsky", "[skytype] - Change zone sky type", AccountStatus::QuestTroupe, command_zsky) || + command_add("zstats", "- Show info about zone header", AccountStatus::QuestTroupe, command_zstats) || + command_add("zunderworld", "[zcoord] - Sets the underworld using zcoord", AccountStatus::QuestTroupe, command_zunderworld) || + command_add("zuwcoords", "[z coord] - Set underworld coord", AccountStatus::QuestTroupe, command_zuwcoords) ) { command_deinit(); return -1; @@ -681,53 +681,67 @@ int command_realdispatch(Client *c, const char *message) void command_logcommand(Client *c, const char *message) { - int admin=c->Admin(); + int admin = c->Admin(); - bool continueevents=false; + bool continueevents = false; switch (zone->loglevelvar){ //catch failsafe case 9: { // log only LeadGM - if ((admin>= 150) && (admin <200)) - continueevents=true; + if ( + admin >= AccountStatus::GMLeadAdmin && + admin < AccountStatus::GMMgmt + ) { + continueevents = true; + } break; } case 8: { // log only GM - if ((admin>= 100) && (admin <150)) - continueevents=true; + if ( + admin >= AccountStatus::GMAdmin && + admin < AccountStatus::GMLeadAdmin + ) { + continueevents = true; + } break; } case 1: { - if ((admin>= 200)) - continueevents=true; + if (admin >= AccountStatus::GMMgmt) { + continueevents = true; + } break; } case 2: { - if ((admin>= 150)) - continueevents=true; + if (admin >= AccountStatus::GMLeadAdmin) { + continueevents = true; + } break; } case 3: { - if ((admin>= 100)) - continueevents=true; + if (admin >= AccountStatus::GMAdmin) { + continueevents = true; + } break; } case 4: { - if ((admin>= 80)) - continueevents=true; + if (admin >= AccountStatus::QuestTroupe) { + continueevents = true; + } break; } case 5: { - if ((admin>= 20)) - continueevents=true; + if (admin >= AccountStatus::ApprenticeGuide) { + continueevents = true; + } break; } case 6: { - if ((admin>= 10)) - continueevents=true; + if (admin >= AccountStatus::Steward) { + continueevents = true; + } break; } case 7: { - continueevents=true; - break; + continueevents = true; + break; } } @@ -1274,10 +1288,7 @@ void command_summon(Client *c, const Seperator *sep) t=c->GetTarget(); else { - /*if(c->Admin() < 150) - c->Message(Chat::White, "You need a NPC/corpse target for this command"); - else*/ - c->Message(Chat::White, "Usage: #summon [charname] Either target or charname is required"); + c->Message(Chat::White, "Usage: #summon [charname] Either target or charname is required"); return; } @@ -1297,11 +1308,6 @@ void command_summon(Client *c, const Seperator *sep) } else if (t->IsClient()) { - /*if(c->Admin() < 150) - { - c->Message(Chat::White, "You may not summon a player."); - return; - }*/ c->Message(Chat::White, "Summoning player %s to %1.1f, %1.1f, %1.1f", t->GetName(), c->GetX(), c->GetY(), c->GetZ()); t->CastToClient()->MovePC(zone->GetZoneID(), zone->GetInstanceID(), c->GetX(), c->GetY(), c->GetZ(), c->GetHeading(), 2, GMSummon); } @@ -2016,13 +2022,23 @@ void command_emote(Client *c, const Seperator *sep) for(newmessage = strtok((char*)sep->arg[3],"^");newmessage!=nullptr;newmessage=strtok(nullptr, "^")) entity_list.Message(0, atoi(sep->arg[2]), newmessage); } - } - else if (!worldserver.Connected()) + } else if (!worldserver.Connected()) { c->Message(Chat::White, "Error: World server disconnected"); - else if (strcasecmp(sep->arg[1], "world") == 0) - worldserver.SendEmoteMessage(0, 0, atoi(sep->arg[2]), sep->argplus[3]); - else - worldserver.SendEmoteMessage(sep->arg[1], 0, atoi(sep->arg[2]), sep->argplus[3]); + } else if (!strcasecmp(sep->arg[1], "world")) { + worldserver.SendEmoteMessage( + 0, + 0, + atoi(sep->arg[2]), + sep->argplus[3] + ); + } else { + worldserver.SendEmoteMessage( + sep->arg[1], + 0, + atoi(sep->arg[2]), + sep->argplus[3] + ); + } } } @@ -5785,7 +5801,7 @@ void command_zonelock(Client *c, const Seperator *sep) strn0cpy(lock_zone->adminname, c->GetName(), sizeof(lock_zone->adminname)); if (is_list) { - lock_zone->op = EQ::constants::ServerLockType::List; + lock_zone->op = ServerLockType::List; worldserver.SendPacket(pack); } else if (!is_list && c->Admin() >= commandLockZones) { auto zone_id = ( @@ -5796,7 +5812,7 @@ void command_zonelock(Client *c, const Seperator *sep) std::string zone_short_name = str_tolower(ZoneName(zone_id, true)); bool is_unknown_zone = zone_short_name.find("unknown") != std::string::npos; if (zone_id && !is_unknown_zone) { - lock_zone->op = is_lock ? EQ::constants::ServerLockType::Lock : EQ::constants::ServerLockType::Unlock; + lock_zone->op = is_lock ? ServerLockType::Lock : ServerLockType::Unlock; lock_zone->zoneID = zone_id; worldserver.SendPacket(pack); } else { @@ -6274,7 +6290,7 @@ void command_gmzone(Client *c, const Seperator *sep) if (instance_id > 0) { float target_x = -1, target_y = -1, target_z = -1, target_heading = -1; - int16 min_status = 0; + int16 min_status = AccountStatus::Player; uint8 min_level = 0; if (!content_db.GetSafePoints( @@ -7494,7 +7510,7 @@ void command_iteminfo(Client *c, const Seperator *sep) c->Message(Chat::White, ">> EffectType: 0x%02X, CastTime: %.2f", (uint8)item->Click.Type, ((double)item->CastTime / 1000)); } - if (c->Admin() >= 200) + if (c->Admin() >= AccountStatus::GMMgmt) c->Message(Chat::White, ">> MinStatus: %u", item->MinStatus); } @@ -7638,58 +7654,6 @@ void command_guild(Client *c, const Seperator *sep) guild_mgr.DescribeGuild(c, tmp); } } - /* - else if (strcasecmp(sep->arg[1], "edit") == 0) { - if (c->GuildDBID() == 0) - c->Message(Chat::White, "You arent in a guild!"); - else if (!sep->IsNumber(2)) - c->Message(Chat::White, "Error: invalid rank #."); - else if (atoi(sep->arg[2]) < 0 || atoi(sep->arg[2]) > GUILD_MAX_RANK) - c->Message(Chat::White, "Error: invalid rank #."); - else if (!c->GuildRank() == 0) - c->Message(Chat::White, "You must be rank %s to use edit.", guilds[c->GuildEQID()].rank[0].rankname); - else if (!worldserver.Connected()) - c->Message(Chat::White, "Error: World server dirconnected"); - else { - if (!helper_guild_edit(c, c->GuildDBID(), c->GuildEQID(), atoi(sep->arg[2]), sep->arg[3], sep->argplus[4])) { - c->Message(Chat::White, " #guild edit rank title newtitle"); - c->Message(Chat::White, " #guild edit rank permission 0/1"); - } - else { - ServerPacket* pack = new ServerPacket(ServerOP_RefreshGuild, 5); - int32 geqid=c->GuildEQID(); - memcpy(pack->pBuffer, &geqid, 4); - worldserver.SendPacket(pack); - safe_delete(pack); - } - } - } - else if (strcasecmp(sep->arg[1], "gmedit") == 0 && admin >= 100) { - if (!sep->IsNumber(2)) - c->Message(Chat::White, "Error: invalid guilddbid."); - else if (!sep->IsNumber(3)) - c->Message(Chat::White, "Error: invalid rank #."); - else if (atoi(sep->arg[3]) < 0 || atoi(sep->arg[3]) > GUILD_MAX_RANK) - c->Message(Chat::White, "Error: invalid rank #."); - else if (!worldserver.Connected()) - c->Message(Chat::White, "Error: World server dirconnected"); - else { - uint32 eqid = database.GetGuildEQID(atoi(sep->arg[2])); - if (eqid == GUILD_NONE) - c->Message(Chat::White, "Error: Guild not found"); - else if (!helper_guild_edit(c, atoi(sep->arg[2]), eqid, atoi(sep->arg[3]), sep->arg[4], sep->argplus[5])) { - c->Message(Chat::White, " #guild gmedit guilddbid rank title newtitle"); - c->Message(Chat::White, " #guild gmedit guilddbid rank permission 0/1"); - } - else { - ServerPacket* pack = new ServerPacket(ServerOP_RefreshGuild, 5); - memcpy(pack->pBuffer, &eqid, 4); - worldserver.SendPacket(pack); - safe_delete(pack); - } - } - } - */ else if (strcasecmp(sep->arg[1], "set") == 0) { if (!sep->IsNumber(3)) c->Message(Chat::White, "Usage: #guild set charname guildgbid (0 = clear guildtag)"); diff --git a/zone/corpse.cpp b/zone/corpse.cpp index bd8a36418..6401abb95 100644 --- a/zone/corpse.cpp +++ b/zone/corpse.cpp @@ -953,7 +953,7 @@ void Corpse::MakeLootRequestPackets(Client* client, const EQApplicationPacket* a // return; } - if(is_locked && client->Admin() < 100) { + if(is_locked && client->Admin() < AccountStatus::GMAdmin) { SendLootReqErrorPacket(client, LootResponse::SomeoneElse); client->Message(Chat::Red, "Error: Corpse locked by GM."); return; @@ -977,7 +977,7 @@ void Corpse::MakeLootRequestPackets(Client* client, const EQApplicationPacket* a // loot_request_type is scoped to class Corpse and reset on a per-loot session basis if (client->GetGM()) { - if (client->Admin() >= 100) + if (client->Admin() >= AccountStatus::GMAdmin) loot_request_type = LootRequestType::GMAllowed; else loot_request_type = LootRequestType::GMPeek; @@ -1203,14 +1203,14 @@ void Corpse::LootItem(Client *client, const EQApplicationPacket *app) } if (IsPlayerCorpse() && !CanPlayerLoot(client->CharacterID()) && !become_npc && - (char_id != client->CharacterID() && client->Admin() < 150)) { + (char_id != client->CharacterID() && client->Admin() < AccountStatus::GMLeadAdmin)) { client->Message(Chat::Red, "Error: This is a player corpse and you dont own it."); client->QueuePacket(app); SendEndLootErrorPacket(client); return; } - if (is_locked && client->Admin() < 100) { + if (is_locked && client->Admin() < AccountStatus::GMAdmin) { client->QueuePacket(app); SendLootReqErrorPacket(client, LootResponse::SomeoneElse); client->Message(Chat::Red, "Error: Corpse locked by GM."); @@ -1580,7 +1580,7 @@ bool Corpse::Summon(Client* client, bool spell, bool CheckDistance) { uint32 dist2 = 10000; // pow(100, 2); if (!spell) { if (this->GetCharID() == client->CharacterID()) { - if (IsLocked() && client->Admin() < 100) { + if (IsLocked() && client->Admin() < AccountStatus::GMAdmin) { client->Message(Chat::Red, "That corpse is locked by a GM."); return false; } diff --git a/zone/embparser_api.cpp b/zone/embparser_api.cpp index b0b1a312e..f5fc4ad6b 100644 --- a/zone/embparser_api.cpp +++ b/zone/embparser_api.cpp @@ -7473,8 +7473,8 @@ XS(XS__worldwideaddldonloss) { uint8 update_type = CZLDoNUpdateSubtype_AddLoss; uint32 theme_id = (uint32)SvUV(ST(0)); int points = 1; - uint8 min_status = 0; - uint8 max_status = 0; + uint8 min_status = AccountStatus::Player; + uint8 max_status = AccountStatus::Player; if (items == 2) min_status = (uint8)SvUV(ST(1)); @@ -7495,8 +7495,8 @@ XS(XS__worldwideaddldonpoints) { uint8 update_type = CZLDoNUpdateSubtype_AddPoints; uint32 theme_id = (uint32)SvUV(ST(0)); int points = 1; - uint8 min_status = 0; - uint8 max_status = 0; + uint8 min_status = AccountStatus::Player; + uint8 max_status = AccountStatus::Player; if (items == 2) points = (int)SvIV(ST(1)); @@ -7520,8 +7520,8 @@ XS(XS__worldwideaddldonwin) { uint8 update_type = CZLDoNUpdateSubtype_AddWin; uint32 theme_id = (uint32)SvUV(ST(0)); int points = 1; - uint8 min_status = 0; - uint8 max_status = 0; + uint8 min_status = AccountStatus::Player; + uint8 max_status = AccountStatus::Player; if (items == 2) min_status = (uint8)SvUV(ST(1)); @@ -7541,8 +7541,8 @@ XS(XS__worldwideassigntask) { { uint8 update_type = WWTaskUpdateType_AssignTask; uint32 task_identifier = (uint32) SvUV(ST(0)); - uint8 min_status = 0; - uint8 max_status = 0; + uint8 min_status = AccountStatus::Player; + uint8 max_status = AccountStatus::Player; int task_subidentifier = -1; int update_count = 1; bool enforce_level_requirement = false; @@ -7565,8 +7565,8 @@ XS(XS__worldwidecastspell) { { uint8 update_type = WWSpellUpdateType_Cast; uint32 spell_id = (uint32) SvUV(ST(0)); - uint8 min_status = 0; - uint8 max_status = 0; + uint8 min_status = AccountStatus::Player; + uint8 max_status = AccountStatus::Player; if (items == 2) min_status = (uint8) SvUV(ST(1)); @@ -7585,8 +7585,8 @@ XS(XS__worldwidedialoguewindow) { Perl_croak(aTHX_ "Usage: quest::worldwidedialoguewindow(string message, [uint8 min_status = 0, uint8 max_status = 0])"); { const char* message = (const char*) SvPV_nolen(ST(0)); - uint8 min_status = 0; - uint8 max_status = 0; + uint8 min_status = AccountStatus::Player; + uint8 max_status = AccountStatus::Player; if (items == 2) min_status = (uint8)SvUV(ST(1)); @@ -7606,8 +7606,8 @@ XS(XS__worldwidedisabletask) { { uint8 update_type = WWTaskUpdateType_DisableTask; uint32 task_identifier = (uint32) SvUV(ST(0)); - uint8 min_status = 0; - uint8 max_status = 0; + uint8 min_status = AccountStatus::Player; + uint8 max_status = AccountStatus::Player; int task_subidentifier = -1; int update_count = 1; bool enforce_level_requirement = false; @@ -7630,8 +7630,8 @@ XS(XS__worldwideenabletask) { { uint8 update_type = WWTaskUpdateType_EnableTask; uint32 task_identifier = (uint32) SvUV(ST(0)); - uint8 min_status = 0; - uint8 max_status = 0; + uint8 min_status = AccountStatus::Player; + uint8 max_status = AccountStatus::Player; int task_subidentifier = -1; int update_count = 1; bool enforce_level_requirement = false; @@ -7654,8 +7654,8 @@ XS(XS__worldwidefailtask) { { uint8 update_type = WWTaskUpdateType_FailTask; uint32 task_identifier = (uint32) SvUV(ST(0)); - uint8 min_status = 0; - uint8 max_status = 0; + uint8 min_status = AccountStatus::Player; + uint8 max_status = AccountStatus::Player; int task_subidentifier = -1; int update_count = 1; bool enforce_level_requirement = false; @@ -7682,8 +7682,8 @@ XS(XS__worldwidemarquee) { uint32 fade_out = (uint32) SvUV(ST(3)); uint32 duration = (uint32) SvUV(ST(4)); const char* message = (const char*) SvPV_nolen(ST(5)); - uint8 min_status = 0; - uint8 max_status = 0; + uint8 min_status = AccountStatus::Player; + uint8 max_status = AccountStatus::Player; if (items == 7) min_status = (uint8) SvUV(ST(6)); @@ -7703,8 +7703,8 @@ XS(XS__worldwidemessage) { { uint32 type = (uint32) SvUV(ST(0)); const char* message = (const char*) SvPV_nolen(ST(1)); - uint8 min_status = 0; - uint8 max_status = 0; + uint8 min_status = AccountStatus::Player; + uint8 max_status = AccountStatus::Player; if (items == 3) min_status = (uint8) SvUV(ST(2)); @@ -7725,8 +7725,8 @@ XS(XS__worldwidemove) { uint8 update_type = WWMoveUpdateType_MoveZone; const char* zone_short_name = (const char*) SvPV_nolen(ST(0)); uint16 instance_id = 0; - uint8 min_status = 0; - uint8 max_status = 0; + uint8 min_status = AccountStatus::Player; + uint8 max_status = AccountStatus::Player; if (items == 2) min_status = (uint8) SvUV(ST(1)); @@ -7747,8 +7747,8 @@ XS(XS__worldwidemoveinstance) { uint8 update_type = WWMoveUpdateType_MoveZoneInstance; const char* zone_short_name = ""; uint16 instance_id = (uint16) SvUV(ST(0)); - uint8 min_status = 0; - uint8 max_status = 0; + uint8 min_status = AccountStatus::Player; + uint8 max_status = AccountStatus::Player; if (items == 2) min_status = (uint8) SvUV(ST(1)); @@ -7769,8 +7769,8 @@ XS(XS__worldwideremoveldonloss) { uint8 update_type = CZLDoNUpdateSubtype_RemoveLoss; uint32 theme_id = (uint32)SvUV(ST(0)); int points = 1; - uint8 min_status = 0; - uint8 max_status = 0; + uint8 min_status = AccountStatus::Player; + uint8 max_status = AccountStatus::Player; if (items == 2) min_status = (uint8)SvUV(ST(1)); @@ -7791,8 +7791,8 @@ XS(XS__worldwideremoveldonwin) { uint8 update_type = CZLDoNUpdateSubtype_RemoveWin; uint32 theme_id = (uint32)SvUV(ST(0)); int points = 1; - uint8 min_status = 0; - uint8 max_status = 0; + uint8 min_status = AccountStatus::Player; + uint8 max_status = AccountStatus::Player; if (items == 2) min_status = (uint8)SvUV(ST(1)); @@ -7812,8 +7812,8 @@ XS(XS__worldwideremovespell) { { uint8 update_type = WWSpellUpdateType_Remove; uint32 spell_id = (uint32) SvUV(ST(0)); - uint8 min_status = 0; - uint8 max_status = 0; + uint8 min_status = AccountStatus::Player; + uint8 max_status = AccountStatus::Player; if (items == 2) min_status = (uint8) SvUV(ST(1)); @@ -7833,8 +7833,8 @@ XS(XS__worldwideremovetask) { { uint8 update_type = WWTaskUpdateType_RemoveTask; uint32 task_identifier = (uint32) SvUV(ST(0)); - uint8 min_status = 0; - uint8 max_status = 0; + uint8 min_status = AccountStatus::Player; + uint8 max_status = AccountStatus::Player; int task_subidentifier = -1; int update_count = 1; bool enforce_level_requirement = false; @@ -7859,8 +7859,8 @@ XS(XS__worldwideresetactivity) { uint8 update_type = WWTaskUpdateType_ActivityReset; uint32 task_identifier = (uint32) SvUV(ST(0)); int task_subidentifier = (int) SvIV(ST(1)); - uint8 min_status = 0; - uint8 max_status = 0; + uint8 min_status = AccountStatus::Player; + uint8 max_status = AccountStatus::Player; int update_count = 1; bool enforce_level_requirement = false; if (items == 3) @@ -7883,8 +7883,8 @@ XS(XS__worldwidesetentityvariableclient) { uint8 update_type = WWSetEntityVariableUpdateType_Character; const char* variable_name = (const char*) SvPV_nolen(ST(0)); const char* variable_value = (const char*) SvPV_nolen(ST(1)); - uint8 min_status = 0; - uint8 max_status = 0; + uint8 min_status = AccountStatus::Player; + uint8 max_status = AccountStatus::Player; if (items == 3) min_status = (uint8) SvUV(ST(2)); @@ -7931,8 +7931,8 @@ XS(XS__worldwidesignalclient) { { uint8 update_type = WWSignalUpdateType_Character; uint32 signal = (uint32) SvUV(ST(0)); - uint8 min_status = 0; - uint8 max_status = 0; + uint8 min_status = AccountStatus::Player; + uint8 max_status = AccountStatus::Player; if (items == 2) min_status = (uint8) SvUV(ST(1)); @@ -7953,8 +7953,8 @@ XS(XS__worldwideupdateactivity) { uint8 update_type = WWTaskUpdateType_ActivityUpdate; uint32 task_identifier = (uint32) SvUV(ST(0)); int task_subidentifier = (int) SvIV(ST(1)); - uint8 min_status = 0; - uint8 max_status = 0; + uint8 min_status = AccountStatus::Player; + uint8 max_status = AccountStatus::Player; int update_count = 1; bool enforce_level_requirement = false; if (items == 3) diff --git a/zone/entity.cpp b/zone/entity.cpp index 08ebe2831..68d8f5f71 100644 --- a/zone/entity.cpp +++ b/zone/entity.cpp @@ -3243,7 +3243,7 @@ void EntityList::SendPetitionToAdmins() pcus->quetotal=0; auto it = client_list.begin(); while (it != client_list.end()) { - if (it->second->CastToClient()->Admin() >= 80) + if (it->second->CastToClient()->Admin() >= AccountStatus::QuestTroupe) it->second->CastToClient()->QueuePacket(outapp); ++it; } @@ -3271,7 +3271,7 @@ void EntityList::SendPetitionToAdmins(Petition *pet) pcus->quetotal = petition_list.GetTotalPetitions(); auto it = client_list.begin(); while (it != client_list.end()) { - if (it->second->CastToClient()->Admin() >= 80) { + if (it->second->CastToClient()->Admin() >= AccountStatus::QuestTroupe) { if (pet->CheckedOut()) strcpy(pcus->gmsenttoo, ""); else @@ -3296,7 +3296,7 @@ void EntityList::ClearClientPetitionQueue() pet->quetotal = petition_list.GetTotalPetitions(); auto it = client_list.begin(); while (it != client_list.end()) { - if (it->second->CastToClient()->Admin() >= 100) { + if (it->second->CastToClient()->Admin() >= AccountStatus::GMAdmin) { int x = 0; for (x = 0; x < 64; x++) { pet->petnumber = x; @@ -4686,7 +4686,7 @@ void EntityList::ZoneWho(Client *c, Who_All_Struct *Who) WAPP2->RankMSGID = 12315; else if (ClientEntry->IsBuyer()) WAPP2->RankMSGID = 6056; - else if (ClientEntry->Admin() >= 10 && ClientEntry->GetGM()) + else if (ClientEntry->Admin() >= AccountStatus::Steward && ClientEntry->GetGM()) WAPP2->RankMSGID = 12312; else WAPP2->RankMSGID = 0xFFFFFFFF; diff --git a/zone/entity.h b/zone/entity.h index b7f65978a..a42165fc6 100644 --- a/zone/entity.h +++ b/zone/entity.h @@ -391,7 +391,7 @@ public: void ReplaceWithTarget(Mob* pOldMob, Mob*pNewTarget); void QueueCloseClients(Mob* sender, const EQApplicationPacket* app, bool ignore_sender=false, float distance=200, Mob* skipped_mob = 0, bool is_ack_required = true, eqFilterType filter=FilterNone); void QueueClients(Mob* sender, const EQApplicationPacket* app, bool ignore_sender=false, bool ackreq = true); - void QueueClientsStatus(Mob* sender, const EQApplicationPacket* app, bool ignore_sender = false, uint8 minstatus = 0, uint8 maxstatus = 0); + void QueueClientsStatus(Mob* sender, const EQApplicationPacket* app, bool ignore_sender = false, uint8 minstatus = AccountStatus::Player, uint8 maxstatus = AccountStatus::Player); void QueueClientsGuild(Mob* sender, const EQApplicationPacket* app, bool ignore_sender = false, uint32 guildeqid = 0); void QueueClientsGuildBankItemUpdate(const GuildBankItemUpdate_Struct *gbius, uint32 GuildID); void QueueClientsByTarget(Mob* sender, const EQApplicationPacket* app, bool iSendToSender = true, Mob* SkipThisMob = 0, bool ackreq = true, diff --git a/zone/exp.cpp b/zone/exp.cpp index 9b4df5492..b7261ccf7 100644 --- a/zone/exp.cpp +++ b/zone/exp.cpp @@ -793,7 +793,7 @@ void Client::SetEXP(uint32 set_exp, uint32 set_aaxp, bool isrezzexp) { FastQueuePacket(&outapp); } - if (admin>=100 && GetGM()) { + if (admin >= AccountStatus::GMAdmin && GetGM()) { char val1[20]={0}; char val2[20]={0}; char val3[20]={0}; diff --git a/zone/guild_mgr.cpp b/zone/guild_mgr.cpp index c63effea5..e3c4e6071 100644 --- a/zone/guild_mgr.cpp +++ b/zone/guild_mgr.cpp @@ -1513,7 +1513,17 @@ void GuildApproval::GuildApproved() database.InsertPetitionToDB(pet); petition_list.UpdateGMQueue(); petition_list.UpdateZoneListQueue(); - worldserver.SendEmoteMessage(0, 0, 80, 15, "%s has made a petition. #%i", owner->CastToClient()->GetName(), pet->GetID()); + worldserver.SendEmoteMessage( + 0, + 0, + AccountStatus::QuestTroupe, + Chat::Yellow, + fmt::format( + "{} has made a petition. ID: {}", + owner->CastToClient()->GetName(), + pet->GetID() + ).c_str() + ); auto pack = new ServerPacket; pack->opcode = ServerOP_RefreshGuild; pack->size = tmp; diff --git a/zone/lua_entity_list.cpp b/zone/lua_entity_list.cpp index 9a9996d96..c7721271e 100644 --- a/zone/lua_entity_list.cpp +++ b/zone/lua_entity_list.cpp @@ -217,7 +217,12 @@ void Lua_EntityList::Message(uint32 guild_dbid, uint32 type, const char *message void Lua_EntityList::MessageStatus(uint32 guild_dbid, int min_status, uint32 type, const char *message) { Lua_Safe_Call_Void(); - self->MessageStatus(guild_dbid, min_status, type, message); + self->MessageStatus( + guild_dbid, + min_status, + type, + message + ); } void Lua_EntityList::MessageClose(Lua_Mob sender, bool skip_sender, float dist, uint32 type, const char *message) { diff --git a/zone/mob.cpp b/zone/mob.cpp index 914d7fdf7..394de8bba 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -3935,7 +3935,7 @@ void Mob::SetTarget(Mob *mob) else if (IsClient()) { parse->EventPlayer(EVENT_TARGET_CHANGE, CastToClient(), "", 0); - if (CastToClient()->admin > 200) { + if (CastToClient()->admin > AccountStatus::GMMgmt) { DisplayInfo(mob); } diff --git a/zone/pathing.cpp b/zone/pathing.cpp index 1513cd5d6..87f8977f7 100644 --- a/zone/pathing.cpp +++ b/zone/pathing.cpp @@ -49,7 +49,7 @@ void Client::SendPathPacket(const std::vector &points) { .Then([this](const EQ::Any &result) { auto points = EQ::any_cast>(result); if (points.size() < 2) { - if (Admin() > 10) { + if (Admin() > AccountStatus::Steward) { Message(Chat::System, "Too few points"); } @@ -59,7 +59,7 @@ void Client::SendPathPacket(const std::vector &points) { } if (points.size() > 36) { - if (Admin() > 10) { + if (Admin() > AccountStatus::Steward) { Message(Chat::System, "Too many points %u", points.size()); } @@ -68,7 +68,7 @@ void Client::SendPathPacket(const std::vector &points) { return; } - if (Admin() > 10) { + if (Admin() > AccountStatus::Steward) { Message(Chat::System, "Total points %u", points.size()); } diff --git a/zone/perl_entity.cpp b/zone/perl_entity.cpp index 835929ef9..8ae7976eb 100644 --- a/zone/perl_entity.cpp +++ b/zone/perl_entity.cpp @@ -856,7 +856,12 @@ XS(XS_EntityList_MessageStatus) { uint32 type = (uint32) SvUV(ST(3)); char *message = (char *) SvPV_nolen(ST(4)); VALIDATE_THIS_IS_ENTITY; - THIS->MessageStatus(to_guilddbid, to_minstatus, type, message); + THIS->MessageStatus( + to_guilddbid, + to_minstatus, + type, + message + ); } XSRETURN_EMPTY; } diff --git a/zone/questmgr.cpp b/zone/questmgr.cpp index 18431e47b..527706567 100644 --- a/zone/questmgr.cpp +++ b/zone/questmgr.cpp @@ -765,18 +765,39 @@ void QuestManager::shout2(const char *str) { if (!owner) { LogQuests("QuestManager::shout2 called with nullptr owner. Probably syntax error in quest file"); return; - } - else { - worldserver.SendEmoteMessage(0,0,0,13, "%s shouts, '%s'", owner->GetCleanName(), str); + } else { + worldserver.SendEmoteMessage( + 0, + 0, + AccountStatus::Player, + Chat::Red, + fmt::format( + "{} shouts, '{}'", + owner->GetCleanName(), + str + ).c_str() + ); } } void QuestManager::gmsay(const char *str, uint32 color, bool send_to_world, uint32 to_guilddbid, uint32 to_minstatus) { QuestManagerCurrentQuestVars(); - if(send_to_world) - worldserver.SendEmoteMessage(0, to_guilddbid, to_minstatus, color, "%s", str); - else - entity_list.MessageStatus(to_guilddbid, to_minstatus, color, "%s", str); + if(send_to_world) { + worldserver.SendEmoteMessage( + 0, + to_guilddbid, + to_minstatus, + color, + str + ); + } else { + entity_list.MessageStatus( + to_guilddbid, + to_minstatus, + color, + str + ); + } } void QuestManager::depop(int npc_type) { @@ -1349,30 +1370,66 @@ void QuestManager::setguild(uint32 new_guild_id, uint8 new_rank) { void QuestManager::CreateGuild(const char *guild_name, const char *leader) { QuestManagerCurrentQuestVars(); - uint32 cid = database.GetCharacterID(leader); - char hString[250]; - if (cid == 0) { - worldserver.SendEmoteMessage(0, 0, 80, 15, "%s", "Guild Creation: Guild leader not found."); - return; - } - - uint32 tmp = guild_mgr.FindGuildByLeader(cid); - if (tmp != GUILD_NONE) { - sprintf(hString, "Guild Creation: Error: %s already is the leader of DB# %u '%s'.", leader, tmp, guild_mgr.GetGuildName(tmp)); - worldserver.SendEmoteMessage(0, 0, 80, 15, "%s", hString); - } - else { - uint32 gid = guild_mgr.CreateGuild(guild_name, cid); - if (gid == GUILD_NONE) - worldserver.SendEmoteMessage(0, 0, 80, 15, "%s", "Guild Creation: Guild creation failed"); - else { - sprintf(hString, "Guild Creation: Guild created: Leader: %u, number %u: %s", cid, gid, leader); - worldserver.SendEmoteMessage(0, 0, 80, 15, "%s", hString); - if(!guild_mgr.SetGuild(cid, gid, GUILD_LEADER)) - worldserver.SendEmoteMessage(0, 0, 80, 15, "%s", "Unable to set guild leader's guild in the database. Your going to have to run #guild set"); - } + uint32 character_id = database.GetCharacterID(leader); + if (character_id == 0) { + worldserver.SendEmoteMessage( + 0, + 0, + AccountStatus::QuestTroupe, + Chat::Yellow, + "Guild Error | Guild leader not found." + ); + return; + } + uint32 tmp = guild_mgr.FindGuildByLeader(character_id); + if (tmp != GUILD_NONE) { + worldserver.SendEmoteMessage( + 0, + 0, + AccountStatus::QuestTroupe, + Chat::Yellow, + fmt::format( + "Guild Error | {} already is the leader of {} ({}).", + leader, + guild_mgr.GetGuildName(tmp), + tmp + ).c_str() + ); + } else { + uint32 gid = guild_mgr.CreateGuild(guild_name, character_id); + if (gid == GUILD_NONE) { + worldserver.SendEmoteMessage( + 0, + 0, + AccountStatus::QuestTroupe, + Chat::Yellow, + "Guild Error | Guild creation failed." + ); + } else { + worldserver.SendEmoteMessage( + 0, + 0, + AccountStatus::QuestTroupe, + Chat::Yellow, + fmt::format( + "Guild Created | Leader: {} ({}) ID: {}", + leader, + character_id, + gid + ).c_str() + ); + if (!guild_mgr.SetGuild(character_id, gid, GUILD_LEADER)) { + worldserver.SendEmoteMessage( + 0, + 0, + AccountStatus::QuestTroupe, + Chat::Yellow, + "Unable to set guild leader's guild in the database. Use #guild set." + ); } + } + } } void QuestManager::settime(uint8 new_hour, uint8 new_min, bool update_world /*= true*/) @@ -2458,7 +2515,12 @@ void QuestManager::ze(int type, const char *str) { } void QuestManager::we(int type, const char *str) { - worldserver.SendEmoteMessage(0, 0, type, str); + worldserver.SendEmoteMessage( + 0, + 0, + type, + str + ); } void QuestManager::message(int color, const char *message) { diff --git a/zone/questmgr.h b/zone/questmgr.h index 2b14e4fe6..d41b2d3ae 100644 --- a/zone/questmgr.h +++ b/zone/questmgr.h @@ -302,15 +302,15 @@ public: void CrossZoneSignal(uint8 update_type, int update_identifier, uint32 signal, const char* client_name = ""); void CrossZoneSpell(uint8 update_type, uint8 update_subtype, int update_identifier, uint32 spell_id, const char* client_name = ""); void CrossZoneTaskUpdate(uint8 update_type, uint8 update_subtype, int update_identifier, uint32 task_identifier, int task_subidentifier = -1, int update_count = 1, bool enforce_level_requirement = false, const char* client_name = ""); - void WorldWideDialogueWindow(const char* message, uint8 min_status = 0, uint8 max_status = 0); - void WorldWideLDoNUpdate(uint8 update_type, uint32 theme_id, int points = 1, uint8 min_status = 0, uint8 max_status = 0); - void WorldWideMarquee(uint32 type, uint32 priority, uint32 fade_in, uint32 fade_out, uint32 duration, const char* message, uint8 min_status = 0, uint8 max_status = 0); - void WorldWideMessage(uint32 type, const char* message, uint8 min_status = 0, uint8 max_status = 0); - void WorldWideMove(uint8 update_type, const char* zone_short_name, uint16 instance_id = 0, uint8 min_status = 0, uint8 max_status = 0); - void WorldWideSetEntityVariable(uint8 update_type, const char* variable_name, const char* variable_value, uint8 min_status = 0, uint8 max_status = 0); - void WorldWideSignal(uint8 update_type, uint32 signal, uint8 min_status = 0, uint8 max_status = 0); - void WorldWideSpell(uint8 update_type, uint32 spell_id, uint8 min_status = 0, uint8 max_status = 0); - void WorldWideTaskUpdate(uint8 update_type, uint32 task_identifier, int task_subidentifier = -1, int update_count = 1, bool enforce_level_requirement = false, uint8 min_status = 0, uint8 max_status = 0); + void WorldWideDialogueWindow(const char* message, uint8 min_status = AccountStatus::Player, uint8 max_status = AccountStatus::Player); + void WorldWideLDoNUpdate(uint8 update_type, uint32 theme_id, int points = 1, uint8 min_status = AccountStatus::Player, uint8 max_status = AccountStatus::Player); + void WorldWideMarquee(uint32 type, uint32 priority, uint32 fade_in, uint32 fade_out, uint32 duration, const char* message, uint8 min_status = AccountStatus::Player, uint8 max_status = AccountStatus::Player); + void WorldWideMessage(uint32 type, const char* message, uint8 min_status = AccountStatus::Player, uint8 max_status = AccountStatus::Player); + void WorldWideMove(uint8 update_type, const char* zone_short_name, uint16 instance_id = 0, uint8 min_status = AccountStatus::Player, uint8 max_status = AccountStatus::Player); + void WorldWideSetEntityVariable(uint8 update_type, const char* variable_name, const char* variable_value, uint8 min_status = AccountStatus::Player, uint8 max_status = AccountStatus::Player); + void WorldWideSignal(uint8 update_type, uint32 signal, uint8 min_status = AccountStatus::Player, uint8 max_status = AccountStatus::Player); + void WorldWideSpell(uint8 update_type, uint32 spell_id, uint8 min_status = AccountStatus::Player, uint8 max_status = AccountStatus::Player); + void WorldWideTaskUpdate(uint8 update_type, uint32 task_identifier, int task_subidentifier = -1, int update_count = 1, bool enforce_level_requirement = false, uint8 min_status = AccountStatus::Player, uint8 max_status = AccountStatus::Player); bool EnableRecipe(uint32 recipe_id); bool DisableRecipe(uint32 recipe_id); void ClearNPCTypeCache(int npctype_id); diff --git a/zone/spells.cpp b/zone/spells.cpp index b38d23486..9783bfc40 100644 --- a/zone/spells.cpp +++ b/zone/spells.cpp @@ -2183,7 +2183,7 @@ bool Mob::SpellFinished(uint16 spell_id, Mob *spell_target, CastingSlot slot, ui ( this->IsClient() && (zone->GetZoneID() == 183 || zone->GetZoneID() == 184) && // load - CastToClient()->Admin() < 80 + CastToClient()->Admin() < AccountStatus::QuestTroupe ) { if diff --git a/zone/trading.cpp b/zone/trading.cpp index 92b132477..27555b8fc 100644 --- a/zone/trading.cpp +++ b/zone/trading.cpp @@ -205,41 +205,45 @@ void Trade::LogTrade() item_count++; } - if (((this->cp + this->sp + this->gp + this->pp)>0) || (item_count>0)) + if ((cp + sp + gp + pp) || item_count) { admin_level = trader->Admin(); - else - admin_level = 999; + } else { + admin_level = (AccountStatus::Max + 1); + } if (zone->tradevar == 7) { logtrade = true; - } - else if ((admin_level>=10) && (admin_level<20)) { - if ((zone->tradevar<8) && (zone->tradevar>5)) + } else if ( + admin_level >= AccountStatus::Steward && + admin_level < AccountStatus::ApprenticeGuide + ) { + if (zone->tradevar < 8 && zone->tradevar > 5) { logtrade = true; - } - else if (admin_level<=20) { - if ((zone->tradevar<8) && (zone->tradevar>4)) + } + } else if (admin_level <= AccountStatus::ApprenticeGuide) { + if (zone->tradevar < 8 && zone->tradevar > 4) { logtrade = true; - } - else if (admin_level<=80) { - if ((zone->tradevar<8) && (zone->tradevar>3)) + } + } else if (admin_level <= AccountStatus::QuestTroupe) { + if (zone->tradevar < 8 && zone->tradevar > 3) { logtrade = true; - } - else if (admin_level<=100){ - if ((zone->tradevar<9) && (zone->tradevar>2)) + } + } else if (admin_level <= AccountStatus::GMAdmin) { + if (zone->tradevar < 9 && zone->tradevar > 2) { logtrade = true; - } - else if (admin_level<=150){ - if (((zone->tradevar<8) && (zone->tradevar>1)) || (zone->tradevar==9)) + } + } else if (admin_level <= AccountStatus::GMLeadAdmin) { + if ((zone->tradevar < 8 && zone->tradevar > 1) || zone->tradevar == 9) { logtrade = true; - } - else if (admin_level<=255){ - if ((zone->tradevar<8) && (zone->tradevar>0)) + } + } else if (admin_level <= AccountStatus::Max){ + if (zone->tradevar < 8 && zone->tradevar > 0) { logtrade = true; + } } } - if (logtrade == true) { + if (logtrade) { char logtext[1000] = {0}; uint32 cash = 0; bool comma = false; diff --git a/zone/worldserver.cpp b/zone/worldserver.cpp index a77eb4a17..be039be8d 100644 --- a/zone/worldserver.cpp +++ b/zone/worldserver.cpp @@ -161,13 +161,22 @@ void WorldServer::OnConnected() { safe_delete(pack); if (is_zone_loaded) { - this->SetZoneData(zone->GetZoneID(), zone->GetInstanceID()); + SetZoneData(zone->GetZoneID(), zone->GetInstanceID()); entity_list.UpdateWho(true); - this->SendEmoteMessage(0, 0, 15, "Zone connect: %s", zone->GetLongName()); + SendEmoteMessage( + 0, + 0, + Chat::Yellow, + fmt::format( + "Zone Connected | {} ({})", + zone->GetLongName(), + zone->GetZoneID() + ).c_str() + ); zone->GetTimeSync(); } else { - this->SetZoneData(0); + SetZoneData(0); } pack = new ServerPacket(ServerOP_LSZoneBoot, sizeof(ZoneBoot_Struct)); @@ -449,7 +458,12 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) ServerEmoteMessage_Struct* sem = (ServerEmoteMessage_Struct*)pack->pBuffer; if (sem->to[0] != 0) { if (strcasecmp(sem->to, zone->GetShortName()) == 0) - entity_list.MessageStatus(sem->guilddbid, sem->minstatus, sem->type, (char*)sem->message); + entity_list.MessageStatus( + sem->guilddbid, + sem->minstatus, + sem->type, + (char*)sem->message + ); else { Client* client = entity_list.GetClientByName(sem->to); if (client) { @@ -465,11 +479,22 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) } else { char* newmessage = 0; - if (strstr(sem->message, "^") == 0) - entity_list.MessageStatus(sem->guilddbid, sem->minstatus, sem->type, sem->message); - else { - for (newmessage = strtok((char*)sem->message, "^"); newmessage != nullptr; newmessage = strtok(nullptr, "^")) - entity_list.MessageStatus(sem->guilddbid, sem->minstatus, sem->type, newmessage); + if (strstr(sem->message, "^") == 0) { + entity_list.MessageStatus( + sem->guilddbid, + sem->minstatus, + sem->type, + sem->message + ); + } else { + for (newmessage = strtok((char*)sem->message, "^"); newmessage != nullptr; newmessage = strtok(nullptr, "^")) { + entity_list.MessageStatus( + sem->guilddbid, + sem->minstatus, + sem->type, + newmessage + ); + } } } break; @@ -502,7 +527,16 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) SetZoneData(0); } else { - SendEmoteMessage(0, 0, 15, "Zone shutdown: %s", zone->GetLongName()); + SendEmoteMessage( + 0, + 0, + Chat::Yellow, + fmt::format( + "Zone Shutdown | {} ({})", + zone->GetLongName(), + zone->GetZoneID() + ).c_str() + ); ServerZoneStateChange_struct* zst = (ServerZoneStateChange_struct *)pack->pBuffer; std::cout << "Zone shutdown by " << zst->adminname << std::endl; @@ -523,7 +557,16 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) zone->StartShutdownTimer(AUTHENTICATION_TIMEOUT * 1000); } else { - SendEmoteMessage(zst->adminname, 0, 0, "Zone bootup failed: Already running '%s'", zone->GetShortName()); + SendEmoteMessage( + zst->adminname, + 0, + Chat::White, + fmt::format( + "Zone Bootup Failed | {} ({}) Already running", + zone->GetLongName(), + zone->GetZoneID() + ).c_str() + ); } break; } @@ -590,7 +633,19 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) else if (client->GetAnon() == 1 && client->Admin() > szp->adminrank) break; else { - SendEmoteMessage(szp->adminname, 0, 0, "Summoning %s to %s %1.1f, %1.1f, %1.1f", szp->name, szp->zone, szp->x_pos, szp->y_pos, szp->z_pos); + SendEmoteMessage( + szp->adminname, + 0, + Chat::White, + fmt::format( + "Summoning {} to {} at {:.2f}, {:.2f}, {:.2f}", + szp->name, + szp->zone, + szp->x_pos, + szp->y_pos, + szp->z_pos + ).c_str() + ); } if (!szp->instance_id) { client->MovePC(ZoneID(szp->zone), szp->instance_id, szp->x_pos, szp->y_pos, szp->z_pos, client->GetHeading(), szp->ignorerestrictions, GMSummon); @@ -615,13 +670,33 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) if (client) { if (skp->adminrank >= client->Admin()) { client->WorldKick(); - if (is_zone_loaded) - SendEmoteMessage(skp->adminname, 0, 0, "Remote Kick: %s booted in zone %s.", skp->name, zone->GetShortName()); - else - SendEmoteMessage(skp->adminname, 0, 0, "Remote Kick: %s booted.", skp->name); + SendEmoteMessage( + skp->adminname, + 0, + Chat::White, + fmt::format( + "Remote Kick | {} booted{}", + skp->name, + is_zone_loaded ? + fmt::format( + "in {} ({})", + zone->GetLongName(), + zone->GetZoneID() + ) : + "" + ).c_str() + ); + } else if (client->GetAnon() != 1) { + SendEmoteMessage( + skp->adminname, + 0, + Chat::White, + fmt::format( + "Remote Kick | Your Status Level is not high enough to kick {}.", + skp->name + ).c_str() + ); } - else if (client->GetAnon() != 1) - SendEmoteMessage(skp->adminname, 0, 0, "Remote Kick: Your avatar level is not high enough to kick %s", skp->name); } break; } @@ -631,13 +706,33 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) if (client) { if (skp->admin >= client->Admin()) { client->GMKill(); - if (is_zone_loaded) - SendEmoteMessage(skp->gmname, 0, 0, "Remote Kill: %s killed in zone %s.", skp->target, zone->GetShortName()); - else - SendEmoteMessage(skp->gmname, 0, 0, "Remote Kill: %s killed.", skp->target); + SendEmoteMessage( + skp->gmname, + 0, + Chat::White, + fmt::format( + "Remote Kill | {} killed{}", + skp->target, + is_zone_loaded ? + fmt::format( + "in {} ({})", + zone->GetLongName(), + zone->GetZoneID() + ) : + "" + ).c_str() + ); + } else if (client->GetAnon() != 1) { + SendEmoteMessage( + skp->gmname, + 0, + Chat::White, + fmt::format( + "Remote Kill | Your Status Level is not high enough to kill {}", + skp->target + ).c_str() + ); } - else if (client->GetAnon() != 1) - SendEmoteMessage(skp->gmname, 0, 0, "Remote Kill: Your avatar level is not high enough to kill %s", skp->target); } break; } @@ -674,7 +769,20 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) ServerGMGoto_Struct* gmg = (ServerGMGoto_Struct*)pack->pBuffer; Client* client = entity_list.GetClientByName(gmg->gotoname); if (client) { - SendEmoteMessage(gmg->myname, 0, 13, "Summoning you to: %s @ %s, %1.1f, %1.1f, %1.1f", client->GetName(), zone->GetShortName(), client->GetX(), client->GetY(), client->GetZ()); + SendEmoteMessage( + gmg->myname, + 0, + Chat::Red, + fmt::format( + "Summoning you to {} ({}) in {} at {:.2f}, {:.2f}, {:.2f}", + client->GetCleanName(), + zone->GetLongName(), + zone->GetZoneID(), + client->GetX(), + client->GetY(), + client->GetZ() + ).c_str() + ); auto outpack = new ServerPacket(ServerOP_ZonePlayer, sizeof(ServerZonePlayer_Struct)); ServerZonePlayer_Struct* szp = (ServerZonePlayer_Struct*)outpack->pBuffer; strcpy(szp->adminname, gmg->myname); @@ -688,7 +796,15 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) safe_delete(outpack); } else { - SendEmoteMessage(gmg->myname, 0, 13, "Error: %s not found", gmg->gotoname); + SendEmoteMessage( + gmg->myname, + 0, + Chat::Red, + fmt::format( + "Error: {} not found.", + gmg->gotoname + ).c_str() + ); } break; } @@ -710,19 +826,17 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) } ServerUptime_Struct* sus = (ServerUptime_Struct*)pack->pBuffer; uint32 ms = Timer::GetCurrentTime(); - uint32 d = ms / 86400000; - ms -= d * 86400000; - uint32 h = ms / 3600000; - ms -= h * 3600000; - uint32 m = ms / 60000; - ms -= m * 60000; - uint32 s = ms / 1000; - if (d) - this->SendEmoteMessage(sus->adminname, 0, 0, "Zone #%i Uptime: %02id %02ih %02im %02is", sus->zoneserverid, d, h, m, s); - else if (h) - this->SendEmoteMessage(sus->adminname, 0, 0, "Zone #%i Uptime: %02ih %02im %02is", sus->zoneserverid, h, m, s); - else - this->SendEmoteMessage(sus->adminname, 0, 0, "Zone #%i Uptime: %02im %02is", sus->zoneserverid, m, s); + std::string time_string = ConvertSecondsToTime(ms); + SendEmoteMessage( + sus->adminname, + 0, + Chat::White, + fmt::format( + "Zoneserver {} | Uptime: {}", + sus->zoneserverid, + time_string + ).c_str() + ); } case ServerOP_Petition: { std::cout << "Got Server Requested Petition List Refresh" << std::endl; @@ -856,9 +970,19 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) case ServerOP_Revoke: { RevokeStruct* rev = (RevokeStruct*)pack->pBuffer; Client* client = entity_list.GetClientByName(rev->name); - if (client) - { - SendEmoteMessage(rev->adminname, 0, 0, "%s: %srevoking %s", zone->GetShortName(), rev->toggle ? "" : "un", client->GetName()); + if (client) { + SendEmoteMessage( + rev->adminname, + 0, + Chat::White, + fmt::format( + "Zone {} ({}) | {} {}.", + zone->GetLongName(), + zone->GetZoneID(), + rev->toggle ? "Revoking" : "Unrevoking", + client->GetCleanName() + ).c_str() + ); client->SetRevoked(rev->toggle); } break; @@ -1826,12 +1950,30 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) break; } case ServerOP_ReloadRules: { - worldserver.SendEmoteMessage( - 0, 0, 100, 15, - "Rules reloaded for Zone: '%s' Instance ID: %u", - (zone ? zone->GetLongName() : StringFormat("Null zone pointer [pid]:[%i]", getpid()).c_str()), - (zone ? zone->GetInstanceID() : 0xFFFFFFFFF) - ); + if (zone) { + worldserver.SendEmoteMessage( + 0, + 0, + AccountStatus::GMAdmin, + Chat::Yellow, + fmt::format( + "Rules reloaded for {}.", + fmt::format( + "{} ({})", + zone->GetLongName(), + zone->GetZoneID() + ), + ( + zone->GetInstanceID() ? + fmt::format( + "Instance ID: {}", + zone->GetInstanceID() + ) : + "" + ) + ).c_str() + ); + } RuleManager::Instance()->LoadRules(&database, RuleManager::Instance()->GetActiveRuleset(), true); break; } @@ -2716,7 +2858,7 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) uint8 min_status = WWDW->min_status; uint8 max_status = WWDW->max_status; for (auto &client : entity_list.GetClientList()) { - if (client.second->Admin() >= min_status && (client.second->Admin() <= max_status || max_status == 0)) { + if (client.second->Admin() >= min_status && (client.second->Admin() <= max_status || max_status == AccountStatus::Player)) { DialogueWindow::Render(client.second, message); } } @@ -2733,27 +2875,27 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) for (auto &client : entity_list.GetClientList()) { switch (update_type) { case WWLDoNUpdateType_AddLoss: - if (client.second->Admin() >= min_status && (client.second->Admin() <= max_status || max_status == 0)) { + if (client.second->Admin() >= min_status && (client.second->Admin() <= max_status || max_status == AccountStatus::Player)) { client.second->UpdateLDoNWinLoss(theme_id, false); } break; case WWLDoNUpdateType_AddPoints: - if (client.second->Admin() >= min_status && (client.second->Admin() <= max_status || max_status == 0)) { + if (client.second->Admin() >= min_status && (client.second->Admin() <= max_status || max_status == AccountStatus::Player)) { client.second->UpdateLDoNPoints(theme_id, points); } break; case WWLDoNUpdateType_AddWin: - if (client.second->Admin() >= min_status && (client.second->Admin() <= max_status || max_status == 0)) { + if (client.second->Admin() >= min_status && (client.second->Admin() <= max_status || max_status == AccountStatus::Player)) { client.second->UpdateLDoNWinLoss(theme_id, true); } break; case WWLDoNUpdateType_RemoveLoss: - if (client.second->Admin() >= min_status && (client.second->Admin() <= max_status || max_status == 0)) { + if (client.second->Admin() >= min_status && (client.second->Admin() <= max_status || max_status == AccountStatus::Player)) { client.second->UpdateLDoNWinLoss(theme_id, false, true); } break; case WWLDoNUpdateType_RemoveWin: - if (client.second->Admin() >= min_status && (client.second->Admin() <= max_status || max_status == 0)) { + if (client.second->Admin() >= min_status && (client.second->Admin() <= max_status || max_status == AccountStatus::Player)) { client.second->UpdateLDoNWinLoss(theme_id, true, true); } break; @@ -2773,7 +2915,7 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) uint8 min_status = WWM->min_status; uint8 max_status = WWM->max_status; for (auto &client : entity_list.GetClientList()) { - if (client.second->Admin() >= min_status && (client.second->Admin() <= max_status || max_status == 0)) { + if (client.second->Admin() >= min_status && (client.second->Admin() <= max_status || max_status == AccountStatus::Player)) { client.second->SendMarqueeMessage(type, priority, fade_in, fade_out, duration, message); } } @@ -2787,7 +2929,7 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) uint8 min_status = WWM->min_status; uint8 max_status = WWM->max_status; for (auto &client : entity_list.GetClientList()) { - if (client.second->Admin() >= min_status && (client.second->Admin() <= max_status || max_status == 0)) { + if (client.second->Admin() >= min_status && (client.second->Admin() <= max_status || max_status == AccountStatus::Player)) { client.second->Message(type, message); } } @@ -2804,12 +2946,12 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) for (auto &client : entity_list.GetClientList()) { switch (update_type) { case WWMoveUpdateType_MoveZone: - if (client.second->Admin() >= min_status && (client.second->Admin() <= max_status || max_status == 0)) { + if (client.second->Admin() >= min_status && (client.second->Admin() <= max_status || max_status == AccountStatus::Player)) { client.second->MoveZone(zone_short_name); } break; case WWMoveUpdateType_MoveZoneInstance: - if (client.second->Admin() >= min_status && (client.second->Admin() <= max_status || max_status == 0)) { + if (client.second->Admin() >= min_status && (client.second->Admin() <= max_status || max_status == AccountStatus::Player)) { client.second->MoveZoneInstance(instance_id); } break; @@ -2827,7 +2969,7 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) uint8 max_status = WWSEV->max_status; if (update_type == WWSetEntityVariableUpdateType_Character) { for (auto &client : entity_list.GetClientList()) { - if (client.second->Admin() >= min_status && (client.second->Admin() <= max_status || max_status == 0)) { + if (client.second->Admin() >= min_status && (client.second->Admin() <= max_status || max_status == AccountStatus::Player)) { client.second->SetEntityVariable(variable_name, variable_value); } } @@ -2847,7 +2989,7 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) uint8 max_status = WWS->max_status; if (update_type == WWSignalUpdateType_Character) { for (auto &client : entity_list.GetClientList()) { - if (client.second->Admin() >= min_status && (client.second->Admin() <= max_status || max_status == 0)) { + if (client.second->Admin() >= min_status && (client.second->Admin() <= max_status || max_status == AccountStatus::Player)) { client.second->Signal(signal); } } @@ -2867,13 +3009,13 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) uint8 max_status = WWS->max_status; if (update_type == WWSpellUpdateType_Cast) { for (auto &client : entity_list.GetClientList()) { - if (client.second->Admin() >= min_status && (client.second->Admin() <= max_status || max_status == 0)) { + if (client.second->Admin() >= min_status && (client.second->Admin() <= max_status || max_status == AccountStatus::Player)) { client.second->SpellFinished(spell_id, client.second); } } } else if (update_type == WWSpellUpdateType_Remove) { for (auto &client : entity_list.GetClientList()) { - if (client.second->Admin() >= min_status && (client.second->Admin() <= max_status || max_status == 0)) { + if (client.second->Admin() >= min_status && (client.second->Admin() <= max_status || max_status == AccountStatus::Player)) { client.second->BuffFadeBySpellID(spell_id); } } @@ -2891,7 +3033,7 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) uint8 min_status = WWTU->min_status; uint8 max_status = WWTU->max_status; for (auto &client : entity_list.GetClientList()) { - if (client.second->Admin() >= min_status && (client.second->Admin() <= max_status || max_status == 0)) { + if (client.second->Admin() >= min_status && (client.second->Admin() <= max_status || max_status == AccountStatus::Player)) { switch (update_type) { case WWTaskUpdateType_ActivityReset: client.second->ResetTaskActivity(task_identifier, task_subidentifier); @@ -2959,11 +3101,28 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) if (request_zone_short_name == local_zone_short_name || can_reload_global_script) { zone->SetQuestHotReloadQueued(true); } else if (request_zone_short_name == "all") { - std::string reload_quest_saylink = EQ::SayLinkEngine::GenerateQuestSaylink("#reloadquest", false, "Locally"); - std::string reload_world_saylink = EQ::SayLinkEngine::GenerateQuestSaylink("#reloadworld", false, "Globally"); - worldserver.SendEmoteMessage(0, 0, 20, 15, "A quest, plugin, or global script has changed reload quests [%s] [%s].", reload_quest_saylink.c_str(), reload_world_saylink.c_str()); + std::string reload_quest_saylink = EQ::SayLinkEngine::GenerateQuestSaylink( + "#reloadquest", + false, + "Locally" + ); + std::string reload_world_saylink = EQ::SayLinkEngine::GenerateQuestSaylink( + "#reloadworld", + false, + "Globally" + ); + worldserver.SendEmoteMessage( + 0, + 0, + AccountStatus::ApprenticeGuide, + Chat::Yellow, + fmt::format( + "A quest, plugin, or global script has changed. Reload: [{}] [{}]", + reload_quest_saylink, + reload_world_saylink + ).c_str() + ); } - break; } case ServerOP_ChangeSharedMem: @@ -3075,7 +3234,7 @@ bool WorldServer::SendChannelMessage(Client* from, const char* to, uint8 chan_nu if (from == 0) { strcpy(scm->from, "ZServer"); - scm->fromadmin = 0; + scm->fromadmin = AccountStatus::Player; } else { strcpy(scm->from, from->GetName()); @@ -3110,7 +3269,13 @@ bool WorldServer::SendEmoteMessage(const char* to, uint32 to_guilddbid, uint32 t vsnprintf(buffer, sizeof(buffer) - 1, message, argptr); va_end(argptr); - return SendEmoteMessage(to, to_guilddbid, 0, type, buffer); + return SendEmoteMessage( + to, + to_guilddbid, + AccountStatus::Player, + type, + buffer + ); } bool WorldServer::SendEmoteMessage(const char* to, uint32 to_guilddbid, int16 to_minstatus, uint32 type, const char* message, ...) { @@ -3122,7 +3287,12 @@ bool WorldServer::SendEmoteMessage(const char* to, uint32 to_guilddbid, int16 to va_end(argptr); if (!Connected() && to == 0) { - entity_list.MessageStatus(to_guilddbid, to_minstatus, type, buffer); + entity_list.MessageStatus( + to_guilddbid, + to_minstatus, + type, + buffer + ); return false; } diff --git a/zone/zone.h b/zone/zone.h index af6f571ae..0a8a0aeff 100755 --- a/zone/zone.h +++ b/zone/zone.h @@ -328,24 +328,29 @@ public: auto message_split = SplitString(message, '\n'); entity_list.MessageStatus( 0, - 80, + AccountStatus::QuestTroupe, LogSys.GetGMSayColorFromCategory(log_category), - "%s", message_split[0].c_str() ); for (size_t iter = 1; iter < message_split.size(); ++iter) { entity_list.MessageStatus( 0, - 80, + AccountStatus::QuestTroupe, LogSys.GetGMSayColorFromCategory(log_category), - "--- %s", - message_split[iter].c_str() + fmt::format( + "--- {}", + message_split[iter] + ).c_str() ); } - } - else { - entity_list.MessageStatus(0, 80, LogSys.GetGMSayColorFromCategory(log_category), "%s", message.c_str()); + } else { + entity_list.MessageStatus( + 0, + AccountStatus::QuestTroupe, + LogSys.GetGMSayColorFromCategory(log_category), + message.c_str() + ); } } diff --git a/zone/zoning.cpp b/zone/zoning.cpp index 7ca47aa7b..d305003b8 100644 --- a/zone/zoning.cpp +++ b/zone/zoning.cpp @@ -181,7 +181,7 @@ void Client::Handle_OP_ZoneChange(const EQApplicationPacket *app) { /* Load up the Safe Coordinates, restrictions and verify the zone name*/ float safe_x, safe_y, safe_z, safe_heading; - int16 min_status = 0; + int16 min_status = AccountStatus::Player; uint8 min_level = 0; char flag_needed[128]; if(!content_db.GetSafePoints( @@ -1059,7 +1059,7 @@ void Client::SendZoneFlagInfo(Client *to) const { const char* zone_short_name = ZoneName(zone_id); std::string zone_long_name = zone_store.GetZoneLongName(zone_id); float safe_x, safe_y, safe_z, safe_heading; - int16 min_status = 0; + int16 min_status = AccountStatus::Player; uint8 min_level = 0; char flag_name[128]; if(!content_db.GetSafePoints( @@ -1089,7 +1089,7 @@ bool Client::CanBeInZone() { return(true); float safe_x, safe_y, safe_z, safe_heading; - int16 min_status = 0; + int16 min_status = AccountStatus::Player; uint8 min_level = 0; char flag_needed[128]; if(!content_db.GetSafePoints(