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

Solved Corpse Ownership [OTX3] (Compiling)

Crevasse

惡名昭彰
Joined
Jan 13, 2017
Messages
150
Solutions
16
Reaction score
121
Location
Washington, D.C.
I've discovered an issue in this distro I'm using (OTX Server 3 - Based on TFS 1.2 (7.6/7.72 - 8.6 - 8.70/71 - 10.96)) with corpse ownership and I can't seem to solve it.

First of all, I don't want to have "corpse ownership" be in the game at all (I'm working with version 7.72). But the problem isn't just that it's in the game, but that corpse ownership lasts for like 10 minutes instead of 10 seconds.

What's worse is that if you kill a monster and then instantly relog, you can't even open it. It will say you are not the owner and then no one can open it for like 10 minutes.

Obviously this isn't optimal, and I can't find in the sources where to change this. I'm fine with compiling but I need to know where to look.

If there's a LUA work around that would be great too.
Thanks
 
Solution
Solved by blocking out the following line of code in actions.cpp

Code:
/*
        uint32_t corpseOwner = container->getCorpseOwner();
        if (container->isRewardCorpse()) {
            //only players who participated in the fight can open the corpse
            if (!player->getReward(container->getIntAttr(ITEM_ATTRIBUTE_DATE), false)) {
                return RETURNVALUE_YOUARENOTTHEOWNER;
            }
        } else if (corpseOwner != 0 && !player->canOpenCorpse(corpseOwner)) {
            return RETURNVALUE_YOUARENOTTHEOWNER;
        }
*/
On rebuild:
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

Tested in-game, problem solved.
Last edited:
Solved by blocking out the following line of code in actions.cpp

Code:
/*
        uint32_t corpseOwner = container->getCorpseOwner();
        if (container->isRewardCorpse()) {
            //only players who participated in the fight can open the corpse
            if (!player->getReward(container->getIntAttr(ITEM_ATTRIBUTE_DATE), false)) {
                return RETURNVALUE_YOUARENOTTHEOWNER;
            }
        } else if (corpseOwner != 0 && !player->canOpenCorpse(corpseOwner)) {
            return RETURNVALUE_YOUARENOTTHEOWNER;
        }
*/
On rebuild:
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

Tested in-game, problem solved.
 
Solution
Back
Top