Closed beats-dh closed 2 years ago
Only issue I see is that magic light wand timer is getting renewed each time we turn it off. I dont know if theres another item like this. (probably torches etc) https://gfycat.com/linedtintedhoopoe
Before this pr it was also like this.
Only issue I see is that magic light wand timer is getting renewed each time we turn it off. I dont know if theres another item like this. (probably torches etc) https://gfycat.com/linedtintedhoopoe
Before this pr it was also like this.
Fixed.
Co-Authored-By: Jakub @SaiyansKing jakubkubina@hotmail.com From: https://github.com/opentibiabr/optimized_forgottenserver/tree/master
Reworked the decay, so the problems with the CPU spike are over, as well as other problems with the decay, like some items resetting the duration when equip/deequip.
New functions: Game::stopDecay(item) Container::stopDecaying() DepotChest::isRemoved() DepotLocker::isRemoved() Inbox::isRemoved() Item::stopDecaying()
From function: decreaseDuration(time) To: setDurationTimestamp(timestamp)
New file decay.cpp/h Decay::startDecay(item, duration) Decay::stopDecay(item, timestamp) Decay::checkDecay()
New attribute: ITEM_ATTRIBUTE_DURATION_TIMESTAMP