Explorar o código

Remove delayed consumption when switching types (#5949)

* Fixes #5937.
* Removed the delayed consumption flag when switching item types.
Thanks to @mazvi!
Aleos %!s(int64=4) %!d(string=hai) anos
pai
achega
ec91884ca6
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  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);