diff --git a/server/gameserver/human.cc b/server/gameserver/human.cc index 85ca5c9..6301c7c 100644 --- a/server/gameserver/human.cc +++ b/server/gameserver/human.cc @@ -684,6 +684,7 @@ void Human::BeKill(int killer_id, const std::string& killer_name, int weapon_id) ((Human*)hum)->stats.last_kill_frameno = room->GetFrameNo(); ((Human*)hum)->kill_humans.insert(this); ((Human*)hum)->SyncAroundPlayers(__FILE__, __LINE__, __func__); + ((Human*)hum)->GetTrigger()->Kill(this); if (weapon_id == VW_Tank) { info.killer_id = killer->GetUniId(); info.killer_team_id = killer->team_id; diff --git a/server/gameserver/skill.cc b/server/gameserver/skill.cc index 6f7c924..0cdefbf 100644 --- a/server/gameserver/skill.cc +++ b/server/gameserver/skill.cc @@ -148,7 +148,8 @@ void Skill::ResetSkillCd() void Skill::Accelerate(int time) { if (inc_times_timer_) { - int remain_time = owner->room->xtimer.GetRemainTime(inc_times_timer_) - time; + int remain_time = owner->room->xtimer.GetRemainTime(inc_times_timer_) * FRAME_RATE_MS; + remain_time += time; remain_time = std::max(remain_time, 0); owner->room->xtimer.ModifyTimer(inc_times_timer_, remain_time / FRAME_RATE_MS); NotifySkillState(); diff --git a/server/gameserver/trigger.cc b/server/gameserver/trigger.cc index e77e3bc..5c7de55 100644 --- a/server/gameserver/trigger.cc +++ b/server/gameserver/trigger.cc @@ -104,7 +104,7 @@ void Trigger::Kill(Creature* target) (kCondBuffKillTarget, [this] (Buff* buff, bool& stop) { - if (buff->meta->int_param2 == kill_num_) { + if (buff->meta->int_param2 > 0 && (kill_num_ % buff->meta->int_param2) == 0) { AddBuffs(buff->meta->int_param1, buff->meta->param4_int_list); } }); diff --git a/server/tools/protobuild/cs_proto.proto b/server/tools/protobuild/cs_proto.proto index 8be3693..8d61b9d 100755 --- a/server/tools/protobuild/cs_proto.proto +++ b/server/tools/protobuild/cs_proto.proto @@ -135,6 +135,12 @@ message MFVec2 property_type: 27 载具油量 property_subtype: 当前油量 valule: 最大油量 + property_type: 28 绝对值属性加成 + property_subtype: 属性id + valule: 属性绝对值 + property_type: 29 百分比属性加成 + property_subtype: 属性id + valule: 百分比绝对值 */ message MFPropertyChg { @@ -206,6 +212,14 @@ message MFPlayerPart optional float speed = 4; //速度 } +//属性增量 +message MFAttrAddition +{ + optional int32 attr_id = 1; //属性id + optional float abs_val = 2; //绝对值加成 + optional float rate_val = 3; //百分比 +} + //玩家信息-全量 message MFPlayerFull { @@ -252,6 +266,8 @@ message MFPlayerFull repeated MFSkill skill_list = 38; //技能列表 + repeated MFAttrAddition attr_addition= 61; //属性加成 + //一下字段只有僵尸模式才有效 optional int32 charid = 44; //人物id optional float speed = 45; //速度 @@ -565,6 +581,8 @@ message MFActivePlayerData repeated MFSkill skill_list = 28; //技能列表 + repeated MFAttrAddition attr_addition= 61; //属性加成 + optional float shoot_offset_x = 50 [default = 0]; //射击偏移量-x optional float shoot_offset_y = 51 [default = 0]; //射击偏移量-y }