Fixed non-Ultra being able to unlock spells/skills.

Fixed Items that weren't free.
This commit is contained in:
Jonathan Williams 2014-04-22 11:20:00 -07:00
parent 2378df6191
commit 7680eaaedc
12 changed files with 26 additions and 9 deletions

View File

@ -222,8 +222,6 @@ public class ClientClass
public void EquipCustomBuild(CustomBuildToken customBuild, boolean notify)
{
System.out.println("Equipped custombuild " + customBuild.CustomBuildId);
_lastClass = _classFactory.GetClass(customBuild.PvpClass);
if (_lastClass == null)

View File

@ -355,8 +355,5 @@ public class CustomBuildToken
token.Name = null;
ItemTokens += item.getTokenCost();
System.out.println("Removed slot " + index);
token.printInfo();
}
}

View File

@ -28,6 +28,8 @@ public class Soup extends ItemUsable
useAction, useStock, useDelay, useEnergy, throwAction, throwStock,
throwDelay, throwEnergy, throwPower,
throwExpire, throwPlayer, throwBlock, throwIdle, throwPickup);
setFree(true);
}
@Override

View File

@ -82,6 +82,11 @@ public class Item implements IItem, Listener
return _free;
}
public void setFree(boolean free)
{
_free = free;
}
public int getTokenCost()
{
return _tokenCost;

View File

@ -161,8 +161,13 @@ public class ItemFactory extends MiniPlugin implements IItemFactory
private void AddOther()
{
AddItem(new Item(this, "Assassin Arrows", new String[] { "Arrows for your bow." }, Material.ARROW, 12, true, 0, 1));
AddItem(new Item(this, "Ranger Arrows", new String[] { "Arrows for your bow." }, Material.ARROW, 24, true, 0, 1));
Item assassinArrows = new Item(this, "Assassin Arrows", new String[] { "Arrows for your bow." }, Material.ARROW, 12, true, 0, 1);
Item rangerArrows = new Item(this, "Ranger Arrows", new String[] { "Arrows for your bow." }, Material.ARROW, 24, true, 0, 1);
assassinArrows.setFree(true);
rangerArrows.setFree(true);
AddItem(assassinArrows);
AddItem(rangerArrows);
}
public IItem GetItem(String weaponName)

View File

@ -36,6 +36,8 @@ public class WaterBottle extends ItemUsable
useAction, useStock, useDelay, useEnergy, throwAction, throwStock,
throwDelay, throwEnergy, throwPower,
throwExpire, throwPlayer, throwBlock, throwIdle, throwPickup);
setFree(true);
}
@Override

View File

@ -28,6 +28,8 @@ public class Web extends ItemUsable
useAction, useStock, useDelay, useEnergy, throwAction, throwStock,
throwDelay, throwEnergy, throwPower,
throwExpire, throwPlayer, throwBlock, throwIdle, throwPickup);
setFree(true);
}
@Override

View File

@ -10,5 +10,7 @@ public class StandardAxe extends Item
public StandardAxe(ItemFactory factory, int gemCost, int tokenCost)
{
super(factory, "Standard Axe", new String[] { "Pretty standard." }, Material.IRON_AXE, 1, true, gemCost, tokenCost);
setFree(true);
}
}

View File

@ -10,5 +10,7 @@ public class StandardBow extends Item
public StandardBow(ItemFactory factory, int gemCost, int tokenCost)
{
super(factory, "Standard Bow", new String[] { "Pretty standard." }, Material.BOW, 1, true, gemCost, tokenCost);
setFree(true);
}
}

View File

@ -10,5 +10,7 @@ public class StandardSword extends Item
public StandardSword(ItemFactory factory, int gemCost, int tokenCost)
{
super(factory, "Standard Sword", new String[] { "Pretty standard." }, Material.IRON_SWORD, 1, true, gemCost, tokenCost);
setFree(true);
}
}

View File

@ -11,7 +11,7 @@ public class ItemSalesPackage extends SalesPackageBase
{
public ItemSalesPackage(Item item)
{
super(item.GetName(), Material.BOOK, item.GetDesc());
super("Champions " + item.GetName(), Material.BOOK, item.GetDesc());
Free = item.isFree();
KnownPackage = false;
}

View File

@ -11,7 +11,7 @@ public class SkillSalesPackage extends SalesPackageBase
{
public SkillSalesPackage(ISkill skill)
{
super(skill.GetName(), Material.BOOK, skill.GetDesc(0));
super("Champions " + skill.GetName(), Material.BOOK, skill.GetDesc(0));
Free = skill.IsFree();
KnownPackage = false;
}