mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-31 04:56:20 +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);
|
database.botdb.LoadTimers(this);
|
||||||
|
|
||||||
LoadAAs();
|
|
||||||
|
|
||||||
LoadDefaultBotSettings();
|
LoadDefaultBotSettings();
|
||||||
|
|
||||||
database.botdb.LoadBotSettings(this);
|
database.botdb.LoadBotSettings(this);
|
||||||
|
|
||||||
|
LoadAAs();
|
||||||
|
|
||||||
if (database.botdb.LoadBuffs(this)) {
|
if (database.botdb.LoadBuffs(this)) {
|
||||||
//reapply some buffs
|
//reapply some buffs
|
||||||
uint32 buff_count = GetMaxBuffSlots();
|
uint32 buff_count = GetMaxBuffSlots();
|
||||||
@@ -1258,7 +1258,6 @@ int32 Bot::GenerateBaseHitPoints() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Bot::LoadAAs() {
|
void Bot::LoadAAs() {
|
||||||
|
|
||||||
aa_ranks.clear();
|
aa_ranks.clear();
|
||||||
|
|
||||||
int id = 0;
|
int id = 0;
|
||||||
@@ -10202,7 +10201,7 @@ void Bot::LoadDefaultBotSettings() {
|
|||||||
|
|
||||||
uint8 botStance = GetBotStance();
|
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));
|
SetBotBaseSetting(i, GetDefaultSetting(BotSettingCategories::BaseSetting, i, botStance));
|
||||||
LogBotSettingsDetail("{} says, 'Setting default {} [{}] to [{}]'", GetCleanName(), GetBotSettingCategoryName(i), i, GetDefaultBotBaseSetting(i, botStance)); //deleteme
|
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 HPWhenToMed = 12;
|
||||||
constexpr uint16 ManaWhenToMed = 13;
|
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 START = BotBaseSettings::ShowHelm; // Everything above this cannot be copied, changed or viewed by players
|
||||||
constexpr uint16 END = BotBaseSettings::ManaWhenToMed; // Increment as needed
|
constexpr uint16 END = BotBaseSettings::ManaWhenToMed; // Increment as needed
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -2294,7 +2294,7 @@ bool BotDatabase::SaveBotSettings(Mob* m)
|
|||||||
if (m->IsBot()) {
|
if (m->IsBot()) {
|
||||||
uint8 botStance = m->CastToBot()->GetBotStance();
|
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)) {
|
if (m->CastToBot()->GetBotBaseSetting(i) != m->CastToBot()->GetDefaultBotBaseSetting(i, botStance)) {
|
||||||
auto e = BotSettingsRepository::BotSettings{
|
auto e = BotSettingsRepository::BotSettings{
|
||||||
.char_id = charID,
|
.char_id = charID,
|
||||||
|
|||||||
Reference in New Issue
Block a user