SirTitan
Member
with the newest trunk version of the tfs the AOL dident worked.
Nor the preventLoss atribute in the items.xml.
I just copyed some parts from another tfs version.
here is the fix:
open const.h
and add after:
in player.cpp find corpse drop function
and add after it
add at end of this function another }
look here:
the credits goes to tfs development team i just used ther code.
add to movements.xml
Ty @Elf, cuz i forgot about movements
Nor the preventLoss atribute in the items.xml.
I just copyed some parts from another tfs version.
here is the fix:
open const.h
and add after:
Code:
ITEM_LABEL = 2599,
Code:
ITEM_AMULETOFLOSS = 2173,
in player.cpp find corpse drop function
Code:
if(corpse && lootDrop)
{
Code:
if(inventory[SLOT_NECKLACE] && inventory[SLOT_NECKLACE]->getID() == ITEM_AMULETOFLOSS &&
getSkull() != SKULL_RED && g_game.getWorldType() != WORLD_TYPE_PVP_ENFORCED)
{
g_game.internalRemoveItem(inventory[SLOT_NECKLACE], 1);
}
else
{
look here:
Code:
sendRemoveInventoryItem((slots_t)i, inventory[(slots_t)i]);
}
}
}
}
}
}
the credits goes to tfs development team i just used ther code.
add to movements.xml
Code:
<movevent event="Equip" itemid="2173" slot="necklace" function="onEquipItem"/>
<movevent event="DeEquip" itemid="2173" slot="necklace" function="onDeEquipItem"/>
Last edited: