merge dev
This commit is contained in:
commit
6227779af0
@ -503,6 +503,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
|
||||
) {
|
||||
|
@ -247,6 +247,8 @@ void Human::FillMFPlayerStats(cs::MFPlayerStats* stats_pb)
|
||||
{
|
||||
stats_pb->set_player_id(GetEntityUniId());
|
||||
stats_pb->set_player_avatar_url(avatar_url);
|
||||
stats_pb->set_charid(meta->i->id());
|
||||
stats_pb->set_team_id(team_id);
|
||||
|
||||
if (!dead) {
|
||||
stats_pb->set_time_alive(room->GetFrameNo() * 1000.0f / SERVER_FRAME_RATE);
|
||||
@ -695,6 +697,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;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -178,6 +178,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);
|
||||
|
@ -75,6 +75,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(); }
|
||||
|
@ -667,6 +667,8 @@ message MFPlayerStats
|
||||
optional int32 vip_lv = 35 [default = 0]; //等级
|
||||
optional int32 head = 36 [default = 0]; //头像框
|
||||
optional int32 sex = 37 [default = 0]; //性别
|
||||
optional int32 charid = 38; //人物id
|
||||
optional int32 team_id = 39; //tamid
|
||||
}
|
||||
|
||||
//空投
|
||||
@ -1064,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