From a660457883e4da9e6dbec1bf9a49e00de8e21baa Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Tue, 21 May 2024 21:49:05 -0500 Subject: [PATCH] cannot get XP from the same character in PVP more than once per reboot --- src/engine/objects/Experience.java | 3 ++- src/engine/objects/PlayerCharacter.java | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/engine/objects/Experience.java b/src/engine/objects/Experience.java index 9f454817..2d6915dd 100644 --- a/src/engine/objects/Experience.java +++ b/src/engine/objects/Experience.java @@ -475,7 +475,8 @@ public class Experience { // Grant XP if(mob.getObjectType().equals(Enum.GameObjectType.PlayerCharacter)) - killer.grantXP((int) Math.floor(grantedExperience), true); + if(((PlayerCharacter)mob).pvpDeaths.contains(killer.getObjectUUID()) == false) + killer.grantXP((int) Math.floor(grantedExperience), true); else killer.grantXP((int) Math.floor(grantedExperience),false); } diff --git a/src/engine/objects/PlayerCharacter.java b/src/engine/objects/PlayerCharacter.java index e9da5652..009095a2 100644 --- a/src/engine/objects/PlayerCharacter.java +++ b/src/engine/objects/PlayerCharacter.java @@ -181,6 +181,8 @@ public class PlayerCharacter extends AbstractCharacter { public boolean depositingWarehouse = false; public Building warehouseBuilding; + public ArrayList killedCharacters = new ArrayList<>(); + /** * No Id Constructor */