// game_enums.hpp

#pragma once

// enums dumped from game assembly unless otherwise stated

enum LifeState {
	LIFE_NONE = 0,
	LIFE_ALIVE = 1,
	LIFE_DEAD = 2,
	LIFE_REVIVE = 3
};

enum EquipType {
	EQUIP_NONE = 0,
	// artifact slots
	EQUIP_BRACER = 1, // flower
	EQUIP_DRESS = 2, // circlet
	EQUIP_SHOES = 3, // sands
	EQUIP_RING = 4, // goblet
	EQUIP_NECKLACE = 5, // feather
	// weapon
	EQUIP_WEAPON = 6
};

enum PropType {
	PROP_NONE = 0,
	// avatar props
	PROP_EXP = 1001, // avatar exp
	PROP_BREAK_LEVEL = 1002, // avatar promote level
	PROP_SMALL_TALENT_POINT = 1004,
	PROP_BIG_TALENT_POINT = 1005,
	PROP_GEAR_START_VAL = 2001,
	PROP_GEAR_STOP_VAL = 2002,
	PROP_LEVEL = 4001, // avatar level
	// player props
	PROP_LAST_CHANGE_AVATAR_TIME = 10001,
	PROP_MAX_SPRING_VOLUME = 10002,
	PROP_CUR_SPRING_VOLUME = 10003,
	PROP_IS_SPRING_AUTO_USE = 10004,
	PROP_SPRING_AUTO_USE_PERCENT = 10005,
	PROP_IS_FLYABLE = 10006,
	PROP_IS_WEATHER_LOCKED = 10007,
	PROP_IS_GAME_TIME_LOCKED = 10008,
	PROP_IS_TRANSFERABLE = 10009,
	PROP_MAX_STAMINA = 10010,
	PROP_CUR_PERSIST_STAMINA = 10011,
	PROP_CUR_TEMPORARY_STAMINA = 10012,
	PROP_PLAYER_LEVEL = 10013, // adventure rank
	PROP_PLAYER_EXP = 10014, // adventure exp
	PROP_PLAYER_HCOIN = 10015, // mora
	PROP_PLAYER_SCOIN = 10016, // primogem
	PROP_IS_WORLD_ENTERABLE = 10017,
	PROP_IS_MP_MODE_AVAILABLE = 10018
};

