Search in sources :

Example 1 with SHOP_LEVEL

use of main.content.CONTENT_CONSTS2.SHOP_LEVEL in project Eidolons by IDemiurge.

the class UnitShop method specialCheck.

private static boolean specialCheck(Unit unit, ObjType type) {
    if (type.getOBJ_TYPE_ENUM() == DC_TYPE.JEWELRY) {
        // TODO
        return true;
    }
    if (type.getOBJ_TYPE_ENUM() == DC_TYPE.ITEMS) {
        // TODO
        return true;
    }
    String property = unit.getProperty(PROPS.ALLOWED_MATERIAL);
    if (property.isEmpty()) {
        SHOP_LEVEL shopLevel = SHOP_LEVEL.COMMON;
        if (unit.getLevel() > 5) {
            shopLevel = SHOP_LEVEL.QUALITY;
        }
        if (unit.getLevel() > 8) {
            shopLevel = SHOP_LEVEL.OPULENT;
        }
        if (unit.getLevel() < 3) {
            shopLevel = SHOP_LEVEL.POOR;
        }
        List<MATERIAL> levelMaterials = ShopMaster.getMaterialsForShopLevel(shopLevel);
        property = StringMaster.constructStringContainer(levelMaterials);
    }
    return StringMaster.compare(type.getProperty(G_PROPS.MATERIAL), property, false);
}
Also used : SHOP_LEVEL(main.content.CONTENT_CONSTS2.SHOP_LEVEL) MATERIAL(main.content.enums.entity.ItemEnums.MATERIAL)

Aggregations

SHOP_LEVEL (main.content.CONTENT_CONSTS2.SHOP_LEVEL)1 MATERIAL (main.content.enums.entity.ItemEnums.MATERIAL)1