added delay on mad scientist eggSpawn

fixed Exp bug
This commit is contained in:
Cheese 2015-06-27 20:39:05 +10:00
parent 1f34bc40a3
commit 840ebabf2a
2 changed files with 16 additions and 5 deletions

View File

@ -9,6 +9,7 @@ import mineplex.core.common.util.UtilEnt;
import mineplex.core.common.util.UtilInv; import mineplex.core.common.util.UtilInv;
import mineplex.core.common.util.UtilMath; import mineplex.core.common.util.UtilMath;
import mineplex.core.common.util.UtilParticle; import mineplex.core.common.util.UtilParticle;
import mineplex.core.common.util.UtilTime;
import mineplex.core.common.util.UtilParticle.ParticleType; import mineplex.core.common.util.UtilParticle.ParticleType;
import mineplex.core.common.util.UtilParticle.ViewDist; import mineplex.core.common.util.UtilParticle.ViewDist;
import mineplex.core.common.util.UtilServer; import mineplex.core.common.util.UtilServer;
@ -68,6 +69,9 @@ public class PerkMadScientist extends Perk implements IThrown
if (Manager.GetGame() == null) if (Manager.GetGame() == null)
return; return;
if (!UtilTime.elapsed(Manager.GetGame().GetStateTime(), 60000))
return;
for (Player player : Manager.GetGame().GetPlayers(true)) for (Player player : Manager.GetGame().GetPlayers(true))
{ {

View File

@ -68,12 +68,19 @@ public class ExperienceStatTracker extends StatTracker<Game>
//Game Time = 1 Exp per 3 Seconds //Game Time = 1 Exp per 3 Seconds
long time = System.currentTimeMillis(); long time = System.currentTimeMillis();
//Exp Until They Quit //Exp Until They Quit
if (!player.isOnline() && _playerQuitTime.containsKey(player.getName())) if (!player.isOnline())
time = _playerQuitTime.get(player.getName()); {
//No Time Exp if (_playerQuitTime.containsKey(player.getName()))
else {
time = _startTime; time = _playerQuitTime.get(player.getName());
}
else
{
time = _startTime;
}
}
double timeExp = (time - _startTime)/1500d; double timeExp = (time - _startTime)/1500d;