Compare commits

...

1 Commits

Author SHA1 Message Date
bash
f70e1975c2 nullptr fix 2025-08-13 00:21:21 +02:00

View File

@@ -1017,8 +1017,10 @@ void PlayerbotFactory::ClearSkills()
}
bot->SetUInt32Value(PLAYER_SKILL_INDEX(0), 0);
bot->SetUInt32Value(PLAYER_SKILL_INDEX(1), 0);
// unlearn default race/class skills
PlayerInfo const* info = sObjectMgr->GetPlayerInfo(bot->getRace(), bot->getClass());
if (PlayerInfo const* info = sObjectMgr->GetPlayerInfo(bot->getRace(), bot->getClass()))
{
for (PlayerCreateInfoSkills::const_iterator itr = info->skills.begin(); itr != info->skills.end(); ++itr)
{
uint32 skillId = itr->SkillId;
@@ -1027,6 +1029,7 @@ void PlayerbotFactory::ClearSkills()
bot->SetSkill(skillId, 0, 0, 0);
}
}
}
void PlayerbotFactory::ClearEverything()
{