aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells/Spell.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Spells/Spell.cpp')
-rw-r--r--src/server/game/Spells/Spell.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index d6f252695c3..fe7a1e12e06 100644
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -1659,7 +1659,8 @@ void Spell::SelectImplicitCasterObjectTargets(SpellEffectInfo const& spellEffect
break;
case TARGET_UNIT_TARGET_TAP_LIST:
if (Creature* creatureCaster = m_caster->ToCreature())
- target = creatureCaster->GetLootRecipient();
+ if (!creatureCaster->GetTapList().empty())
+ target = ObjectAccessor::GetWorldObject(*creatureCaster, Trinity::Containers::SelectRandomContainerElement(creatureCaster->GetTapList()));
break;
case TARGET_UNIT_OWN_CRITTER:
if (Unit const* unitCaster = m_caster->ToUnit())
@@ -2857,8 +2858,8 @@ void Spell::TargetInfo::DoDamageAndTriggers(Spell* spell)
if (spell->m_spellInfo->HasAttribute(SPELL_ATTR6_TAPS_IMMEDIATELY))
if (Creature* targetCreature = unit->ToCreature())
- if (!targetCreature->hasLootRecipient() && unitCaster->IsPlayer())
- targetCreature->SetLootRecipient(unitCaster);
+ if (unitCaster->IsPlayer())
+ targetCreature->SetTappedBy(unitCaster);
}
if (!spell->m_spellInfo->HasAttribute(SPELL_ATTR3_DO_NOT_TRIGGER_TARGET_STAND) && !unit->IsStandState())
@@ -5998,7 +5999,7 @@ SpellCastResult Spell::CheckCast(bool strict, int32* param1 /*= nullptr*/, int32
Creature* creature = m_targets.GetUnitTarget()->ToCreature();
Loot* loot = creature->GetLootForPlayer(m_caster->ToPlayer());
- if (loot && !loot->isLooted())
+ if (loot && (!loot->isLooted() || loot->loot_type == LOOT_SKINNING))
return SPELL_FAILED_TARGET_NOT_LOOTED;
uint32 skill = creature->GetCreatureTemplate()->GetRequiredLootSkill();