Skip to content

Commit

Permalink
Merge branch 'main' into feature/player-onwalk-callback
Browse files Browse the repository at this point in the history
  • Loading branch information
elsongabriel authored Apr 2, 2024
2 parents df5576c + 0bb10ab commit ac08230
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion data/items/items.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34797,7 +34797,7 @@
<attribute key="showduration" value="1"/>
<attribute key="showAttributes" value="1"/>
<attribute key="absorbpercentphysical" value="10"/>
<attribute key="absorbpercentpoison" value="8"/>
<attribute key="absorbpercentenergy" value="8"/>
<attribute key="duration" value="3600"/>
<attribute key="transformdeequipto" value="16114"/>
<attribute key="decayTo" value="0"/>
Expand Down
8 changes: 3 additions & 5 deletions src/game/game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2616,12 +2616,10 @@ std::shared_ptr<Item> Game::transformItem(std::shared_ptr<Item> item, uint16_t n

auto decaying = item->getDecaying();
// If the item is decaying, we need to transform it to the new item
if (decaying > DECAYING_FALSE && item->getDuration() <= 1) {
if (decaying > DECAYING_FALSE && item->getDuration() <= 1 && newType.decayTo) {
g_logger().debug("Decay duration old type {}, transformEquipTo {}, transformDeEquipTo {}", curType.decayTo, curType.transformEquipTo, curType.transformDeEquipTo);
g_logger().debug("Decay duration new type, decayTo {}, transformEquipTo {}, transformDeEquipTo {}", newType.decayTo, newType.transformEquipTo, newType.transformDeEquipTo);
if (newType.decayTo) {
itemId = newType.decayTo;
}
g_logger().debug("Decay duration new type decayTo {}, transformEquipTo {}, transformDeEquipTo {}", newType.decayTo, newType.transformEquipTo, newType.transformDeEquipTo);
itemId = newType.decayTo;
} else if (curType.id != newType.id) {
if (newType.group != curType.group) {
item->setDefaultSubtype();
Expand Down

0 comments on commit ac08230

Please sign in to comment.