• 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!

How to remove preview loot from monsters

mengueh

Newbie
Joined
May 5, 2013
Messages
64
Reaction score
5
Hello,

I'm trying to remove the message loot when someone kills a monster. For exemplo: Loot from a rat: ...
I want to remove it, could you help me? :D
 
C++:
void MonsterType::createLoot(Container* corpse)
{
    if (g_config.getNumber(ConfigManager::RATE_LOOT) == 0) {
        corpse->startDecaying();
        return;
    }

    Player* owner = g_game.getPlayerByID(corpse->getCorpseOwner());
    if (!owner || owner->getStaminaMinutes() > 840) {
        for (auto it = info.lootItems.rbegin(), end = info.lootItems.rend(); it != end; ++it) {
            auto itemList = createLootItem(*it);
            if (itemList.empty()) {
                continue;
            }

            for (Item* item : itemList) {
                //check containers
                if (Container* container = item->getContainer()) {
                    if (!createLootContainer(container, *it)) {
                        delete container;
                        continue;
                    }
                }

                if (g_game.internalAddItem(corpse, item) != RETURNVALUE_NOERROR) {
                    corpse->internalAddThing(item);
                }
            }
        }
    }
    corpse->startDecaying();
}
 
Back
Top