Merge remote-tracking branch 'refs/remotes/origin/update/moba-cosmetics' into update/hub-makeover

This commit is contained in:
Sam 2017-08-30 13:46:07 +01:00
commit 9f24a0ecb9
6 changed files with 11 additions and 7 deletions

View File

@ -5,6 +5,7 @@ import mineplex.core.common.util.F;
import mineplex.core.gadget.GadgetManager;
import mineplex.core.gadget.gadgets.gamemodifiers.GameCosmeticCategory;
import mineplex.core.gadget.types.GameModifierGadget;
import mineplex.core.gadget.util.CostConstants;
public class GemHuntersMountGadget extends GameModifierGadget
{
@ -16,7 +17,7 @@ public class GemHuntersMountGadget extends GameModifierGadget
super(manager, category, type.getName() + " Mount", new String[] {
C.cGray + "Changed your active Mount",
C.cGray + "in " + F.greenElem("Gem Hunters") + " to " + type.getName() + ".",
}, -7, type.getMaterial(), type.getMaterialData());
}, CostConstants.PURCHASED_FROM_STORE, type.getMaterial(), type.getMaterialData());
_type = type;
}

View File

@ -15,6 +15,7 @@ import mineplex.core.common.util.C;
import mineplex.core.gadget.GadgetManager;
import mineplex.core.gadget.gadgets.gamemodifiers.GameCosmeticCategory;
import mineplex.core.gadget.types.GameModifierGadget;
import mineplex.core.gadget.util.CostConstants;
public class EmblemGadget extends GameModifierGadget
{
@ -73,7 +74,7 @@ public class EmblemGadget extends GameModifierGadget
public EmblemGadget(GadgetManager manager, GameCosmeticCategory category, EmblemType type)
{
this(manager, category, type, -20);
this(manager, category, type, CostConstants.FOUND_IN_MOBA_CHESTS);
}
public EmblemGadget(GadgetManager manager, GameCosmeticCategory category, EmblemType type, int cost)

View File

@ -6,6 +6,7 @@ import mineplex.core.common.util.C;
import mineplex.core.gadget.GadgetManager;
import mineplex.core.gadget.gadgets.gamemodifiers.GameCosmeticCategory;
import mineplex.core.gadget.types.GameModifierGadget;
import mineplex.core.gadget.util.CostConstants;
import mineplex.core.itemstack.ItemStackFactory;
public class ShopMorphGadget extends GameModifierGadget
@ -15,7 +16,7 @@ public class ShopMorphGadget extends GameModifierGadget
public ShopMorphGadget(GadgetManager manager, GameCosmeticCategory category, ShopMorphType type)
{
this(manager, category, type, -20);
this(manager, category, type, CostConstants.FOUND_IN_MOBA_CHESTS);
}
public ShopMorphGadget(GadgetManager manager, GameCosmeticCategory category, ShopMorphType type, int cost)

View File

@ -16,6 +16,7 @@ import mineplex.core.common.util.C;
import mineplex.core.gadget.GadgetManager;
import mineplex.core.gadget.gadgets.gamemodifiers.GameCosmeticCategory;
import mineplex.core.gadget.types.GameModifierGadget;
import mineplex.core.gadget.util.CostConstants;
import mineplex.core.game.GameDisplay;
import mineplex.core.google.GoogleSheetsManager;
import mineplex.core.reward.RewardRarity;
@ -62,7 +63,7 @@ public class HeroSkinGadget extends GameModifierGadget
public HeroSkinGadget(GadgetManager manager, GameCosmeticCategory category, HeroSkinGadgetData skinData)
{
this(manager, category, skinData, -20);
this(manager, category, skinData, CostConstants.FOUND_IN_MOBA_CHESTS);
}
public HeroSkinGadget(GadgetManager manager, GameCosmeticCategory category, HeroSkinGadgetData skinData, int cost)

View File

@ -45,7 +45,6 @@ public class HorseMount extends Mount<SingleEntityMountData<Horse>>
}
}
private static final int MIN_OFFSET_SQUARED = 16;
private static final int MAX_OFFSET_SQUARED = 400;

View File

@ -17,6 +17,7 @@ import mineplex.core.common.util.UtilText;
import mineplex.core.gadget.GadgetManager;
import mineplex.core.gadget.gadgets.mount.Mount;
import mineplex.core.gadget.gadgets.mount.SingleEntityMountData;
import mineplex.core.recharge.Recharge;
import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
@ -55,7 +56,7 @@ public class MountCart extends Mount<SingleEntityMountData<Minecart>>
{
Minecart cart = cartData.getEntity();
if (cart.getPassenger() == null || !(cart.getPassenger() instanceof Player) || !UtilEnt.isGrounded(cart))
if (cart.getPassenger() == null || !(cart.getPassenger() instanceof Player) || !UtilEnt.isGrounded(cart) || !Recharge.Instance.usable(cartData.getOwner(), getName() + " Collide"))
{
continue;
}
@ -63,7 +64,7 @@ public class MountCart extends Mount<SingleEntityMountData<Minecart>>
Player player = (Player) cart.getPassenger();
UtilAction.velocity(cart, UtilAlg.getTrajectory2d(player.getEyeLocation(), UtilPlayer.getTargetLocation(player, 5)), 1.4, true, 0, 0, 1, false);
if (Math.random() > 0.8)
if (Math.random() > 0.9)
{
cart.getWorld().playSound(cart.getLocation(), Sound.MINECART_BASE, 0.05f, 2f);
}