[Bots] Move Bot Spell Loading process to constructor from calcbotstats() (#2583)

This commit is contained in:
Aeadoin 2022-11-27 11:41:10 -05:00 committed by GitHub
parent 15b2baa663
commit 9a7770377d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -405,6 +405,10 @@ Bot::Bot(uint32 botID, uint32 botOwnerCharacterID, uint32 botSpellsID, double to
bot_owner->Message(Chat::White, "&s for '%s'", BotDatabase::fail::LoadBuffs(), GetCleanName());
}
GetBotOwnerDataBuckets();
GetBotDataBuckets();
AI_AddBotSpells(GetBotSpellID());
CalcBotStats(false);
hp_regen = CalcHPRegen();
mana_regen = CalcManaRegen();
@ -9418,10 +9422,6 @@ void Bot::CalcBotStats(bool showtext) {
CalcBonuses();
GetBotOwnerDataBuckets();
GetBotDataBuckets();
AI_AddBotSpells(GetBotSpellID());
if(showtext) {
GetBotOwner()->Message(Chat::Yellow, "%s has been updated.", GetCleanName());
GetBotOwner()->Message(Chat::Yellow, "Level: %i HP: %i AC: %i Mana: %i STR: %i STA: %i DEX: %i AGI: %i INT: %i WIS: %i CHA: %i", GetLevel(), max_hp, GetAC(), max_mana, GetSTR(), GetSTA(), GetDEX(), GetAGI(), GetINT(), GetWIS(), GetCHA());