修复技能问题

This commit is contained in:
aozhiwei 2021-07-09 04:24:36 +00:00
parent 1306bc7b2c
commit fc3e2c1c6c
4 changed files with 22 additions and 2 deletions

View File

@ -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)->stats.last_kill_frameno = room->GetFrameNo();
((Human*)hum)->kill_humans.insert(this); ((Human*)hum)->kill_humans.insert(this);
((Human*)hum)->SyncAroundPlayers(__FILE__, __LINE__, __func__); ((Human*)hum)->SyncAroundPlayers(__FILE__, __LINE__, __func__);
((Human*)hum)->GetTrigger()->Kill(this);
if (weapon_id == VW_Tank) { if (weapon_id == VW_Tank) {
info.killer_id = killer->GetUniId(); info.killer_id = killer->GetUniId();
info.killer_team_id = killer->team_id; info.killer_team_id = killer->team_id;

View File

@ -148,7 +148,8 @@ void Skill::ResetSkillCd()
void Skill::Accelerate(int time) void Skill::Accelerate(int time)
{ {
if (inc_times_timer_) { 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); remain_time = std::max(remain_time, 0);
owner->room->xtimer.ModifyTimer(inc_times_timer_, remain_time / FRAME_RATE_MS); owner->room->xtimer.ModifyTimer(inc_times_timer_, remain_time / FRAME_RATE_MS);
NotifySkillState(); NotifySkillState();

View File

@ -104,7 +104,7 @@ void Trigger::Kill(Creature* target)
(kCondBuffKillTarget, (kCondBuffKillTarget,
[this] (Buff* buff, bool& stop) [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); AddBuffs(buff->meta->int_param1, buff->meta->param4_int_list);
} }
}); });

View File

@ -135,6 +135,12 @@ message MFVec2
property_type: 27 property_type: 27
property_subtype: property_subtype:
valule: valule:
property_type: 28
property_subtype: id
valule:
property_type: 29
property_subtype: id
valule:
*/ */
message MFPropertyChg message MFPropertyChg
{ {
@ -206,6 +212,14 @@ message MFPlayerPart
optional float speed = 4; // optional float speed = 4; //
} }
//
message MFAttrAddition
{
optional int32 attr_id = 1; //id
optional float abs_val = 2; //
optional float rate_val = 3; //
}
//- //-
message MFPlayerFull message MFPlayerFull
{ {
@ -252,6 +266,8 @@ message MFPlayerFull
repeated MFSkill skill_list = 38; // repeated MFSkill skill_list = 38; //
repeated MFAttrAddition attr_addition= 61; //
// //
optional int32 charid = 44; //id optional int32 charid = 44; //id
optional float speed = 45; // optional float speed = 45; //
@ -565,6 +581,8 @@ message MFActivePlayerData
repeated MFSkill skill_list = 28; // repeated MFSkill skill_list = 28; //
repeated MFAttrAddition attr_addition= 61; //
optional float shoot_offset_x = 50 [default = 0]; //-x optional float shoot_offset_x = 50 [default = 0]; //-x
optional float shoot_offset_y = 51 [default = 0]; //-y optional float shoot_offset_y = 51 [default = 0]; //-y
} }