From 1bd0209b3936a2646767a432059aad30ef4f14b8 Mon Sep 17 00:00:00 2001 From: Jonathan Williams Date: Sat, 30 Aug 2014 02:04:04 -0700 Subject: [PATCH] Added multi-server tags for npcs Fixed Customer support packages. Fixed Account rank expire for Hero Added SNR mod to update Rank Changed SNR mod color to gray. --- .../src/mineplex/core/common/Rank.java | 2 +- .../core/account/command/UpdateRank.java | 2 +- .../mineplex/hub/server/ServerManager.java | 13 +- .../shop/salespackage/SkillSalesPackage.java | 1 + .../salespackage/command/HeroCommand.java | 2 +- .../command/LifetimeHeroCommand.java | 2 +- .../salespackages/LifetimeHero.java | 2 +- .../salespackages/MonthlyHero.java | 2 +- .../Models/AccountAdministrator.cs | 2 +- .../LOC.Website.Web.Publish.xml | 440 +++++++++--------- Website/LOCWebsite.suo | Bin 474624 -> 474624 bytes 11 files changed, 235 insertions(+), 233 deletions(-) diff --git a/Plugins/Mineplex.Core.Common/src/mineplex/core/common/Rank.java b/Plugins/Mineplex.Core.Common/src/mineplex/core/common/Rank.java index 0a36b9ddb..c9e7b76e2 100644 --- a/Plugins/Mineplex.Core.Common/src/mineplex/core/common/Rank.java +++ b/Plugins/Mineplex.Core.Common/src/mineplex/core/common/Rank.java @@ -11,7 +11,7 @@ public enum Rank OWNER("Owner", ChatColor.DARK_RED), DEVELOPER("Dev", ChatColor.RED), ADMIN("Admin", ChatColor.RED), - SNR_MODERATOR("Sr.Mod", ChatColor.GOLD), + SNR_MODERATOR("Sr.Mod", ChatColor.GRAY), MODERATOR("Mod", ChatColor.GOLD), HELPER("Helper", ChatColor.GREEN), MAPDEV("Mapper", ChatColor.BLUE), diff --git a/Plugins/Mineplex.Core/src/mineplex/core/account/command/UpdateRank.java b/Plugins/Mineplex.Core/src/mineplex/core/account/command/UpdateRank.java index d8c9218bd..15f9813b8 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/account/command/UpdateRank.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/account/command/UpdateRank.java @@ -50,7 +50,7 @@ public class UpdateRank extends CommandBase final Rank rank = tempRank; - if (rank == Rank.MODERATOR || rank == Rank.HELPER || rank == Rank.ALL || rank == Rank.MAPDEV) + if (rank == Rank.MODERATOR || rank == Rank.HELPER || rank == Rank.ALL || rank == Rank.MAPDEV || rank == Rank.SNR_MODERATOR) { Plugin.getRepository().MatchPlayerName(new Callback>() { diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/server/ServerManager.java b/Plugins/Mineplex.Hub/src/mineplex/hub/server/ServerManager.java index 12cb4aa5d..b56dabae8 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/server/ServerManager.java +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/server/ServerManager.java @@ -187,7 +187,6 @@ public class ServerManager extends MiniPlugin try { Collections.sort(serverList, new ServerSorter(slots)); - boolean hasUltra = _clientManager.Get(player).GetRank().Has(Rank.ULTRA); for (ServerInfo serverInfo : serverList) { @@ -302,13 +301,15 @@ public class ServerManager extends MiniPlugin _serverInfoMap.remove(serverName); } - public void addServerGroup(String serverKey, String serverTag) + public void addServerGroup(String serverKey, String...serverTag) { _serverKeyInfoMap.put(serverKey, new HashSet()); - _serverKeyTagMap.put(serverTag, serverKey); + + for (String tag : serverTag) + _serverKeyTagMap.put(tag, serverKey); } - public void AddServerNpc(String serverNpcName, String serverTag) + public void AddServerNpc(String serverNpcName, String...serverTag) { addServerGroup(serverNpcName, serverTag); _serverNpcShopMap.put(serverNpcName, new ServerNpcShop(this, _clientManager, _donationManager, serverNpcName)); @@ -597,7 +598,7 @@ public class ServerManager extends MiniPlugin while (line != null) { String serverNpcName = line.substring(0, line.indexOf('|')).trim(); - String serverTag = line.substring(line.indexOf('|') + 1, line.indexOf('|', line.indexOf('|') + 1)).trim(); + String[] serverTags = line.substring(line.indexOf('|') + 1, line.indexOf('|', line.indexOf('|') + 1)).trim().split(","); String[] locations = line.substring(line.indexOf('|', line.indexOf('|') + 1) + 1).trim().split(","); for (String location : locations) @@ -607,7 +608,7 @@ public class ServerManager extends MiniPlugin if (!HasServerNpc(serverNpcName)) { - AddServerNpc(serverNpcName, serverTag); + AddServerNpc(serverNpcName, serverTags); } npcNames.add(serverNpcName); diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/shop/salespackage/SkillSalesPackage.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/shop/salespackage/SkillSalesPackage.java index 880d2f845..436d82b17 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/shop/salespackage/SkillSalesPackage.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/shop/salespackage/SkillSalesPackage.java @@ -14,6 +14,7 @@ public class SkillSalesPackage extends SalesPackageBase super("Champions " + skill.GetName(), Material.BOOK, (byte)0, skill.GetDesc(0), skill.GetGemCost()); Free = skill.IsFree(); KnownPackage = false; + CurrencyCostMap.put(CurrencyType.Gems, skill.GetGemCost()); } @Override diff --git a/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/salespackage/command/HeroCommand.java b/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/salespackage/command/HeroCommand.java index 5d061fefb..0d6bb4b1a 100644 --- a/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/salespackage/command/HeroCommand.java +++ b/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/salespackage/command/HeroCommand.java @@ -28,7 +28,7 @@ public class HeroCommand extends CommandBase Bukkit.getServer().getPluginManager().callEvent(event); resetCommandCharge(caller); - event = new PlayerCommandPreprocessEvent(caller, "/sales booster " + args[0] + " 60"); + event = new PlayerCommandPreprocessEvent(caller, "/sales booster " + args[0] + " 90"); Bukkit.getServer().getPluginManager().callEvent(event); } } diff --git a/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/salespackage/command/LifetimeHeroCommand.java b/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/salespackage/command/LifetimeHeroCommand.java index 9bf6a28ab..38676174b 100644 --- a/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/salespackage/command/LifetimeHeroCommand.java +++ b/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/salespackage/command/LifetimeHeroCommand.java @@ -27,7 +27,7 @@ public class LifetimeHeroCommand extends CommandBase Bukkit.getServer().getPluginManager().callEvent(event); resetCommandCharge(caller); - event = new PlayerCommandPreprocessEvent(caller, "/sales booster " + args[0] + " 120"); + event = new PlayerCommandPreprocessEvent(caller, "/sales booster " + args[0] + " 180"); Bukkit.getServer().getPluginManager().callEvent(event); } } diff --git a/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/salespackage/salespackages/LifetimeHero.java b/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/salespackage/salespackages/LifetimeHero.java index 11be30d2d..caf8b8eab 100644 --- a/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/salespackage/salespackages/LifetimeHero.java +++ b/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/salespackage/salespackages/LifetimeHero.java @@ -14,7 +14,7 @@ public class LifetimeHero extends SalesPackageBase public void displayToAgent(Player agent, String playerName) { addButton(agent, "/sales coin " + playerName + " 40000", " 40,000 Coins"); - addButton(agent, "/sales booster " + playerName + " 120", " 120 Gem Boosters"); + addButton(agent, "/sales booster " + playerName + " 180", " 180 Gem Boosters"); addButton(agent, "/sales rank " + playerName + " HERO true", " Lifetime Hero (Also, unlocks kits)."); addButton(agent, "Apply All", "/sales lifetimehero " + playerName, " Apply all above."); agent.sendMessage(" "); diff --git a/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/salespackage/salespackages/MonthlyHero.java b/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/salespackage/salespackages/MonthlyHero.java index 66102b208..ad82d4d83 100644 --- a/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/salespackage/salespackages/MonthlyHero.java +++ b/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/salespackage/salespackages/MonthlyHero.java @@ -14,7 +14,7 @@ public class MonthlyHero extends SalesPackageBase public void displayToAgent(Player agent, String playerName) { addButton(agent, "/sales coin " + playerName + " 15000", " 15,000 Coins"); - addButton(agent, "/sales booster " + playerName + " 60", " 60 Gem Boosters"); + addButton(agent, "/sales booster " + playerName + " 90", " 90 Gem Boosters"); addButton(agent, "/sales rank " + playerName + " HERO false", " Monthly Hero."); addButton(agent, "Apply All", "/sales hero " + playerName, " Apply all above."); agent.sendMessage(" "); diff --git a/Website/LOC.Website.Common/Models/AccountAdministrator.cs b/Website/LOC.Website.Common/Models/AccountAdministrator.cs index 851a817f0..aed5208f5 100644 --- a/Website/LOC.Website.Common/Models/AccountAdministrator.cs +++ b/Website/LOC.Website.Common/Models/AccountAdministrator.cs @@ -93,7 +93,7 @@ } // Expire ranks - if ((account.Rank.Name == "ULTRA") && !account.RankPerm && DateTime.Now.CompareTo(account.RankExpire) >= 0) + if ((account.Rank.Name == "ULTRA" || account.Rank.Name == "HERO") && !account.RankPerm && DateTime.Now.CompareTo(account.RankExpire) >= 0) { account.Rank = repository.Where(x => x.Name == "ALL").First(); repository.Attach(account.Rank); diff --git a/Website/LOC.Website.Web/LOC.Website.Web.Publish.xml b/Website/LOC.Website.Web/LOC.Website.Web.Publish.xml index 8209eb247..d6f0e2641 100644 --- a/Website/LOC.Website.Web/LOC.Website.Web.Publish.xml +++ b/Website/LOC.Website.Web/LOC.Website.Web.Publish.xml @@ -1,7 +1,6 @@  - @@ -19,18 +18,16 @@ - - + - + + - - @@ -44,27 +41,24 @@ - - - - + - - + + @@ -75,31 +69,31 @@ - - + - + + + + - - - + @@ -107,41 +101,43 @@ - + + + + + - - + - + - - - - + + - + + @@ -155,44 +151,50 @@ - + + + + + + - - + + - + - + - + + + - @@ -200,25 +202,26 @@ - + - - + + - + - + - + - + + @@ -226,51 +229,47 @@ - + - - + - - + + - - - - + + - + - - + + - - + + - + - + - @@ -281,16 +280,18 @@ - + + + - + @@ -304,26 +305,25 @@ + + - + - - - @@ -334,30 +334,29 @@ + - - + + - - + + - - @@ -365,41 +364,43 @@ - - - + + + + - + + + + - - + + - - @@ -410,130 +411,128 @@ - + - - - - + - - + - + - - + - + + - + + - + + - - + - - + + - + - + - + - + - + + - + - + + - + - + - - + + - + - - + + - - + + - + - + - @@ -546,22 +545,21 @@ - + + - - + - @@ -571,13 +569,14 @@ + - + @@ -586,8 +585,8 @@ + - @@ -598,20 +597,23 @@ + - + + - + + @@ -619,86 +621,81 @@ - - + + + - - - + - - + - + + - + - + - - + - + - - - - + - - + - - - + + + + @@ -708,95 +705,97 @@ - + + - + + - - + - + - - + + - + - + - - - + + + + - + - + + - + - + - - + + - + - - + + - - + + - + - + - @@ -809,22 +808,21 @@ - + + - - + - @@ -834,13 +832,14 @@ + - + @@ -849,8 +848,8 @@ + - @@ -861,20 +860,23 @@ + - + + - + + @@ -882,7 +884,6 @@ - @@ -891,77 +892,73 @@ + + - - - + - - + - + + - + - + - - + - + - - - - + - - + - + + @@ -971,85 +968,88 @@ - + + - + + - - + - + - - + + - + - + - - + + + - + - + + - + - + - - + + - + - - + + - - + + - + \ No newline at end of file diff --git a/Website/LOCWebsite.suo b/Website/LOCWebsite.suo index 2ad3002180581f26288f96b8758f6e75207ed54f..3f9f119c206263c33c081bccfa1582d0a37a428c 100644 GIT binary patch delta 716 zcmYL`Ur5tY6vyxV{qFs>O|wmh$(VC&BZj0Rh^10)y%+^eMZ$85U{RFxM}LtR)i0Ey z@TqH_m%z{-q=$%I@{TZBN)JJ}lHrpNDq;j?FTYAcTz3Q4fqUS5?)TpFt!d!|<5KK4=d(;!0VF8iV0*P285R~F}aA32MOTT;L$lpr$-3E!s8gs3^B+ahe9 zRCCjoBor4*&c03^=H`JEA$fZ$ZaSN-mNHou<&f?nSn(1*SoTR}^JT}F;n(p^{>z^{ zVhKoj$gV`Z_wnfYiH!mL zlheXzQVctsnkAKv%cuv{qbRzKuA@G56-7m3yAtk(=qxGOCp~B4(Rf@D<8gI$7ZMej zwt|E-wpQ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