Durable: reset durability when overstacked items are broken

this is not really defined behaviour, but it makes more sense than the current behaviour, which makes the tool unbreakable unintentionally.

fixes #5378
This commit is contained in:
Dylan K. Taylor 2022-11-02 15:42:44 +00:00
parent 1572b31b8d
commit fe982c697b
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -109,6 +109,7 @@ abstract class Durable extends Item{
*/
protected function onBroken() : void{
$this->pop();
$this->setDamage(0); //the stack size may be greater than 1 if overstacked by a plugin
}
/**