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

TFS 1.X+ summon no body upon death

leik meris

Active Member
Joined
Feb 17, 2010
Messages
104
Reaction score
40
Hello everyone, I have a problem. When I kill a summon, it doesn't drop a body. Does anyone know the option to make it drop a body? Thank you very much.

I use TFS 1.5 with Nekiro's downgrade.
 
Solution
setDropLoot set to false causes corpse to not be created, you'll have to fix up the logic. Just remember its tied to actual items dropping, so if you set this to true, your summons will drop items.

what about this logic?

C:
bool Creature::dropCorpse(Creature* lastHitCreature, Creature* mostDamageCreature, bool lastHitUnjustified, bool mostDamageUnjustified)
{
        Item* splash;
        switch (getRace()) {
            case RACE_VENOM:
                splash = Item::CreateItem(ITEM_FULLSPLASH, FLUID_SLIME);
                break;

            case RACE_BLOOD:
                splash =...
setDropLoot set to false causes corpse to not be created, you'll have to fix up the logic. Just remember its tied to actual items dropping, so if you set this to true, your summons will drop items.

Or in creaturescripts on kill retrieve the corpseID from monster and create it on position upon death?
 
setDropLoot set to false causes corpse to not be created, you'll have to fix up the logic. Just remember its tied to actual items dropping, so if you set this to true, your summons will drop items.

what about this logic?

C:
bool Creature::dropCorpse(Creature* lastHitCreature, Creature* mostDamageCreature, bool lastHitUnjustified, bool mostDamageUnjustified)
{
        Item* splash;
        switch (getRace()) {
            case RACE_VENOM:
                splash = Item::CreateItem(ITEM_FULLSPLASH, FLUID_SLIME);
                break;

            case RACE_BLOOD:
                splash = Item::CreateItem(ITEM_FULLSPLASH, FLUID_BLOOD);
                break;

            default:
                splash = nullptr;
                break;
        }

        Tile* tile = getTile();

        if (splash) {
            g_game.internalAddItem(tile, splash, INDEX_WHEREEVER, FLAG_NOLIMIT);
            g_game.startDecay(splash);
        }

        Item* corpse = getCorpse(lastHitCreature, mostDamageCreature);
        if (corpse) {
            g_game.internalAddItem(tile, corpse, INDEX_WHEREEVER, FLAG_NOLIMIT);
            g_game.startDecay(corpse);
        }

        //scripting event - onDeath
        for (CreatureEvent* deathEvent : getCreatureEvents(CREATURE_EVENT_DEATH)) {
            deathEvent->executeOnDeath(this, corpse, lastHitCreature, mostDamageCreature, lastHitUnjustified, mostDamageUnjustified);
        }

        if (corpse && lootDrop && !master) { // changes here
            dropLoot(corpse->getContainer(), lastHitCreature);
        }
       
    return true;
}
 
Solution
what about this logic?

C:
bool Creature::dropCorpse(Creature* lastHitCreature, Creature* mostDamageCreature, bool lastHitUnjustified, bool mostDamageUnjustified)
{
        Item* splash;
        switch (getRace()) {
            case RACE_VENOM:
                splash = Item::CreateItem(ITEM_FULLSPLASH, FLUID_SLIME);
                break;

            case RACE_BLOOD:
                splash = Item::CreateItem(ITEM_FULLSPLASH, FLUID_BLOOD);
                break;

            default:
                splash = nullptr;
                break;
        }

        Tile* tile = getTile();

        if (splash) {
            g_game.internalAddItem(tile, splash, INDEX_WHEREEVER, FLAG_NOLIMIT);
            g_game.startDecay(splash);
        }

        Item* corpse = getCorpse(lastHitCreature, mostDamageCreature);
        if (corpse) {
            g_game.internalAddItem(tile, corpse, INDEX_WHEREEVER, FLAG_NOLIMIT);
            g_game.startDecay(corpse);
        }

        //scripting event - onDeath
        for (CreatureEvent* deathEvent : getCreatureEvents(CREATURE_EVENT_DEATH)) {
            deathEvent->executeOnDeath(this, corpse, lastHitCreature, mostDamageCreature, lastHitUnjustified, mostDamageUnjustified);
        }

        if (corpse && lootDrop && !master) { // changes here
            dropLoot(corpse->getContainer(), lastHitCreature);
        }
      
    return true;
}
Works?
 
Back
Top