Fancy treasure changes

This commit is contained in:
Shaun Bennett 2015-12-14 04:19:15 -05:00
parent 670eaa1954
commit 50bf97ae4a
17 changed files with 150 additions and 119 deletions

View File

@ -2,6 +2,7 @@ package mineplex.core.cosmetic.ui.page;
import java.util.ArrayList;
import java.util.EnumMap;
import java.util.HashMap;
import java.util.List;
import org.bukkit.ChatColor;
@ -16,6 +17,8 @@ import mineplex.core.common.CurrencyType;
import mineplex.core.common.util.C;
import mineplex.core.common.util.F;
import mineplex.core.common.util.LineFormat;
import mineplex.core.common.util.NautArrayList;
import mineplex.core.common.util.NautHashMap;
import mineplex.core.common.util.UtilText;
import mineplex.core.common.util.UtilUI;
import mineplex.core.cosmetic.CosmeticManager;
@ -126,7 +129,8 @@ public class Menu extends ShopPageBase<CosmeticManager, CosmeticShop>
int petMax = 0;
for (Pet pet : getPlugin().getPetManager().GetFactory().GetPets())
{
if (getPlugin().getPetManager().Get(getPlayer()).GetPets().containsKey(pet.GetPetType()))
NautHashMap<EntityType, String> pets = getPlugin().getPetManager().Get(getPlayer()).GetPets();
if (pets != null && pets.containsKey(pet.GetPetType()))
{
petOwned++;
}
@ -136,55 +140,55 @@ public class Menu extends ShopPageBase<CosmeticManager, CosmeticShop>
Creature petActive = getPlugin().getPetManager().GetPet(getPlayer());
GadgetType type = GadgetType.Particle;
String[] lore = getLore(ownedCount.get(type), maxCount.get(type), enabled.get(type));
String[] lore = getLore(ownedCount.get(type), maxCount.get(type), "Show everyone how cool you are with swirly particles that follow you when you walk!", "Visible Everywhere", enabled.get(type));
addButton(particleSlot, new ShopItem(Material.NETHER_STAR, "Particle Effects", lore, 1, false), new OpenParticles(this, enabled.get(type)));
if (enabled.containsKey(type)) addGlow(particleSlot);
type = GadgetType.ArrowTrail;
lore = getLore(ownedCount.get(type), maxCount.get(type), enabled.get(type));
lore = getLore(ownedCount.get(type), maxCount.get(type), "Your arrows will now leave particle trails as they soar through the air.", "Visible in Games", enabled.get(type));
addButton(arrowSlot, new ShopItem(Material.ARROW, "Arrow Trails", lore, 1, false), new OpenArrowTrails(this, enabled.get(type)));
if (enabled.containsKey(type)) addGlow(arrowSlot);
type = GadgetType.DoubleJump;
lore = getLore(ownedCount.get(type), maxCount.get(type), enabled.get(type));
lore = getLore(ownedCount.get(type), maxCount.get(type), "Demonstrate your parkour prowess with sweet particles when you double jump.", "Visible Everywhere", enabled.get(type));
addButton(jumpSlot, new ShopItem(Material.GOLD_BOOTS, "Double Jump Effects", lore, 1, false), new OpenDoubleJump(this, enabled.get(type)));
if (enabled.containsKey(type)) addGlow(jumpSlot);
type = GadgetType.Death;
lore = getLore(ownedCount.get(type), maxCount.get(type), enabled.get(type));
lore = getLore(ownedCount.get(type), maxCount.get(type), "Your death will now be mourned with a wonderful particle tribute.", "Visible in Games", enabled.get(type));
addButton(deathSlot, new ShopItem(Material.SKULL_ITEM, "Death Animations", lore, 1, false), new OpenDeathAnimations(this, enabled.get(type)));
if (enabled.containsKey(type)) addGlow(deathSlot);
type = GadgetType.Item;
lore = getLore(ownedCount.get(type), maxCount.get(type), enabled.get(type));
lore = getLore(ownedCount.get(type), maxCount.get(type), "All sorts of zaney contraptions to use on your friends and foes.", "Usable in Lobbies", enabled.get(type));
addButton(gadgetSlot, new ShopItem(Material.MELON_BLOCK, "Gadgets", lore, 1, false), new OpenGadgets(this, enabled.get(type)));
if (enabled.containsKey(type)) addGlow(gadgetSlot);
type = GadgetType.Morph;
lore = getLore(ownedCount.get(type), maxCount.get(type), enabled.get(type));
lore = getLore(ownedCount.get(type), maxCount.get(type), "Ever want to be a tiger? Well, you cant be a tiger! Thats silly! But you can be many other things!", "Usable in Lobbies", enabled.get(type));
addButton(morphSlot, new ShopItem(Material.LEATHER, "Morphs", lore, 1, false), new OpenMorphs(this, enabled.get(type)));
if (enabled.containsKey(type)) addGlow(morphSlot);
lore = getLore(mountOwned, mountMax, mountActive == null ? null : mountActive.GetName());
lore = getLore(mountOwned, mountMax, "Why walk when you can ride? Summon fancy mounts to help you move in style.", "Usable in Lobbies", mountActive == null ? null : mountActive.GetName());
addButton(mountSlot, new ShopItem(Material.IRON_BARDING, "Mounts", lore, 1, false), new OpenMounts(this, mountActive));
if (mountActive != null) addGlow(mountSlot);
lore = getLore(petOwned, petMax, petActive == null ? null : petActive.getCustomName());
lore = getLore(petOwned, petMax, "Life on a server can get lonely sometimes. Summon an adorable pet to follow you around and cheer you up!", "Usable in Lobbies", petActive == null ? null : petActive.getCustomName());
addButton(petSlot, new ShopItem(Material.BONE, "Pets", lore, 1, false), new OpenPets(this));
if (petActive != null) addGlow(petSlot);
type = GadgetType.Hat;
lore = getLore(ownedCount.get(type), maxCount.get(type), enabled.get(type));
lore = getLore(ownedCount.get(type), maxCount.get(type), "Hats are in this year. Wear them on your head to impress the ladies.", "Usable in Lobbies", enabled.get(type));
addButton(hatSlot, new ShopItem(Material.GOLD_HELMET, "Hats", lore, 1, false), new OpenHats(this, enabled.get(type)));
if (enabled.containsKey(type)) addGlow(hatSlot);
type = GadgetType.Costume;
lore = getLore(ownedCount.get(type), maxCount.get(type), enabled.get(type));
lore = getLore(ownedCount.get(type), maxCount.get(type), "Sometimes going out calls for special clothes! Gain bonus effects for matching outfit.", "Usable in Lobbies", enabled.get(type));
addButton(costumeSlot, new ShopItem(Material.DIAMOND_CHESTPLATE, "Costumes", lore, 1, false), new OpenCostumes(this, enabled.get(type)));
if (enabled.containsKey(type)) addGlow(costumeSlot);
type = GadgetType.MusicDisc;
lore = getLore(ownedCount.get(type), maxCount.get(type), enabled.get(type));
lore = getLore(ownedCount.get(type), maxCount.get(type), "I JUST WANT TO DANCE WITH YOU!", "Usable in Lobbies", enabled.get(type));
addButton(musicSlot, new ShopItem(Material.GREEN_RECORD, "Music", lore, 1, false), new OpenMusic(this, enabled.get(type)));
if (enabled.containsKey(type)) addGlow(musicSlot);
@ -198,16 +202,19 @@ public class Menu extends ShopPageBase<CosmeticManager, CosmeticShop>
});
}
private String[] getLore(int ownedCount, int maxCount, Gadget enabled)
private String[] getLore(int ownedCount, int maxCount, String info, String visibility, Gadget enabled)
{
return getLore(ownedCount, maxCount, enabled == null ? null : enabled.GetName());
return getLore(ownedCount, maxCount, info, visibility, enabled == null ? null : enabled.GetName());
}
private String[] getLore(int ownedCount, int maxCount, String enabled)
private String[] getLore(int ownedCount, int maxCount,String info, String visibility, String enabled)
{
if (enabled != null)
{
return UtilText.splitLinesToArray(new String[] {
C.blankLine,
C.cGray + info,
C.cDGray + visibility,
C.blankLine,
C.cWhite + "You own " + ownedCount + "/" + maxCount,
C.blankLine,
@ -220,6 +227,9 @@ public class Menu extends ShopPageBase<CosmeticManager, CosmeticShop>
else
{
return UtilText.splitLinesToArray(new String[] {
C.blankLine,
C.cGray + info,
C.cDGray + visibility,
C.blankLine,
C.cWhite + "You own " + ownedCount + "/" + maxCount,
C.blankLine,

View File

@ -12,7 +12,7 @@ public class HatGrinch extends HatGadget
public HatGrinch(GadgetManager manager)
{
super(manager, "The Grinch Hat",
super(manager, "The Grinch",
UtilText.splitLineToArray(C.cGray + "Great! Now wheres the Roast Beast?!", LineFormat.LORE),
-3,
SkinData.THE_GRINCH.getSkull());

View File

@ -12,7 +12,7 @@ public class HatPresent extends HatGadget
public HatPresent(GadgetManager manager)
{
super(manager, "Present Hat",
super(manager, "Present",
UtilText.splitLineToArray(C.cGray + "WHAT IN THE PRESENT? Oh, it's just you...", LineFormat.LORE),
-3,
SkinData.PRESENT.getSkull());

View File

@ -12,7 +12,7 @@ public class HatSanta extends HatGadget
public HatSanta(GadgetManager manager)
{
super(manager, "Santa Hat",
super(manager, "Santa",
UtilText.splitLineToArray(C.cGray + "Now you can work the Mall circuit!", LineFormat.LORE),
-3,
SkinData.SANTA.getSkull());

View File

@ -10,7 +10,7 @@ public class RankRewardData extends RewardData
public RankRewardData(String friendlyName, ItemStack displayItem, RewardRarity rarity, Rank rank)
{
super(friendlyName, displayItem, rarity);
super(null, friendlyName, displayItem, rarity);
_rank = rank;
}

View File

@ -7,14 +7,16 @@ import org.bukkit.inventory.ItemStack;
*/
public class RewardData
{
private final String _header;
private final String _friendlyName;
private final ItemStack _displayItem;
private final RewardRarity _rarity;
private final boolean _rewardedShards;
private final int _shards;
public RewardData(String friendlyName, ItemStack displayItem, RewardRarity rarity, int shards)
public RewardData(String header, String friendlyName, ItemStack displayItem, RewardRarity rarity, int shards)
{
_header = header;
_friendlyName = friendlyName;
_displayItem = displayItem;
_rarity = rarity;
@ -22,8 +24,9 @@ public class RewardData
_shards = shards;
}
public RewardData(String friendlyName, ItemStack displayItem, RewardRarity rarity)
public RewardData(String header, String friendlyName, ItemStack displayItem, RewardRarity rarity)
{
_header = header;
_friendlyName = friendlyName;
_displayItem = displayItem;
_rarity = rarity;
@ -31,6 +34,11 @@ public class RewardData
_shards = 0;
}
public String getHeader()
{
return _header;
}
public String getFriendlyName()
{
return _friendlyName;

View File

@ -166,9 +166,9 @@ public class RewardManager
new ItemStack(Material.ICE), rarity, 10, 0));
addReward(RewardPool.Type.WINTER_HOLIDAY, new InventoryReward(inventoryManager, "Party Popper", "Party Popper", 5, 10,
new ItemStack(Material.GOLDEN_CARROT), rarity, 10, 0));
addReward(RewardPool.Type.WINTER_HOLIDAY, new UnknownPackageReward(donationManager, "Present Hat", "Present Hat",
addReward(RewardPool.Type.WINTER_HOLIDAY, new UnknownPackageReward(donationManager, "Hat", "Present", "Present",
SkinData.PRESENT.getSkull(), rarity, 5, 100));
addReward(RewardPool.Type.WINTER_HOLIDAY, new UnknownPackageReward(donationManager, "Snowman Head", "Snowman Head",
addReward(RewardPool.Type.WINTER_HOLIDAY, new UnknownPackageReward(donationManager, "Hat", "Snowman Head", "Snowman Head",
SkinData.SNOWMAN.getSkull(), rarity, 5, 100));
// Gadgets
@ -217,27 +217,27 @@ public class RewardManager
EntityType.WOLF, rarity, 125, _uncommonShards));
// Music Discs
addReward(new UnknownPackageReward(donationManager, "13 Disc", "13 Disc",
addReward(new UnknownPackageReward(donationManager, "Music Disc", "13 Disc", "13 Disc",
new ItemStack(2256), rarity, 25, _uncommonShards));
addReward(new UnknownPackageReward(donationManager, "Cat Disc", "Cat Disc",
addReward(new UnknownPackageReward(donationManager, "Music Disc", "Cat Disc", "Cat Disc",
new ItemStack(2257), rarity, 25, _uncommonShards));
addReward(new UnknownPackageReward(donationManager, "Blocks Disc", "Blocks Disc",
addReward(new UnknownPackageReward(donationManager, "Music Disc", "Blocks Disc", "Blocks Disc",
new ItemStack(2258), rarity, 25, _uncommonShards));
addReward(new UnknownPackageReward(donationManager, "Chirp Disc", "Chirp Disc",
addReward(new UnknownPackageReward(donationManager, "Music Disc", "Chirp Disc", "Chirp Disc",
new ItemStack(2259), rarity, 25, _uncommonShards));
addReward(new UnknownPackageReward(donationManager, "Far Disc", "Far Disc",
addReward(new UnknownPackageReward(donationManager, "Music Disc", "Far Disc", "Far Disc",
new ItemStack(2260), rarity, 25, _uncommonShards));
addReward(new UnknownPackageReward(donationManager, "Mall Disc", "Mall Disc",
addReward(new UnknownPackageReward(donationManager, "Music Disc", "Mall Disc", "Mall Disc",
new ItemStack(2261), rarity, 25, _uncommonShards));
addReward(new UnknownPackageReward(donationManager, "Mellohi Disc", "Mellohi Disc",
addReward(new UnknownPackageReward(donationManager, "Music Disc", "Mellohi Disc", "Mellohi Disc",
new ItemStack(2262), rarity, 25, _uncommonShards));
addReward(new UnknownPackageReward(donationManager, "Stal Disc", "Stal Disc",
addReward(new UnknownPackageReward(donationManager, "Music Disc", "Stal Disc", "Stal Disc",
new ItemStack(2263), rarity, 25, _uncommonShards));
addReward(new UnknownPackageReward(donationManager, "Strad Disc", "Strad Disc",
addReward(new UnknownPackageReward(donationManager, "Music Disc", "Strad Disc", "Strad Disc",
new ItemStack(2264), rarity, 25, _uncommonShards));
addReward(new UnknownPackageReward(donationManager, "Ward Disc", "Ward Disc",
addReward(new UnknownPackageReward(donationManager, "Music Disc", "Ward Disc", "Ward Disc",
new ItemStack(2265), rarity, 25, _uncommonShards));
addReward(new UnknownPackageReward(donationManager, "Wait Disc", "Wait Disc",
addReward(new UnknownPackageReward(donationManager, "Music Disc", "Wait Disc", "Wait Disc",
new ItemStack(2267), rarity, 25, _uncommonShards));
}
@ -257,56 +257,56 @@ public class RewardManager
// addReward(new CoinReward(donationManager, (int)minValue, (int)maxValue, 100, RewardRarity.RARE));
}
addReward(RewardPool.Type.WINTER_HOLIDAY, new UnknownPackageReward(donationManager, "Santa Hat", "Santa Hat",
addReward(RewardPool.Type.WINTER_HOLIDAY, new UnknownPackageReward(donationManager, "Hat", "Santa", "Santa",
SkinData.SANTA.getSkull(), rarity, 5, _rareShards));
addReward(RewardPool.Type.WINTER_HOLIDAY, new PetReward(petManager, inventoryManager, donationManager, "Elf Pet", "Christmas Elf",
addReward(RewardPool.Type.WINTER_HOLIDAY, new PetReward(petManager, inventoryManager, donationManager, "Elf", "Christmas Elf",
EntityType.VILLAGER, rarity, 5, _rareShards));
addReward(RewardPool.Type.WINTER_HOLIDAY, new UnknownPackageReward(donationManager, "Fall of the Frost Lord", "Fall of the Frost Lord",
new ItemStack(Material.SNOW_BALL), rarity, 5, _rareShards));
addReward(RewardPool.Type.WINTER_HOLIDAY, new UnknownPackageReward(donationManager, "Candy Cane Remains", "Candy Cane Remains",
addReward(RewardPool.Type.WINTER_HOLIDAY, new UnknownPackageReward(donationManager, "Death Effect", "Candy Cane Remains", "Candy Cane Remains",
new ItemStack(Material.SNOW_BALL), rarity, 5, _rareShards));
addReward(RewardPool.Type.WINTER_HOLIDAY, new UnknownPackageReward(donationManager, "Particles", "Crushed Candy Cane", "Crushed Candy Cane",
new ItemStack(Material.SNOW_BALL), rarity, 5, _legendaryShards));
addReward(RewardPool.Type.WINTER_HOLIDAY, new UnknownPackageReward(donationManager, "Arrow Effect", "Candy Cane Arrows", "Candy Cane Arrows",
new ItemStack(Material.SNOW_BALL), rarity, 5, _legendaryShards));
addReward(RewardPool.Type.WINTER_HOLIDAY, new UnknownPackageReward(donationManager, "Jump Effect", "Candy Cane Blast", "Candy Cane Blast",
new ItemStack(Material.SNOW_BALL), rarity, 5, _legendaryShards));
// Mounts
addReward(new UnknownPackageReward(donationManager, "Mount Mule", "Mount Mule",
addReward(new UnknownPackageReward(donationManager, "Mount", "Mule", "Mount Mule",
new ItemStack(Material.HAY_BLOCK), rarity, 200, _rareShards));
addReward(new UnknownPackageReward(donationManager, "Minecart Mount", "Minecart",
addReward(new UnknownPackageReward(donationManager, "Mount", "Minecart", "Minecart",
new ItemStack(Material.MINECART), rarity, 100, _rareShards));
addReward(new UnknownPackageReward(donationManager, "Slime Mount", "Slime Mount",
addReward(new UnknownPackageReward(donationManager, "Mount", "Slime", "Slime Mount",
new ItemStack(Material.SLIME_BALL), rarity, 67, _rareShards));
addReward(new UnknownPackageReward(donationManager, "Glacial Steed", "Glacial Steed",
addReward(new UnknownPackageReward(donationManager, "Mount", "Glacial Steed", "Glacial Steed",
new ItemStack(Material.SNOW_BALL), rarity, 50, _rareShards));
// Morphs
addReward(new UnknownPackageReward(donationManager, "Cow Morph", "Cow Morph",
addReward(new UnknownPackageReward(donationManager, "Morph", "Cow", "Cow Morph",
new ItemStack(Material.LEATHER), rarity, 167, _rareShards));
addReward(new UnknownPackageReward(donationManager, "Villager Morph", "Villager Morph",
addReward(new UnknownPackageReward(donationManager, "Morph", "Villager", "Villager Morph",
new ItemStack(Material.EMERALD), rarity, 83, _rareShards));
addReward(new UnknownPackageReward(donationManager, "Chicken Morph", "Chicken Morph",
addReward(new UnknownPackageReward(donationManager, "Morph", "Chicken", "Chicken Morph",
new ItemStack(Material.FEATHER), rarity, 50, _rareShards));
addReward(new UnknownPackageReward(donationManager, "Enderman Morph", "Enderman Morph",
addReward(new UnknownPackageReward(donationManager, "Morph", "Enderman", "Enderman Morph",
new ItemStack(Material.ENDER_PEARL), rarity, 33, _rareShards));
// Gadgets
addReward(new InventoryReward(inventoryManager, "Treasure Party Bomb", "Treasure Party Bomb", 1, 1,
new ItemStack(Material.getMaterial(175)), rarity, 100, _rareShards));
// Costumes
addReward(new UnknownPackageReward(donationManager, "Rave Hat", "Rave Hat",
addReward(new UnknownPackageReward(donationManager, "Costume", "Rave Hat", "Rave Hat",
new ItemStack(Material.LEATHER_HELMET), rarity, 30, _rareShards));
addReward(new UnknownPackageReward(donationManager, "Rave Shirt", "Rave Shirt",
addReward(new UnknownPackageReward(donationManager, "Costume", "Rave Shirt", "Rave Shirt",
new ItemStack(Material.LEATHER_CHESTPLATE), rarity, 30, _rareShards));
addReward(new UnknownPackageReward(donationManager, "Rave Pants", "Rave Pants",
addReward(new UnknownPackageReward(donationManager, "Costume", "Rave Pants", "Rave Pants",
new ItemStack(Material.LEATHER_LEGGINGS), rarity, 30, _rareShards));
addReward(new UnknownPackageReward(donationManager, "Rave Boots", "Rave Boots",
addReward(new UnknownPackageReward(donationManager, "Costume", "Rave Boots", "Rave Boots",
new ItemStack(Material.LEATHER_BOOTS), rarity, 30, _rareShards));
addReward(new UnknownPackageReward(donationManager, "Space Helmet", "Space Helmet",
addReward(new UnknownPackageReward(donationManager, "Costume", "Space Helmet", "Space Helmet",
new ItemStack(Material.GLASS), rarity, 50, _rareShards));
addReward(new UnknownPackageReward(donationManager, "Space Jacket", "Space Jacket",
addReward(new UnknownPackageReward(donationManager, "Costume", "Space Jacket", "Space Jacket",
new ItemStack(Material.GOLD_CHESTPLATE), rarity, 50, _rareShards));
addReward(new UnknownPackageReward(donationManager, "Space Pants", "Space Pants",
addReward(new UnknownPackageReward(donationManager, "Costume", "Space Pants", "Space Pants",
new ItemStack(Material.GOLD_LEGGINGS), rarity, 50, _rareShards));
addReward(new UnknownPackageReward(donationManager, "Space Boots", "Space Boots",
addReward(new UnknownPackageReward(donationManager, "Costume", "Space Boots", "Space Boots",
new ItemStack(Material.GOLD_BOOTS), rarity, 50, _rareShards));
}
@ -326,56 +326,52 @@ public class RewardManager
// addReward(new CoinReward(donationManager, (int)minValue, (int)maxValue, 25, rarity));
}
addReward(RewardPool.Type.WINTER_HOLIDAY, new UnknownPackageReward(donationManager, "The Grinch Hat", "The Grinch Hat",
addReward(RewardPool.Type.WINTER_HOLIDAY, new UnknownPackageReward(donationManager, "Hat", "The Grinch", "The Grinch Hat",
SkinData.THE_GRINCH.getSkull(), rarity, 5, _legendaryShards));
addReward(RewardPool.Type.WINTER_HOLIDAY, new UnknownPackageReward(donationManager, "Olaf Morph", "Olaf Morph",
addReward(RewardPool.Type.WINTER_HOLIDAY, new UnknownPackageReward(donationManager, "Morph", "Olaf", "Olaf Morph",
new ItemStack(Material.SNOW_BALL), rarity, 5, _legendaryShards));
addReward(RewardPool.Type.WINTER_HOLIDAY, new UnknownPackageReward(donationManager, "Glacial Steed", "Glacial Steed",
addReward(RewardPool.Type.WINTER_HOLIDAY, new UnknownPackageReward(donationManager, "Mount", "Glacial Steed", "Glacial Steed",
new ItemStack(Material.SADDLE), rarity, 5, _legendaryShards));
addReward(RewardPool.Type.WINTER_HOLIDAY, new UnknownPackageReward(donationManager, "Baby Reindeer", "Baby Reindeer",
addReward(RewardPool.Type.WINTER_HOLIDAY, new UnknownPackageReward(donationManager, "Mount", "Baby Reindeer", "Baby Reindeer",
new ItemStack(Material.GOLDEN_CARROT), rarity, 5, _legendaryShards));
addReward(RewardPool.Type.WINTER_HOLIDAY, new UnknownPackageReward(donationManager, "Wind of the Frost Lord", "Wind of the Frost Lord",
addReward(RewardPool.Type.WINTER_HOLIDAY, new UnknownPackageReward(donationManager, "Particles", "Wind of the Frost Lord", "Wind of the Frost Lord",
new ItemStack(Material.SNOW_BALL), rarity, 5, _legendaryShards));
addReward(RewardPool.Type.WINTER_HOLIDAY, new UnknownPackageReward(donationManager, "Arrows of the Frost Lord", "Arrows of the Frost Lord",
addReward(RewardPool.Type.WINTER_HOLIDAY, new UnknownPackageReward(donationManager, "Arrow Effect", "Arrows of the Frost Lord", "Arrows of the Frost Lord",
new ItemStack(Material.SNOW_BALL), rarity, 5, _legendaryShards));
addReward(RewardPool.Type.WINTER_HOLIDAY, new UnknownPackageReward(donationManager, "Gust of the Frost Lord", "Gust of the Frost Lord",
new ItemStack(Material.SNOW_BALL), rarity, 5, _legendaryShards));
addReward(RewardPool.Type.WINTER_HOLIDAY, new UnknownPackageReward(donationManager, "Crushed Candy Cane", "Crushed Candy Cane",
new ItemStack(Material.SNOW_BALL), rarity, 5, _legendaryShards));
addReward(RewardPool.Type.WINTER_HOLIDAY, new UnknownPackageReward(donationManager, "Candy Cane Arrows", "Candy Cane Arrows",
new ItemStack(Material.SNOW_BALL), rarity, 5, _legendaryShards));
addReward(RewardPool.Type.WINTER_HOLIDAY, new UnknownPackageReward(donationManager, "Candy Cane Blast", "Candy Cane Blast",
addReward(RewardPool.Type.WINTER_HOLIDAY, new UnknownPackageReward(donationManager, "Jump Effect", "Gust of the Frost Lord", "Gust of the Frost Lord",
new ItemStack(Material.SNOW_BALL), rarity, 5, _legendaryShards));
addReward(RewardPool.Type.WINTER_HOLIDAY, new UnknownPackageReward(donationManager, "Death Effect", "Fall of the Frost Lord", "Fall of the Frost Lord",
new ItemStack(Material.SNOW_BALL), rarity, 5, _rareShards));
// Mounts
addReward(new UnknownPackageReward(donationManager, "Infernal Horror", "Infernal Horror",
addReward(new UnknownPackageReward(donationManager, "Mount", "Infernal Horror", "Infernal Horror",
new ItemStack(Material.BONE), rarity, 33, _legendaryShards));
// Morphs
addReward(new UnknownPackageReward(donationManager, "Bat Morph", "Bat Morph",
addReward(new UnknownPackageReward(donationManager, "Morph", "Bat", "Bat Morph",
new ItemStack(Material.SKULL_ITEM, 1, (short) 0, (byte) 1), rarity, 25, _legendaryShards));
addReward(new UnknownPackageReward(donationManager, "Block Morph", "Block Morph",
addReward(new UnknownPackageReward(donationManager, "Morph", "Block", "Block Morph",
new ItemStack(Material.EMERALD_BLOCK), rarity, 20, _legendaryShards));
addReward(new UnknownPackageReward(donationManager, "Big Larry Morph", "Big Larry Morph",
addReward(new UnknownPackageReward(donationManager, "Morph", "Big Larry", "Big Larry Morph",
new ItemStack(Material.SLIME_BALL), rarity, 10, _legendaryShards));
// Particles
addReward(new UnknownPackageReward(donationManager, "Shadow Walk Particles", "Shadow Walk",
addReward(new UnknownPackageReward(donationManager, "Particles", "Shadow Walk", "Shadow Walk",
new ItemStack(Material.LEATHER_BOOTS), rarity, 33, _legendaryShards));
addReward(new UnknownPackageReward(donationManager, "Enchanted Particles", "Enchanted",
addReward(new UnknownPackageReward(donationManager, "Particles", "Enchanted", "Enchanted",
new ItemStack(Material.BOOK), rarity, 25, _legendaryShards));
addReward(new UnknownPackageReward(donationManager, "Flame Rings Particles", "Flame Rings",
addReward(new UnknownPackageReward(donationManager, "Particles", "Flame Rings", "Flame Rings",
new ItemStack(Material.BLAZE_POWDER), rarity, 17, _legendaryShards));
addReward(new UnknownPackageReward(donationManager, "Rain Cloud Particles", "Rain Cloud",
addReward(new UnknownPackageReward(donationManager, "Particles", "Rain Cloud", "Rain Cloud",
new ItemStack(Material.INK_SACK, 1, (short) 0, (byte) 4), rarity, 13, _legendaryShards));
addReward(new UnknownPackageReward(donationManager, "Blood Helix Particles", "Blood Helix",
addReward(new UnknownPackageReward(donationManager, "Particles", "Blood Helix", "Blood Helix",
new ItemStack(Material.REDSTONE), rarity, 10, _legendaryShards));
addReward(new UnknownPackageReward(donationManager, "Green Rings Particles", "Green Ring",
addReward(new UnknownPackageReward(donationManager, "Particles", "Green Rings", "Green Ring",
new ItemStack(Material.EMERALD), rarity, 8, _legendaryShards));
addReward(new UnknownPackageReward(donationManager, "Flame Fairy Particles", "Flame Fairy",
addReward(new UnknownPackageReward(donationManager, "Particles", "Flame Fairy", "Flame Fairy",
new ItemStack(Material.APPLE), rarity, 4, _legendaryShards));
addReward(new UnknownPackageReward(donationManager, "Heart Particles", "I Heart You",
addReward(new UnknownPackageReward(donationManager, "Particles", "Heart", "I Heart You",
new ItemStack(Material.BLAZE_POWDER), rarity, 2, _legendaryShards));
}

View File

@ -18,24 +18,26 @@ public enum RewardRarity
* (Fireworks, sounds, etc)
*/
OTHER("Other", cWhite, Material.STAINED_GLASS_PANE, (byte) 0),
COMMON("Common", cWhite, Material.STAINED_GLASS_PANE, (byte) 0),
GAME("Game", cYellow, Material.STAINED_GLASS_PANE, (byte) 4),
UNCOMMON("Uncommon", cAqua, Material.STAINED_GLASS_PANE, (byte) 3),
RARE("Rare", cPurple, Material.STAINED_GLASS_PANE, (byte) 10),
LEGENDARY("Legendary", cGreen, Material.STAINED_GLASS_PANE, (byte) 5),
MYTHICAL("Mythical", cRed, Material.STAINED_GLASS_PANE, (byte) 14);
OTHER("Other", cWhite, C.cGray, Material.STAINED_GLASS_PANE, (byte) 0),
COMMON("Common", cWhite, C.cGray, Material.STAINED_GLASS_PANE, (byte) 0),
GAME("Game", cYellow, C.cYellow, Material.STAINED_GLASS_PANE, (byte) 4),
UNCOMMON("Uncommon", cAqua, C.cDAqua, Material.STAINED_GLASS_PANE, (byte) 3),
RARE("Rare", cPurple, C.cDPurple, Material.STAINED_GLASS_PANE, (byte) 10),
LEGENDARY("Legendary", cGreen, C.cDGreen, Material.STAINED_GLASS_PANE, (byte) 5),
MYTHICAL("Mythical", cRed, C.cDRed, Material.STAINED_GLASS_PANE, (byte) 14);
private String _name;
private String _color;
private String _darkColor;
private Material _material;
private byte _data;
private ItemStack _stack;
RewardRarity(String name, String color, Material material, byte data)
RewardRarity(String name, String color, String darkColor, Material material, byte data)
{
_name = name;
_color = color;
_darkColor = darkColor;
_material = material;
_data = data;
@ -50,6 +52,11 @@ public enum RewardRarity
return _color;
}
public String getDarkColor()
{
return _darkColor;
}
public String getName()
{
return _name;

View File

@ -36,13 +36,13 @@ public class ExperienceReward extends Reward
_statsManager.incrementStat(player, "Global.ExpEarned", experience);
return new RewardData(getRarity().getColor() + experience + " Experience", new ItemStack(Material.EXP_BOTTLE), getRarity());
return new RewardData(null, getRarity().getColor() + experience + " Experience", new ItemStack(Material.EXP_BOTTLE), getRarity());
}
@Override
public RewardData getFakeRewardData(Player player)
{
return new RewardData(getRarity().getColor() + "Experience", new ItemStack(Material.EXP_BOTTLE), getRarity());
return new RewardData(null, getRarity().getColor() + "Experience", new ItemStack(Material.EXP_BOTTLE), getRarity());
}
@Override

View File

@ -49,13 +49,13 @@ public class GemReward extends Reward
}
}, "Treasure Chest", player.getName(), player.getUniqueId(), GemsToReward);
return new RewardData(getRarity().getColor() + GemsToReward + " Gems", new ItemStack(Material.EMERALD), getRarity());
return new RewardData(null, getRarity().getColor() + GemsToReward + " Gems", new ItemStack(Material.EMERALD), getRarity());
}
@Override
public RewardData getFakeRewardData(Player player)
{
return new RewardData(getRarity().getColor() + "Gems", new ItemStack(Material.EMERALD), getRarity());
return new RewardData(null, getRarity().getColor() + "Gems", new ItemStack(Material.EMERALD), getRarity());
}
@Override

View File

@ -59,13 +59,13 @@ public class InventoryReward extends Reward
_inventoryManager.addItemToInventory(player, _packageName, amountToGive);
return new RewardData(getRarity().getColor() + amountToGive + " " + _name, _itemStack, getRarity());
return new RewardData(getRarity().getDarkColor() + "Gadget", getRarity().getColor() + amountToGive + " " + _name, _itemStack, getRarity());
}
@Override
public RewardData getFakeRewardData(Player player)
{
return new RewardData(getRarity().getColor() + _name, _itemStack, getRarity());
return new RewardData(getRarity().getDarkColor() + "Gadget", getRarity().getColor() + _name, _itemStack, getRarity());
}
@Override

View File

@ -26,7 +26,7 @@ public class PetReward extends UnknownPackageReward
public PetReward(PetManager petManager, InventoryManager inventoryManager, DonationManager donationManager, String name, String packageName, EntityType petEntity, RewardRarity rarity, int weight, int shardValue)
{
super(donationManager, name, packageName, new ItemStack(Material.MONSTER_EGG, 1, petEntity.getTypeId()), rarity, weight, shardValue);
super(donationManager, "Pet", name, packageName, new ItemStack(Material.MONSTER_EGG, 1, petEntity.getTypeId()), rarity, weight, shardValue);
_petManager = petManager;
_inventoryManager = inventoryManager;

View File

@ -40,7 +40,7 @@ public class RankReward extends Reward
rank = Rank.TITAN;
if (rank == null)
return new RewardData(getRarity().getColor() + "Rank Upgrade Error", new ItemStack(Material.PAPER), getRarity());
return new RewardData(null, getRarity().getColor() + "Rank Upgrade Error", new ItemStack(Material.PAPER), getRarity());
_clientManager.Get(player).SetRank(rank, false);
_clientManager.getRepository().saveRank(null, player.getName(), player.getUniqueId(), rank, true);
@ -57,7 +57,7 @@ public class RankReward extends Reward
else if (_clientManager.Get(player).GetRank() == Rank.HERO) rank = Rank.LEGEND;
if (rank == null)
return new RewardData(getRarity().getColor() + "Rank Upgrade Error", new ItemStack(Material.PAPER), getRarity());
return new RewardData(null, getRarity().getColor() + "Rank Upgrade Error", new ItemStack(Material.PAPER), getRarity());
return new RankRewardData(getRarity().getColor() + rank.Name + " Rank", new ItemStack(Material.NETHER_STAR), getRarity(), rank);
}

View File

@ -31,7 +31,7 @@ public class TreasureShardReward extends Reward
public RewardData giveRewardCustom(Player player, RewardType rewardType)
{
RewardData fakeData = _otherReward.getFakeRewardData(player);
RewardData rewardData = new RewardData(fakeData.getFriendlyName(), fakeData.getDisplayItem(), fakeData.getRarity(), _shards);
RewardData rewardData = new RewardData(fakeData.getHeader(), fakeData.getFriendlyName(), fakeData.getDisplayItem(), fakeData.getRarity(), _shards);
_donationManager.RewardCoins(new Callback<Boolean>()
{
@ -48,7 +48,7 @@ public class TreasureShardReward extends Reward
@Override
public RewardData getFakeRewardData(Player player)
{
return new RewardData(getRarity().getColor() + "Treasure Shards", new ItemStack(Material.PRISMARINE_SHARD), getRarity());
return new RewardData(null, getRarity().getColor() + "Treasure Shards", new ItemStack(Material.PRISMARINE_SHARD), getRarity());
}
@Override

View File

@ -18,13 +18,15 @@ public class UnknownPackageReward extends Reward
{
protected DonationManager _donationManager;
private ItemStack _itemStack;
private String _header;
private String _name;
private String _packageName;
public UnknownPackageReward(DonationManager donationManager, String name, String packageName, ItemStack itemStack, RewardRarity rarity, int weight, int shardValue)
public UnknownPackageReward(DonationManager donationManager, String header, String name, String packageName, ItemStack itemStack, RewardRarity rarity, int weight, int shardValue)
{
super(rarity, weight, shardValue);
_donationManager = donationManager;
_header = header;
_name = name;
_packageName = packageName;
_itemStack = itemStack;
@ -35,7 +37,7 @@ public class UnknownPackageReward extends Reward
{
_donationManager.PurchaseUnknownSalesPackage(null, player.getName(), _donationManager.getClientManager().Get(player).getAccountId(), _packageName, CurrencyType.Coins, 0, true);
return new RewardData(getRarity().getColor() + _name, _itemStack, getRarity());
return new RewardData(getRarity().getDarkColor() + _header, getRarity().getColor() + _name, _itemStack, getRarity());
}
@Override
@ -53,7 +55,7 @@ public class UnknownPackageReward extends Reward
@Override
public RewardData getFakeRewardData(Player player)
{
return new RewardData(getRarity().getColor() + _name, _itemStack, getRarity());
return new RewardData(getRarity().getDarkColor() + _header, getRarity().getColor() + _name, _itemStack, getRarity());
}
protected String getPackageName()

View File

@ -76,15 +76,26 @@ public class ChestOpenAnimation extends Animation
}
else if (getTicks() == 15)
{
_hologram = new Hologram(_hologramManager, _chestData.getBlock().getLocation().add(0.5, 1.4, 0.5),
if (_rewardData.getHeader() != null)
{
_hologram = new Hologram(_hologramManager, _chestData.getBlock().getLocation().add(0.5, 1.4, 0.5),
_rewardData.getHeader(), _rewardData.getFriendlyName());
}
else
{
_hologram = new Hologram(_hologramManager, _chestData.getBlock().getLocation().add(0.5, 1.4, 0.5),
_rewardData.getFriendlyName());
}
_hologram.start();
}
else if (getTicks() == 25)
{
if (_rewardData.isRewardedShards())
{
_hologram.setText(C.cWhite + "You already own this", C.cAqua + "+" + _rewardData.getShards() + " Treasure Shards", " ", _rewardData.getFriendlyName());
if (_rewardData.getHeader() != null)
_hologram.setText(C.cWhite + "Duplicate", C.cAqua + "+" + _rewardData.getShards() + " Treasure Shards", " ", _rewardData.getHeader(), _rewardData.getFriendlyName());
else
_hologram.setText(C.cWhite + "Duplicate", C.cAqua + "+" + _rewardData.getShards() + " Treasure Shards", " ", _rewardData.getFriendlyName());
}
}
}

View File

@ -112,12 +112,11 @@ public class TreasurePage extends ShopPageBase<TreasureManager, TreasureShop>
christmasLore.add(" ");
christmasLore.add(F.value("Winter Holiday Chests Owned", "" + christmasCount));
christmasLore.add(" ");
christmasLore.add(C.cGray + "All our previous adventurers have");
christmasLore.add(C.cGray + "perished in search of these chests.");
christmasLore.add(C.cGray + "However, legends of their existence");
christmasLore.add(C.cGray + "convinced Sterling, Chiss and Defek7");
christmasLore.add(C.cGray + "to venture out and discover the");
christmasLore.add(C.cGray + "location of these chests on their own.");
christmasLore.add(C.cGray + "Legend tells of the Winter Lord's");
christmasLore.add(C.cGray + "vast treasure horde, locked away in");
christmasLore.add(C.cGray + "in a vault of ice, deep beneath the");
christmasLore.add(C.cGray + "Frozen Sea. It is said it can only be");
christmasLore.add(C.cGray + "accessed in the deepest parts of Winter...");
christmasLore.add(" ");
if (christmasCount > 0)
christmasLore.add(ChatColor.RESET + C.cGreen + "Click to Open!");
@ -130,19 +129,17 @@ public class TreasurePage extends ShopPageBase<TreasureManager, TreasureShop>
List<String> cosmicLore = new ArrayList<String>();
cosmicLore.add(" ");
cosmicLore.add(F.value("Cosmic Chests Owned", "" + 0));
cosmicLore.add(C.cWhite + "Cannot be purchased in Shop");
cosmicLore.add(C.cWhite + "Coming Soon");
cosmicLore.add(" ");
cosmicLore.add(C.Reset + "Cannot be purchased in shop");
cosmicLore.add(C.cAqua + "20000 Treasure Shards");
cosmicLore.add(" ");
cosmicLore.add(C.cGray + "Coming Soon");
ShopItem shards = new ShopItem(Material.PRISMARINE_SHARD, C.cAqua + C.Bold + treasureShards + " Treasure Shards", shardLore.toArray(new String[0]), 0, false);
ShopItem basic = new ShopItem(Material.CHEST, C.cGreen + C.Bold + "Old Treasure", basicLore.toArray(new String[0]), 0, false, false);
ShopItem heroic = new ShopItem(Material.TRAPPED_CHEST, C.cGold + C.Bold + "Ancient Treasure", heroicLore.toArray(new String[0]), 0, false, false);
ShopItem legendary = new ShopItem(Material.ENDER_CHEST, C.cRed + C.Bold + "Mythical Treasure", legendaryLore.toArray(new String[0]), 0, false, false);
ItemStack christmas = SkinData.PRESENT.getSkull(C.cDGreen + C.Bold + "Winter Holiday Treasure", christmasLore);
ItemStack cosmic = SkinData.MOOSHROOM.getSkull(C.cDGreen + C.Bold + "Cosmic Treasure", cosmicLore);
ItemStack cosmic = new ShopItem(Material.SEA_LANTERN, C.cDAqua + C.Bold + "??? Treasure", cosmicLore.toArray(new String[0]), 0, false, false);
addItem(40, shards);