每天第一次玩允许复活两次

This commit is contained in:
aozhiwei 2019-10-23 15:56:42 +08:00
parent 867cee0414
commit c44d5b4a5b
4 changed files with 6 additions and 0 deletions

View File

@ -749,6 +749,9 @@ void Human::BeKill(int killer_id, const std::string& killer_name, int weapon_id)
dead_frameno = room->frame_no;
++dead_times;
int max_revive_times = MetaMgr::Instance()->GetSysParamAsInt("max_revive_times", 1);
if (today_enter_times == 0) {
++max_revive_times;
}
if (weapon_id != VW_Spectate &&
dead_times <= max_revive_times &&
room->AliveCount() > 2 &&

View File

@ -44,6 +44,7 @@ class Human : public Entity
std::string from_appid;
std::string team_uuid;
bool auto_fill = false;
int today_enter_times = 0;
int account_registertime = 0;
MetaData::Player* meta = nullptr;
MetaData::Equip* helmet_meta = nullptr;

View File

@ -51,6 +51,7 @@ Player* PlayerMgr::CreatePlayerByCMJoin(long ip_saddr, int socket, const cs::CMJ
hum->use_touch = msg.use_touch();
hum->avatar_url = msg.avatar_url();
hum->energy_shield = msg.energy_shield();
hum->today_enter_times = msg.today_enter_times();
hum->create_tick = a8::XGetTickCount();
hum->account_registertime = f8::ExtractRegisterTimeFromSessionId(msg.session_id());
hum->atk_add = msg.atk_add();

View File

@ -655,6 +655,7 @@ message CMJoin
optional int32 emoji2 = 25; //2
optional int32 parachute = 26; //
optional bool has_pass = 27; //
optional int32 today_enter_times = 28; //
}
//