[10641] Fixed use item dynamic/item proto flags.

* List its independelty. Each from this 2 fields have own flags. Cleanup lists.
* Not copy proto flags to item flags update field. This fix heroic item versions
  show in client in result mixed use ITEM_DYNFLAG_WRAPPED (0x8) with ITEM_FLAG_HEROIC (0x8)
* Update uses to proto case use for some cases where before wrongly has been used item dyn.flags
* For ITEM_DYNFLAG_UNLOCKED (0x4) set for item at unlock and check for prevent re-unlocking.
  This mostly for future case when will be implemented partly loting items support.
* For ITEM_FLAG_LOOTABLE (0x4) check loot absent or conflicting setting with containers/casted at use items.
  Report wrong cases art loading.
* Better check related loot tables content using ITEM_FLAG_PROSPECTABLE and ITEM_FLAG_MILLABLE
This commit is contained in:
VladimirMangos 2010-10-24 20:31:50 +04:00
parent d53fe93e9d
commit 46d740bbf4
17 changed files with 208 additions and 103 deletions

View file

@ -3824,6 +3824,10 @@ void Spell::EffectOpenLock(SpellEffectIndex eff_idx)
return;
}
// mark item as unlocked
if (itemTarget)
itemTarget->SetFlag(ITEM_FIELD_FLAGS, ITEM_DYNFLAG_UNLOCKED);
SendLoot(guid, LOOT_SKINNING);
// not allow use skill grow at item base open
@ -7851,17 +7855,17 @@ void Spell::EffectTransmitted(SpellEffectIndex eff_idx)
void Spell::EffectProspecting(SpellEffectIndex /*eff_idx*/)
{
if(m_caster->GetTypeId() != TYPEID_PLAYER)
if (m_caster->GetTypeId() != TYPEID_PLAYER)
return;
Player* p_caster = (Player*)m_caster;
if(!itemTarget || !(itemTarget->GetProto()->BagFamily & BAG_FAMILY_MASK_MINING_SUPP))
if (!itemTarget || !(itemTarget->GetProto()->Flags & ITEM_FLAG_PROSPECTABLE))
return;
if(itemTarget->GetCount() < 5)
if (itemTarget->GetCount() < 5)
return;
if( sWorld.getConfig(CONFIG_BOOL_SKILL_PROSPECTING))
if (sWorld.getConfig(CONFIG_BOOL_SKILL_PROSPECTING))
{
uint32 SkillValue = p_caster->GetPureSkillValue(SKILL_JEWELCRAFTING);
uint32 reqSkillValue = itemTarget->GetProto()->RequiredSkillRank;
@ -7877,7 +7881,7 @@ void Spell::EffectMilling(SpellEffectIndex /*eff_idx*/)
return;
Player* p_caster = (Player*)m_caster;
if(!itemTarget || !(itemTarget->GetProto()->BagFamily & BAG_FAMILY_MASK_HERBS))
if (!itemTarget || !(itemTarget->GetProto()->Flags & ITEM_FLAG_MILLABLE))
return;
if(itemTarget->GetCount() < 5)