diff --git a/server/gameserver/buff/callfunc.cc b/server/gameserver/buff/callfunc.cc index 8a9914eb..b78c2abd 100644 --- a/server/gameserver/buff/callfunc.cc +++ b/server/gameserver/buff/callfunc.cc @@ -1827,7 +1827,7 @@ void CallFuncBuff::RandAdd() void CallFuncBuff::ShowExplosion() { - if (owner->dead || !meta->dead_valid()) { + if (owner->dead && !meta->dead_valid()) { return; } int explosion_effect = meta->GetBuffParam2(this); diff --git a/server/gameserver/creature.cc b/server/gameserver/creature.cc index cdf06402..0025055b 100644 --- a/server/gameserver/creature.cc +++ b/server/gameserver/creature.cc @@ -3587,6 +3587,26 @@ void Creature::RemoveSurplusObstacle(int id, int num) } } +void Creature::RemoveSurplusObstacleByUniid(int obj_uniid) +{ + for (auto itr : slave_things2_) { + list_head* pos = nullptr; + list_head* next = nullptr; + float new_val = 0.0f; + bool inited = false; + list_for_each_safe(pos, next, &itr.second) { + RoomObstacle* ob = list_entry(pos, + RoomObstacle, + entry); + if (ob->GetUniId() == obj_uniid) { + ob->Destory(); + list_del_init(&ob->entry); + return; + } + } + } +} + Obstacle* Creature::InternalSummonObstacle(Buff* buff, const mt::MapThing* thing_meta, glm::vec3 dir, const glm::vec3 born_pos) { diff --git a/server/gameserver/creature.h b/server/gameserver/creature.h index 49d5624e..8dd5d980 100644 --- a/server/gameserver/creature.h +++ b/server/gameserver/creature.h @@ -300,6 +300,7 @@ class Creature : public MoveableEntity void RemoveSurplusHero(int hero_id, int num); Obstacle* SummonObstacle(Buff* buff, int id, const glm::vec3& pos, const glm::vec3& dir); void RemoveSurplusObstacle(int thing_id, int num); + void RemoveSurplusObstacleByUniid(int obj_uniid); void FillSkillCasterState(SkillCasterState* caster_state); void RecoverSkillCasterState(SkillCasterState* caster_state); CreatureWeakPtr AllocWeakPtr(); diff --git a/server/tools/protobuild/cs_proto.proto b/server/tools/protobuild/cs_proto.proto index be85b518..63f1bf02 100755 --- a/server/tools/protobuild/cs_proto.proto +++ b/server/tools/protobuild/cs_proto.proto @@ -829,6 +829,7 @@ message MFBullet optional int32 bullet_uniid = 12; //子弹唯一id optional int32 hand = 16 [default = 0]; //手 0:右手 1:左手 optional int32 duration = 21; //持续时间(单位毫秒,>0时才有意义) + optional int32 scale = 22 [default = 1]; //子弹缩放 //追踪型子弹以下字段才有意义(trace_target_uniid != 0) optional int32 trace_target_uniid = 13 [default = 0]; //不为空和0的时候表示要追踪的目标对象uniid