[9636] Move item real-time/in-game duration counting flag to new extraflags field.

Client expected only positive duration values, so stop use duration field as signed.
This commit is contained in:
VladimirMangos 2010-03-29 09:48:38 +04:00
parent 8e25d43443
commit d7c1e06d1b
11 changed files with 62 additions and 29 deletions

View file

@ -3650,7 +3650,7 @@ void Spell::TakeCastItem()
// item has limited charges
if (proto->Spells[i].SpellCharges)
{
if (proto->Spells[i].SpellCharges < 0 && !proto->NonConsumable)
if (proto->Spells[i].SpellCharges < 0 && !(proto->ExtraFlags & ITEM_EXTRA_NON_CONSUMABLE))
expendable = true;
int32 charges = m_CastItem->GetSpellCharges(i);
@ -5557,7 +5557,7 @@ SpellCastResult Spell::CheckItems()
{
// CastItem will be used up and does not count as reagent
int32 charges = m_CastItem->GetSpellCharges(s);
if (proto->Spells[s].SpellCharges < 0 && !proto->NonConsumable && abs(charges) < 2)
if (proto->Spells[s].SpellCharges < 0 && !(proto->ExtraFlags & ITEM_EXTRA_NON_CONSUMABLE) && abs(charges) < 2)
{
++itemcount;
break;