Merge branch 'master' of ssh://dev.mineplex.com:7999/min/mineplex

Conflicts:
	Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/champions/Champions.java
This commit is contained in:
Chiss 2013-10-31 17:38:44 +11:00
commit d41338b76a
11 changed files with 89 additions and 15 deletions

View File

@ -135,6 +135,9 @@
<fileset dir="../Mineplex.Core.Common/bin">
<include name="**/*.class"/>
</fileset>
<fileset dir="../Mineplex.Minecraft.Game.ClassCombat/bin">
<include name="**/*.class"/>
</fileset>
<fileset dir="../Mineplex.Minecraft.Game.Core/bin">
<include name="**/*.class"/>
</fileset>

View File

@ -253,7 +253,7 @@ public class ServerGameMenu extends ShopPageBase<ServerManager, QuickShop>
ChatColor.RESET + "Squid Sauce"
}));
_minigameCycle.add(ItemStackFactory.Instance.CreateStack(144, (byte)1, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Arcade " + C.cGray + "Mixed Games", new String []
_minigameCycle.add(ItemStackFactory.Instance.CreateStack(319, (byte)0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Arcade " + C.cGray + "Mixed Games", new String []
{
ChatColor.RESET + "",
ChatColor.RESET + "Play all of these fun minigames:",
@ -271,7 +271,7 @@ public class ServerGameMenu extends ShopPageBase<ServerManager, QuickShop>
ChatColor.RESET + "Squid Sauce"
}));
_minigameCycle.add(ItemStackFactory.Instance.CreateStack(144, (byte)1, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Arcade " + C.cGray + "Mixed Games", new String []
_minigameCycle.add(ItemStackFactory.Instance.CreateStack(351, (byte)0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Arcade " + C.cGray + "Mixed Games", new String []
{
ChatColor.RESET + "",
ChatColor.RESET + "Play all of these fun minigames:",

View File

@ -11,7 +11,7 @@ import mineplex.core.shop.page.ShopPageBase;
import mineplex.core.common.CurrencyType;
import mineplex.core.common.util.NautHashMap;
import mineplex.minecraft.game.classcombat.Class.ClientClass;
import mineplex.minecraft.game.classcombat.shop.page.ArmorPage;
import mineplex.minecraft.game.classcombat.shop.page.CustomBuildPage;
public class ClassCombatShop extends ShopBase<ClassShopManager>
{
@ -29,13 +29,13 @@ public class ClassCombatShop extends ShopBase<ClassShopManager>
@Override
protected ShopPageBase<ClassShopManager, ClassCombatShop> BuildPagesFor(Player player)
{
return new ArmorPage(Plugin, this, ClientManager, DonationManager, player, Purchasing);
return new CustomBuildPage(Plugin, this, ClientManager, DonationManager, player);
}
@Override
protected ShopPageBase<ClassShopManager, ? extends ShopBase<ClassShopManager>> GetOpeningPageForPlayer(Player player)
{
return new ArmorPage(Plugin, this, ClientManager, DonationManager, player, Purchasing);
return new CustomBuildPage(Plugin, this, ClientManager, DonationManager, player);
}
@Override

View File

@ -47,7 +47,7 @@ public class ArmorPage extends ShopPageBase<ClassShopManager, ClassCombatShop>
pvpClass.ApplyArmor(player);
clientClass.ClearDefaults();
Shop.OpenPageForPlayer(Player, new CustomBuildPage(Plugin, Shop, ClientManager, DonationManager, player, pvpClass));
Shop.OpenPageForPlayer(Player, new CustomBuildPage(Plugin, Shop, ClientManager, DonationManager, player));
}
}

View File

@ -29,10 +29,10 @@ public class CustomBuildPage extends ShopPageBase<ClassShopManager, ClassCombatS
protected boolean equipDefaultArmor = true;
protected boolean saveActiveCustomBuild = false;
public CustomBuildPage(ClassShopManager shopManager, ClassCombatShop shop, CoreClientManager clientManager, DonationManager donationManager, Player player, IPvpClass pvpClass)
public CustomBuildPage(ClassShopManager shopManager, ClassCombatShop shop, CoreClientManager clientManager, DonationManager donationManager, Player player)
{
super(shopManager, shop, clientManager, donationManager, " Custom Build", player);
_pvpClass = pvpClass;
_pvpClass = Plugin.GetClassManager().Get(player).GetGameClass();
BuildPage();
}

View File

@ -125,7 +125,7 @@ public class Arcade extends JavaPlugin implements INautilusPlugin, IPlugin
_damageManager = new DamageManager(this, new CombatManager(this), new NpcManager(this, GetCreature()), disguiseManager);
//Arcade Manager
_gameManager = new ArcadeManager(this, ReadServerConfig(), _clientManager, _donationManager, conditionManager, _damageManager, disguiseManager, GetCreature(), GetBlood(), antistack, packetHandler);
_gameManager = new ArcadeManager(this, ReadServerConfig(), _clientManager, _donationManager, conditionManager, _damageManager, disguiseManager, GetCreature(), GetBlood(), antistack, packetHandler, GetWebServerAddress());
//Unreferenced Modules
//new AntiStack();

View File

@ -24,9 +24,15 @@ import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.player.PlayerLoginEvent;
import org.bukkit.event.player.PlayerQuitEvent;
import org.bukkit.event.server.ServerListPingEvent;
import org.bukkit.plugin.java.JavaPlugin;
import mineplex.minecraft.game.classcombat.Class.ClassManager;
import mineplex.minecraft.game.classcombat.Class.IPvpClass;
import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
import mineplex.minecraft.game.classcombat.itempack.ItemPackFactory;
import mineplex.minecraft.game.classcombat.shop.ClassCombatCustomBuildShop;
import mineplex.minecraft.game.classcombat.shop.ClassShopManager;
import mineplex.minecraft.game.core.IRelation;
import mineplex.minecraft.game.core.combat.CombatManager;
import mineplex.minecraft.game.core.condition.ConditionManager;
import mineplex.minecraft.game.core.condition.Condition.ConditionType;
import mineplex.minecraft.game.core.damage.DamageManager;
@ -43,7 +49,9 @@ import mineplex.core.common.util.*;
import mineplex.core.creature.Creature;
import mineplex.core.disguise.DisguiseManager;
import mineplex.core.donation.DonationManager;
import mineplex.core.movement.Movement;
import mineplex.core.packethandler.PacketHandler;
import mineplex.core.energy.Energy;
import mineplex.core.explosion.Explosion;
import mineplex.core.portal.Portal;
import mineplex.core.projectile.ProjectileManager;
@ -76,6 +84,11 @@ public class ArcadeManager extends MiniPlugin implements IRelation
private GameManager _gameManager;
private GameLobbyManager _gameLobbyManager;
private GameWorldManager _gameWorldManager;
private ClassManager _classManager;
private SkillFactory _skillFactory;
private ClassShopManager _classShopManager;
private ClassCombatCustomBuildShop _classCustomBuildShop;
//Server Games
private GameServerConfig _serverConfig;
@ -83,7 +96,7 @@ public class ArcadeManager extends MiniPlugin implements IRelation
//Games
private Game _game;
public ArcadeManager(JavaPlugin plugin, GameServerConfig serverConfig, CoreClientManager clientManager, DonationManager donationManager, ConditionManager conditionManager, DamageManager damageManager, DisguiseManager disguiseManager, Creature creature, Blood blood, AntiStack antistack, PacketHandler packetHandler)
public ArcadeManager(Arcade plugin, GameServerConfig serverConfig, CoreClientManager clientManager, DonationManager donationManager, ConditionManager conditionManager, DamageManager damageManager, DisguiseManager disguiseManager, Creature creature, Blood blood, AntiStack antistack, PacketHandler packetHandler, String webAddress)
{
super("Game Manager", plugin);
@ -115,11 +128,16 @@ public class ArcadeManager extends MiniPlugin implements IRelation
_donationManager = donationManager;
_firework = new FireworkHandler();
_projectileManager = new ProjectileManager(plugin);
_fire = new Fire(plugin, conditionManager, damageManager);
_projectileManager = new ProjectileManager(plugin);
_skillFactory = new SkillFactory(plugin, damageManager, this, new CombatManager(plugin), conditionManager, _projectileManager, _blockRestore, _fire, new Movement(plugin), plugin.GetTeleport(), new Energy(plugin), webAddress);
_classManager = new ClassManager(plugin, clientManager, donationManager, _skillFactory, webAddress);
_classShopManager = new ClassShopManager(_plugin, _classManager, _skillFactory, new ItemPackFactory(_plugin));
_classCustomBuildShop = new ClassCombatCustomBuildShop(_classShopManager, clientManager, donationManager, webAddress);
_portal = new Portal(plugin);
//Shop
@ -493,4 +511,19 @@ public class ArcadeManager extends MiniPlugin implements IRelation
return maps;
}
public ClassManager getClassManager()
{
return _classManager;
}
public ClassCombatCustomBuildShop getClassShop()
{
return _classCustomBuildShop;
}
public void openClassShop(Player player, IPvpClass pvpClass)
{
_classCustomBuildShop.attemptShopOpen(player);
}
}

View File

@ -544,7 +544,13 @@ public abstract class Game implements Listener
}
}
if (_playerKit.get(player) != null)
{
_playerKit.get(player).Deselected(player);
}
_playerKit.put(player, kit);
kit.Selected(player);
if (announce)
{

View File

@ -24,6 +24,7 @@ import nautilus.game.arcade.events.GameStateChangeEvent;
import nautilus.game.arcade.game.Game;
import nautilus.game.arcade.game.GameTeam;
import nautilus.game.arcade.game.TeamGame;
import nautilus.game.arcade.game.games.champions.kits.KitKnight;
import nautilus.game.arcade.game.games.champions.map.*;
import nautilus.game.arcade.game.games.smash.kits.*;
import nautilus.game.arcade.kit.Kit;
@ -53,7 +54,7 @@ public class Champions extends TeamGame
new Kit[]
{
new KitWitherSkeleton(manager),
new KitBlaze(manager),
new KitKnight(manager),
new KitGolem(manager),
new KitSlime(manager),
new KitChicken(manager),

View File

@ -8,9 +8,12 @@ import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import me.chiss.Core.ClientData.IClientClass;
import mineplex.core.common.util.F;
import mineplex.core.itemstack.ItemStackFactory;
import mineplex.minecraft.game.classcombat.Class.ClientClass;
import mineplex.minecraft.game.classcombat.Class.IPvpClass;
import mineplex.minecraft.game.classcombat.shop.page.CustomBuildPage;
import nautilus.game.arcade.ArcadeManager;
import nautilus.game.arcade.kit.Kit;
import nautilus.game.arcade.kit.KitAvailability;
@ -36,6 +39,28 @@ public class KitKnight extends Kit
}
@Override
public void Deselected(Player player)
{
_class.remove(player);
}
@Override
public void Selected(Player player)
{
_class.put(player, Manager.getClassManager().Get(player));
ClientClass clientClass = _class.get(player);
IPvpClass pvpClass = Manager.getClassManager().GetClass("Knight");
player.getInventory().clear();
clientClass.SetGameClass(pvpClass);
pvpClass.ApplyArmor(player);
clientClass.ClearDefaults();
Manager.openClassShop(player, Manager.getClassManager().GetClass("Knight"));
}
@Override
public void GiveItems(Player player)
{
@ -53,6 +78,8 @@ public class KitKnight extends Kit
player.getInventory().setChestplate(ItemStackFactory.Instance.CreateStack(Material.IRON_CHESTPLATE));
player.getInventory().setLeggings(ItemStackFactory.Instance.CreateStack(Material.IRON_LEGGINGS));
player.getInventory().setBoots(ItemStackFactory.Instance.CreateStack(Material.IRON_BOOTS));
_class.get(player).ResetToDefaults(true, true);
}
@Override

View File

@ -176,4 +176,8 @@ public abstract class Kit implements Listener
{
return _displayItem;
}
public void Deselected(Player player) { }
public void Selected(Player player) { }
}