Browse Source

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

lakebane-master
FatBoy-DOTC 7 months ago
parent
commit
a660457883
  1. 1
      src/engine/objects/Experience.java
  2. 2
      src/engine/objects/PlayerCharacter.java

1
src/engine/objects/Experience.java

@ -475,6 +475,7 @@ public class Experience {
// Grant XP // Grant XP
if(mob.getObjectType().equals(Enum.GameObjectType.PlayerCharacter)) if(mob.getObjectType().equals(Enum.GameObjectType.PlayerCharacter))
if(((PlayerCharacter)mob).pvpDeaths.contains(killer.getObjectUUID()) == false)
killer.grantXP((int) Math.floor(grantedExperience), true); killer.grantXP((int) Math.floor(grantedExperience), true);
else else
killer.grantXP((int) Math.floor(grantedExperience),false); killer.grantXP((int) Math.floor(grantedExperience),false);

2
src/engine/objects/PlayerCharacter.java

@ -181,6 +181,8 @@ public class PlayerCharacter extends AbstractCharacter {
public boolean depositingWarehouse = false; public boolean depositingWarehouse = false;
public Building warehouseBuilding; public Building warehouseBuilding;
public ArrayList<PlayerCharacter> killedCharacters = new ArrayList<>();
/** /**
* No Id Constructor * No Id Constructor
*/ */

Loading…
Cancel
Save