Fixed builds losing tokens.

This commit is contained in:
Jonathan Williams 2014-04-22 10:35:56 -07:00
parent 923d2455d0
commit 2378df6191

View File

@ -8,6 +8,7 @@ import mineplex.core.shop.ShopBase;
import mineplex.core.shop.page.ShopPageBase;
import mineplex.core.common.CurrencyType;
import mineplex.minecraft.game.classcombat.Class.ClientClass;
import mineplex.minecraft.game.classcombat.Class.repository.token.CustomBuildToken;
import mineplex.minecraft.game.classcombat.shop.page.CustomBuildPage;
public class ClassCombatShop extends ShopBase<ClassShopManager>
@ -50,9 +51,11 @@ public class ClassCombatShop extends ShopBase<ClassShopManager>
if (clientClass != null && clientClass.IsSavingCustomBuild())
{
clientClass.SetActiveCustomBuild(clientClass.GetGameClass(), clientClass.GetSavingCustomBuild());
clientClass.EquipCustomBuild(clientClass.GetSavingCustomBuild(), false);
CustomBuildToken customBuild = clientClass.GetSavingCustomBuild();
clientClass.SaveActiveCustomBuild();
clientClass.SetActiveCustomBuild(clientClass.GetGameClass(), customBuild);
clientClass.EquipCustomBuild(customBuild, false);
}
}