gem stuff
This commit is contained in:
parent
d879bc68ab
commit
8238a199d5
@ -140,7 +140,7 @@ public class Evolution extends SoloGame
|
|||||||
GemAssistDeathRespawn = .5;
|
GemAssistDeathRespawn = .5;
|
||||||
|
|
||||||
CompassEnabled = true;
|
CompassEnabled = true;
|
||||||
CompassGiveItem = false;
|
CompassGiveItem = false;
|
||||||
|
|
||||||
AutomaticRespawn = false;
|
AutomaticRespawn = false;
|
||||||
DeathSpectateSecs = 4.0;
|
DeathSpectateSecs = 4.0;
|
||||||
|
@ -9,6 +9,7 @@ import mineplex.core.common.util.C;
|
|||||||
import mineplex.core.common.util.F;
|
import mineplex.core.common.util.F;
|
||||||
import mineplex.core.common.util.UtilPlayer;
|
import mineplex.core.common.util.UtilPlayer;
|
||||||
import mineplex.core.common.util.UtilServer;
|
import mineplex.core.common.util.UtilServer;
|
||||||
|
import mineplex.core.common.util.UtilTime;
|
||||||
import mineplex.minecraft.game.core.combat.CombatComponent;
|
import mineplex.minecraft.game.core.combat.CombatComponent;
|
||||||
import mineplex.minecraft.game.core.combat.event.CombatDeathEvent;
|
import mineplex.minecraft.game.core.combat.event.CombatDeathEvent;
|
||||||
import nautilus.game.arcade.ArcadeFormat;
|
import nautilus.game.arcade.ArcadeFormat;
|
||||||
@ -36,8 +37,9 @@ public class GameGemManager implements Listener
|
|||||||
{
|
{
|
||||||
ArcadeManager Manager;
|
ArcadeManager Manager;
|
||||||
|
|
||||||
boolean DoubleGem = true;
|
boolean DoubleGem = false;
|
||||||
|
boolean TimeReward = true;
|
||||||
|
|
||||||
public GameGemManager(ArcadeManager manager)
|
public GameGemManager(ArcadeManager manager)
|
||||||
{
|
{
|
||||||
Manager = manager;
|
Manager = manager;
|
||||||
@ -184,8 +186,21 @@ public class GameGemManager implements Listener
|
|||||||
total += (int)(earned * (gemFinder * 0.25));
|
total += (int)(earned * (gemFinder * 0.25));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Time Reward
|
||||||
|
if (TimeReward)
|
||||||
|
{
|
||||||
|
long timeOnline = 7380000;
|
||||||
|
|
||||||
|
double hoursOnline = timeOnline/3600000d;
|
||||||
|
|
||||||
|
if (hoursOnline > 5)
|
||||||
|
hoursOnline = 5;
|
||||||
|
|
||||||
|
total += (int)(earned * (hoursOnline * 0.2));
|
||||||
|
}
|
||||||
|
|
||||||
if (DoubleGem && game.GemDoubleEnabled && UtilPlayer.is1_8(player))
|
if (DoubleGem && game.GemDoubleEnabled)
|
||||||
total += earned;
|
total += earned;
|
||||||
|
|
||||||
Manager.GetDonation().RewardGems(null, "Earned " + game.GetName(), player.getName(), player.getUniqueId(), total);
|
Manager.GetDonation().RewardGems(null, "Earned " + game.GetName(), player.getName(), player.getUniqueId(), total);
|
||||||
@ -290,8 +305,26 @@ public class GameGemManager implements Listener
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Time Reward
|
||||||
|
if (TimeReward)
|
||||||
|
{
|
||||||
|
long timeOnline = 7380000;
|
||||||
|
|
||||||
|
double hoursOnline = timeOnline/3600000d;
|
||||||
|
|
||||||
|
if (hoursOnline > 5)
|
||||||
|
hoursOnline = 5;
|
||||||
|
|
||||||
|
int extraGems = (int)(earnedGems * (hoursOnline * 0.2));;
|
||||||
|
|
||||||
|
UtilPlayer.message(player, F.elem(C.cGreen + "+" + extraGems + " Gems") + " for " +
|
||||||
|
F.elem("Online for " + UtilTime.MakeStr(timeOnline) ));
|
||||||
|
|
||||||
|
totalGems += extraGems;
|
||||||
|
}
|
||||||
|
|
||||||
//Double Gem
|
//Double Gem
|
||||||
if (DoubleGem && game.GemDoubleEnabled && UtilPlayer.is1_8(player))
|
if (DoubleGem && game.GemDoubleEnabled)
|
||||||
{
|
{
|
||||||
UtilPlayer.message(player, F.elem(C.cGreen + "+" + (earnedGems) + " Gems") + " for " + F.elem(C.cDGreen + "Double Gem Weekend"));
|
UtilPlayer.message(player, F.elem(C.cGreen + "+" + (earnedGems) + " Gems") + " for " + F.elem(C.cDGreen + "Double Gem Weekend"));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user