2022-12-14 17:11:56 +08:00

462 lines
11 KiB
C++

#pragma once
#include "metatable.pb.h"
namespace MetaData
{
struct Parameter
{
const metatable::Parameter* pb = nullptr;
int int_val = 0;
std::string str_val;
double float_val = 0.0f;
void Init();
};
struct Map
{
const metatable::Map* pb = nullptr;
std::vector<std::tuple<std::string, int>> template_list;
int rand_space = 0;
std::vector<int> airdrops;
std::vector<int> airraids;
int refresh_robot_min_num = 0;
int refresh_robot_max_num = 0;
int refresh_robot_min_time = 0;
int refresh_robot_max_time = 0;
std::vector<int> buff_list;
a8::Vec2 first_safearea_center;
std::map<int, int> car_num_limit;
std::vector<int> safearea_list;
void Init();
void Init2();
std::string RandTemplate();
int GetCarLimit(int car_id);
a8::Vec2 GetCenter() const;
int RandSafeArea() const;
bool IsPveMap() const;
};
struct Attr
{
const metatable::Attr* pb = nullptr;
};
struct MapThing
{
const metatable::MapThing* pb = nullptr;
std::vector<int> buff_list;
std::vector<int> airdrop_mon_list;
long long special_damage_type = 0;
long long receive_special_damage_type = 0;
int int_param1 = 0;
float float_param1 = 0;
int int_param2 = 0;
float float_param2 = 0;
long long sweep_tags = 0;
std::vector<int> param2_list;
std::vector<std::tuple<int, int>> preexplosion_summon;
std::vector<std::tuple<int, int>> drop;
std::vector<std::tuple<int, int, int>> shapes;
bool HasDrop() { return !drop.empty();};
void Init();
int RandDrop();
};
struct SafeArea
{
const metatable::SafeArea* pb = nullptr;
};
struct SafeAreaPos
{
const metatable::SafeAreaPos* pb = nullptr;
std::vector<a8::Vec2> poses;
void Init();
void Init2();
};
struct Item
{
const metatable::Item* pb = nullptr;
void Init();
};
struct Buff;
struct Equip
{
const metatable::Equip* pb = nullptr;
int lock_time = 0;
//0,0,0,0,后座力,是否取消定身
std::vector<std::tuple<float, float, float, int, int, int>> bullet_born_offset;
std::vector<std::tuple<int, a8::Vec2>> shoot_offsets;
std::shared_ptr<std::tuple<float, float, float>> gun_muzzle_position;
std::shared_ptr<std::tuple<float, float, float>> movex_position;
std::array<int, IS_END> volume = {};
int int_param1 = 0;
float float_param1 = 0;
int int_param2 = 0;
float float_param2 = 0;
std::vector<std::tuple<int, int, int>> power_charge;
MetaData::Buff* buff_meta = nullptr;
std::vector<std::tuple<float, int>> car_buff_list;
std::vector<int> hit_buff_list;
int car_active_buff_id = 0;
int car_deactive_buff_id = 0;
long long special_damage_type = 0;
int group_id = 0;
void Init();
void Init2();
int GetWeaponIdx();
bool Match(CondAddBuff_e cond, int val, int val2);
};
struct HeroShotAnimation
{
int id = 0;
int t = 0;
float r_x = 0;
float r_y = 0;
float r_z = 0;
float l_x = 0;
float l_y = 0;
float l_z = 0;
float p3_x = 0;
float p3_y = 0;
float p3_z = 0;
float p4_x = 0;
float p4_y = 0;
float p4_z = 0;
float p5_x = 0;
float p5_y = 0;
float p5_z = 0;
};
struct Player
{
const metatable::Player* pb = nullptr;
std::array<int, IS_END> volume = {};
std::vector<int> init_buffs;
std::vector<std::tuple<int, int>> dead_drop;
std::vector<std::tuple<int, int>> pre_appear_effect;
bool HasDrop() { return !dead_drop.empty();};
std::tuple<int, int> pve_score;
std::map<int, HeroShotAnimation> shot_animations;
void Init();
int RandDrop();
HeroShotAnimation* GetShotAnimi(int shotfire);
};
struct NpcStandard
{
const metatable::NpcStandard* pb = nullptr;
};
struct Robot
{
const metatable::Robot* pb = nullptr;
void Init();
std::vector<int> skin_id;
};
struct Drop
{
const metatable::Drop* pb = nullptr;
void Init();
//0:item_id 1:item_num 2:weight
void RandItems(std::vector<std::tuple<int, int, int>>& drop_items);
private:
std::vector<std::tuple<std::vector<int>, std::vector<int>, std::vector<int>, int>> items;
int total_weight = 0;
};
struct AirDrop
{
const metatable::AirDrop* pb = nullptr;
std::vector<std::tuple<int, int>> drop;
bool HasDrop() { return !drop.empty();};
void Init();
int RandDrop();
};
struct AirRaid
{
const metatable::AirRaid* pb = nullptr;
std::vector<std::tuple<int, int>> raid_waves;
std::vector<int> bomb_ids;
void Init();
};
struct AirLine
{
const metatable::AirLine* pb = nullptr;
float start_point_x = 0.0f;
float start_point_y = 0.0f;
float end_point_x = 0.0f;
float end_point_y = 0.0f;
void Init();
};
struct Buff
{
const metatable::Buff* pb = nullptr;
void Init();
void Init2();
bool EffectCanStack();
bool IsImmuneBuffEffect(int buff_effect);
bool Match(CondAddBuff_e cond, int val);
float param1 = 0.0f;
float param2 = 0.0f;
float param3 = 0.0f;
float param4 = 0.0f;
float param5 = 0.0f;
int int_param1 = 0;
int int_param2 = 0;
int int_param3 = 0;
int int_param4 = 0;
int int_param5 = 0;
std::vector<int> param1_int_list;
std::vector<int> param2_int_list;
std::set<int> param1_int_set;
std::set<int> param2_int_set;
std::vector<int> param3_int_list;
std::vector<int> param4_int_list;
std::vector<std::tuple<int, std::vector<std::tuple<int, int>>>> batch_add_list;
std::vector<std::tuple<int, std::vector<int>>> post_remove_action;
std::set<int> immune_buffeffect;
std::vector<std::tuple<int, float, float, int, int, int>> hero_infos;
std::set<int> tags;
long long only_spec_race = 0;
long long exclude_spec_race = 0;
std::vector<int> child_buff_list;
};
struct SkillPhase
{
int phase_idx = 0;
int time_offset = 0;
SkillFunc_e func_id = kSkill_FuncNone;
a8::XValue param1;
a8::XValue param2;
a8::XValue param3;
std::string param1_str;
std::string param2_str;
std::string param3_str;
std::vector<int> param1_ints;
std::vector<int> param2_ints;
std::vector<int> param3_ints;
};
struct Skill
{
const metatable::Skill* pb = nullptr;
struct SkillNumber* number_meta = nullptr;
void Init();
void Init2();
Skill* base_skill_meta = nullptr;
float value_up = 0.0f;
std::set<int> buff_list;
std::map<int, std::set<MetaData::Buff*>> trigger_type_buffs;
std::vector<MetaData::SkillPhase> phases;
std::vector<MetaData::SkillPhase> raw_phases;
bool IsTurnOverSkill() const;
int GetMagicId() const;
private:
int magic_id = 0;
int base_skill_id = 0;
};
struct SkillNumber
{
const metatable::SkillNumber* pb = nullptr;
int int_ratio = 0;
float float_ratio = 0;
int int_ratio2 = 0;
float float_ratio2 = 0;
int int_speed = 0;
float float_speed = 0;
int int_range = 0;
float float_range = 0;
int int_range2 = 0;
float float_range2 = 0;
int int_probability = 0;
float float_probability = 0;
int int_time = 0;
float float_time = 0;
int int_cd = 0;
float float_cd = 0;
void Init();
};
struct RankReward
{
const metatable::RankReward* pb = nullptr;
void Init();
};
struct KillReward
{
const metatable::KillReward* pb = nullptr;
};
struct RankPoint
{
const metatable::RankPoint* pb = nullptr;
};
struct KillPoint
{
const metatable::KillPoint* pb = nullptr;
};
struct FormulaPvp
{
const metatable::FormulaPvp* pb = nullptr;
};
struct GunTalentGrow
{
const metatable::GunTalentGrow* pb = nullptr;
std::vector<std::tuple<int, int>> addattr;
void Init();
};
struct HeroQuality
{
const metatable::HeroQuality* pb = nullptr;
long long GetPvpCegUpLimit();
};
struct GunQuality
{
const metatable::GunQuality* pb = nullptr;
long long GetPvpCegUpLimit();
};
struct AI
{
const metatable::AI* pb = nullptr;
void Init();
void Init2();
int GetMoveIdleTime();
int GetMoveTime();
float param1 = 0.0f;
float param2 = 0.0f;
float param3 = 0.0f;
float param4 = 0.0f;
float param5 = 0.0f;
int int_param1 = 0;
int int_param2 = 0;
int int_param3 = 0;
int int_param4 = 0;
int int_param5 = 0;
std::vector<int> int_list_param1;
std::vector<int> int_list_param2;
std::vector<int> int_list_param3;
std::vector<int> int_list_param4;
std::vector<int> int_list_param5;
std::set<int> int_set_param1;
std::set<int> int_set_param2;
std::set<int> int_set_param3;
std::set<int> int_set_param4;
std::set<int> int_set_param5;
long long bits_param2 = 0;
private:
std::tuple<int, int> random_move_idle_time_;
std::tuple<int, int> random_move_time_;
};
struct PveGemini
{
const metatable::PveGemini* pb = nullptr;
std::vector<float> hp_muls;
void Init();
float GetHpMul(int num);
private:
std::vector<float> hp_mul;
};
struct PveGeminiContent
{
const metatable::PveGeminiContent* pb = nullptr;
a8::Vec2 spawn_point;
std::vector<int> enemys;
void Init();
};
struct PveGeminiMode
{
const metatable::PveGeminiMode* pb = nullptr;
std::vector<int> mode_time;
std::vector<MetaData::SafeArea*> area;
std::vector<std::vector<PveGeminiContent*>> waves;
std::vector<int> score_reward;
std::vector<int> round_score;
std::vector<a8::Vec2> next_door;
void Init();
int CalcStar(int score);
};
struct RankRoom
{
const metatable::RankRoom* pb = nullptr;
void Init();
};
}