diff --git a/server/gameserver/buff/bufffactory.cc b/server/gameserver/buff/bufffactory.cc index a6b93a93..1f5ec6af 100644 --- a/server/gameserver/buff/bufffactory.cc +++ b/server/gameserver/buff/bufffactory.cc @@ -44,6 +44,7 @@ #include "buff/turnover.h" #include "buff/use_skill.h" #include "buff/invincible.h" +#include "buff/modify_attr.h" #include "mt/Buff.h" @@ -130,6 +131,8 @@ Buff* BuffFactory::MakeBuff(const mt::Buff* buff_meta) return new UseSkillBuff(); case kBET_Invincible: return new InvincibleBuff(); + case kBET_ModifyAttr: + return new ModifyBuff(); default: return new Buff(); } diff --git a/server/gameserver/buff/modify_attr.cc b/server/gameserver/buff/modify_attr.cc new file mode 100644 index 00000000..2a0327b1 --- /dev/null +++ b/server/gameserver/buff/modify_attr.cc @@ -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() +{ + +} diff --git a/server/gameserver/buff/modify_attr.h b/server/gameserver/buff/modify_attr.h new file mode 100644 index 00000000..ac9bd26c --- /dev/null +++ b/server/gameserver/buff/modify_attr.h @@ -0,0 +1,12 @@ +#pragma once + +#include "buff.h" + +class ModifyBuff : public Buff +{ + public: + + virtual void Activate() override; + virtual void Deactivate() override; + +}; diff --git a/server/gameserver/constant_export.h b/server/gameserver/constant_export.h index 6a2ab35a..3dc465af 100644 --- a/server/gameserver/constant_export.h +++ b/server/gameserver/constant_export.h @@ -44,7 +44,7 @@ A8_DECLARE_ENUM(BuffEffectType_e, kBET_JumpTo = 10, //跳跃 kBET_OnceChgAttr = 11, //一次性buff kBET_Pull = 12, //拉人(主动方) - kBET_Reserve13 = 13, + kBET_ModifyAttr = 13, kBET_PlayShotAni = 14, //播放射击动画 kBET_Vertigo = 15, //眩晕 kBET_DecHp = 16, //扣血 diff --git a/server/gameserver/gungrasp.cc b/server/gameserver/gungrasp.cc index 7031cb2a..26d58237 100644 --- a/server/gameserver/gungrasp.cc +++ b/server/gameserver/gungrasp.cc @@ -50,6 +50,7 @@ struct GraspBuff for (auto& buff : grasp_triggers_) { if (buff && (buff->graspbuff_target() == BUFF_TARGET_SELF || + buff->graspbuff_target() == BUFF_TARGET_GUN || buff->graspbuff_target() == BUFF_TARGET_ENEMY)) { int buff_time = buff->GetBuffTime(gun_grasp->GetHeroLv()); int attr_num = buff->GetAttrNum(gun_grasp->GetHeroLv()); diff --git a/server/tools/protobuild/cs_proto.proto b/server/tools/protobuild/cs_proto.proto index 74172443..7d012cc1 100755 --- a/server/tools/protobuild/cs_proto.proto +++ b/server/tools/protobuild/cs_proto.proto @@ -285,6 +285,7 @@ message MFPlayerFull optional int32 emoji2 = 26; //表情2 optional int32 parachute = 27; //降落伞 repeated MFBuff buff_list = 28; //buff列表 + repeated MFEffect effect_list = 67; //特效列表 optional int32 car_uniid = 29; //载具id optional int32 car_seat = 34; //载具-座位0-3 @@ -411,6 +412,7 @@ message MFHeroFull optional bool dead = 11; //是否已死亡 repeated MFBuff buff_list = 12; //buff列表 optional float max_health = 13; //最大血量 + repeated MFEffect effect_list = 14; //特效列表 } //载具-部分 @@ -437,6 +439,7 @@ message MFCarFull optional int32 oil = 14; //当前油量 optional int32 max_oil = 15; //最大油量 optional int32 bullet_num = 16; //子弹数量 + repeated MFEffect effect_list = 18; //特效列表 /* 乘客列表(包含驾驶员) @@ -772,6 +775,13 @@ message MFBuff optional int32 buff_uniid = 5; //buff唯一id } +//effect +message MFEffect +{ + optional int32 effect_uniid = 1; //特效唯一id + optional int32 effect_id = 5; //特效id +} + //buff变更 message MFBuffChg { @@ -780,6 +790,14 @@ message MFBuffChg 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 { @@ -1292,6 +1310,7 @@ message SMUpdate optional MFAirDrop airdrop = 26; //空投 optional MFPlane plane = 27; //飞机 repeated MFBuffChg chged_buff_list = 28; //buff变更列表 + repeated MFEffectChg chged_effect_list = 51; //特效变更列表 repeated MFPropertyChg chged_property_list = 31; //property变更列表 repeated MFPlaySkill play_skill_list = 32; //播放技能 optional MFAirRaid airraid = 33; //空袭