#pragma once #include "metatable.pb.h" namespace MetaData { struct Parameter { const metatable::Parameter* i = nullptr; int int_val = 0; std::string str_val; double float_val = 0.0f; void Init(); }; struct Map { const metatable::Map* i = nullptr; std::vector> template_list; int rand_space = 0; void Init(); std::string RandTemplate(); }; struct Attr { const metatable::Attr* i = nullptr; }; struct MapThing { const metatable::MapThing* i = nullptr; }; struct SafeArea { const metatable::SafeArea* i = nullptr; }; struct Item { const metatable::Item* i = nullptr; }; struct Equip { const metatable::Equip* i = nullptr; std::vector> bullet_born_offset; std::array volume = {}; void Init(); bool CanDrop(); }; struct Player { const metatable::Player* i = nullptr; std::array volume = {}; void Init(); }; struct Robot { const metatable::Robot* i = nullptr; void Init(); }; struct Building { struct Door { int door_id = 0; a8::Vec2 state0_dir; a8::Vec2 state1_dir; const metatable::DoorObjJson* state0 = nullptr; const metatable::DoorObjJson* state1 = nullptr; }; const metatable::BuildingJson* i = nullptr; std::vector doors; void Init(); }; struct Drop { const metatable::Drop* i = nullptr; void Init(); void RandItems(std::vector>& drop_items); private: std::vector, std::vector, std::vector, int>> items; int total_weight = 0; }; struct MapTplThing { const metatable::MapTplThingJson* i = nullptr; void Init(); int RandThing(); std::vector> things; std::vector born_angle; int rand_space = 0; }; struct Buff { const metatable::Buff* i = nullptr; void Init(); bool EffectCanStack(); float param1 = 0.0f; float param2 = 0.0f; float param3 = 0.0f; float param4 = 0.0f; }; struct SkillPhase { int phase_idx = 0; int time_offset = 0; SkillFunc_e func_id = Skill_FuncNone; a8::XValue param1; a8::XValue param2; std::string param1_str; std::string param2_str; }; struct Skill { const metatable::Skill* i = nullptr; void Init(); std::set buff_list; std::map> trigger_type_buffs; std::vector phases; }; struct Dress { const metatable::Dress* i = nullptr; void Init(); float GetAttrValue(int level, int attr_type); private: std::vector> level_attrs; }; struct RankReward { const metatable::RankReward* i = nullptr; }; struct KillReward { const metatable::KillReward* i = nullptr; }; struct Tank { const metatable::Tank* i = nullptr; }; }