• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

TFS 1.X+ Items decaying in equipment slot -> does not update stats

Unknown Soldier

Mapping a map
Joined
Oct 30, 2010
Messages
294
Solutions
11
Reaction score
665
Hello,

I wonder if it's only me and my TFS 1.4.2, but when an item that has specified duration in items.xml, got decayed (so the duration runs out) transforming into another item (this is important), and the item is in equipment slot when it happens, the bonus stats that it gave during the working period does not disappear until player relogs. They are not properly updated.

This does not happen if item disappears completely (<attribute key="decayTo" value="0" />) for example like a sword ring. But in the case of newer Tibia items like spiritthorn ring, blister ring, sleep shawl and others, which are not completely disappearing, rather changing into non-enchanted version that gives less stats, and staying in the same eq slot when they expire, it seems to work like that.

Does somebody know fix to this issue?

Thanks in advance!

Example of an item + movement:

XML:
    <item id="24716" article="a" name="werewolf amulet"> <!-- expired-->
        <attribute key="weight" value="500" />
        <attribute key="slotType" value="necklace" />
    </item>
    <item id="24717" article="an" name="enchanted werewolf amulet"> <!-- taken-off-->
        <attribute key="weight" value="500" />
        <attribute key="slotType" value="necklace" />
        <attribute key="transformEquipTo" value="24790" />
        <attribute key="showduration" value="1" />
        <attribute key="stopduration" value="1" />
        <attribute key="showattributes" value="1" />
    </item>
    <item id="24790" article="an" name="enchanted werewolf amulet"> <!-- dressed-->
        <attribute key="weight" value="500" />
        <attribute key="slotType" value="necklace" />
        <attribute key="transformDeEquipTo" value="24717" />   
        <attribute key="armor" value="3" />
        <attribute key="absorbPercentPhysical" value="6" />
        <attribute key="decayTo" value="24716" />
        <attribute key="duration" value="3600" />
        <attribute key="showduration" value="1" />
        <attribute key="showattributes" value="1" />
    </item>

XML:
    <movevent event="Equip" itemid="24717" slot="necklace" function="onEquipItem" /> <!--Enchanted Werewolf Amulet taken-off-->
    <movevent event="Equip" itemid="24790" slot="necklace" function="onEquipItem" /> <!--Enchanted Werewolf Amulet dressed-->
    <movevent event="DeEquip" itemid="24790" slot="necklace" function="onDeEquipItem" /> <!--Enchanted Werewolf Amulet dressed-->
 
there were some changes with decay between 1.4.2 and 1.5 probably fix in commits

Thanks for the hint, I found one PR:

But it solved part of the issue. Now, the item really changes skills back to normal when it expires, but trying to wear the same item, but renewed/repaired, or even any other item of this kind, doesn't GIVE the bonuses that it is supposed to give. Moving an item into its slot doesn't change it into "working" version, you can still read "brand-new". Relog solves it.

Seems to be this one also?

@edit
Those 2 PRs solved the issue.
 
Last edited:
Back
Top