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.
This commit is contained in:
Jonathan Williams 2014-08-30 02:04:04 -07:00
parent fa56aa0843
commit 1bd0209b39
11 changed files with 235 additions and 233 deletions

View File

@ -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),

View File

@ -50,7 +50,7 @@ public class UpdateRank extends CommandBase<CoreClientManager>
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<List<String>>()
{

View File

@ -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<ServerInfo>());
_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);

View File

@ -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

View File

@ -28,7 +28,7 @@ public class HeroCommand extends CommandBase<SalesPackageManager>
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);
}
}

View File

@ -27,7 +27,7 @@ public class LifetimeHeroCommand extends CommandBase<SalesPackageManager>
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);
}
}

View File

@ -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(" ");

View File

@ -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(" ");

View File

@ -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<Rank>(x => x.Name == "ALL").First();
repository.Attach(account.Rank);

File diff suppressed because it is too large Load Diff

Binary file not shown.