package com.td.Dawa.config.enums;

import lombok.Getter;

import java.util.HashMap;
import java.util.Map;

/**
 *
 * @author:slambb
 * @date:2022/06/01
 */
@Getter
public enum GameEnum {
    //Log gold
    TRAN_GOLD_SUMMON(0,"消费金币:召唤角色时候消耗"),

    //redis key
    REDIS_KEY_EXCEL_WORK_PRO(0,"work_pro"),//工作效率表key
    REDIS_KEY_EXCEL_SCENE(1,"scene"),//场景信息表key
    REDIS_KEY_EXCEL_PROP(2,"prop"),//场景道具表key
    REDIS_KEY_EXCEL_CHARACTER_COLOR(3,"character_color"),//颜色表key
    REDIS_KEY_EXCEL_CHARACTER_CREATE(4,"character_create"),//生成表key
    REDIS_KEY_EXCEL_RESOURCES(5,"resources"),//资源表key
    REDIS_KEY_EXCEL_CHARACTER_LEVEL(6,"character_level"),//等级表key
    REDIS_KEY_EXCEL_PARAMETER(7,"parameter"),//参数表key
    REDIS_KEY_EXCEL_CHARACTER_ATTRI(8,"character_attri"),//角色属性表key

    CHARACTERS_STATE_NORMAL(0,"角色普通状态"),
    CHARACTERS_STATE_TRADE_BANK(1,"角色在交易行状态"),
    CHARACTERS_STATE_IN_TEAM(2,"角色在队列状态"),
    CHARACTERS_STATE_IN_WORK(3,"角色在工作状态"),

    WORK_ING(0,"探索工作进行中"),
    WORK_COMPLETE(1,"探索工作完成"),
    WORK_NOT_STARTED(2,"探索工作未开始"),


    PRO_POWER(0,"影响挖矿(或者伐木)"),
    PRO_INTELLIGENCE(1,"影响勘探"),
    PRO_SKIlLS(2,"影响运输"),

    PRO_WORK_NORMAL(0,"自由工作职业"),
    PRO_WORK_MINING(1,"工作职业为挖矿职业"),
    PRO_WORK_PROSPECT(2,"工作职业为勘探职业"),
    PRO_WORK_TRANSPORT(3,"工作职业为运输职业"),
    PRO_WORK_LUMBERING(4,"工作职业为伐木职业"),

    //伐木场景id
    LUMBERING_00(101,"深林入口"),
    LUMBERING_01(102,"深林一层"),
    LUMBERING_02(103,"深林二层"),
    LUMBERING_03(104,"深林三层"),
    LUMBERING_04(105,"深林最深处"),

    //矿洞场景id
    MINE_00(201,"矿洞入口"),
    MINE_01(202,"矿洞一层"),
    MINE_02(203,"矿洞二层"),
    MINE_03(204,"矿洞三层"),
    MINE_04(205,"矿洞最深处"),
    LIMIT_LEVEL(5,"现在层级，最后需要配置表设置"),


    //属性区间
    ATTRIBUTE_01(60,"属性等级1"),
    ATTRIBUTE_02(100,"属性等级2"),
    ATTRIBUTE_03(140,"属性等级3"),
    ATTRIBUTE_04(180,"属性等级4"),
    ATTRIBUTE_05(220,"属性等级5"),
    ATTRIBUTE_06(260,"属性等级6");

    private Integer value;
    private String message;

    GameEnum(Integer value, String message) {
        this.value = value;
        this.message = message;
    }


    //放入map中，通过键取值
    private static Map<Integer,GameEnum> gMap = new HashMap<>();
    static {
        for (GameEnum value : GameEnum .values()) {
            gMap.put(value.getValue(),value);
        }
    }
    public static GameEnum getByValue(Integer value){
        return gMap.get(value);
    }
}
