1
This commit is contained in:
parent
8fb3dd1932
commit
d6849f4536
@ -309,6 +309,43 @@ void FrameEvent::AddZombieIdChg(Human* hum)
|
|||||||
hum->chged_zombieid_.push_back(idx);
|
hum->chged_zombieid_.push_back(idx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FrameEvent::AddDead(Human* sender, int revive_time)
|
||||||
|
{
|
||||||
|
{
|
||||||
|
dead_objs_.push_back(
|
||||||
|
std::make_tuple(
|
||||||
|
sender->GetEntityUniId(),
|
||||||
|
revive_time
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
{
|
||||||
|
int dead_idx = dead_objs_.size() - 1;
|
||||||
|
sender->TouchAllLayerHumanList
|
||||||
|
(
|
||||||
|
[dead_idx] (Human* hum, bool& stop)
|
||||||
|
{
|
||||||
|
hum->dead_objs_.push_back(dead_idx);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void FrameEvent::AddRevive(Human* sender)
|
||||||
|
{
|
||||||
|
{
|
||||||
|
revive_objs_.push_back(sender->GetEntityUniId());
|
||||||
|
}
|
||||||
|
{
|
||||||
|
int revive_idx = revive_objs_.size() - 1;
|
||||||
|
sender->TouchAllLayerHumanList
|
||||||
|
(
|
||||||
|
[revive_idx] (Human* hum, bool& stop)
|
||||||
|
{
|
||||||
|
hum->revive_objs_.push_back(revive_idx);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void FrameEvent::Clear()
|
void FrameEvent::Clear()
|
||||||
{
|
{
|
||||||
if (!explosions_.empty()) {
|
if (!explosions_.empty()) {
|
||||||
@ -368,4 +405,10 @@ void FrameEvent::Clear()
|
|||||||
if (!chged_zombieids_.empty()) {
|
if (!chged_zombieids_.empty()) {
|
||||||
chged_zombieids_.clear();
|
chged_zombieids_.clear();
|
||||||
}
|
}
|
||||||
|
if (!revive_objs_.empty()) {
|
||||||
|
revive_objs_.clear();
|
||||||
|
}
|
||||||
|
if (!dead_objs_.empty()) {
|
||||||
|
dead_objs_.clear();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -30,6 +30,8 @@ public:
|
|||||||
void AddExpChg(Human* hum);
|
void AddExpChg(Human* hum);
|
||||||
void AddRaceChg(Human* hum);
|
void AddRaceChg(Human* hum);
|
||||||
void AddZombieIdChg(Human* hum);
|
void AddZombieIdChg(Human* hum);
|
||||||
|
void AddDead(Human* sender, int revive_time);
|
||||||
|
void AddRevive(Human* sender);
|
||||||
|
|
||||||
void Clear();
|
void Clear();
|
||||||
private:
|
private:
|
||||||
@ -52,6 +54,8 @@ private:
|
|||||||
std::vector<Human*> chged_exps_;
|
std::vector<Human*> chged_exps_;
|
||||||
std::vector<Human*> chged_races_;
|
std::vector<Human*> chged_races_;
|
||||||
std::vector<Human*> chged_zombieids_;
|
std::vector<Human*> chged_zombieids_;
|
||||||
|
std::vector<int> revive_objs_;
|
||||||
|
std::vector<std::tuple<int, int>> dead_objs_;
|
||||||
|
|
||||||
friend class FrameMaker;
|
friend class FrameMaker;
|
||||||
};
|
};
|
||||||
|
@ -1972,6 +1972,12 @@ void Human::ClearFrameData()
|
|||||||
if (!chged_zombieid_.empty()) {
|
if (!chged_zombieid_.empty()) {
|
||||||
chged_zombieid_.clear();
|
chged_zombieid_.clear();
|
||||||
}
|
}
|
||||||
|
if (!revive_objs_.empty()) {
|
||||||
|
revive_objs_.clear();
|
||||||
|
}
|
||||||
|
if (!dead_objs_.empty()) {
|
||||||
|
dead_objs_.clear();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Human::GenBattleReportData(a8::MutableXObject* params)
|
void Human::GenBattleReportData(a8::MutableXObject* params)
|
||||||
|
@ -358,6 +358,8 @@ protected:
|
|||||||
std::vector<int> chged_exp_;
|
std::vector<int> chged_exp_;
|
||||||
std::vector<int> chged_race_;
|
std::vector<int> chged_race_;
|
||||||
std::vector<int> chged_zombieid_;
|
std::vector<int> chged_zombieid_;
|
||||||
|
std::vector<int> revive_objs_;
|
||||||
|
std::vector<int> dead_objs_;
|
||||||
Human* follow_target_ = nullptr;
|
Human* follow_target_ = nullptr;
|
||||||
bool follow_synced_active_player = false;
|
bool follow_synced_active_player = false;
|
||||||
HumanCar car_;
|
HumanCar car_;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user