[Cleanup] Utilize ConvertSecondsToTime() method. (#1805)

* [Cleanup] Utilize ConvertSecondsToTime() method.

* Lowercase.
This commit is contained in:
Kinglykrab
2021-11-23 18:25:02 -05:00
committed by GitHub
parent 4672e48fbd
commit a11482ff23
3 changed files with 67 additions and 82 deletions
+9 -2
View File
@@ -9549,8 +9549,15 @@ bool Bot::UseDiscipline(uint32 spell_id, uint32 target) {
if(spells[spell_id].timer_id > 0 && spells[spell_id].timer_id < MAX_DISCIPLINE_TIMERS)
SetDisciplineRecastTimer(spells[spell_id].timer_id, spell.recast_time);
} else {
uint32 remain = (GetDisciplineRemainingTime(this, spells[spell_id].timer_id) / 1000);
GetOwner()->Message(Chat::White, "%s can use this discipline in %d minutes %d seconds.", GetCleanName(), (remain / 60), (remain % 60));
uint32 remaining_time = (GetDisciplineRemainingTime(this, spells[spell_id].timer_id) / 1000);
GetOwner()->Message(
Chat::White,
fmt::format(
"{} can use this discipline in {}.",
GetCleanName(),
ConvertSecondsToTime(remaining_time)
).c_str()
);
return false;
}
}