1
This commit is contained in:
parent
5322bdd4bc
commit
431a1453bd
@ -20,6 +20,7 @@ public:
|
|||||||
CreatureWeakPtr master;
|
CreatureWeakPtr master;
|
||||||
MetaData::Player* meta = nullptr;
|
MetaData::Player* meta = nullptr;
|
||||||
bool shot_hold = false;
|
bool shot_hold = false;
|
||||||
|
bool is_pve_boss = false;
|
||||||
|
|
||||||
Hero();
|
Hero();
|
||||||
virtual ~Hero() override;
|
virtual ~Hero() override;
|
||||||
|
@ -697,7 +697,7 @@ void Human::FillMFTeamData(Human* hum, cs::MFTeamData* team_data, bool is_game_o
|
|||||||
team_data->set_team_id(team_id);
|
team_data->set_team_id(team_id);
|
||||||
team_data->set_player_id(GetUniId());
|
team_data->set_player_id(GetUniId());
|
||||||
team_data->set_hero_id(meta->i->id());
|
team_data->set_hero_id(meta->i->id());
|
||||||
team_data->set_score(stats.pve_score);
|
team_data->set_score(stats.pve_rank_score);
|
||||||
if (is_game_over || !real_dead || room->GetFrameNo() - GetRealDeadFrameNo(room) < 4) {
|
if (is_game_over || !real_dead || room->GetFrameNo() - GetRealDeadFrameNo(room) < 4) {
|
||||||
TypeConvert::ToPb(GetPos(), team_data->mutable_pos());
|
TypeConvert::ToPb(GetPos(), team_data->mutable_pos());
|
||||||
TypeConvert::ToPb(GetAttackDir(), team_data->mutable_dir());
|
TypeConvert::ToPb(GetAttackDir(), team_data->mutable_dir());
|
||||||
@ -1875,7 +1875,7 @@ void Human::SendUIUpdate()
|
|||||||
notifymsg.set_kill_count(stats.kills);
|
notifymsg.set_kill_count(stats.kills);
|
||||||
room->FillSMUiUpdate(notifymsg);
|
room->FillSMUiUpdate(notifymsg);
|
||||||
if (room->IsPveRoom()) {
|
if (room->IsPveRoom()) {
|
||||||
notifymsg.set_score(stats.pve_score);
|
notifymsg.set_score(stats.pve_rank_score);
|
||||||
notifymsg.set_wave(room->pve_data.wave + 1);
|
notifymsg.set_wave(room->pve_data.wave + 1);
|
||||||
notifymsg.set_max_wave(room->pve_data.max_wave);
|
notifymsg.set_max_wave(room->pve_data.max_wave);
|
||||||
notifymsg.set_mon_num(room->pve_data.mon_num);
|
notifymsg.set_mon_num(room->pve_data.mon_num);
|
||||||
@ -2082,6 +2082,10 @@ void Human::GenBattleReportData(a8::MutableXObject* params)
|
|||||||
params->SetVal("ride_car_move_distance", stats.ride_car_move_distance);
|
params->SetVal("ride_car_move_distance", stats.ride_car_move_distance);
|
||||||
params->SetVal("ride_car_kills", stats.ride_car_kills);
|
params->SetVal("ride_car_kills", stats.ride_car_kills);
|
||||||
params->SetVal("max_hero_skill_lv", stats.max_hero_skill_lv);
|
params->SetVal("max_hero_skill_lv", stats.max_hero_skill_lv);
|
||||||
|
{
|
||||||
|
params->SetVal("pve_rank_score", stats.pve_rank_score);
|
||||||
|
params->SetVal("pve_kill_boss", stats.pve_kill_boss);
|
||||||
|
}
|
||||||
{
|
{
|
||||||
std::string weapons_type;
|
std::string weapons_type;
|
||||||
std::string weapons_slot;
|
std::string weapons_slot;
|
||||||
@ -4246,5 +4250,5 @@ void Human::DecOxygen(int val)
|
|||||||
|
|
||||||
void Human::WinPveScore(int score)
|
void Human::WinPveScore(int score)
|
||||||
{
|
{
|
||||||
stats.pve_score += score;
|
stats.pve_rank_score += score;
|
||||||
}
|
}
|
||||||
|
@ -88,7 +88,8 @@ struct PlayerStats
|
|||||||
int pass_score = 0;
|
int pass_score = 0;
|
||||||
int rank_score = 0;
|
int rank_score = 0;
|
||||||
|
|
||||||
int pve_score = 0;
|
int pve_rank_score = 0;
|
||||||
|
int pve_kill_boss = 0;
|
||||||
|
|
||||||
std::vector<std::pair<int, int>> extra_drop;
|
std::vector<std::pair<int, int>> extra_drop;
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
#include "room.h"
|
#include "room.h"
|
||||||
#include "human.h"
|
#include "human.h"
|
||||||
#include "metamgr.h"
|
#include "metamgr.h"
|
||||||
|
#include "hero.h"
|
||||||
|
|
||||||
void Incubator::Init()
|
void Incubator::Init()
|
||||||
{
|
{
|
||||||
@ -325,6 +326,10 @@ void Incubator::SpawnWaveMon(int wave)
|
|||||||
if (!hero) {
|
if (!hero) {
|
||||||
A8_ABORT();
|
A8_ABORT();
|
||||||
}
|
}
|
||||||
|
if (wave + 1 == room->pve_mode_meta->waves.size()) {
|
||||||
|
hero->is_pve_boss = true;
|
||||||
|
}
|
||||||
|
|
||||||
++room->pve_data.mon_num;
|
++room->pve_data.mon_num;
|
||||||
room->NotifyUiUpdate();
|
room->NotifyUiUpdate();
|
||||||
}
|
}
|
||||||
|
@ -1626,6 +1626,11 @@ namespace MetaData
|
|||||||
abort();
|
abort();
|
||||||
}
|
}
|
||||||
waves[content.pb->round() - 1].push_back(&content);
|
waves[content.pb->round() - 1].push_back(&content);
|
||||||
|
if (content.pb->round() +1 >= waves.size()) {
|
||||||
|
if (content.enemys.size() != 1) {
|
||||||
|
abort();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
std::vector<std::string> strings;
|
std::vector<std::string> strings;
|
||||||
|
@ -51,6 +51,19 @@ void PveData::OnBeKill(Hero* hero)
|
|||||||
room->NotifyUiUpdate();
|
room->NotifyUiUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (hero->is_pve_boss) {
|
||||||
|
room->TraverseHumanList
|
||||||
|
(
|
||||||
|
a8::XParams(),
|
||||||
|
[] (Human* hum, a8::XParams& param) -> bool
|
||||||
|
{
|
||||||
|
hum->stats.pve_kill_boss = true;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
a8::XPrintf("PveData::OnBeKill wave:%d refreshed_mon:%d killed_num:%d\n",
|
a8::XPrintf("PveData::OnBeKill wave:%d refreshed_mon:%d killed_num:%d\n",
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user