Patch exploit allowing for merging of Champions Classes in Clans

This commit is contained in:
AlexTheCoder 2017-08-26 04:54:31 -04:00
parent 2a0c9d58af
commit 514aced5e0
2 changed files with 16 additions and 2 deletions

View File

@ -142,7 +142,21 @@ public class ClansGame extends MiniPlugin
{
if (!event.getPlayer().isSneaking() || !hasItem)
{
_clans.getClassShop().attemptShopOpen(event.getPlayer());
if (Recharge.Instance.use(event.getPlayer(), "Open Skill Table GUI", 1000, false, false))
{
runSyncLater(() ->
{
if (event.getPlayer().isDead() || !event.getPlayer().isOnline() || !event.getPlayer().isValid())
{
return;
}
if (UtilMath.offsetSquared(event.getClickedBlock().getLocation(), event.getPlayer().getLocation()) > 36)
{
return;
}
_clans.getClassShop().attemptShopOpen(event.getPlayer());
}, 10);
}
event.setCancelled(true);
}
}

View File

@ -885,7 +885,7 @@ public class ClansManager extends MiniClientPlugin<ClientClan> implements IRelat
if (client.IsGameClass(IPvpClass.ClassType.Mage) || client.IsGameClass(IPvpClass.ClassType.Knight) || client.IsGameClass(IPvpClass.ClassType.Brute))
{
event.setCancelled(true);
UtilPlayer.message(player, F.main("Clans", "You cannot use " + F.elem("bow") + " as a " + F.elem(client.GetGameClass().GetName())));
UtilPlayer.message(player, F.main("Clans", "You cannot use " + F.elem("Bow") + " as a " + F.elem(client.GetGameClass().GetName())));
}
}
}