Browse Source

Remove delayed consumption when switching types (#5949)

* Fixes #5937.
* Removed the delayed consumption flag when switching item types.
Thanks to @mazvi!
Aleos 4 years ago
parent
commit
ec91884ca6
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/map/itemdb.cpp

+ 2 - 0
src/map/itemdb.cpp

@@ -102,6 +102,8 @@ uint64 ItemDatabase::parseBodyNode(const YAML::Node &node) {
 		if (constant == IT_DELAYCONSUME) { // Items that are consumed only after target confirmation
 			constant = IT_USABLE;
 			item->flag.delay_consume |= DELAYCONSUME_TEMP;
+		} else {
+			item->flag.delay_consume &= ~DELAYCONSUME_TEMP; // Remove delayed consumption flag if switching types
 		}
 
 		item->type = static_cast<item_types>(constant);