mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 16:51:29 +00:00
[Fix] Zone Flags Regression (#2760)
This commit is contained in:
parent
29473aa7f5
commit
a7b35594f8
@ -1352,7 +1352,7 @@ public:
|
||||
void ClearPendingAdventureDoorClick() { safe_delete(adventure_door_timer); }
|
||||
void ClearPendingAdventureData();
|
||||
|
||||
bool CanEnterZone(std::string zone_short_name = "", int16 instance_version = -1);
|
||||
bool CanEnterZone(const std::string& zone_short_name = "", int16 instance_version = -1);
|
||||
|
||||
int GetAggroCount();
|
||||
void IncrementAggroCount(bool raid_target = false);
|
||||
|
||||
@ -265,6 +265,19 @@ void Doors::HandleClick(Client *sender, uint8 trigger)
|
||||
}
|
||||
}
|
||||
|
||||
// enforce flags before they hit zoning process
|
||||
auto z = GetZone(m_destination_zone_name, 0);
|
||||
if (!z->flag_needed.empty() && Strings::IsNumber(z->flag_needed) && std::stoi(z->flag_needed) == 1) {
|
||||
if (sender->Admin() < minStatusToIgnoreZoneFlags && !sender->HasZoneFlag(z->zoneidnumber)) {
|
||||
LogInfo(
|
||||
"Character [{}] does not have the flag to be in this zone [{}]!",
|
||||
sender->GetCleanName(),
|
||||
z->flag_needed
|
||||
);
|
||||
sender->MessageString(Chat::LightBlue, DOORS_LOCKED);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Guild Doors
|
||||
*
|
||||
|
||||
@ -1198,7 +1198,7 @@ void Client::SetPEQZoneFlag(uint32 zone_id) {
|
||||
}
|
||||
}
|
||||
|
||||
bool Client::CanEnterZone(std::string zone_short_name, int16 instance_version) {
|
||||
bool Client::CanEnterZone(const std::string& zone_short_name, int16 instance_version) {
|
||||
//check some critial rules to see if this char needs to be booted from the zone
|
||||
//only enforce rules here which are serious enough to warrant being kicked from
|
||||
//the zone
|
||||
@ -1246,11 +1246,8 @@ bool Client::CanEnterZone(std::string zone_short_name, int16 instance_version) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!z->flag_needed.empty()) {
|
||||
if (
|
||||
Admin() < minStatusToIgnoreZoneFlags &&
|
||||
!HasZoneFlag(zone->GetZoneID())
|
||||
) {
|
||||
if (!z->flag_needed.empty() && Strings::IsNumber(z->flag_needed) && std::stoi(z->flag_needed) == 1) {
|
||||
if (Admin() < minStatusToIgnoreZoneFlags && !HasZoneFlag(z->zoneidnumber)) {
|
||||
LogInfo(
|
||||
"Character [{}] does not have the flag to be in this zone [{}]!",
|
||||
GetCleanName(),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user