|
|
|
@ -11,6 +11,7 @@ package engine.objects;
@@ -11,6 +11,7 @@ package engine.objects;
|
|
|
|
|
|
|
|
|
|
import engine.Enum; |
|
|
|
|
import engine.Enum.TargetColor; |
|
|
|
|
import engine.gameManager.LootManager; |
|
|
|
|
import engine.gameManager.ZoneManager; |
|
|
|
|
import engine.math.Vector3fImmutable; |
|
|
|
|
import engine.server.MBServerStatics; |
|
|
|
@ -443,13 +444,14 @@ public class Experience {
@@ -443,13 +444,14 @@ public class Experience {
|
|
|
|
|
if (grantedExperience == 0) |
|
|
|
|
grantedExperience = 1; |
|
|
|
|
|
|
|
|
|
grantedExperience *= LootManager.NORMAL_EXP_RATE; |
|
|
|
|
// Grant the player the EXP
|
|
|
|
|
if(mob.getObjectType().equals(Enum.GameObjectType.PlayerCharacter)) |
|
|
|
|
playerCharacter.grantXP((int) Math.floor(grantedExperience), true); |
|
|
|
|
else |
|
|
|
|
playerCharacter.grantXP((int) Math.floor(grantedExperience),false); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(mob.getObjectType().equals(Enum.GameObjectType.PlayerCharacter)) { |
|
|
|
|
if (((PlayerCharacter) mob).pvpDeaths.contains(killer.getObjectUUID()) == false) |
|
|
|
|
playerCharacter.grantXP((int) Math.floor(grantedExperience), true); |
|
|
|
|
}else { |
|
|
|
|
playerCharacter.grantXP((int) Math.floor(grantedExperience), false); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} else { // Give EXP to a single character
|
|
|
|
@ -474,11 +476,12 @@ public class Experience {
@@ -474,11 +476,12 @@ public class Experience {
|
|
|
|
|
grantedExperience *= .6; |
|
|
|
|
|
|
|
|
|
// Grant XP
|
|
|
|
|
if(mob.getObjectType().equals(Enum.GameObjectType.PlayerCharacter)) |
|
|
|
|
if(((PlayerCharacter)mob).pvpDeaths.contains(killer.getObjectUUID()) == false) |
|
|
|
|
if(mob.getObjectType().equals(Enum.GameObjectType.PlayerCharacter)) { |
|
|
|
|
if (((PlayerCharacter) mob).pvpDeaths.contains(killer.getObjectUUID()) == false) |
|
|
|
|
killer.grantXP((int) Math.floor(grantedExperience), true); |
|
|
|
|
else |
|
|
|
|
killer.grantXP((int) Math.floor(grantedExperience),false); |
|
|
|
|
}else { |
|
|
|
|
killer.grantXP((int) Math.floor(grantedExperience), false); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|