mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 10:37:02 +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
|
|
@ -10748,10 +10748,10 @@ uint8 Player::CanUseItem( ItemPrototype const *pProto ) const
|
|||
|
||||
if( pProto )
|
||||
{
|
||||
if ((pProto->Flags2 & ITEM_FLAGS2_HORDE_ONLY) && GetTeam() != HORDE)
|
||||
if ((pProto->Flags2 & ITEM_FLAG2_HORDE_ONLY) && GetTeam() != HORDE)
|
||||
return EQUIP_ERR_YOU_CAN_NEVER_USE_THAT_ITEM;
|
||||
|
||||
if ((pProto->Flags2 & ITEM_FLAGS2_ALLIANCE_ONLY) && GetTeam() != ALLIANCE)
|
||||
if ((pProto->Flags2 & ITEM_FLAG2_ALLIANCE_ONLY) && GetTeam() != ALLIANCE)
|
||||
return EQUIP_ERR_YOU_CAN_NEVER_USE_THAT_ITEM;
|
||||
|
||||
if ((pProto->AllowableClass & getClassMask()) == 0 || (pProto->AllowableRace & getRaceMask()) == 0)
|
||||
|
|
@ -11306,7 +11306,7 @@ void Player::DestroyItem( uint8 bag, uint8 slot, bool update )
|
|||
DestroyItem(slot, i, update);
|
||||
}
|
||||
|
||||
if(pItem->HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAGS_WRAPPED))
|
||||
if (pItem->HasFlag(ITEM_FIELD_FLAGS, ITEM_DYNFLAG_WRAPPED))
|
||||
CharacterDatabase.PExecute("DELETE FROM character_gifts WHERE item_guid = '%u'", pItem->GetGUIDLow());
|
||||
|
||||
RemoveEnchantmentDurations(pItem);
|
||||
|
|
@ -15897,7 +15897,7 @@ void Player::_LoadInventory(QueryResult *result, uint32 timediff)
|
|||
}
|
||||
|
||||
// "Conjured items disappear if you are logged out for more than 15 minutes"
|
||||
if (timediff > 15*MINUTE && item->HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAGS_CONJURED))
|
||||
if (timediff > 15*MINUTE && (item->GetProto()->Flags & ITEM_FLAG_CONJURED))
|
||||
{
|
||||
CharacterDatabase.PExecute("DELETE FROM character_inventory WHERE item = '%u'", item_guid);
|
||||
item->FSetState(ITEM_REMOVED);
|
||||
|
|
@ -18682,7 +18682,7 @@ bool Player::BuyItemFromVendorSlot(uint64 vendorguid, uint32 vendorslot, uint32
|
|||
}
|
||||
}
|
||||
|
||||
uint32 price = (crItem->ExtendedCost == 0 || pProto->Flags2 & ITEM_FLAGS2_EXT_COST_REQUIRES_GOLD) ? pProto->BuyPrice * count : 0;
|
||||
uint32 price = (crItem->ExtendedCost == 0 || pProto->Flags2 & ITEM_FLAG2_EXT_COST_REQUIRES_GOLD) ? pProto->BuyPrice * count : 0;
|
||||
|
||||
// reputation discount
|
||||
if (price)
|
||||
|
|
@ -19677,7 +19677,7 @@ void Player::SendInstanceResetWarning( uint32 mapid, Difficulty difficulty, uint
|
|||
|
||||
void Player::ApplyEquipCooldown( Item * pItem )
|
||||
{
|
||||
if (pItem->HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAGS_NO_EQUIP_COOLDOWN))
|
||||
if (pItem->GetProto()->Flags & ITEM_FLAG_NO_EQUIP_COOLDOWN)
|
||||
return;
|
||||
|
||||
for(int i = 0; i < MAX_ITEM_PROTO_SPELLS; ++i)
|
||||
|
|
@ -21310,7 +21310,7 @@ uint8 Player::CanEquipUniqueItem(Item* pItem, uint8 eslot, uint32 limit_count) c
|
|||
uint8 Player::CanEquipUniqueItem( ItemPrototype const* itemProto, uint8 except_slot, uint32 limit_count) const
|
||||
{
|
||||
// check unique-equipped on item
|
||||
if (itemProto->Flags & ITEM_FLAGS_UNIQUE_EQUIPPED)
|
||||
if (itemProto->Flags & ITEM_FLAG_UNIQUE_EQUIPPED)
|
||||
{
|
||||
// there is an equip limit on this item
|
||||
if(HasItemOrGemWithIdEquipped(itemProto->ItemId,1,except_slot))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue