mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 22:58:34 +00:00
[Commands] Add additional #peqzone functionality. (#2085)
* [Commands] Add additional #peqzone functionality. - Add #peqzone flagging capabilities so operators don't have to blanket allow #peqzone access to zones. - Allows you to set a zone's `peqzone` column to `2` and disallow use of `#peqzone` until they have been given the appropriate flag. - Add #peqzone_flags command to list your #peqzone flags similar to #flags command. - Add `character_peqzone_flags` table to database and database_schema.h. - Required SQL update to add the new table. - Add client:ClearPEQZoneFlag(zone_id) to Lua. - Add client:HasPEQZoneFlag(zone_id) to Lua. - Add client:LoadPEQZoneFlags() to Lua. - Add client:LoadZoneFlags() to Lua. - Add client:SendPEQZoneFlagInfo(client) to Lua. - Add client:SetPEQZoneFlag(zone_id) to Lua. - Add $client->ClearPEQZoneFlag(zone_id) to Perl. - Add $client->HasPEQZoneFlag(zone_id) to Perl. - Add $client->LoadPEQZoneFlags() to Perl. - Add $client->SendPEQZoneFlagInfo(client) to Perl. - Add $client->SetPEQZoneFlag(zone_id) to Perl. * Fixes.
This commit is contained in:
@@ -68,12 +68,8 @@ void command_peqzone(Client *c, const Seperator *sep)
|
||||
return;
|
||||
}
|
||||
|
||||
bool allows_peqzone = (
|
||||
content_db.GetPEQZone(zone_id, 0) ?
|
||||
true :
|
||||
false
|
||||
);
|
||||
if (!allows_peqzone) {
|
||||
uint8 peqzone_flag = content_db.GetPEQZone(zone_id, 0);
|
||||
if (peqzone_flag == 0) {
|
||||
c->Message(
|
||||
Chat::White,
|
||||
fmt::format(
|
||||
@@ -83,6 +79,16 @@ void command_peqzone(Client *c, const Seperator *sep)
|
||||
).c_str()
|
||||
);
|
||||
return;
|
||||
} else if (peqzone_flag == 2 && !c->HasPEQZoneFlag(zone_id)) {
|
||||
c->Message(
|
||||
Chat::White,
|
||||
fmt::format(
|
||||
"You do not have the required PEQZone flag to use this command to enter {} ({}).",
|
||||
zone_long_name,
|
||||
zone_short_name
|
||||
).c_str()
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
if (zone_id == zone->GetZoneID()) {
|
||||
|
||||
Reference in New Issue
Block a user