aozhiwei 41b9d646cd 1
2023-06-09 19:46:10 +08:00

151 lines
3.2 KiB
C++

#pragma once
struct WeaponStats
{
int weapon_id = 0;
int kills = 0;
int damage_out = 0;
int obtain_count = 0;
int use_times = 0;
};
struct HeroStats
{
int hero_id = 0;
int skill_lv = 0;
int weapon_lv = 0;
};
struct HeroStatsPb
{
std::string hero_uniid;
std::string hero_name;
int hero_id = 0;
int reward_ceg = 0;
int ceg_uplimit = 0;
int today_get_ceg = 0;
};
struct WeaponStatsPb
{
std::string weapon_uniid;
std::string weapon_name;
int weapon_id = 0;
int reward_ceg = 0;
int ceg_uplimit = 0;
int today_get_ceg = 0;
};
struct OverRewardItem
{
std::string uniid;
int id = 0;
std::string obtain_gold;
std::string gold_limit;
std::string curr_gold;
};
struct OverReward
{
OverRewardItem hero;
OverRewardItem weapon1;
OverRewardItem weapon2;
std::string total_ceg;
std::vector<std::tuple<int, std::string>> items;
};
class Human;
class PlayerStats
{
public:
int abandon_battle = 0;
int kills = 0;
long long last_kill_frameno = 0;
int damage_amount_in = 0;
int damage_amount_out = 0;
int heal_amount = 0;
int rescue_member = 0;
int rescue_guild_member = 0;
int alive_time = 0;
int game_time = 0;
int old_rank = 0;
int new_rank = 0;
int old_score = 0;
int new_score = 0;
int assist = 0;
int pve_wave = 0;
int revive = 0;
int rank_chg = 0;
int history_time_alive = 0;
int history_kills = 0;
int history_damage_amount = 0;
int history_heal_amount = 0;
int diving_times = 0;
int open_airdrop_times = 0;
int use_medicine_times = 0;
int destory_car_times = 0;
int use_camouflage_times = 0;
int use_skill_times = 0;
int ride_car_move_distance = 0;
int ride_car_kills = 0;
int max_hero_skill_lv = 0;
std::map<int, WeaponStats> weapon_stats;
std::map<int, HeroStats> hero_stats;
int gold = 0;
int score = 0;
std::vector<std::pair<int, int>> items;
int pass_score = 0;
int rank_score = 0;
int pve_rank_score = 0;
int pve_kill_boss = 0;
std::vector<std::pair<int, int>> extra_drop;
int killer_id = 0;
std::string killer_name;
int weapon_id = 0;
int pvp_settlement_type = 0;
int settlement_color = 0;
int rank = 0;
int skill_times = 0;
bool victory = false;
int dead_times = 0;
OverReward over_reward;
bool is_run_away = false;
int statemented = false;
double ranked_topx = 0;
double kills_topx = 0;
double hero_topx = 0;
double weapon_topx = 0;
double survival_topx = 0;
HeroStatsPb pb_hero_stats;
std::vector<WeaponStatsPb> pb_weapons_stats;
int star_num = 0;
WeaponStats& MustBeWeapon(int weapon_id);
void IncWeaponKills(int weapon_id, int val);
void IncWeaponDamageOut(int weapon_id, int val);
void IncWeaponObtainCount(int weapon_id, int val);
void IncWeaponUseTimes(int weapon_id, int val);
HeroStats& MustBeHero(int hero_id);
void SetHeroSkillLv(int hero_id, int skill_lv);
void SetHeroWeaponLv(int hero_id, int weapon_lv);
void ParseReward(Human* hum, a8::XObject& xobj);
void AdjustRewardData();
void Statement(Human* hum);
};