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.UtilMath;
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.ViewDist;
import mineplex.core.common.util.UtilServer;
@ -68,6 +69,9 @@ public class PerkMadScientist extends Perk implements IThrown
if (Manager.GetGame() == null)
return;
if (!UtilTime.elapsed(Manager.GetGame().GetStateTime(), 60000))
return;
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
long time = System.currentTimeMillis();
//Exp Until They Quit
if (!player.isOnline() && _playerQuitTime.containsKey(player.getName()))
time = _playerQuitTime.get(player.getName());
//No Time Exp
else
time = _startTime;
if (!player.isOnline())
{
if (_playerQuitTime.containsKey(player.getName()))
{
time = _playerQuitTime.get(player.getName());
}
else
{
time = _startTime;
}
}
double timeExp = (time - _startTime)/1500d;