mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 21:01: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 ClearPendingAdventureDoorClick() { safe_delete(adventure_door_timer); }
|
||||||
void ClearPendingAdventureData();
|
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();
|
int GetAggroCount();
|
||||||
void IncrementAggroCount(bool raid_target = false);
|
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
|
* 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
|
//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
|
//only enforce rules here which are serious enough to warrant being kicked from
|
||||||
//the zone
|
//the zone
|
||||||
@ -1246,11 +1246,8 @@ bool Client::CanEnterZone(std::string zone_short_name, int16 instance_version) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!z->flag_needed.empty()) {
|
if (!z->flag_needed.empty() && Strings::IsNumber(z->flag_needed) && std::stoi(z->flag_needed) == 1) {
|
||||||
if (
|
if (Admin() < minStatusToIgnoreZoneFlags && !HasZoneFlag(z->zoneidnumber)) {
|
||||||
Admin() < minStatusToIgnoreZoneFlags &&
|
|
||||||
!HasZoneFlag(zone->GetZoneID())
|
|
||||||
) {
|
|
||||||
LogInfo(
|
LogInfo(
|
||||||
"Character [{}] does not have the flag to be in this zone [{}]!",
|
"Character [{}] does not have the flag to be in this zone [{}]!",
|
||||||
GetCleanName(),
|
GetCleanName(),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user