SHOVA wrote...
I think this was fixed with 1.69, or one of the expansions. I suggest updating your mod event scripts to the latest. The on client leave, on client enter. that is where the fix should be.
it wasn't its not a bug per see, rather than PW issue, reason why this is happening is that temporary itemproperties have a timestamp when created which tell the game when they should be removed, the problem arise when the PW module restart -> this reset clocks to toolset default date which is way lower than date of itemproperties expiration
persistent time should fix it, if not try this piece of code in your OnClientEnter script:
this should go above void main()
void removeAllTempEffect(object oItem)
{
itemproperty ip = GetFirstItemProperty(oItem);
while(GetIsItemPropertyValid(ip))
{
if(GetItemPropertyDurationType(ip) == DURATION_TYPE_TEMPORARY)
{
RemoveItemProperty(oItem, ip);
}
ip = GetNextItemProperty(oItem);
}
}
void removeEffectFromWeapons(object oPC) {
removeAllTempEffect(GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,oPC));
removeAllTempEffect(GetItemInSlot(INVENTORY_SLOT_LEFTHAND,oPC));
removeAllTempEffect(GetItemInSlot(INVENTORY_SLOT_CHEST,oPC));
removeAllTempEffect(GetItemInSlot(INVENTORY_SLOT_CARMOUR,oPC));
// remove effect also from all item in invertory
object oItem = GetFirstItemInInventory(oPC);
while (oItem != OBJECT_INVALID) {
removeAllTempEffect(oItem);
oItem = GetNextItemInInventory(oPC);
}
}
this somwhere inside:
removeEffectFromWeapons(GetEnteringObject());