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