From b007732beadb0193d5107e1144bf113819df2444 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Mon, 12 Apr 2021 16:52:52 +0800 Subject: [PATCH] 1 --- server/gameserver/constant.h | 3 ++- server/gameserver/human.cc | 8 +++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/server/gameserver/constant.h b/server/gameserver/constant.h index b72db83..077ff4a 100755 --- a/server/gameserver/constant.h +++ b/server/gameserver/constant.h @@ -169,6 +169,7 @@ enum BuffEffectType_e kBET_InWater = 57, //在水里 kBET_InIce = 58, //在冰里 kBET_BatchAddBuff = 60, //批量添加buff + kBET_BeRecycle = 61, //待回收 kBET_End }; @@ -467,5 +468,5 @@ const int kRecoilBuffId = 7005; const int kInGrassBuffId = 7006; const int kInWaterBuffId = 7007; const int kInIceBuffId = 7008; - +const int kBeRecycleBuffId = 7009; const float DEFAULT_FLY_DISTANCE = 5.0f; diff --git a/server/gameserver/human.cc b/server/gameserver/human.cc index c0ffbde..d6fe8f5 100644 --- a/server/gameserver/human.cc +++ b/server/gameserver/human.cc @@ -1054,6 +1054,9 @@ void Human::DoJump() MustBeAddBuff(this, JUMP_BUFFID); jump_frameno_ = room->GetFrameNo(); SyncAroundPlayers(__FILE__, __LINE__, __func__); + if (IsAndroid() && team_uuid.empty()) { + MustBeAddBuff(this, kBeRecycleBuffId); + } } } @@ -2631,7 +2634,9 @@ Skin* Human::GetSkinByIdx(int idx) void Human::AddBuffPostProc(Creature* caster, Buff* buff) { - room->frame_event.AddBuff(this, buff); + if (!buff->meta->i->only_server()) { + room->frame_event.AddBuff(this, buff); + } } int Human::GetItemNum(int item_id) @@ -3389,3 +3394,4 @@ void Human::GetHitAabbBox(AabbCollider& aabb_box) aabb_box._max.y = GetHitRadius(); } } +