mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 22:58:34 +00:00
[Messages] Add GM Status and Invulnerability Messages (#4266)
* [Messages] Add GM Status and Invulnerability Messages * Update zoning.cpp * Finalize. * Update corpse.cpp * Update message --------- Co-authored-by: Akkadius <akkadius1@gmail.com>
This commit is contained in:
+17
-13
@@ -373,8 +373,8 @@ void Client::Handle_OP_ZoneChange(const EQApplicationPacket *app) {
|
||||
}
|
||||
|
||||
if (content_service.GetCurrentExpansion() >= Expansion::Classic && GetGM()) {
|
||||
LogInfo("[{}] Bypassing Expansion zone checks because GM status is set", GetCleanName());
|
||||
Message(Chat::Yellow, "Bypassing Expansion zone checks because GM status is set");
|
||||
LogInfo("[{}] Bypassing zone expansion checks because GM Flag is set", GetCleanName());
|
||||
Message(Chat::White, "Your GM Flag allows you to bypass zone expansion checks.");
|
||||
}
|
||||
|
||||
if (zoning_message == ZoningMessage::ZoneSuccess) {
|
||||
@@ -1369,7 +1369,7 @@ bool Client::CanEnterZone(const std::string& zone_short_name, int16 instance_ver
|
||||
return false;
|
||||
}
|
||||
|
||||
if (GetLevel() < z->min_level) {
|
||||
if (!GetGM() && GetLevel() < z->min_level) {
|
||||
LogInfo(
|
||||
"Character [{}] does not meet minimum level requirement ([{}] < [{}])!",
|
||||
GetCleanName(),
|
||||
@@ -1379,7 +1379,7 @@ bool Client::CanEnterZone(const std::string& zone_short_name, int16 instance_ver
|
||||
return false;
|
||||
}
|
||||
|
||||
if (GetLevel() > z->max_level) {
|
||||
if (!GetGM() && GetLevel() > z->max_level) {
|
||||
LogInfo(
|
||||
"Character [{}] does not meet maximum level requirement ([{}] > [{}])!",
|
||||
GetCleanName(),
|
||||
@@ -1399,15 +1399,19 @@ bool Client::CanEnterZone(const std::string& zone_short_name, int16 instance_ver
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!z->flag_needed.empty() && Strings::IsNumber(z->flag_needed) && Strings::ToBool(z->flag_needed)) {
|
||||
if (!GetGM() && !HasZoneFlag(z->zoneidnumber)) {
|
||||
LogInfo(
|
||||
"Character [{}] does not have the flag to be in this zone [{}]!",
|
||||
GetCleanName(),
|
||||
z->flag_needed
|
||||
);
|
||||
return false;
|
||||
}
|
||||
if (
|
||||
!GetGM() &&
|
||||
!z->flag_needed.empty() &&
|
||||
Strings::IsNumber(z->flag_needed) &&
|
||||
Strings::ToBool(z->flag_needed) &&
|
||||
!HasZoneFlag(z->zoneidnumber)
|
||||
) {
|
||||
LogInfo(
|
||||
"Character [{}] does not have the flag to be in this zone [{}]!",
|
||||
GetCleanName(),
|
||||
z->flag_needed
|
||||
);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user