• 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 0.3.6] Possible to disable showHotkeyUseMessage?

titan22

New Member
Joined
Jul 5, 2013
Messages
15
Reaction score
2
Is there a way to disable showHotkeyUseMessage in game.cpp?

The "Using the last..." message is annoying and useless for our uses so is there a way to disable it?

Or, if possible, is there a way to disable it without source changes?

Code:
void Game::showHotkeyUseMessage(Player* player, Item* item)
{
    int32_t subType = -1;
    if(item->hasSubType() && !item->hasCharges())
        subType = item->getSubType();

    const ItemType& it = Item::items[item->getID()];
    uint32_t count = player->__getItemTypeCount(item->getID(), subType, false);

    char buffer[40 + it.name.size()];
    if(count == 1)
        sprintf(buffer, "Using the last %s...", it.name.c_str());
    else
        sprintf(buffer, "Using one of %d %s...", count, it.pluralName.c_str());

    player->sendTextMessage(MSG_INFO_DESCR, buffer);
}
 
replace:
player->sendTextMessage(MSG_INFO_DESCR, buffer);
with:
//player->sendTextMessage(MSG_INFO_DESCR, buffer);

And the message is never sent :)
 
replace:
player->sendTextMessage(MSG_INFO_DESCR, buffer);
with:
//player->sendTextMessage(MSG_INFO_DESCR, buffer);

And the message is never sent :)

is there a way to disable it without source changes?

Code:
void Game::showHotkeyUseMessage(Player* player, Item* item)
{
    int32_t subType = -1;
    if(item->hasSubType() && !item->hasCharges())
        subType = item->getSubType();

    const ItemType& it = Item::items[item->getID()];
    uint32_t count = player->__getItemTypeCount(item->getID(), subType, false);

    char buffer[40 + it.name.size()];
    if(count == 1)
        sprintf(buffer, "Using the last %s...", it.name.c_str());
    else
        sprintf(buffer, "Using one of %d %s...", count, it.pluralName.c_str());

    player->sendTextMessage(MSG_INFO_DESCR, buffer);
}
That's a source solution..

Topic:
If there is no config for it, you will have to edit sources..
 
Back
Top