diff --git a/server/gameserver/creature.cc b/server/gameserver/creature.cc index be2d3ee..fcb1a46 100644 --- a/server/gameserver/creature.cc +++ b/server/gameserver/creature.cc @@ -299,12 +299,10 @@ void Creature::TryAddBuff(Creature* caster, int buff_id) void Creature::RemoveBuffById(int buff_id) { - a8::XPrintf("RemoveBuffById :%d\n", {buff_id}); std::vector> removed_buffs; for (auto itr = buff_list_.begin(); itr != buff_list_.end(); ++itr) { Buff& buff = *itr; if (buff.meta->i->buff_id() == buff_id) { - a8::XPrintf("RemoveBuffById2 :%d\n", {buff_id}); removed_buffs.push_back(std::make_tuple(buff.meta, buff.GetCaster().Get())); OnBuffRemove(buff); buff.UnInit(); diff --git a/server/gameserver/creature.h b/server/gameserver/creature.h index 06dfd2d..02f0008 100644 --- a/server/gameserver/creature.h +++ b/server/gameserver/creature.h @@ -263,6 +263,7 @@ private: float skill_distance_ = 0.0f; std::map skill_hash_; std::map passive_skill_hash_; + std::map buff_interval_hash_; std::array inventory_ = {}; friend class Skill; friend class Trigger; diff --git a/server/tools/protobuild/cs_proto.proto b/server/tools/protobuild/cs_proto.proto index 4ed7870..8be3693 100755 --- a/server/tools/protobuild/cs_proto.proto +++ b/server/tools/protobuild/cs_proto.proto @@ -144,6 +144,15 @@ message MFPropertyChg optional float value = 4; //属性值 } + +//碰撞体 +message MFCollider +{ + optional int32 shape = 1; //形状 1:矩形 2:圆形(当是圆形的时候width=eight) + optional int32 width = 2; //宽度 + optional int32 height = 3; //高度 +} + //地图物件 message MFMapObject { @@ -285,6 +294,7 @@ message MFObstacleFull optional float door_height = 28; //门高度 optional int32 door_open_times = 29; //门开启次数,每次开/关 ++times 0:客户端自动开 optional string button_name = 30; //按钮名(不为空是显示按钮,靠近时显示) + optional MFCollider collider = 31; //碰撞体(有值的时候读取没值的时候还是读取配置表里的碰撞) } //建筑物-部分 diff --git a/server/tools/protobuild/metatable.proto b/server/tools/protobuild/metatable.proto index 7deb0dd..3ecda62 100755 --- a/server/tools/protobuild/metatable.proto +++ b/server/tools/protobuild/metatable.proto @@ -251,6 +251,7 @@ message Buff optional string child_buff = 17; optional int32 coexist_num = 18; optional int32 dead_valid = 23; + optional int32 buff_interval = 24; } message Drop