enum FightPropType {
	FIGHT_PROP_NONE = 0,
	FIGHT_PROP_BASE_HP = 1,
	FIGHT_PROP_HP = 2,
	FIGHT_PROP_HP_PERCENT = 3,
	FIGHT_PROP_BASE_ATTACK = 4,
	FIGHT_PROP_ATTACK = 5,
	FIGHT_PROP_ATTACK_PERCENT = 6,
	FIGHT_PROP_BASE_DEFENSE = 7,
	FIGHT_PROP_DEFENSE = 8,
	FIGHT_PROP_DEFENSE_PERCENT = 9,
	FIGHT_PROP_BASE_SPEED = 10,
	FIGHT_PROP_SPEED_PERCENT = 11,
	FIGHT_PROP_CRITICAL = 20,
	FIGHT_PROP_ANTI_CRITICAL = 21,
	FIGHT_PROP_CRITICAL_HURT = 22,
	FIGHT_PROP_CHARGE_EFFICIENCY = 23,
	FIGHT_PROP_ADD_HURT = 24,
	FIGHT_PROP_SUB_HURT = 25,
	FIGHT_PROP_HEAL_ADD = 26,
	FIGHT_PROP_HEALED_ADD = 27,
	FIGHT_PROP_FIRE_ADD_HURT = 40,
	FIGHT_PROP_ELEC_ADD_HURT = 41,
	FIGHT_PROP_WATER_ADD_HURT = 42,
	FIGHT_PROP_GRASS_ADD_HURT = 43,
	FIGHT_PROP_WIND_ADD_HURT = 44,
	FIGHT_PROP_ROCK_ADD_HURT = 45,
	FIGHT_PROP_ICE_ADD_HURT = 46,
	FIGHT_PROP_HIT_HEAD_ADD_HURT = 47,
	FIGHT_PROP_FIRE_SUB_HURT = 50,
	FIGHT_PROP_ELEC_SUB_HURT = 51,
	FIGHT_PROP_WATER_SUB_HURT = 52,
	FIGHT_PROP_GRASS_SUB_HURT = 53,
	FIGHT_PROP_WIND_SUB_HURT = 54,
	FIGHT_PROP_ROCK_SUB_HURT = 55,
	FIGHT_PROP_ICE_SUB_HURT = 56,
	FIGHT_PROP_EFFECT_HIT = 60,
	FIGHT_PROP_EFFECT_RESIST = 61,
	FIGHT_PROP_FREEZE_RESIST = 62,
	FIGHT_PROP_TORPOR_RESIST = 63,
	FIGHT_PROP_DIZZY_RESIST = 64,
	FIGHT_PROP_FREEZE_SHORTEN = 65,
	FIGHT_PROP_TORPOR_SHORTEN = 66,
	FIGHT_PROP_DIZZY_SHORTEN = 67,
	FIGHT_PROP_MAX_FIRE_ENERGY = 70,
	FIGHT_PROP_MAX_ELEC_ENERGY = 71,
	FIGHT_PROP_MAX_WATER_ENERGY = 72,
	FIGHT_PROP_MAX_GRASS_ENERGY = 73,
	FIGHT_PROP_MAX_WIND_ENERGY = 74,
	FIGHT_PROP_MAX_ICE_ENERGY = 75,
	FIGHT_PROP_MAX_ROCK_ENERGY = 76,
	FIGHT_PROP_CUR_FIRE_ENERGY = 1000,
	FIGHT_PROP_CUR_ELEC_ENERGY = 1001,
	FIGHT_PROP_CUR_WATER_ENERGY = 1002,
	FIGHT_PROP_CUR_GRASS_ENERGY = 1003,
	FIGHT_PROP_CUR_WIND_ENERGY = 1004,
	FIGHT_PROP_CUR_ICE_ENERGY = 1005,
	FIGHT_PROP_CUR_ROCK_ENERGY = 1006,
	FIGHT_PROP_CUR_HP = 1010,
	FIGHT_PROP_MAX_HP = 2000,
	FIGHT_PROP_CUR_ATTACK = 2001,
	FIGHT_PROP_CUR_DEFENSE = 2002,
	FIGHT_PROP_CUR_SPEED = 2003
};

enum OpenStateType {
	OPEN_STATE_NONE = 0,
	OPEN_STATE_PAIMON = 1,
	OPEN_STATE_PAIMON_NAVIGATION = 2,
	OPEN_STATE_AVATAR_PROMOTE = 3,
	OPEN_STATE_AVATAR_TALENT = 4,
	OPEN_STATE_WEAPON_PROMOTE = 5,
	OPEN_STATE_WEAPON_AWAKEN = 6,
	OPEN_STATE_QUEST_REMIND = 7,
	OPEN_STATE_GAME_GUIDE = 8,
	OPEN_STATE_COOK = 9,
	OPEN_STATE_WEAPON_UPGRADE = 10,
	OPEN_STATE_RELIQUARY_UPGRADE = 11,
	OPEN_STATE_RELIQUARY_PROMOTE = 12,
	OPEN_STATE_WEAPON_PROMOTE_GUIDE = 13,
	OPEN_STATE_WEAPON_CHANGE_GUIDE = 14,
	OPEN_STATE_PLAYER_LVUP_GUIDE = 15,
	OPEN_STATE_FRESHMAN_GUIDE = 16,
	OPEN_STATE_SKIP_FRESHMAN_GUIDE = 17,
	OPEN_STATE_GUIDE_MOVE_CAMERA = 18,
	OPEN_STATE_GUIDE_SCALE_CAMERA = 19,
	OPEN_STATE_GUIDE_KEYBOARD = 20,
	OPEN_STATE_GUIDE_MOVE = 21,
	OPEN_STATE_GUIDE_JUMP = 22,
	OPEN_STATE_GUIDE_SPRINT = 23,
	OPEN_STATE_GUIDE_MAP = 24,
	OPEN_STATE_GUIDE_ATTACK = 25,
	OPEN_STATE_GUIDE_FLY = 26,
	OPEN_STATE_GUIDE_TALENT = 27,
	OPEN_STATE_GUIDE_RELIC = 28,
	OPEN_STATE_GUIDE_RELIC_PROM = 29
};

