cannot get XP from the same character in PVP more than once per reboot

This commit is contained in:
2024-05-21 21:49:05 -05:00
parent 4ca81b019b
commit a660457883
2 changed files with 4 additions and 1 deletions
+2 -1
View File
@@ -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);
}
+2
View File
@@ -181,6 +181,8 @@ public class PlayerCharacter extends AbstractCharacter {
public boolean depositingWarehouse = false;
public Building warehouseBuilding;
public ArrayList<PlayerCharacter> killedCharacters = new ArrayList<>();
/**
* No Id Constructor
*/