mirror of
https://github.com/mangosfour/server.git
synced 2025-12-21 10:37:06 +00:00
[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:
parent
d53fe93e9d
commit
46d740bbf4
17 changed files with 208 additions and 103 deletions
|
|
@ -4998,7 +4998,8 @@ SpellCastResult Spell::CheckCast(bool strict)
|
|||
|| m_spellInfo->EffectImplicitTargetA[i] == TARGET_GAMEOBJECT && !m_targets.getGOTarget()
|
||||
// we need a go target, or an openable item target in case of TARGET_GAMEOBJECT_ITEM
|
||||
|| m_spellInfo->EffectImplicitTargetA[i] == TARGET_GAMEOBJECT_ITEM && !m_targets.getGOTarget() &&
|
||||
(!m_targets.getItemTarget() || !m_targets.getItemTarget()->GetProto()->LockID || m_targets.getItemTarget()->GetOwner() != m_caster ) )
|
||||
(!m_targets.getItemTarget() || m_targets.getItemTarget()->GetOwner() != m_caster ||
|
||||
!m_targets.getItemTarget()->GetProto()->LockID || m_targets.getItemTarget()->HasFlag(ITEM_FIELD_FLAGS, ITEM_DYNFLAG_UNLOCKED)))
|
||||
return SPELL_FAILED_BAD_TARGETS;
|
||||
|
||||
// In BattleGround players can use only flags and banners
|
||||
|
|
@ -5721,7 +5722,7 @@ SpellCastResult Spell::CheckPower()
|
|||
bool Spell::IgnoreItemRequirements() const
|
||||
{
|
||||
/// Check if it's an enchant scroll. These have no required reagents even though their spell does.
|
||||
if (m_CastItem && m_CastItem->HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAGS_ENCHANT_SCROLL))
|
||||
if (m_CastItem && (m_CastItem->GetProto()->Flags & ITEM_FLAG_ENCHANT_SCROLL))
|
||||
return true;
|
||||
|
||||
if (m_IsTriggeredSpell)
|
||||
|
|
@ -6038,7 +6039,7 @@ SpellCastResult Spell::CheckItems()
|
|||
if(!m_targets.getItemTarget())
|
||||
return SPELL_FAILED_CANT_BE_PROSPECTED;
|
||||
// ensure item is a prospectable ore
|
||||
if(!(m_targets.getItemTarget()->GetProto()->BagFamily & BAG_FAMILY_MASK_MINING_SUPP) || m_targets.getItemTarget()->GetProto()->Class != ITEM_CLASS_TRADE_GOODS)
|
||||
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() )
|
||||
|
|
@ -6061,7 +6062,7 @@ SpellCastResult Spell::CheckItems()
|
|||
if(!m_targets.getItemTarget())
|
||||
return SPELL_FAILED_CANT_BE_MILLED;
|
||||
// ensure item is a millable herb
|
||||
if(!(m_targets.getItemTarget()->GetProto()->BagFamily & BAG_FAMILY_MASK_HERBS) || m_targets.getItemTarget()->GetProto()->Class != ITEM_CLASS_TRADE_GOODS)
|
||||
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() )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue