From 133334a902b705dae6f7e92bb1009b84cf1c51d2 Mon Sep 17 00:00:00 2001 From: Shauren Date: Mon, 17 Oct 2022 23:11:46 +0200 Subject: Core/Loot: Implemented personal loot and tag sharing for non-boss loot --- src/server/game/Spells/SpellEffects.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/server/game/Spells/SpellEffects.cpp') diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index e4e9179dc37..b09841cac2a 100644 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -3733,12 +3733,12 @@ void Spell::EffectSkinning() uint32 skill = creature->GetCreatureTemplate()->GetRequiredLootSkill(); - creature->RemoveUnitFlag(UNIT_FLAG_SKINNABLE); + creature->SetUnitFlag3(UNIT_FLAG3_ALREADY_SKINNED); creature->SetDynamicFlag(UNIT_DYNFLAG_LOOTABLE); - creature->m_loot.reset(new Loot(creature->GetMap(), creature->GetGUID(), LOOT_SKINNING, nullptr)); - creature->m_loot->FillLoot(creature->GetCreatureTemplate()->SkinLootId, LootTemplates_Skinning, player, true); - creature->SetLootRecipient(player, false); - player->SendLoot(*creature->m_loot); + Loot* loot = new Loot(creature->GetMap(), creature->GetGUID(), LOOT_SKINNING, nullptr); + creature->m_personalLoot[player->GetGUID()].reset(loot); + loot->FillLoot(creature->GetCreatureTemplate()->SkinLootId, LootTemplates_Skinning, player, true); + player->SendLoot(*loot); if (skill == SKILL_SKINNING) { -- cgit v1.2.3