mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 22:58:34 +00:00
[Quest API] Add GetClassAbbreviation() and GetRaceAbbreviation() to Perl/Lua (#3463)
# Perl - Add `$bot->GetClassAbbreviation()`. - Add `$bot->GetRaceAbbreviation()`. - Add `$client->GetClassAbbreviation()`. - Add `$client->GetRaceAbbreviation()`. # Lua - Add `bot:GetClassAbbreviation()`. - Add `bot:GetRaceAbbreviation()`. - Add `client:GetClassAbbreviation()`. - Add `client:GetRaceAbbreviation()`. # Notes - Allows operators to easily get a player race/class abbreviation, example being `Warrior` as `WAR`.
This commit is contained in:
+2
-2
@@ -755,7 +755,7 @@ uint8 ClassArmorType(uint8 class_id)
|
||||
const std::string GetPlayerClassAbbreviation(uint8 class_id)
|
||||
{
|
||||
if (!EQ::ValueWithin(class_id, WARRIOR, BERSERKER)) {
|
||||
return std::string();
|
||||
return std::string("UNK");
|
||||
}
|
||||
|
||||
switch (class_id) {
|
||||
@@ -793,7 +793,7 @@ const std::string GetPlayerClassAbbreviation(uint8 class_id)
|
||||
return "BER";
|
||||
}
|
||||
|
||||
return std::string();
|
||||
return std::string("UNK");
|
||||
}
|
||||
|
||||
bool IsPlayerClass(uint8 class_id) {
|
||||
|
||||
+2
-2
@@ -2249,7 +2249,7 @@ const char* GetGenderName(uint32 gender_id) {
|
||||
const std::string GetPlayerRaceAbbreviation(uint16 race_id)
|
||||
{
|
||||
if (!IsPlayerRace(race_id)) {
|
||||
return std::string();
|
||||
return std::string("UNK");
|
||||
}
|
||||
|
||||
switch (race_id) {
|
||||
@@ -2287,7 +2287,7 @@ const std::string GetPlayerRaceAbbreviation(uint16 race_id)
|
||||
return "DRK";
|
||||
}
|
||||
|
||||
return std::string();
|
||||
return std::string("UNK");
|
||||
}
|
||||
|
||||
bool IsPlayerRace(uint16 race_id) {
|
||||
|
||||
Reference in New Issue
Block a user