mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 22:37:02 +00:00
[10689] Restore some item checkes for temporary loot case.
This commit is contained in:
parent
e219ee99bb
commit
bffc07e4bc
8 changed files with 80 additions and 64 deletions
|
|
@ -4420,7 +4420,7 @@ void Spell::EffectPickPocket(SpellEffectIndex /*eff_idx*/)
|
|||
{
|
||||
// Stealing successful
|
||||
//DEBUG_LOG("Sending loot from pickpocket");
|
||||
((Player*)m_caster)->SendLoot(unitTarget->GetGUID(),LOOT_PICKPOCKETING);
|
||||
((Player*)m_caster)->SendLoot(unitTarget->GetObjectGuid(),LOOT_PICKPOCKETING);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -7096,7 +7096,7 @@ void Spell::EffectDisEnchant(SpellEffectIndex /*eff_idx*/)
|
|||
|
||||
p_caster->UpdateCraftSkill(m_spellInfo->Id);
|
||||
|
||||
((Player*)m_caster)->SendLoot(itemTarget->GetGUID(),LOOT_DISENCHANTING);
|
||||
((Player*)m_caster)->SendLoot(itemTarget->GetObjectGuid(),LOOT_DISENCHANTING);
|
||||
|
||||
// item will be removed at disenchanting end
|
||||
}
|
||||
|
|
@ -7400,7 +7400,7 @@ void Spell::EffectSkinning(SpellEffectIndex /*eff_idx*/)
|
|||
|
||||
uint32 skill = creature->GetCreatureInfo()->GetRequiredLootSkill();
|
||||
|
||||
((Player*)m_caster)->SendLoot(creature->GetGUID(),LOOT_SKINNING);
|
||||
((Player*)m_caster)->SendLoot(creature->GetObjectGuid(),LOOT_SKINNING);
|
||||
creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_SKINNABLE);
|
||||
|
||||
int32 reqValue = targetLevel < 10 ? 0 : targetLevel < 20 ? (targetLevel-10)*10 : targetLevel*5;
|
||||
|
|
@ -7845,15 +7845,10 @@ void Spell::EffectTransmitted(SpellEffectIndex eff_idx)
|
|||
|
||||
void Spell::EffectProspecting(SpellEffectIndex /*eff_idx*/)
|
||||
{
|
||||
if (m_caster->GetTypeId() != TYPEID_PLAYER)
|
||||
if (m_caster->GetTypeId() != TYPEID_PLAYER || !itemTarget)
|
||||
return;
|
||||
|
||||
Player* p_caster = (Player*)m_caster;
|
||||
if (!itemTarget || !(itemTarget->GetProto()->Flags & ITEM_FLAG_PROSPECTABLE))
|
||||
return;
|
||||
|
||||
if (itemTarget->GetCount() < 5)
|
||||
return;
|
||||
|
||||
if (sWorld.getConfig(CONFIG_BOOL_SKILL_PROSPECTING))
|
||||
{
|
||||
|
|
@ -7867,15 +7862,10 @@ void Spell::EffectProspecting(SpellEffectIndex /*eff_idx*/)
|
|||
|
||||
void Spell::EffectMilling(SpellEffectIndex /*eff_idx*/)
|
||||
{
|
||||
if(m_caster->GetTypeId() != TYPEID_PLAYER)
|
||||
if (m_caster->GetTypeId() != TYPEID_PLAYER || !itemTarget)
|
||||
return;
|
||||
|
||||
Player* p_caster = (Player*)m_caster;
|
||||
if (!itemTarget || !(itemTarget->GetProto()->Flags & ITEM_FLAG_MILLABLE))
|
||||
return;
|
||||
|
||||
if(itemTarget->GetCount() < 5)
|
||||
return;
|
||||
|
||||
if( sWorld.getConfig(CONFIG_BOOL_SKILL_MILLING))
|
||||
{
|
||||
|
|
@ -7884,7 +7874,7 @@ void Spell::EffectMilling(SpellEffectIndex /*eff_idx*/)
|
|||
p_caster->UpdateGatherSkill(SKILL_INSCRIPTION, SkillValue, reqSkillValue);
|
||||
}
|
||||
|
||||
((Player*)m_caster)->SendLoot(itemTarget->GetGUID(), LOOT_MILLING);
|
||||
((Player*)m_caster)->SendLoot(itemTarget->GetObjectGuid(), LOOT_MILLING);
|
||||
}
|
||||
|
||||
void Spell::EffectSkill(SpellEffectIndex /*eff_idx*/)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue