Added default builds for kits in Champions/Dominate
Added default build selection in lobby when only hitting kit and not selecting a build.
This commit is contained in:
parent
f277b1da23
commit
c4b7cd19c8
@ -9,6 +9,9 @@ import mineplex.minecraft.game.classcombat.Class.IPvpClass.ClassType;
|
|||||||
import mineplex.minecraft.game.classcombat.Class.repository.ClassRepository;
|
import mineplex.minecraft.game.classcombat.Class.repository.ClassRepository;
|
||||||
import mineplex.minecraft.game.classcombat.Class.repository.token.ClassToken;
|
import mineplex.minecraft.game.classcombat.Class.repository.token.ClassToken;
|
||||||
import mineplex.minecraft.game.classcombat.Class.repository.token.ClientClassTokenWrapper;
|
import mineplex.minecraft.game.classcombat.Class.repository.token.ClientClassTokenWrapper;
|
||||||
|
import mineplex.minecraft.game.classcombat.Class.repository.token.CustomBuildToken;
|
||||||
|
import mineplex.minecraft.game.classcombat.Class.repository.token.SlotToken;
|
||||||
|
import mineplex.minecraft.game.classcombat.Skill.ISkill;
|
||||||
import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
|
import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
|
||||||
import mineplex.core.MiniClientPlugin;
|
import mineplex.core.MiniClientPlugin;
|
||||||
import mineplex.core.account.CoreClientManager;
|
import mineplex.core.account.CoreClientManager;
|
||||||
@ -32,8 +35,6 @@ public class ClassManager extends MiniClientPlugin<ClientClass> implements IClas
|
|||||||
private HashMap<String, IPvpClass> _classes;
|
private HashMap<String, IPvpClass> _classes;
|
||||||
private HashMap<Integer, IPvpClass> _classSalesPackageIdMap;
|
private HashMap<Integer, IPvpClass> _classSalesPackageIdMap;
|
||||||
|
|
||||||
private ClassRestore _classRestore;
|
|
||||||
|
|
||||||
private Object _clientLock = new Object();
|
private Object _clientLock = new Object();
|
||||||
|
|
||||||
public ClassManager(JavaPlugin plugin, CoreClientManager clientManager, DonationManager donationManager, SkillFactory skillFactory, String webAddress)
|
public ClassManager(JavaPlugin plugin, CoreClientManager clientManager, DonationManager donationManager, SkillFactory skillFactory, String webAddress)
|
||||||
@ -77,30 +78,12 @@ public class ClassManager extends MiniClientPlugin<ClientClass> implements IClas
|
|||||||
private void PopulateClasses()
|
private void PopulateClasses()
|
||||||
{
|
{
|
||||||
_classes.clear();
|
_classes.clear();
|
||||||
AddClass(new PvpClass(this, -1, ClassType.Knight,
|
|
||||||
new String[] { "Trained in the arts of melee combat.", "Able to stand his ground against foes."},
|
|
||||||
Material.IRON_HELMET, Material.IRON_CHESTPLATE, Material.IRON_LEGGINGS, Material.IRON_BOOTS,
|
|
||||||
null));
|
|
||||||
|
|
||||||
AddClass(new PvpClass(this, -1, ClassType.Ranger,
|
AddKnight();
|
||||||
new String[] { "Mastery with a Bow and Arrow.", "Adept in Wilderness Survival" },
|
AddRanger();
|
||||||
Material.CHAINMAIL_HELMET, Material.CHAINMAIL_CHESTPLATE, Material.CHAINMAIL_LEGGINGS, Material.CHAINMAIL_BOOTS,
|
AddBrute();
|
||||||
null));
|
AddMage();
|
||||||
|
AddAssassin();
|
||||||
AddClass(new PvpClass(this, 3, ClassType.Brute,
|
|
||||||
new String[] { "Uses pure strength to dominate.", "Great at crowd control."},
|
|
||||||
Material.DIAMOND_HELMET, Material.DIAMOND_CHESTPLATE, Material.DIAMOND_LEGGINGS, Material.DIAMOND_BOOTS,
|
|
||||||
null));
|
|
||||||
|
|
||||||
AddClass(new PvpClass(this, 4, ClassType.Mage,
|
|
||||||
new String[] { "Trained in the ancient arts.", "Able to adapt to many roles in combat."},
|
|
||||||
Material.GOLD_HELMET, Material.GOLD_CHESTPLATE, Material.GOLD_LEGGINGS, Material.GOLD_BOOTS,
|
|
||||||
null));
|
|
||||||
|
|
||||||
AddClass(new PvpClass(this, 5, ClassType.Assassin,
|
|
||||||
new String[] { "Extremely nimble and smart.", "Excels at ambushing and takedowns.", "", "Permanent Speed II" },
|
|
||||||
Material.LEATHER_HELMET, Material.LEATHER_CHESTPLATE, Material.LEATHER_LEGGINGS, Material.LEATHER_BOOTS,
|
|
||||||
null));
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
AddClass(new PvpClass(this, 6, ClassType.Shapeshifter,
|
AddClass(new PvpClass(this, 6, ClassType.Shapeshifter,
|
||||||
@ -131,6 +114,113 @@ public class ClassManager extends MiniClientPlugin<ClientClass> implements IClas
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void AddAssassin()
|
||||||
|
{
|
||||||
|
CustomBuildToken customBuild = new CustomBuildToken();
|
||||||
|
customBuild.Name = "Default Build";
|
||||||
|
|
||||||
|
customBuild.SwordSkillId = _skillFactory.GetSkill("Evade").GetSalesPackageId();
|
||||||
|
customBuild.AxeSkillId = _skillFactory.GetSkill("Blink").GetSalesPackageId();
|
||||||
|
customBuild.BowSkillId = _skillFactory.GetSkill("Marked for Death").GetSalesPackageId();
|
||||||
|
customBuild.ClassPassiveASkillId = _skillFactory.GetSkill("Stealth").GetSalesPackageId();
|
||||||
|
customBuild.ClassPassiveBSkillId = _skillFactory.GetSkill("Repeated Strikes").GetSalesPackageId();
|
||||||
|
customBuild.GlobalPassiveSkillId = _skillFactory.GetSkill("Break Fall").GetSalesPackageId();
|
||||||
|
|
||||||
|
AddClass(new PvpClass(
|
||||||
|
this,
|
||||||
|
5,
|
||||||
|
ClassType.Assassin,
|
||||||
|
customBuild,
|
||||||
|
new String[] { "Extremely nimble and smart.", "Excels at ambushing and takedowns.", "", "Permanent Speed II" },
|
||||||
|
Material.LEATHER_HELMET, Material.LEATHER_CHESTPLATE, Material.LEATHER_LEGGINGS, Material.LEATHER_BOOTS,
|
||||||
|
null));
|
||||||
|
}
|
||||||
|
|
||||||
|
private void AddMage()
|
||||||
|
{
|
||||||
|
CustomBuildToken customBuild = new CustomBuildToken();
|
||||||
|
customBuild.Name = "Default Build";
|
||||||
|
|
||||||
|
customBuild.SwordSkillId = _skillFactory.GetSkill("Blizzard").GetSalesPackageId();
|
||||||
|
customBuild.AxeSkillId = _skillFactory.GetSkill("Freezing Blast").GetSalesPackageId();
|
||||||
|
customBuild.BowSkillId = -1;
|
||||||
|
customBuild.ClassPassiveASkillId = _skillFactory.GetSkill("Arctic Armor").GetSalesPackageId();
|
||||||
|
customBuild.ClassPassiveBSkillId = _skillFactory.GetSkill("Glacial Blade").GetSalesPackageId();
|
||||||
|
customBuild.GlobalPassiveSkillId = _skillFactory.GetSkill("Fitness").GetSalesPackageId();
|
||||||
|
|
||||||
|
AddClass(new PvpClass(this,
|
||||||
|
4,
|
||||||
|
ClassType.Mage,
|
||||||
|
customBuild,
|
||||||
|
new String[] { "Trained in the ancient arts.", "Able to adapt to many roles in combat."},
|
||||||
|
Material.GOLD_HELMET, Material.GOLD_CHESTPLATE, Material.GOLD_LEGGINGS, Material.GOLD_BOOTS,
|
||||||
|
null));
|
||||||
|
}
|
||||||
|
|
||||||
|
private void AddBrute()
|
||||||
|
{
|
||||||
|
CustomBuildToken customBuild = new CustomBuildToken();
|
||||||
|
customBuild.Name = "Default Build";
|
||||||
|
|
||||||
|
customBuild.SwordSkillId = _skillFactory.GetSkill("Dwarf Toss").GetSalesPackageId();
|
||||||
|
customBuild.AxeSkillId = _skillFactory.GetSkill("Seismic Slam").GetSalesPackageId();
|
||||||
|
customBuild.BowSkillId = -1;
|
||||||
|
customBuild.ClassPassiveASkillId = _skillFactory.GetSkill("Stampede").GetSalesPackageId();
|
||||||
|
customBuild.ClassPassiveBSkillId = _skillFactory.GetSkill("Crippling Blow").GetSalesPackageId();
|
||||||
|
customBuild.GlobalPassiveSkillId = _skillFactory.GetSkill("Recharge").GetSalesPackageId();
|
||||||
|
|
||||||
|
AddClass(new PvpClass(this,
|
||||||
|
3,
|
||||||
|
ClassType.Brute,
|
||||||
|
customBuild,
|
||||||
|
new String[] { "Uses pure strength to dominate.", "Great at crowd control."},
|
||||||
|
Material.DIAMOND_HELMET, Material.DIAMOND_CHESTPLATE, Material.DIAMOND_LEGGINGS, Material.DIAMOND_BOOTS,
|
||||||
|
null));
|
||||||
|
}
|
||||||
|
|
||||||
|
private void AddRanger()
|
||||||
|
{
|
||||||
|
CustomBuildToken customBuild = new CustomBuildToken();
|
||||||
|
customBuild.Name = "Default Build";
|
||||||
|
|
||||||
|
customBuild.SwordSkillId = _skillFactory.GetSkill("Disengage").GetSalesPackageId();
|
||||||
|
customBuild.AxeSkillId = _skillFactory.GetSkill("Agility").GetSalesPackageId();
|
||||||
|
customBuild.BowSkillId = _skillFactory.GetSkill("Napalm Shot").GetSalesPackageId();
|
||||||
|
customBuild.ClassPassiveASkillId = _skillFactory.GetSkill("Barrage").GetSalesPackageId();
|
||||||
|
customBuild.ClassPassiveBSkillId = _skillFactory.GetSkill("Barbed Arrows").GetSalesPackageId();
|
||||||
|
customBuild.GlobalPassiveSkillId = _skillFactory.GetSkill("Quick Recovery").GetSalesPackageId();
|
||||||
|
|
||||||
|
AddClass(new PvpClass(this,
|
||||||
|
-1,
|
||||||
|
ClassType.Ranger,
|
||||||
|
customBuild,
|
||||||
|
new String[] { "Mastery with a Bow and Arrow.", "Adept in Wilderness Survival" },
|
||||||
|
Material.CHAINMAIL_HELMET, Material.CHAINMAIL_CHESTPLATE, Material.CHAINMAIL_LEGGINGS, Material.CHAINMAIL_BOOTS,
|
||||||
|
null));
|
||||||
|
}
|
||||||
|
|
||||||
|
private void AddKnight()
|
||||||
|
{
|
||||||
|
CustomBuildToken customBuild = new CustomBuildToken();
|
||||||
|
customBuild.Name = "Default Build";
|
||||||
|
|
||||||
|
customBuild.SwordSkillId = _skillFactory.GetSkill("Hilt Smash").GetSalesPackageId();
|
||||||
|
customBuild.AxeSkillId = _skillFactory.GetSkill("Bulls Charge").GetSalesPackageId();
|
||||||
|
customBuild.BowSkillId = -1;
|
||||||
|
customBuild.ClassPassiveASkillId = _skillFactory.GetSkill("Swordsmanship").GetSalesPackageId();
|
||||||
|
customBuild.ClassPassiveBSkillId = _skillFactory.GetSkill("Fortitude").GetSalesPackageId();
|
||||||
|
customBuild.GlobalPassiveSkillId = _skillFactory.GetSkill("Resistance").GetSalesPackageId();
|
||||||
|
|
||||||
|
AddClass(new PvpClass(
|
||||||
|
this,
|
||||||
|
-1,
|
||||||
|
ClassType.Knight,
|
||||||
|
customBuild,
|
||||||
|
new String[] { "Trained in the arts of melee combat.", "Able to stand his ground against foes."},
|
||||||
|
Material.IRON_HELMET, Material.IRON_CHESTPLATE, Material.IRON_LEGGINGS, Material.IRON_BOOTS,
|
||||||
|
null));
|
||||||
|
}
|
||||||
|
|
||||||
public IPvpClass GetClass(String className)
|
public IPvpClass GetClass(String className)
|
||||||
{
|
{
|
||||||
return _classes.get(className);
|
return _classes.get(className);
|
||||||
@ -172,14 +262,6 @@ public class ClassManager extends MiniClientPlugin<ClientClass> implements IClas
|
|||||||
return _skillFactory;
|
return _skillFactory;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ClassRestore GetRestore()
|
|
||||||
{
|
|
||||||
if (_classRestore == null)
|
|
||||||
_classRestore = new ClassRestore(_plugin, this, _skillFactory);
|
|
||||||
|
|
||||||
return _classRestore;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected ClientClass AddPlayer(String player)
|
protected ClientClass AddPlayer(String player)
|
||||||
{
|
{
|
||||||
|
@ -1,259 +0,0 @@
|
|||||||
package mineplex.minecraft.game.classcombat.Class;
|
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
|
||||||
import java.io.BufferedWriter;
|
|
||||||
import java.io.DataInputStream;
|
|
||||||
import java.io.File;
|
|
||||||
import java.io.FileInputStream;
|
|
||||||
import java.io.FileWriter;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.io.InputStreamReader;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.HashMap;
|
|
||||||
|
|
||||||
import mineplex.core.MiniPlugin;
|
|
||||||
import mineplex.core.common.util.F;
|
|
||||||
import mineplex.minecraft.game.classcombat.Skill.ISkill;
|
|
||||||
import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
|
|
||||||
|
|
||||||
import org.bukkit.event.EventHandler;
|
|
||||||
import org.bukkit.event.EventPriority;
|
|
||||||
import org.bukkit.event.player.AsyncPlayerPreLoginEvent;
|
|
||||||
import org.bukkit.event.player.PlayerQuitEvent;
|
|
||||||
import org.bukkit.event.player.AsyncPlayerPreLoginEvent.Result;
|
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
|
||||||
|
|
||||||
public class ClassRestore extends MiniPlugin
|
|
||||||
{
|
|
||||||
private ClassManager _classManager;
|
|
||||||
private SkillFactory _skillFactory;
|
|
||||||
private boolean _active = false;
|
|
||||||
private String _folder = "data/classbuilds/";
|
|
||||||
|
|
||||||
private HashMap<String, HashMap<IPvpClass, Collection<ISkill>>> _skills = new HashMap<String, HashMap<IPvpClass, Collection<ISkill>>>();
|
|
||||||
|
|
||||||
public ClassRestore(JavaPlugin plugin, ClassManager classManager, SkillFactory skillFactory)
|
|
||||||
{
|
|
||||||
super("Class Restore", plugin);
|
|
||||||
|
|
||||||
_classManager = classManager;
|
|
||||||
_skillFactory = skillFactory;
|
|
||||||
|
|
||||||
File file = new File(_folder);
|
|
||||||
file.mkdirs();
|
|
||||||
}
|
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.HIGHEST)
|
|
||||||
public void Join(AsyncPlayerPreLoginEvent event)
|
|
||||||
{
|
|
||||||
if (!_active)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (event.getLoginResult() != Result.ALLOWED)
|
|
||||||
return;
|
|
||||||
|
|
||||||
ReadBuilds(event.getName());
|
|
||||||
}
|
|
||||||
|
|
||||||
@EventHandler
|
|
||||||
public void Quit(PlayerQuitEvent event)
|
|
||||||
{
|
|
||||||
if (!_active)
|
|
||||||
return;
|
|
||||||
|
|
||||||
WriteBuilds(event.getPlayer().getName());
|
|
||||||
_skills.remove(event.getPlayer().getName());
|
|
||||||
}
|
|
||||||
|
|
||||||
public Collection<ISkill> GetBuild(String name, IPvpClass gameClass)
|
|
||||||
{
|
|
||||||
if (!_active)
|
|
||||||
return null;
|
|
||||||
|
|
||||||
if (!_skills.containsKey(name))
|
|
||||||
return null;
|
|
||||||
|
|
||||||
if (!_skills.get(name).containsKey(gameClass))
|
|
||||||
return null;
|
|
||||||
|
|
||||||
return _skills.get(name).get(gameClass);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SaveBuild(String name, IPvpClass gameClass, Collection<ISkill> skills)
|
|
||||||
{
|
|
||||||
if (!_active)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (!_skills.containsKey(name))
|
|
||||||
_skills.put(name, new HashMap<IPvpClass, Collection<ISkill>>());
|
|
||||||
|
|
||||||
//Replace Old
|
|
||||||
_skills.get(name).put(gameClass, new ArrayList<ISkill>());
|
|
||||||
|
|
||||||
//Insert Skills
|
|
||||||
for (ISkill skill : skills)
|
|
||||||
_skills.get(name).get(gameClass).add(skill);
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean IsActive()
|
|
||||||
{
|
|
||||||
return _active;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Activate()
|
|
||||||
{
|
|
||||||
_active = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* FORMAT
|
|
||||||
*
|
|
||||||
* Assassin 5 Bulls Charge
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
public void WriteBuilds(String player)
|
|
||||||
{
|
|
||||||
if (!_skills.containsKey(player))
|
|
||||||
return;
|
|
||||||
|
|
||||||
System.out.println("Writing Build: " + player);
|
|
||||||
|
|
||||||
FileWriter fstream = null;
|
|
||||||
BufferedWriter out = null;
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
fstream = new FileWriter(_folder + player + ".dat");
|
|
||||||
out = new BufferedWriter(fstream);
|
|
||||||
|
|
||||||
HashMap<IPvpClass, Collection<ISkill>> builds = _skills.get(player);
|
|
||||||
|
|
||||||
for (IPvpClass gameClass : builds.keySet())
|
|
||||||
for (ISkill skill : builds.get(gameClass))
|
|
||||||
out.write(gameClass.GetName() + " " + skill.GetName() + "\n");
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
System.err.println("Build Write Error: " + e.getMessage());
|
|
||||||
}
|
|
||||||
finally
|
|
||||||
{
|
|
||||||
if (out != null)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
out.close();
|
|
||||||
}
|
|
||||||
catch (IOException e)
|
|
||||||
{
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (fstream != null)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
fstream.close();
|
|
||||||
}
|
|
||||||
catch (IOException e)
|
|
||||||
{
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void ReadBuilds(String player)
|
|
||||||
{
|
|
||||||
System.out.println("Reading Build: " + player);
|
|
||||||
|
|
||||||
FileInputStream fstream = null;
|
|
||||||
DataInputStream in = null;
|
|
||||||
BufferedReader br = null;
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
File f = new File(_folder + player + ".dat");
|
|
||||||
|
|
||||||
if (!f.exists())
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (!_skills.containsKey(player))
|
|
||||||
_skills.put(player, new HashMap<IPvpClass, Collection<ISkill>>());
|
|
||||||
|
|
||||||
fstream = new FileInputStream(f);
|
|
||||||
in = new DataInputStream(fstream);
|
|
||||||
br = new BufferedReader(new InputStreamReader(in));
|
|
||||||
String strLine;
|
|
||||||
|
|
||||||
while ((strLine = br.readLine()) != null)
|
|
||||||
{
|
|
||||||
String[] tokens = strLine.split(" ");
|
|
||||||
|
|
||||||
if (tokens.length < 3)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
//Class
|
|
||||||
IPvpClass gameClass = _classManager.GetClass(tokens[0]);
|
|
||||||
|
|
||||||
if (!_skills.get(player).containsKey(gameClass))
|
|
||||||
_skills.get(player).put(gameClass, new ArrayList<ISkill>());
|
|
||||||
|
|
||||||
ISkill skill = _skillFactory.GetSkill(F.combine(tokens, 2, null, false));
|
|
||||||
|
|
||||||
_skills.get(player).get(gameClass).add(skill);
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
System.err.println("Build Parse Error: " + e.getMessage());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
System.err.println("Build Read Error: " + e.getMessage());
|
|
||||||
}
|
|
||||||
finally
|
|
||||||
{
|
|
||||||
if (br != null)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
br.close();
|
|
||||||
}
|
|
||||||
catch (IOException e)
|
|
||||||
{
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (in != null)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
in.close();
|
|
||||||
}
|
|
||||||
catch (IOException e)
|
|
||||||
{
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (fstream != null)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
fstream.close();
|
|
||||||
}
|
|
||||||
catch (IOException e)
|
|
||||||
{
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -63,6 +63,7 @@ public class ClientClass
|
|||||||
for (IPvpClass pvpClass : _classFactory.GetAllClasses())
|
for (IPvpClass pvpClass : _classFactory.GetAllClasses())
|
||||||
{
|
{
|
||||||
_customBuilds.put(pvpClass, new HashMap<Integer, CustomBuildToken>());
|
_customBuilds.put(pvpClass, new HashMap<Integer, CustomBuildToken>());
|
||||||
|
_customBuilds.get(pvpClass).put(0, pvpClass.getDefaultBuild());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (token == null)
|
if (token == null)
|
||||||
@ -70,6 +71,9 @@ public class ClientClass
|
|||||||
|
|
||||||
for (CustomBuildToken buildToken : token.CustomBuilds)
|
for (CustomBuildToken buildToken : token.CustomBuilds)
|
||||||
{
|
{
|
||||||
|
if (buildToken.CustomBuildNumber == 0)
|
||||||
|
continue;
|
||||||
|
|
||||||
IPvpClass pvpClass = _classFactory.GetClass(buildToken.PvpClassId);
|
IPvpClass pvpClass = _classFactory.GetClass(buildToken.PvpClassId);
|
||||||
|
|
||||||
ISkill swordSkill = _skillFactory.GetSkillBySalesPackageId(buildToken.SwordSkillId);
|
ISkill swordSkill = _skillFactory.GetSkillBySalesPackageId(buildToken.SwordSkillId);
|
||||||
@ -413,22 +417,6 @@ public class ClientClass
|
|||||||
if (_gameClass == null)
|
if (_gameClass == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
//Load Saved
|
|
||||||
if (_classFactory.GetRestore().IsActive())
|
|
||||||
{
|
|
||||||
Collection<ISkill> skills = _classFactory.GetRestore().GetBuild(_client.GetPlayerName(), gameClass);
|
|
||||||
|
|
||||||
if (skills != null)
|
|
||||||
{
|
|
||||||
for (ISkill skill : skills)
|
|
||||||
AddSkill(skill);
|
|
||||||
|
|
||||||
//Inform
|
|
||||||
UtilPlayer.message(_client.GetPlayer(), F.main("Class", "Armor Class: " + F.oo(_gameClass.GetName(), true)));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for (ISkill cur : gameClass.GetDefaultSkills().keySet())
|
for (ISkill cur : gameClass.GetDefaultSkills().keySet())
|
||||||
{
|
{
|
||||||
if (cur.GetSkillType() == SkillType.Class)
|
if (cur.GetSkillType() == SkillType.Class)
|
||||||
@ -436,7 +424,7 @@ public class ClientClass
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Inform
|
//Inform
|
||||||
UtilPlayer.message(_client.GetPlayer(), F.main("Class", "Armor Class: " + F.oo(_gameClass.GetName(), true)));
|
//UtilPlayer.message(_client.GetPlayer(), F.main("Class", "Armor Class: " + F.oo(_gameClass.GetName(), true)));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -489,10 +477,6 @@ public class ClientClass
|
|||||||
_lastSkillMap.put(skill.GetSkillType(), skill);
|
_lastSkillMap.put(skill.GetSkillType(), skill);
|
||||||
|
|
||||||
skill.AddUser(_client.GetPlayer());
|
skill.AddUser(_client.GetPlayer());
|
||||||
|
|
||||||
//Save
|
|
||||||
if (_classFactory.GetRestore().IsActive())
|
|
||||||
_classFactory.GetRestore().SaveBuild(_client.GetPlayerName(), _gameClass, GetSkills());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RemoveSkill(ISkill skill)
|
public void RemoveSkill(ISkill skill)
|
||||||
|
@ -4,6 +4,7 @@ import java.util.HashMap;
|
|||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
|
||||||
import mineplex.minecraft.game.classcombat.Class.repository.token.ClassToken;
|
import mineplex.minecraft.game.classcombat.Class.repository.token.ClassToken;
|
||||||
|
import mineplex.minecraft.game.classcombat.Class.repository.token.CustomBuildToken;
|
||||||
import mineplex.minecraft.game.classcombat.Skill.ISkill;
|
import mineplex.minecraft.game.classcombat.Skill.ISkill;
|
||||||
|
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
@ -38,4 +39,5 @@ public interface IPvpClass
|
|||||||
void Update(ClassToken classToken);
|
void Update(ClassToken classToken);
|
||||||
String[] GetDesc();
|
String[] GetDesc();
|
||||||
void ApplyArmor(Player caller);
|
void ApplyArmor(Player caller);
|
||||||
|
CustomBuildToken getDefaultBuild();
|
||||||
}
|
}
|
||||||
|
@ -3,9 +3,7 @@ package mineplex.minecraft.game.classcombat.Class;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
|
||||||
import mineplex.core.common.util.F;
|
|
||||||
import mineplex.core.common.util.UtilGear;
|
import mineplex.core.common.util.UtilGear;
|
||||||
import mineplex.core.common.util.UtilPlayer;
|
|
||||||
import mineplex.core.itemstack.ItemStackFactory;
|
import mineplex.core.itemstack.ItemStackFactory;
|
||||||
import mineplex.minecraft.game.classcombat.Class.repository.token.ClassToken;
|
import mineplex.minecraft.game.classcombat.Class.repository.token.ClassToken;
|
||||||
import mineplex.minecraft.game.classcombat.Class.repository.token.CustomBuildToken;
|
import mineplex.minecraft.game.classcombat.Class.repository.token.CustomBuildToken;
|
||||||
@ -22,6 +20,7 @@ import org.bukkit.inventory.meta.LeatherArmorMeta;
|
|||||||
public class PvpClass implements IPvpClass
|
public class PvpClass implements IPvpClass
|
||||||
{
|
{
|
||||||
private ClassType _type;
|
private ClassType _type;
|
||||||
|
private CustomBuildToken _customBuild;
|
||||||
private int _salesPackageId;
|
private int _salesPackageId;
|
||||||
private String[] _desc;
|
private String[] _desc;
|
||||||
private int _cost;
|
private int _cost;
|
||||||
@ -39,7 +38,7 @@ public class PvpClass implements IPvpClass
|
|||||||
|
|
||||||
private ClassManager _classes;
|
private ClassManager _classes;
|
||||||
|
|
||||||
public PvpClass(ClassManager classes, int salesPackageId, ClassType type, String[] desc, Material head, Material chest, Material legs, Material boots, Color leatherColor)
|
public PvpClass(ClassManager classes, int salesPackageId, ClassType type, CustomBuildToken customBuild, String[] desc, Material head, Material chest, Material legs, Material boots, Color leatherColor)
|
||||||
{
|
{
|
||||||
_classes = classes;
|
_classes = classes;
|
||||||
_salesPackageId = salesPackageId;
|
_salesPackageId = salesPackageId;
|
||||||
@ -48,6 +47,8 @@ public class PvpClass implements IPvpClass
|
|||||||
|
|
||||||
_type = type;
|
_type = type;
|
||||||
|
|
||||||
|
_customBuild = customBuild;
|
||||||
|
|
||||||
_head = head;
|
_head = head;
|
||||||
_chest = chest;
|
_chest = chest;
|
||||||
_legs = legs;
|
_legs = legs;
|
||||||
@ -230,7 +231,7 @@ public class PvpClass implements IPvpClass
|
|||||||
{
|
{
|
||||||
_classes.Get(player).SetGameClass(null);
|
_classes.Get(player).SetGameClass(null);
|
||||||
|
|
||||||
UtilPlayer.message(player, F.main("Class", "Armor Class: " + F.oo("None", false)));
|
// UtilPlayer.message(player, F.main("Class", "Armor Class: " + F.oo("None", false)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -263,6 +264,7 @@ public class PvpClass implements IPvpClass
|
|||||||
_salesPackageId = classToken.SalesPackage.GameSalesPackageId;
|
_salesPackageId = classToken.SalesPackage.GameSalesPackageId;
|
||||||
_cost = classToken.SalesPackage.Gems;
|
_cost = classToken.SalesPackage.Gems;
|
||||||
_free = classToken.SalesPackage.Free;
|
_free = classToken.SalesPackage.Free;
|
||||||
|
_customBuild.PvpClassId = classToken.SalesPackage.GameSalesPackageId;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -303,4 +305,10 @@ public class PvpClass implements IPvpClass
|
|||||||
caller.getInventory().setLeggings(legs);
|
caller.getInventory().setLeggings(legs);
|
||||||
caller.getInventory().setBoots(boots);
|
caller.getInventory().setBoots(boots);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CustomBuildToken getDefaultBuild()
|
||||||
|
{
|
||||||
|
return _customBuild;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package mineplex.minecraft.game.classcombat.Class.repository.token;
|
package mineplex.minecraft.game.classcombat.Class.repository.token;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class CustomBuildToken
|
public class CustomBuildToken
|
||||||
@ -25,7 +26,7 @@ public class CustomBuildToken
|
|||||||
|
|
||||||
public int GlobalPassiveSkillId = -1;
|
public int GlobalPassiveSkillId = -1;
|
||||||
|
|
||||||
public List<SlotToken> Slots;
|
public List<SlotToken> Slots = new ArrayList<SlotToken>();;
|
||||||
|
|
||||||
public void printInfo()
|
public void printInfo()
|
||||||
{
|
{
|
||||||
|
@ -40,7 +40,7 @@ public class ClassCombatShop extends ShopBase<ClassShopManager>
|
|||||||
return new ArmorPage(Plugin, this, ClientManager, DonationManager, player, Purchasing);
|
return new ArmorPage(Plugin, this, ClientManager, DonationManager, player, Purchasing);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean attemptShopOpen(Player player, IPvpClass pvpClass)
|
public boolean attemptShopOpen(Player player)
|
||||||
{
|
{
|
||||||
if (!OpenedShop.contains(player.getName()))
|
if (!OpenedShop.contains(player.getName()))
|
||||||
{
|
{
|
||||||
@ -51,19 +51,11 @@ public class ClassCombatShop extends ShopBase<ClassShopManager>
|
|||||||
|
|
||||||
OpenShopForPlayer(player);
|
OpenShopForPlayer(player);
|
||||||
|
|
||||||
|
|
||||||
ClientClass clientClass = Plugin.GetClassManager().Get(player);
|
|
||||||
|
|
||||||
player.getInventory().clear();
|
|
||||||
|
|
||||||
clientClass.SetGameClass(pvpClass);
|
|
||||||
pvpClass.ApplyArmor(player);
|
|
||||||
clientClass.ClearDefaults();
|
|
||||||
|
|
||||||
CustomBuildPage buildPage = new CustomBuildPage(Plugin, this, ClientManager, DonationManager, player);
|
CustomBuildPage buildPage = new CustomBuildPage(Plugin, this, ClientManager, DonationManager, player);
|
||||||
|
|
||||||
if (!PlayerPageMap.containsKey(player.getName()))
|
if (!PlayerPageMap.containsKey(player.getName()))
|
||||||
{
|
{
|
||||||
|
System.out.println("PlayerPageMap doesn't have this player");
|
||||||
PlayerPageMap.put(player.getName(), buildPage);
|
PlayerPageMap.put(player.getName(), buildPage);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -108,10 +108,13 @@ public class CustomBuildPage extends ShopPageBase<ClassShopManager, ClassCombatS
|
|||||||
customBuild.PvpClassId = _pvpClass.GetSalesPackageId();
|
customBuild.PvpClassId = _pvpClass.GetSalesPackageId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (i != 0)
|
||||||
|
{
|
||||||
AddButton(slot + 9, new ShopItem(Material.ANVIL, "Edit & Save Build", new String[] { }, 1, locked, true), new EditAndSaveCustomBuildButton(this, customBuild));
|
AddButton(slot + 9, new ShopItem(Material.ANVIL, "Edit & Save Build", new String[] { }, 1, locked, true), new EditAndSaveCustomBuildButton(this, customBuild));
|
||||||
AddButton(slot + 18, new ShopItem(Material.WORKBENCH, "Edit & Don't Save Build", new String[] { }, 1, locked, true), new EditAndDontSaveCustomBuildButton(this, customBuild));
|
AddButton(slot + 18, new ShopItem(Material.WORKBENCH, "Edit & Don't Save Build", new String[] { }, 1, locked, true), new EditAndDontSaveCustomBuildButton(this, customBuild));
|
||||||
AddButton(slot + 36, new ShopItem(Material.FIRE, "Delete Build", new String[] { "§rIt will never come back..."}, 1, locked, true), new DeleteCustomBuildButton(this, customBuild));
|
AddButton(slot + 36, new ShopItem(Material.FIRE, "Delete Build", new String[] { "§rIt will never come back..."}, 1, locked, true), new DeleteCustomBuildButton(this, customBuild));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
getInventory().setItem(slot + 9, new ShopItem(Material.ANVIL, "Edit & Save Build", new String[] { }, 1, locked, true).getHandle());
|
getInventory().setItem(slot + 9, new ShopItem(Material.ANVIL, "Edit & Save Build", new String[] { }, 1, locked, true).getHandle());
|
||||||
|
@ -550,9 +550,9 @@ public class ArcadeManager extends MiniPlugin implements IRelation
|
|||||||
return _classCustomBuildShop;
|
return _classCustomBuildShop;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void openClassShop(Player player, IPvpClass pvpClass)
|
public void openClassShop(Player player)
|
||||||
{
|
{
|
||||||
_classCustomBuildShop.attemptShopOpen(player, pvpClass);
|
_classCustomBuildShop.attemptShopOpen(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
|
@ -561,6 +561,7 @@ public abstract class Game implements Listener
|
|||||||
}
|
}
|
||||||
|
|
||||||
_playerKit.put(player, kit);
|
_playerKit.put(player, kit);
|
||||||
|
|
||||||
kit.Selected(player);
|
kit.Selected(player);
|
||||||
|
|
||||||
if (announce)
|
if (announce)
|
||||||
|
@ -5,6 +5,7 @@ import java.util.ArrayList;
|
|||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
|
import org.bukkit.entity.Entity;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.entity.ItemDespawnEvent;
|
import org.bukkit.event.entity.ItemDespawnEvent;
|
||||||
@ -14,8 +15,6 @@ import mineplex.core.common.util.C;
|
|||||||
import mineplex.core.common.util.UtilPlayer;
|
import mineplex.core.common.util.UtilPlayer;
|
||||||
import mineplex.core.updater.UpdateType;
|
import mineplex.core.updater.UpdateType;
|
||||||
import mineplex.core.updater.event.UpdateEvent;
|
import mineplex.core.updater.event.UpdateEvent;
|
||||||
import mineplex.minecraft.game.classcombat.shop.ClassCombatCustomBuildShop;
|
|
||||||
import mineplex.minecraft.game.classcombat.shop.ClassShopManager;
|
|
||||||
import mineplex.minecraft.game.core.combat.event.CombatDeathEvent;
|
import mineplex.minecraft.game.core.combat.event.CombatDeathEvent;
|
||||||
import nautilus.game.arcade.ArcadeManager;
|
import nautilus.game.arcade.ArcadeManager;
|
||||||
import nautilus.game.arcade.GameType;
|
import nautilus.game.arcade.GameType;
|
||||||
@ -28,14 +27,11 @@ import nautilus.game.arcade.game.games.champions_dominate.kits.KitKnight;
|
|||||||
import nautilus.game.arcade.game.games.champions_dominate.kits.KitMage;
|
import nautilus.game.arcade.game.games.champions_dominate.kits.KitMage;
|
||||||
import nautilus.game.arcade.game.games.champions_dominate.kits.KitRanger;
|
import nautilus.game.arcade.game.games.champions_dominate.kits.KitRanger;
|
||||||
import nautilus.game.arcade.game.games.champions_dominate.map.*;
|
import nautilus.game.arcade.game.games.champions_dominate.map.*;
|
||||||
import nautilus.game.arcade.game.games.smash.kits.*;
|
|
||||||
import nautilus.game.arcade.kit.Kit;
|
import nautilus.game.arcade.kit.Kit;
|
||||||
|
import nautilus.game.arcade.kit.KitAvailability;
|
||||||
|
|
||||||
public class Dominate extends TeamGame
|
public class Dominate extends TeamGame
|
||||||
{
|
{
|
||||||
//Class Combat
|
|
||||||
private ClassCombatCustomBuildShop _shop;
|
|
||||||
|
|
||||||
//Map Data
|
//Map Data
|
||||||
private ArrayList<CapturePoint> _points = new ArrayList<CapturePoint>();
|
private ArrayList<CapturePoint> _points = new ArrayList<CapturePoint>();
|
||||||
private ArrayList<Emerald> _emerald = new ArrayList<Emerald>();
|
private ArrayList<Emerald> _emerald = new ArrayList<Emerald>();
|
||||||
@ -75,9 +71,6 @@ public class Dominate extends TeamGame
|
|||||||
this.PrepareFreeze = false;
|
this.PrepareFreeze = false;
|
||||||
|
|
||||||
this.DeathSpectateSecs = 8;
|
this.DeathSpectateSecs = 8;
|
||||||
|
|
||||||
|
|
||||||
_shop = manager.getClassShop();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -98,29 +91,18 @@ public class Dominate extends TeamGame
|
|||||||
_emerald.add(new Emerald(this, loc));
|
_emerald.add(new Emerald(this, loc));
|
||||||
}
|
}
|
||||||
|
|
||||||
this.CreatureAllowOverride = true;
|
CreatureAllowOverride = true;
|
||||||
|
|
||||||
//Knight
|
for (int i = 0; i < GetKits().length && i < WorldData.GetDataLocs("RED").size() && i < WorldData.GetDataLocs("BLUE").size(); i++)
|
||||||
new KitKnight(Manager).SpawnEntity(WorldData.GetDataLocs("RED").get(0));
|
{
|
||||||
new KitKnight(Manager).SpawnEntity(WorldData.GetDataLocs("BLUE").get(0));
|
Entity ent = GetKits()[i].SpawnEntity(WorldData.GetDataLocs("RED").get(i));
|
||||||
|
Manager.GetLobby().AddKitLocation(ent, GetKits()[i], WorldData.GetDataLocs("RED").get(i));
|
||||||
|
|
||||||
//Ranger
|
ent = GetKits()[i].SpawnEntity(WorldData.GetDataLocs("BLUE").get(i));
|
||||||
new KitRanger(Manager).SpawnEntity(WorldData.GetDataLocs("RED").get(1));
|
Manager.GetLobby().AddKitLocation(ent, GetKits()[i], WorldData.GetDataLocs("BLUE").get(i));
|
||||||
new KitRanger(Manager).SpawnEntity(WorldData.GetDataLocs("BLUE").get(1));
|
}
|
||||||
|
|
||||||
//Brute
|
CreatureAllowOverride = false;
|
||||||
new KitBrute(Manager).SpawnEntity(WorldData.GetDataLocs("RED").get(2));
|
|
||||||
new KitBrute(Manager).SpawnEntity(WorldData.GetDataLocs("BLUE").get(2));
|
|
||||||
|
|
||||||
//Assassin
|
|
||||||
new KitAssassin(Manager).SpawnEntity(WorldData.GetDataLocs("RED").get(3));
|
|
||||||
new KitAssassin(Manager).SpawnEntity(WorldData.GetDataLocs("BLUE").get(3));
|
|
||||||
|
|
||||||
//Mage
|
|
||||||
new KitMage(Manager).SpawnEntity(WorldData.GetDataLocs("RED").get(4));
|
|
||||||
new KitMage(Manager).SpawnEntity(WorldData.GetDataLocs("BLUE").get(4));
|
|
||||||
|
|
||||||
this.CreatureAllowOverride = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
@ -301,4 +283,10 @@ public class Dominate extends TeamGame
|
|||||||
{
|
{
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void ValidateKit(Player player, GameTeam team)
|
||||||
|
{
|
||||||
|
// NOTHING
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -48,13 +48,14 @@ public class KitAssassin extends Kit
|
|||||||
ClientClass clientClass = _class.get(player);
|
ClientClass clientClass = _class.get(player);
|
||||||
IPvpClass pvpClass = Manager.getClassManager().GetClass("Assassin");
|
IPvpClass pvpClass = Manager.getClassManager().GetClass("Assassin");
|
||||||
|
|
||||||
player.getInventory().clear();
|
|
||||||
|
|
||||||
clientClass.SetGameClass(pvpClass);
|
clientClass.SetGameClass(pvpClass);
|
||||||
pvpClass.ApplyArmor(player);
|
pvpClass.ApplyArmor(player);
|
||||||
clientClass.ClearDefaults();
|
clientClass.ClearDefaults();
|
||||||
|
|
||||||
Manager.openClassShop(player, Manager.getClassManager().GetClass("Assassin"));
|
if (!Manager.GetGame().InProgress())
|
||||||
|
clientClass.SetActiveCustomBuild(pvpClass, pvpClass.getDefaultBuild());
|
||||||
|
|
||||||
|
Manager.openClassShop(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -48,13 +48,14 @@ public class KitBrute extends Kit
|
|||||||
ClientClass clientClass = _class.get(player);
|
ClientClass clientClass = _class.get(player);
|
||||||
IPvpClass pvpClass = Manager.getClassManager().GetClass("Brute");
|
IPvpClass pvpClass = Manager.getClassManager().GetClass("Brute");
|
||||||
|
|
||||||
player.getInventory().clear();
|
|
||||||
|
|
||||||
clientClass.SetGameClass(pvpClass);
|
clientClass.SetGameClass(pvpClass);
|
||||||
pvpClass.ApplyArmor(player);
|
pvpClass.ApplyArmor(player);
|
||||||
clientClass.ClearDefaults();
|
clientClass.ClearDefaults();
|
||||||
|
|
||||||
Manager.openClassShop(player, Manager.getClassManager().GetClass("Brute"));
|
if (!Manager.GetGame().InProgress())
|
||||||
|
clientClass.SetActiveCustomBuild(pvpClass, pvpClass.getDefaultBuild());
|
||||||
|
|
||||||
|
Manager.openClassShop(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -48,13 +48,14 @@ public class KitKnight extends Kit
|
|||||||
ClientClass clientClass = _class.get(player);
|
ClientClass clientClass = _class.get(player);
|
||||||
IPvpClass pvpClass = Manager.getClassManager().GetClass("Knight");
|
IPvpClass pvpClass = Manager.getClassManager().GetClass("Knight");
|
||||||
|
|
||||||
player.getInventory().clear();
|
|
||||||
|
|
||||||
clientClass.SetGameClass(pvpClass);
|
clientClass.SetGameClass(pvpClass);
|
||||||
pvpClass.ApplyArmor(player);
|
pvpClass.ApplyArmor(player);
|
||||||
clientClass.ClearDefaults();
|
clientClass.ClearDefaults();
|
||||||
|
|
||||||
Manager.openClassShop(player, Manager.getClassManager().GetClass("Knight"));
|
if (!Manager.GetGame().InProgress())
|
||||||
|
clientClass.SetActiveCustomBuild(pvpClass, pvpClass.getDefaultBuild());
|
||||||
|
|
||||||
|
Manager.openClassShop(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -48,13 +48,14 @@ public class KitMage extends Kit
|
|||||||
ClientClass clientClass = _class.get(player);
|
ClientClass clientClass = _class.get(player);
|
||||||
IPvpClass pvpClass = Manager.getClassManager().GetClass("Mage");
|
IPvpClass pvpClass = Manager.getClassManager().GetClass("Mage");
|
||||||
|
|
||||||
player.getInventory().clear();
|
|
||||||
|
|
||||||
clientClass.SetGameClass(pvpClass);
|
clientClass.SetGameClass(pvpClass);
|
||||||
pvpClass.ApplyArmor(player);
|
pvpClass.ApplyArmor(player);
|
||||||
clientClass.ClearDefaults();
|
clientClass.ClearDefaults();
|
||||||
|
|
||||||
Manager.openClassShop(player, Manager.getClassManager().GetClass("Mage"));
|
if (!Manager.GetGame().InProgress())
|
||||||
|
clientClass.SetActiveCustomBuild(pvpClass, pvpClass.getDefaultBuild());
|
||||||
|
|
||||||
|
Manager.openClassShop(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -48,13 +48,14 @@ public class KitRanger extends Kit
|
|||||||
ClientClass clientClass = _class.get(player);
|
ClientClass clientClass = _class.get(player);
|
||||||
IPvpClass pvpClass = Manager.getClassManager().GetClass("Ranger");
|
IPvpClass pvpClass = Manager.getClassManager().GetClass("Ranger");
|
||||||
|
|
||||||
player.getInventory().clear();
|
|
||||||
|
|
||||||
clientClass.SetGameClass(pvpClass);
|
clientClass.SetGameClass(pvpClass);
|
||||||
pvpClass.ApplyArmor(player);
|
pvpClass.ApplyArmor(player);
|
||||||
clientClass.ClearDefaults();
|
clientClass.ClearDefaults();
|
||||||
|
|
||||||
Manager.openClassShop(player, Manager.getClassManager().GetClass("Ranger"));
|
if (!Manager.GetGame().InProgress())
|
||||||
|
clientClass.SetActiveCustomBuild(pvpClass, pvpClass.getDefaultBuild());
|
||||||
|
|
||||||
|
Manager.openClassShop(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -489,6 +489,7 @@ public class GameManager implements Listener
|
|||||||
|
|
||||||
game.ValidateKit(player, game.GetTeam(player));
|
game.ValidateKit(player, game.GetTeam(player));
|
||||||
|
|
||||||
|
if (game.GetKit(player) != null)
|
||||||
game.GetKit(player).ApplyKit(player);
|
game.GetKit(player).ApplyKit(player);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user