From 38beead6c1d5f7f04c9a6eaf8b74bf8677a8ae71 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 27 Jun 2023 13:39:12 +0800 Subject: [PATCH] 1 --- server/gameserver/buff/once_chg_attr.cc | 5 +++++ server/gameserver/human.cc | 2 +- server/gameserver/mt/Param.cc | 1 + server/gameserver/mt/Param.h | 2 ++ 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/server/gameserver/buff/once_chg_attr.cc b/server/gameserver/buff/once_chg_attr.cc index e395a051..540c64b0 100644 --- a/server/gameserver/buff/once_chg_attr.cc +++ b/server/gameserver/buff/once_chg_attr.cc @@ -32,6 +32,11 @@ void OnceChgAttrBuff::InternalProcOnceChgAttr() real_killer_id = caster_.Get()->GetUniId(); real_killer_name = caster_.Get()->GetName(); } +#ifdef DEBUG + if (caster_.Get()->IsPlayer()) { + a8::XPrintf("once chgattr %d %d\n", {real_killer_id, real_killer_name}); + } +#endif if (meta->_int_buff_param2 == 1) { //绝对值 if (meta->_buff_param3 > 0) { diff --git a/server/gameserver/human.cc b/server/gameserver/human.cc index f1027fcd..2ec1f64c 100644 --- a/server/gameserver/human.cc +++ b/server/gameserver/human.cc @@ -306,7 +306,7 @@ void Human::DecHP(float dec_hp, int killer_id, const std::string killer_name, in BeKill(killer_id, killer_name, weapon_id, real_killer_id, real_killer_name); SyncAroundPlayers(__FILE__, __LINE__, __func__); } else { - if ((HasNoDownedTeammate() && !room->IsPveRoom()) || + if ((mt::Param::s().downed_switch && HasNoDownedTeammate() && !room->IsPveRoom()) || GetInventory(IS_SHEN_BAO) > 0) { SetHP(GetMaxHP() * std::min(1.0f, (float)mt::Param::GetFloatParam("downed_recover_hp"))); diff --git a/server/gameserver/mt/Param.cc b/server/gameserver/mt/Param.cc index 97c349ab..7a2633b6 100644 --- a/server/gameserver/mt/Param.cc +++ b/server/gameserver/mt/Param.cc @@ -47,6 +47,7 @@ namespace mt s_.pre_client_shot = GetIntParam("pre_client_shot", 0); s_.rank_mode_wait_time = GetIntParam("rank_mode_wait_time", 10); s_.rank_mode_min_player = GetIntParam("rank_mode_min_player", 3); + s_.downed_switch = GetIntParam("downed_switch", 0); #if 1 { std::string point = GetStringParam("newbie_room_born_point", "3471.3662:6.8399:5268.6240"); diff --git a/server/gameserver/mt/Param.h b/server/gameserver/mt/Param.h index 31f26aac..fd75ba21 100644 --- a/server/gameserver/mt/Param.h +++ b/server/gameserver/mt/Param.h @@ -117,6 +117,8 @@ namespace mt int rank_mode_wait_time = 0; int rank_mode_min_player = 0; + + int downed_switch = 0; }; static void StaticPostInit(); static const S& s() { return s_; };