Evil Mark
Active Member
- Joined
- Nov 23, 2008
- Messages
- 1,707
- Reaction score
- 32
So I would like you to change this code a bit so that players with red skulls wont drop their loots, and that amulet of loss never dissapears, using Mystic Spirit 0.2.5 Final release, thank you.
Code:
void Player::dropLoot(Container* corpse)
{
if(corpse && lootDrop)
{
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
{
for(int32_t i = SLOT_FIRST; i < SLOT_LAST; ++i)
{
Item* item = inventory[i];
if(item)
{
if(((item->getContainer()) || random_range(1, 100) <= 10 || getSkull() == SKULL_RED))
{
g_game.internalMoveItem(this, corpse, INDEX_WHEREEVER, item, item->getItemCount(), 0);
sendRemoveInventoryItem((slots_t)i, inventory[(slots_t)i]);
}
}
}
}
}