[10751] Use objectguids in item code.

Also
* Fixed unexpected container updated state after inventory load
* Make .debug getitemstate command more friendly by args.
This commit is contained in:
VladimirMangos 2010-11-19 23:43:06 +03:00
parent bbd34562a8
commit 2601022b9f
14 changed files with 173 additions and 110 deletions

View file

@ -5741,7 +5741,7 @@ bool Spell::IgnoreItemRequirements() const
{
/// Not own traded item (in trader trade slot) req. reagents including triggered spell case
if (Item* targetItem = m_targets.getItemTarget())
if (targetItem->GetOwnerGUID() != m_caster->GetGUID())
if (targetItem->GetOwnerGuid() != m_caster->GetObjectGuid())
return false;
return true;
@ -6032,7 +6032,7 @@ SpellCastResult Spell::CheckItems()
return SPELL_FAILED_CANT_BE_DISENCHANTED;
// prevent disenchanting in trade slot
if( m_targets.getItemTarget()->GetOwnerGUID() != m_caster->GetGUID() )
if( m_targets.getItemTarget()->GetOwnerGuid() != m_caster->GetObjectGuid() )
return SPELL_FAILED_CANT_BE_DISENCHANTED;
ItemPrototype const* itemProto = m_targets.getItemTarget()->GetProto();
@ -6057,7 +6057,7 @@ SpellCastResult Spell::CheckItems()
if (!(m_targets.getItemTarget()->GetProto()->Flags & ITEM_FLAG_PROSPECTABLE))
return SPELL_FAILED_CANT_BE_PROSPECTED;
// prevent prospecting in trade slot
if (m_targets.getItemTarget()->GetOwnerGUID() != m_caster->GetGUID())
if (m_targets.getItemTarget()->GetOwnerGuid() != m_caster->GetObjectGuid())
return SPELL_FAILED_CANT_BE_PROSPECTED;
// Check for enough skill in jewelcrafting
uint32 item_prospectingskilllevel = m_targets.getItemTarget()->GetProto()->RequiredSkillRank;
@ -6080,7 +6080,7 @@ SpellCastResult Spell::CheckItems()
if (!(m_targets.getItemTarget()->GetProto()->Flags & ITEM_FLAG_MILLABLE))
return SPELL_FAILED_CANT_BE_MILLED;
// prevent milling in trade slot
if (m_targets.getItemTarget()->GetOwnerGUID() != m_caster->GetGUID())
if (m_targets.getItemTarget()->GetOwnerGuid() != m_caster->GetObjectGuid())
return SPELL_FAILED_CANT_BE_MILLED;
// Check for enough skill in inscription
uint32 item_millingskilllevel = m_targets.getItemTarget()->GetProto()->RequiredSkillRank;