// names from nametranslation
enum RuntimeIDBits {
	RUNTIME_ID_SEQUENCE_BITS = 0x17,
	RUNTIME_ID_SEQUENCE_SHIFT = 0x0,
	RUNTIME_ID_SEQUENCE_MASK = 0x7fffff,
	RUNTIME_ID_IS_SYNCED_BITS = 0x1,
	RUNTIME_ID_IS_SYNCED_SHIFT = 0x17,
	RUNTIME_ID_IS_SYNCED_MASK = 0x800000,
	RUNTIME_ID_CATEGORY_BITS = 0x5,
	RUNTIME_ID_CATEGORY_SHIFT = 0x18,
	RUNTIME_ID_CATEGORY_MASK = 0x1f000000,
	RUNTIME_ID_PEER_BITS = 0x3,
	RUNTIME_ID_PEER_MASK = 0xe0000000,
	RUNTIME_ID_PEER_SHIFT = 0x1d
};

// names from string lurking or from nametranslation
enum RuntimeIDCategory {
	INVALID_RUNTIMEID = 0,
	AVATAR_CATE = 1,
	MONSTER_CATE = 2,
	NPC_CATE = 3,
	GADGET_CATE = 4,
	MAX_SERVER_CATE = 15,
	EFFECT_CATE = 16,
	ATTACKUNIT_CATE = 17,
	CAMERA_CATE = 18,
	MANAGER_CATE = 19,
	LOCALGADGET_CATE = 20,
	LOCALMASSIVE_CATE = 21
};

enum AvatarUseType {
	AVATAR_TEST = 0,
	AVATAR_SYNC_TEST = 1,
	AVATAR_FORMAL = 2,
	AVATAR_ABANDON = 3
};

enum WeaponType {
	WEAPON_NONE = 0,
	WEAPON_SWORD_ONE_HAND = 1,
	WEAPON_CROSSBOW = 2,
	WEAPON_STAFF = 3,
	WEAPON_DOUBLE_DAGGER = 4,
	WEAPON_KATANA = 5,
	WEAPON_SHURIKEN = 6,
	WEAPON_STICK = 7,
	WEAPON_SPEAR = 8,
	WEAPON_SHIELD_SMALL = 9,
	WEAPON_CATALYST = 10,
	WEAPON_CLAYMORE = 11,
	WEAPON_BOW = 12,
	WEAPON_POLE = 13
};

enum ItemType {
	ITEM_NONE = 0,
	ITEM_VIRTUAL = 1,
	ITEM_MATERIAL = 2,
	ITEM_RELIQUARY = 3,
	ITEM_WEAPON = 4
};

enum ShopType {
	SHOP_TYPE_NONE = 0,
	SHOP_TYPE_PAIMON = 1, // "CB Shop"
	SHOP_TYPE_CITY = 2,
	SHOP_TYPE_BLACKSMITH = 3,
	SHOP_TYPE_GROCERY = 4,
	SHOP_TYPE_FOOD = 5
};

enum ElementType {
	ELEMENT_None = 0,
	ELEMENT_Fire = 1,
	ELEMENT_Water = 2,
	ELEMENT_Grass = 3,
	ELEMENT_Electric = 4,
	ELEMENT_Ice = 5,
	ELEMENT_Frozen = 6,
	ELEMENT_Wind = 7,
	ELEMENT_Rock = 8,
	ELEMENT_AntiFire = 9
};

enum SceneType {
	SCENE_NONE = 0,
	SCENE_WORLD = 1,
	SCENE_DUNGEON = 2,
	SCENE_ROOM = 3
};

enum GadgetState {
	GADGET_STATE_Default = 0,
	GADGET_STATE_GatherDrop = 1,
	GADGET_STATE_ChestLocked = 101,
	GADGET_STATE_ChestOpened = 102,
	GADGET_STATE_ChestTrap = 103,
	GADGET_STATE_ChestBramble = 104,
	GADGET_STATE_ChestFrozen = 105,
	GADGET_STATE_GearStart = 201,
	GADGET_STATE_GearStop = 202,
	GADGET_STATE_GearAction1 = 203,
	GADGET_STATE_GearAction2 = 204,
	GADGET_STATE_CrystalResonate1 = 301,
	GADGET_STATE_CrystalResonate2 = 302,
	GADGET_STATE_CrystalExplode = 303,
	GADGET_STATE_CrystalDrain = 304,
	GADGET_STATE_Action01 = 901,
	GADGET_STATE_Action02 = 902,
	GADGET_STATE_Action03 = 903
};

enum GadgetType {
	GADGET_NONE = 0,
	GADGET_WORLD_CHECT = 1,
	GADGET_DUNGEON_SECRET_CHEST = 2,
	GADGET_DUNGEON_PASS_CHEST = 3
};

enum EntityType {
	ENTITY_None = 0,
	ENTITY_Avatar = 1,
	ENTITY_Monster = 2,
	ENTITY_Bullet = 3,
	ENTITY_AttackPhyisicalUnit = 4,
	ENTITY_AOE = 5,
	ENTITY_Camera = 6,
	ENTITY_EnviroArea = 7,
	ENTITY_Equip = 8,
	ENTITY_MonsterEquip = 9,
	ENTITY_Grass = 10,
	ENTITY_Level = 11,
	ENTITY_NPC = 12,
	ENTITY_TransPointFirst = 13,
	ENTITY_TransPointFirstGadget = 14,
	ENTITY_TransPointSecond = 15,
	ENTITY_TransPointSecondGadget = 16,
	ENTITY_DropItem = 17,
	ENTITY_Field = 18,
	ENTITY_Gadget = 19,
	ENTITY_Water = 20,
	ENTITY_GatherPoint = 21,
	ENTITY_GatherObject = 22,
	ENTITY_AirflowField = 23,
	ENTITY_SpeedupField = 24,
	ENTITY_Gear = 25,
	ENTITY_Chest = 26,
	ENTITY_EnergyBall = 27,
	ENTITY_ElemCrystal = 28,
	ENTITY_Timeline = 29,
	ENTITY_Worktop = 30,
	ENTITY_Team = 31,
	ENTITY_Platform = 32,
	ENTITY_AmberWind = 33,
	ENTITY_EnvAnimal = 34,
	ENTITY_SealGadget = 35,
	ENTITY_Tree = 36,
	ENTITY_Bush = 37,
	ENTITY_PlaceHolder = 99
};

// names from lua sources
enum EventType {
	EVENT_NONE = 0,
	EVENT_ANY_MONSTER_DIE = 1,
	EVENT_ANY_GADGET_DIE = 2,
	EVENT_VARIABLE_CHANGE = 3,
	EVENT_ENTER_REGION = 4,
	EVENT_LEAVE_REGION = 5,
	EVENT_GADGET_CREATE = 6,
	EVENT_GADGET_STATE_CHANGE = 7,
	EVENT_DUNGEON_SETTLE = 8,
	EVENT_SELECT_OPTION = 9,
	EVENT_CLIENT_EXECUTE = 10,
	EVENT_ANY_MONSTER_LIVE = 11, // "any monster creation"
	EVENT_SPECIFIC_MONSTER_HP_CHANGE = 12,
	EVENT_AREA_LEVELUP_UNLOCK_DUNGEON_ENTRY = 13,
	EVENT_DUNGEON_BROADCAST_ONTIMER = 14,
	EVENT_TIMER_EVENT = 15,
	EVENT_CHALLENGE_SUCCESS = 16,
	EVENT_CHALLENGE_FAIL = 17,
	EVENT_SEAL_BATTLE_BEGIN = 18,
	EVENT_SEAL_BATTLE_END = 19,
	EVENT_GATHER = 20,
	EVENT_QUEST_FINISH = 21,
	EVENT_MONSTER_BATTLE = 22,
	EVENT_AREA_LEVELUP = 23,
	EVENT_CUTSCENE_END = 24,
	EVENT_AVATAR_NEAR_PLATFORM = 25 // "a character is close to a stopped moving platform (sent by the client)"
};
