mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 18:52:22 +00:00
[Commands] Cleanup #who Command. (#1924)
* [Commands] Cleanup #who Command. - Cleanup messages and logic. - Add GetAccountStatusMap() and GetAccountStatusName() helpers for account status stuff. - Use Chat::Who instead of Chat::Magenta so you can more easily see saylinks. - Add a summon saylink to the list of saylinks so you can summon the player. * New line.
This commit is contained in:
@@ -298,4 +298,42 @@ std::string EQ::constants::GetBodyTypeName(bodyType bodytype_id)
|
||||
return bodytypes[bodytype_id];
|
||||
}
|
||||
return std::string();
|
||||
}
|
||||
}
|
||||
|
||||
const std::map<uint8, std::string>& EQ::constants::GetAccountStatusMap()
|
||||
{
|
||||
static const std::map<uint8, std::string> account_status_map = {
|
||||
{ AccountStatus::Player, "Player" },
|
||||
{ AccountStatus::Steward, "Steward" },
|
||||
{ AccountStatus::ApprenticeGuide, "Apprentice Guide" },
|
||||
{ AccountStatus::Guide, "Guide" },
|
||||
{ AccountStatus::QuestTroupe, "Quest Troupe" },
|
||||
{ AccountStatus::SeniorGuide, "Senior Guide" },
|
||||
{ AccountStatus::GMTester, "GM Tester" },
|
||||
{ AccountStatus::EQSupport, "EQ Support" },
|
||||
{ AccountStatus::GMStaff, "GM Staff" },
|
||||
{ AccountStatus::GMAdmin, "GM Admin" },
|
||||
{ AccountStatus::GMLeadAdmin, "GM Lead Admin" },
|
||||
{ AccountStatus::QuestMaster, "Quest Master" },
|
||||
{ AccountStatus::GMAreas, "GM Areas" },
|
||||
{ AccountStatus::GMCoder, "GM Coder" },
|
||||
{ AccountStatus::GMMgmt, "GM Mgmt" },
|
||||
{ AccountStatus::GMImpossible, "GM Impossible" },
|
||||
{ AccountStatus::Max, "GM Max" }
|
||||
};
|
||||
return account_status_map;
|
||||
}
|
||||
|
||||
std::string EQ::constants::GetAccountStatusName(uint8 account_status)
|
||||
{
|
||||
auto account_statuses = EQ::constants::GetAccountStatusMap();
|
||||
std::string status_name;
|
||||
for (auto status_level = account_statuses.rbegin(); status_level != account_statuses.rend(); ++status_level) {
|
||||
if (account_status >= status_level->first) {
|
||||
status_name = status_level->second;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return status_name;
|
||||
}
|
||||
|
||||
@@ -245,6 +245,9 @@ namespace EQ
|
||||
extern const std::map<bodyType, std::string>& GetBodyTypeMap();
|
||||
std::string GetBodyTypeName(bodyType bodytype_id);
|
||||
|
||||
extern const std::map<uint8, std::string>& GetAccountStatusMap();
|
||||
std::string GetAccountStatusName(uint8 account_status);
|
||||
|
||||
const int STANCE_TYPE_FIRST = stancePassive;
|
||||
const int STANCE_TYPE_LAST = stanceBurnAE;
|
||||
const int STANCE_TYPE_COUNT = stanceBurnAE;
|
||||
|
||||
Reference in New Issue
Block a user