修复技能问题
This commit is contained in:
parent
1306bc7b2c
commit
fc3e2c1c6c
@ -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;
|
||||||
|
@ -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();
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user