mirror of
https://github.com/ProjectSWGCore/Holocore.git
synced 2026-01-17 00:06:00 -05:00
Merge pull request #293 from madsboddum/290
PvP zones are now only applied to the intended planet instead of every planet #290
This commit is contained in:
@@ -281,6 +281,11 @@ public class FactionFlagService extends Service {
|
||||
return pvpZones.values().stream()
|
||||
.anyMatch(pvpZone -> {
|
||||
Location zoneLocation = pvpZone.getLocation();
|
||||
|
||||
if (location.getTerrain() != zoneLocation.getTerrain()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
double radius = pvpZone.getRadius();
|
||||
|
||||
return location.isWithinFlatDistance(zoneLocation, radius);
|
||||
|
||||
Reference in New Issue
Block a user