Well this is the dropLoot() function located inside Player.cpp file
I need to fix it so it only drops the backpacks 100% of the time but never drop equipment.
I'd do it myself but as i suck at c++ im afraid of fucking the script up.
Thnx in advance
Kird~
Code:
void Player::dropLoot(Container* corpse)
{
if(!corpse || lootDrop != LOOT_DROP_FULL)
return;
uint32_t start = g_config.getNumber(ConfigManager::BLESS_REDUCTION_BASE), loss = lossPercent[LOSS_CONTAINERS], bless = getBlessings();
while(bless > 0 && loss > 0)
{
loss -= start;
start -= g_config.getNumber(ConfigManager::BLESS_REDUCTION_DECREAMENT);
bless--;
}
uint32_t itemLoss = (uint32_t)std::floor((5. + loss) * lossPercent[LOSS_ITEMS] / 1000.);
for(int32_t i = SLOT_FIRST; i < SLOT_LAST; ++i)
{
Item* item = inventory[i];
if(!item)
continue;
uint32_t rand = random_range(1, 100);
if(skull > SKULL_WHITE || (item->getContainer() && rand < loss) || (!item->getContainer() && rand < itemLoss))
{
g_game.internalMoveItem(NULL, this, corpse, INDEX_WHEREEVER, item, item->getItemCount(), 0);
sendRemoveInventoryItem((slots_t)i, inventory[(slots_t)i]);
}
}
}
I'd do it myself but as i suck at c++ im afraid of fucking the script up.
Thnx in advance
Kird~