mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-19 13:28:25 +00:00
fix AA loading and expansionbitmask saving/loading
This commit is contained in:
+3
-4
@@ -248,12 +248,12 @@ Bot::Bot(
|
||||
|
||||
database.botdb.LoadTimers(this);
|
||||
|
||||
LoadAAs();
|
||||
|
||||
LoadDefaultBotSettings();
|
||||
|
||||
database.botdb.LoadBotSettings(this);
|
||||
|
||||
LoadAAs();
|
||||
|
||||
if (database.botdb.LoadBuffs(this)) {
|
||||
//reapply some buffs
|
||||
uint32 buff_count = GetMaxBuffSlots();
|
||||
@@ -1258,7 +1258,6 @@ int32 Bot::GenerateBaseHitPoints() {
|
||||
}
|
||||
|
||||
void Bot::LoadAAs() {
|
||||
|
||||
aa_ranks.clear();
|
||||
|
||||
int id = 0;
|
||||
@@ -10213,7 +10212,7 @@ void Bot::LoadDefaultBotSettings() {
|
||||
|
||||
uint8 botStance = GetBotStance();
|
||||
|
||||
for (uint16 i = BotBaseSettings::START; i <= BotBaseSettings::END; ++i) {
|
||||
for (uint16 i = BotBaseSettings::START_ALL; i <= BotBaseSettings::END; ++i) {
|
||||
SetBotBaseSetting(i, GetDefaultSetting(BotSettingCategories::BaseSetting, i, botStance));
|
||||
LogBotSettingsDetail("{} says, 'Setting default {} [{}] to [{}]'", GetCleanName(), GetBotSettingCategoryName(i), i, GetDefaultBotBaseSetting(i, botStance)); //deleteme
|
||||
}
|
||||
|
||||
@@ -142,6 +142,7 @@ namespace BotBaseSettings {
|
||||
constexpr uint16 HPWhenToMed = 12;
|
||||
constexpr uint16 ManaWhenToMed = 13;
|
||||
|
||||
constexpr uint16 START_ALL = ExpansionBitmask;
|
||||
constexpr uint16 START = BotBaseSettings::ShowHelm; // Everything above this cannot be copied, changed or viewed by players
|
||||
constexpr uint16 END = BotBaseSettings::ManaWhenToMed; // Increment as needed
|
||||
};
|
||||
|
||||
@@ -2294,7 +2294,7 @@ bool BotDatabase::SaveBotSettings(Mob* m)
|
||||
if (m->IsBot()) {
|
||||
uint8 botStance = m->CastToBot()->GetBotStance();
|
||||
|
||||
for (uint16 i = BotBaseSettings::START; i <= BotBaseSettings::END; ++i) {
|
||||
for (uint16 i = BotBaseSettings::START_ALL; i <= BotBaseSettings::END; ++i) {
|
||||
if (m->CastToBot()->GetBotBaseSetting(i) != m->CastToBot()->GetDefaultBotBaseSetting(i, botStance)) {
|
||||
auto e = BotSettingsRepository::BotSettings{
|
||||
.char_id = charID,
|
||||
|
||||
Reference in New Issue
Block a user