[Bug Fix] Bots will now load AAs properly when spawned. (#3544)

* [Bug Fix] Bots will now load AAs properly when spawned.

* formatting

* formatting

* formatting

* formatting

* formatting (for real this time)

* formatting (for real this time)

* Formatting
This commit is contained in:
Aeadoin
2023-08-13 15:57:27 -04:00
committed by GitHub
parent 919a92bda3
commit 9a07142a9b
3 changed files with 13 additions and 5 deletions
+10 -1
View File
@@ -119,7 +119,15 @@ Bot::Bot(NPCType *npcTypeData, Client* botOwner) : NPC(npcTypeData, nullptr, glm
} }
// This constructor is used when the bot is loaded out of the database // This constructor is used when the bot is loaded out of the database
Bot::Bot(uint32 botID, uint32 botOwnerCharacterID, uint32 botSpellsID, double totalPlayTime, uint32 lastZoneId, NPCType *npcTypeData) Bot::Bot(
uint32 botID,
uint32 botOwnerCharacterID,
uint32 botSpellsID,
double totalPlayTime,
uint32 lastZoneId,
NPCType *npcTypeData,
int32 expansion_bitmask
)
: NPC(npcTypeData, nullptr, glm::vec4(), Ground, false), rest_timer(1), ping_timer(1) : NPC(npcTypeData, nullptr, glm::vec4(), Ground, false), rest_timer(1), ping_timer(1)
{ {
GiveNPCTypeData(npcTypeData); GiveNPCTypeData(npcTypeData);
@@ -161,6 +169,7 @@ Bot::Bot(uint32 botID, uint32 botOwnerCharacterID, uint32 botSpellsID, double to
RestRegenHP = 0; RestRegenHP = 0;
RestRegenMana = 0; RestRegenMana = 0;
RestRegenEndurance = 0; RestRegenEndurance = 0;
m_expansion_bitmask = expansion_bitmask;
SetBotID(botID); SetBotID(botID);
SetBotSpellID(botSpellsID); SetBotSpellID(botSpellsID);
SetSpawnStatus(false); SetSpawnStatus(false);
+1 -1
View File
@@ -130,7 +130,7 @@ public:
// Class Constructors // Class Constructors
Bot(NPCType *npcTypeData, Client* botOwner); Bot(NPCType *npcTypeData, Client* botOwner);
Bot(uint32 botID, uint32 botOwnerCharacterID, uint32 botSpellsID, double totalPlayTime, uint32 lastZoneId, NPCType *npcTypeData); Bot(uint32 botID, uint32 botOwnerCharacterID, uint32 botSpellsID, double totalPlayTime, uint32 lastZoneId, NPCType *npcTypeData, int32 expansion_bitmask);
//abstract virtual override function implementations requird by base abstract class //abstract virtual override function implementations requird by base abstract class
bool Death(Mob* killerMob, int64 damage, uint16 spell_id, EQ::skills::SkillType attack_skill) override; bool Death(Mob* killerMob, int64 damage, uint16 spell_id, EQ::skills::SkillType attack_skill) override;
+2 -3
View File
@@ -464,7 +464,8 @@ bool BotDatabase::LoadBot(const uint32 bot_id, Bot*& loaded_bot)
l.spells_id, l.spells_id,
l.time_spawned, l.time_spawned,
l.zone_id, l.zone_id,
t t,
l.expansion_bitmask
); );
if (loaded_bot) { if (loaded_bot) {
@@ -479,8 +480,6 @@ bool BotDatabase::LoadBot(const uint32 bot_id, Bot*& loaded_bot)
loaded_bot->SetStopMeleeLevel(l.stop_melee_level); loaded_bot->SetStopMeleeLevel(l.stop_melee_level);
loaded_bot->SetExpansionBitmask(l.expansion_bitmask, false);
loaded_bot->SetBotEnforceSpellSetting((l.enforce_spell_settings ? true : false)); loaded_bot->SetBotEnforceSpellSetting((l.enforce_spell_settings ? true : false));
loaded_bot->SetBotArcherySetting((l.archery_setting ? true : false)); loaded_bot->SetBotArcherySetting((l.archery_setting ? true : false));