From 780120036d58032c3d55d95a485a42e393f36d62 Mon Sep 17 00:00:00 2001 From: nytmyr <53322305+nytmyr@users.noreply.github.com> Date: Wed, 14 May 2025 19:58:18 -0500 Subject: [PATCH] [Bots] Move all spell_id instances to uint16 (#4876) * [Bots] Move all spell_id instances to uint16 * Alignment --- zone/bot.h | 2 +- zone/bot_structs.h | 4 ++-- zone/botspellsai.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/zone/bot.h b/zone/bot.h index 5e9b8e193..620e3a9a1 100644 --- a/zone/bot.h +++ b/zone/bot.h @@ -747,7 +747,7 @@ public: static BotSpell GetBestBotSpellForGroupCompleteHeal(Bot* caster, Mob* tar, uint16 spell_type = BotSpellTypes::RegularHeal); static BotSpell GetBestBotSpellForGroupHeal(Bot* caster, Mob* tar, uint16 spell_type = BotSpellTypes::RegularHeal); - static Mob* GetFirstIncomingMobToMez(Bot* caster, int16 spell_id, uint16 spell_type, bool AE); + static Mob* GetFirstIncomingMobToMez(Bot* caster, uint16 spell_id, uint16 spell_type, bool AE); static BotSpell GetBestBotSpellForMez(Bot* caster, uint16 spell_type = BotSpellTypes::Mez); static BotSpell GetBestBotMagicianPetSpell(Bot* caster, uint16 spell_type = BotSpellTypes::Pet); static std::string GetBotMagicianPetType(Bot* caster); diff --git a/zone/bot_structs.h b/zone/bot_structs.h index aaf226057..2917cfc0b 100644 --- a/zone/bot_structs.h +++ b/zone/bot_structs.h @@ -68,7 +68,7 @@ struct BotSpellSetting { struct BotSpells { uint32 type; // 0 = never, must be one (and only one) of the defined values - int16 spellid; // <= 0 = no spell + uint16 spellid; // <= 0 = no spell int16 manacost; // -1 = use spdat, -2 = no cast time uint32 time_cancast; // when we can cast this spell next int32 recast_delay; @@ -86,7 +86,7 @@ struct BotSpells { struct BotSpells_wIndex { uint32 index; //index of AIBot_spells uint32 type; // 0 = never, must be one (and only one) of the defined values - int16 spellid; // <= 0 = no spell + uint16 spellid; // <= 0 = no spell int16 manacost; // -1 = use spdat, -2 = no cast time uint32 time_cancast; // when we can cast this spell next int32 recast_delay; diff --git a/zone/botspellsai.cpp b/zone/botspellsai.cpp index 60dda0d71..d9e19a1eb 100644 --- a/zone/botspellsai.cpp +++ b/zone/botspellsai.cpp @@ -1459,7 +1459,7 @@ BotSpell Bot::GetBestBotSpellForMez(Bot* caster, uint16 spell_type) { return result; } -Mob* Bot::GetFirstIncomingMobToMez(Bot* caster, int16 spell_id, uint16 spell_type, bool AE) { +Mob* Bot::GetFirstIncomingMobToMez(Bot* caster, uint16 spell_id, uint16 spell_type, bool AE) { Mob* result = nullptr; if (caster && caster->GetOwner()) {