Core/Items: Added custom flags field to item_template, currently 2 flag values are available
* ITEM_FLAGS_CU_DURATION_REAL_TIME determines item duration counts even if offline (replaced ugly negative duration workaround, easy to lose data when importing fresh wdb) * ITEM_FLAGS_CU_IGNORE_QUEST_STATUS quest status will not affect this item appearing in loot, currently needed for Arena Master trinket
This commit is contained in:
1 parent
b5443af772
commit
5eee40249c
7 files changed
+30
-21
No files matched your search
@@ -13665,7 +13665,7 @@ void Player::UpdateItemDuration(uint32 time, bool realtimeonly)
|
||||
Item* item = *itr;
|
||||
++itr; // current element can be erased in UpdateDuration
|
||||
|
||||
if ((realtimeonly && item->GetTemplate()->Duration < 0) || !realtimeonly)
|
||||
if (!realtimeonly || item->GetTemplate()->FlagsCu & ITEM_FLAGS_CU_DURATION_REAL_TIME)
|
||||
item->UpdateDuration(this, time);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user