1
This commit is contained in:
parent
e79c487caf
commit
4efd559043
@ -501,6 +501,7 @@ void Creature::DoSkill(int skill_id,
|
||||
skill_distance_ = skill_distance;
|
||||
curr_skill_ = skill;
|
||||
playing_skill = true;
|
||||
buff_vec2_param1 = GetPos() + skill_dir_ * skill_distance_;
|
||||
CurrentSkill()->last_use_frameno = room->GetFrameNo();
|
||||
if (CurrentSkill()->meta->i->skill_target() == kST_Self
|
||||
) {
|
||||
|
@ -696,6 +696,8 @@ void Human::FillSMGameOver(cs::SMGameOver& msg)
|
||||
msg.set_game_over(room->IsGameOver());
|
||||
msg.set_victory(!dead);
|
||||
msg.set_room_uuid(a8::XValue(room->GetRoomUuid()));
|
||||
msg.set_total_human_num(room->GetHumanNum());
|
||||
msg.set_alive_human_num(room->AliveCount());
|
||||
|
||||
{
|
||||
for (auto& itr : *team_members) {
|
||||
|
@ -64,11 +64,14 @@ void MolotorCocktailMiTask::Check()
|
||||
}
|
||||
}
|
||||
);
|
||||
a8::Vec2 old_buff_vec2_param1 = sender.Get()->buff_vec2_param1;
|
||||
sender.Get()->buff_vec2_param1 = sender.Get()->GetPos();
|
||||
for (Creature* target : objects) {
|
||||
if (!target->GetBuffById(meta->i->buffid())) {
|
||||
target->MustBeAddBuff(sender.Get(), meta->i->buffid());
|
||||
}
|
||||
}
|
||||
sender.Get()->buff_vec2_param1 = old_buff_vec2_param1;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -64,11 +64,14 @@ void PosionGasMiTask::Check()
|
||||
}
|
||||
}
|
||||
);
|
||||
a8::Vec2 old_buff_vec2_param1 = sender.Get()->buff_vec2_param1;
|
||||
sender.Get()->buff_vec2_param1 = sender.Get()->GetPos();
|
||||
for (Creature* target : objects) {
|
||||
if (!target->GetBuffById(meta->i->buffid())) {
|
||||
target->MustBeAddBuff(sender.Get(), meta->i->buffid());
|
||||
}
|
||||
}
|
||||
sender.Get()->buff_vec2_param1 = old_buff_vec2_param1;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -171,6 +171,11 @@ int Room::GetPlayerNum()
|
||||
return accountid_hash_.size();
|
||||
}
|
||||
|
||||
int Room::GetHumanNum()
|
||||
{
|
||||
return human_hash_.size();
|
||||
}
|
||||
|
||||
Player* Room::GetPlayerByAccountId(const std::string& accountid)
|
||||
{
|
||||
auto itr = accountid_hash_.find(accountid);
|
||||
|
@ -74,6 +74,7 @@ public:
|
||||
#endif
|
||||
|
||||
int GetPlayerNum();
|
||||
int GetHumanNum();
|
||||
int AliveCount();
|
||||
long long AliveCountChgFrameNo() { return alive_count_chged_frameno_; };
|
||||
inline int RealAliveCount() { return alive_human_hash_.size(); }
|
||||
|
@ -1066,6 +1066,8 @@ message SMGameOver
|
||||
optional int32 team_allcnt = 3;
|
||||
optional bool game_over = 4; //是否结束
|
||||
optional bool victory = 5; //是否胜利
|
||||
optional int32 total_human_num = 12; //房间总人数
|
||||
optional int32 alive_human_num = 13; //房间剩余存活人数
|
||||
|
||||
repeated MFPlayerStats player_stats = 6; //玩家信息统计
|
||||
optional string room_uuid = 7; //房间唯一id
|
||||
|
Loading…
x
Reference in New Issue
Block a user