From 9f1def66712326f6cd7e3074f1592b2d5b0dc361 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Mon, 20 Mar 2023 17:23:16 +0800 Subject: [PATCH] 1 --- server/gameserver/buff/summon_loot.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/server/gameserver/buff/summon_loot.cc b/server/gameserver/buff/summon_loot.cc index eb9adbd5..ae8126bd 100644 --- a/server/gameserver/buff/summon_loot.cc +++ b/server/gameserver/buff/summon_loot.cc @@ -28,8 +28,10 @@ void SummonLootBuff::Activate() 1 ); Entity* e = owner->room->GetEntityByUniId(loot_uniid); - if (e) { - + if (e && e->IsEntityType(ET_Loot)) { + Loot* loot = (Loot*)e; + loot->pickup_flag = flag; + loot->master = owner->GetWeakPtrRef(); } } }