potinho
Advanced OT User
I dont know why its happening, there's something can i do to improve this? Appearly exhaust its not being applied correctly.
I've changed both EXHAUST to 3000 (3 sec) but still running slow when player will change outfit.
C++:
bool Game::playerRequestOutfit(uint32_t playerId)
{
Player* player = getPlayerByID(playerId);
if(!player || player->isRemoved())
return false;
if(player->hasCondition(CONDITION_EXHAUST, 4))
{
player->sendTextMessage(MSG_STATUS_SMALL, "You have to wait a while.");
return false;
}
if(Condition* conditionoutfit = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_EXHAUST, 300, 0, false, 4))
player->addCondition(conditionoutfit);
player->sendOutfitWindow();
return true;
}
bool Game::playerChangeOutfit(uint32_t playerId, Outfit_t outfit)
{
Player* player = getPlayerByID(playerId);
if(!player || player->isRemoved())
return false;
if(player->hasCondition(CONDITION_EXHAUST, 4))
{
player->sendTextMessage(MSG_STATUS_SMALL, "You have to wait a while.");
return false;
}
if(Condition* conditionoutfit = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_EXHAUST, 1000, 0, false, 4))
player->addCondition(conditionoutfit);
if(!player->changeOutfit(outfit, true))
return false;
player->setIdleTime(0);
if(!player->hasCondition(CONDITION_OUTFIT, -1))
internalCreatureChangeOutfit(player, outfit);
return true;
}
I've changed both EXHAUST to 3000 (3 sec) but still running slow when player will change outfit.
