• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Fix/Patch [TFS 1.x] Monster Skulls

Sitrene

Member
Joined
Jul 25, 2022
Messages
4
Solutions
1
Reaction score
11
This fixes skulls not appearing on monsters for some versions of TFS. (Nekiro's Downgrade personally). I saw many threads about this with no fixes.

Credits @zbizu for walking me through this.

In protocolgame.cpp AddCreature() method:
C++:
msg.addByte(player->getSkullClient(otherPlayer));

Replace with:
C++:
msg.addByte(creature->getSkullClient(creature));

In player.cpp getSkullClient method:
Code:
    if (!player || player->getSkull() != SKULL_NONE) {
        return Creature::getSkullClient(creature);
    }

Replace with:
Code:
    if (!player || creature->getSkull() != SKULL_NONE) {
        return Creature::getSkullClient(creature);
    }


skulls.PNG
 
In protocolgame.cpp AddCreature() method:
msg.addByte(player->getSkullClient(otherPlayer));
Replace with:
msg.addByte(creature->getSkullClient(creature));
I recently suffered because of that for a week
This change causes a problem
If there's a team in the party, I see a green skull on them, and I'm not a member of the team.
It has been solved
C++:
msg.addByte(creature->getSkullClient(creature));
to
C++:
if (const Player* targetPlayer = creature->getPlayer()) {
    msg.addByte(player->getSkullClient(targetPlayer));
} else {
    msg.addByte(creature->getSkull());
}
enjoy
 
Back
Top