This commit is contained in:
aozhiwei 2023-02-24 12:32:04 +08:00
parent b2f3dd6403
commit 40474f86a3
6 changed files with 54 additions and 1 deletions

View File

@ -44,6 +44,7 @@
#include "buff/turnover.h" #include "buff/turnover.h"
#include "buff/use_skill.h" #include "buff/use_skill.h"
#include "buff/invincible.h" #include "buff/invincible.h"
#include "buff/modify_attr.h"
#include "mt/Buff.h" #include "mt/Buff.h"
@ -130,6 +131,8 @@ Buff* BuffFactory::MakeBuff(const mt::Buff* buff_meta)
return new UseSkillBuff(); return new UseSkillBuff();
case kBET_Invincible: case kBET_Invincible:
return new InvincibleBuff(); return new InvincibleBuff();
case kBET_ModifyAttr:
return new ModifyBuff();
default: default:
return new Buff(); return new Buff();
} }

View File

@ -0,0 +1,18 @@
#include "precompile.h"
#include "buff/modify_attr.h"
#include "creature.h"
#include "human.h"
#include "car.h"
#include "mt/Buff.h"
void ModifyBuff::Activate()
{
}
void ModifyBuff::Deactivate()
{
}

View File

@ -0,0 +1,12 @@
#pragma once
#include "buff.h"
class ModifyBuff : public Buff
{
public:
virtual void Activate() override;
virtual void Deactivate() override;
};

View File

@ -44,7 +44,7 @@ A8_DECLARE_ENUM(BuffEffectType_e,
kBET_JumpTo = 10, //跳跃 kBET_JumpTo = 10, //跳跃
kBET_OnceChgAttr = 11, //一次性buff kBET_OnceChgAttr = 11, //一次性buff
kBET_Pull = 12, //拉人(主动方) kBET_Pull = 12, //拉人(主动方)
kBET_Reserve13 = 13, kBET_ModifyAttr = 13,
kBET_PlayShotAni = 14, //播放射击动画 kBET_PlayShotAni = 14, //播放射击动画
kBET_Vertigo = 15, //眩晕 kBET_Vertigo = 15, //眩晕
kBET_DecHp = 16, //扣血 kBET_DecHp = 16, //扣血

View File

@ -50,6 +50,7 @@ struct GraspBuff
for (auto& buff : grasp_triggers_) { for (auto& buff : grasp_triggers_) {
if (buff && if (buff &&
(buff->graspbuff_target() == BUFF_TARGET_SELF || (buff->graspbuff_target() == BUFF_TARGET_SELF ||
buff->graspbuff_target() == BUFF_TARGET_GUN ||
buff->graspbuff_target() == BUFF_TARGET_ENEMY)) { buff->graspbuff_target() == BUFF_TARGET_ENEMY)) {
int buff_time = buff->GetBuffTime(gun_grasp->GetHeroLv()); int buff_time = buff->GetBuffTime(gun_grasp->GetHeroLv());
int attr_num = buff->GetAttrNum(gun_grasp->GetHeroLv()); int attr_num = buff->GetAttrNum(gun_grasp->GetHeroLv());

View File

@ -285,6 +285,7 @@ message MFPlayerFull
optional int32 emoji2 = 26; //2 optional int32 emoji2 = 26; //2
optional int32 parachute = 27; // optional int32 parachute = 27; //
repeated MFBuff buff_list = 28; //buff列表 repeated MFBuff buff_list = 28; //buff列表
repeated MFEffect effect_list = 67; //
optional int32 car_uniid = 29; //id optional int32 car_uniid = 29; //id
optional int32 car_seat = 34; //-0-3 optional int32 car_seat = 34; //-0-3
@ -411,6 +412,7 @@ message MFHeroFull
optional bool dead = 11; // optional bool dead = 11; //
repeated MFBuff buff_list = 12; //buff列表 repeated MFBuff buff_list = 12; //buff列表
optional float max_health = 13; // optional float max_health = 13; //
repeated MFEffect effect_list = 14; //
} }
//- //-
@ -437,6 +439,7 @@ message MFCarFull
optional int32 oil = 14; // optional int32 oil = 14; //
optional int32 max_oil = 15; // optional int32 max_oil = 15; //
optional int32 bullet_num = 16; // optional int32 bullet_num = 16; //
repeated MFEffect effect_list = 18; //
/* /*
@ -772,6 +775,13 @@ message MFBuff
optional int32 buff_uniid = 5; //buff唯一id optional int32 buff_uniid = 5; //buff唯一id
} }
//effect
message MFEffect
{
optional int32 effect_uniid = 1; //id
optional int32 effect_id = 5; //id
}
//buff变更 //buff变更
message MFBuffChg message MFBuffChg
{ {
@ -780,6 +790,14 @@ message MFBuffChg
optional MFBuff buff = 3; //buff optional MFBuff buff = 3; //buff
} }
//
message MFEffectChg
{
optional int32 obj_id = 1; //id
optional int32 chg = 2; //0:/ 1:
optional MFEffect effect = 3; //effect
}
//() //()
message MFBodyState message MFBodyState
{ {
@ -1292,6 +1310,7 @@ message SMUpdate
optional MFAirDrop airdrop = 26; // optional MFAirDrop airdrop = 26; //
optional MFPlane plane = 27; // optional MFPlane plane = 27; //
repeated MFBuffChg chged_buff_list = 28; //buff变更列表 repeated MFBuffChg chged_buff_list = 28; //buff变更列表
repeated MFEffectChg chged_effect_list = 51; //
repeated MFPropertyChg chged_property_list = 31; //property变更列表 repeated MFPropertyChg chged_property_list = 31; //property变更列表
repeated MFPlaySkill play_skill_list = 32; // repeated MFPlaySkill play_skill_list = 32; //
optional MFAirRaid airraid = 33; // optional MFAirRaid airraid = 33; //