Ir para conteúdo

Featured Replies

Postado

tem q mudar de void p/ bool, troca sua função por essa: (recompila o projeto, não da build só não)


bool 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);

    if(player->hasCondition(CONDITION_EXHAUST, 4597))
    {
        player->sendCancelMessage("You have to wait.");
        return 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());

    if(Condition* showHotkeyExhaust = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_EXHAUST, 1000, 0, false, 4597))
        player->addCondition(showHotkeyExhaust);

    player->sendTextMessage(MSG_INFO_DESCR, buffer);
    return true;
}

 

e no arquivo game.h


void showHotkeyUseMessage(Player* player, Item* item);

 

por


bool showHotkeyUseMessage(Player* player, Item* item);

Editado por Fir3element (veja o histórico de edições)

  • Respostas 13
  • Visualizações 1.2k
  • Created
  • Última resposta

Top Posters In This Topic

Posted Images

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo