mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-17 22:51:30 +00:00
[Rules] Add Rule to disable PVP Regions (#4513)
This commit is contained in:
parent
f76c798910
commit
be42b73f5c
@ -338,6 +338,7 @@ RULE_STRING(World, IPExemptionZones, "", "Comma-delimited list of zones to exclu
|
|||||||
RULE_STRING(World, MOTD, "", "Server MOTD sent on login, change from empty to have this be used instead of variables table 'motd' value")
|
RULE_STRING(World, MOTD, "", "Server MOTD sent on login, change from empty to have this be used instead of variables table 'motd' value")
|
||||||
RULE_STRING(World, Rules, "", "Server Rules, change from empty to have this be used instead of variables table 'rules' value, lines are pipe (|) separated, example: A|B|C")
|
RULE_STRING(World, Rules, "", "Server Rules, change from empty to have this be used instead of variables table 'rules' value, lines are pipe (|) separated, example: A|B|C")
|
||||||
RULE_BOOL(World, EnableAutoLogin, false, "Enables or disables auto login of characters, allowing people to log characters in directly from loginserver to ingame")
|
RULE_BOOL(World, EnableAutoLogin, false, "Enables or disables auto login of characters, allowing people to log characters in directly from loginserver to ingame")
|
||||||
|
RULE_BOOL(World, EnablePVPRegions, true, "Enables or disables PVP Regions automatically setting your PVP flag")
|
||||||
RULE_CATEGORY_END()
|
RULE_CATEGORY_END()
|
||||||
|
|
||||||
RULE_CATEGORY(Zone)
|
RULE_CATEGORY(Zone)
|
||||||
|
|||||||
@ -8677,14 +8677,16 @@ int Client::GetAccountAge() {
|
|||||||
|
|
||||||
void Client::CheckRegionTypeChanges()
|
void Client::CheckRegionTypeChanges()
|
||||||
{
|
{
|
||||||
if (!zone->HasWaterMap())
|
if (!zone->HasWaterMap()) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
auto new_region = zone->watermap->ReturnRegionType(glm::vec3(m_Position));
|
auto new_region = zone->watermap->ReturnRegionType(glm::vec3(m_Position));
|
||||||
|
|
||||||
// still same region, do nothing
|
// still same region, do nothing
|
||||||
if (last_region_type == new_region)
|
if (last_region_type == new_region) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// If we got out of water clear any water aggro for water only npcs
|
// If we got out of water clear any water aggro for water only npcs
|
||||||
if (last_region_type == RegionTypeWater) {
|
if (last_region_type == RegionTypeWater) {
|
||||||
@ -8695,13 +8697,15 @@ void Client::CheckRegionTypeChanges()
|
|||||||
last_region_type = new_region;
|
last_region_type = new_region;
|
||||||
|
|
||||||
// PVP is the only state we need to keep track of, so we can just return now for PVP servers
|
// PVP is the only state we need to keep track of, so we can just return now for PVP servers
|
||||||
if (RuleI(World, PVPSettings) > 0)
|
if (RuleI(World, PVPSettings) > 0) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (last_region_type == RegionTypePVP)
|
if (last_region_type == RegionTypePVP && RuleB(World, EnablePVPRegions)) {
|
||||||
temp_pvp = true;
|
temp_pvp = true;
|
||||||
else if (temp_pvp)
|
} else if (temp_pvp) {
|
||||||
temp_pvp = false;
|
temp_pvp = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Client::ProcessAggroMeter()
|
void Client::ProcessAggroMeter()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user