I needed this too, it should work for you too, you'll have to adjust the numbers because I have different cooldowns,
first go to enums.h
add CONDITION_EMOTESPELLEXHAUST to the bottom of ConditionType_t table:
Code:
CONDITION_EXHAUST_COMBAT = 1 << 23, // unused
CONDITION_EXHAUST_HEAL = 1 << 24, // unused
CONDITION_PACIFIED = 1 << 25,
CONDITION_SPELLCOOLDOWN = 1 << 26,
CONDITION_SPELLGROUPCOOLDOWN = 1 << 27,
CONDITION_EMOTESPELLEXHAUST = 1 << 28,
add to conditions.cpp:
by case CONDITION_MUTED add case CONDITION_EMOTESPELLEXHAUST:
Code:
case CONDITION_EXHAUST_COMBAT:
case CONDITION_EXHAUST_BUFF:
case CONDITION_EXHAUST_HEAL:
case CONDITION_MUTED:
case CONDITION_EMOTESPELLEXHAUST:
and game.cpp, mine looked like this:
Code:
if (result == TALKACTION_BREAK) {
if (!g_config.getBoolean(ConfigManager::EMOTE_SPELLS)) {
return internalCreatureSay(player, TALKTYPE_SAY, words, false);
} else {
return internalCreatureSay(player, TALKTYPE_MONSTER_SAY, words, false);
}
} else if (result == TALKACTION_FAILED) {
return true;
}
I changed it to this:
Code:
if (result == TALKACTION_BREAK) {
if (!player->hasCondition(CONDITION_EMOTESPELLEXHAUST)) {
Condition* condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_EMOTESPELLEXHAUST, 4000, 0);
player->addCondition(condition);
return internalCreatureSay(player, TALKTYPE_MONSTER_SAY, words, false);
} else {
if (player->getCondition(CONDITION_EMOTESPELLEXHAUST)->getTicks() >= 4000) {
return true;
}
else {
player->getCondition(CONDITION_EMOTESPELLEXHAUST)->setTicks(std::min(7000, 2500 + player->getCondition(CONDITION_EMOTESPELLEXHAUST)->getTicks()));
return internalCreatureSay(player, TALKTYPE_MONSTER_SAY, words, false);
}
}
} else if (result == TALKACTION_FAILED) {
return true;
}
I'm not sure about the differences between 1.2 and 1.3