mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-12 04:29:01 +00:00
Add Buff infrastructure to go through different logic paths from different patches (#5073)
This commit is contained in:
+12
-12
@@ -1335,7 +1335,7 @@ BotSpell Bot::GetBestBotSpellForGroupHeal(Bot* caster, Mob* tar, uint16 spell_ty
|
||||
|
||||
for (std::list<BotSpell>::iterator bot_spell_list_itr = bot_spell_list.begin(); bot_spell_list_itr != bot_spell_list.end(); ++bot_spell_list_itr) {
|
||||
if (IsRegularGroupHealSpell(bot_spell_list_itr->SpellId)) {
|
||||
uint16 spell_id = bot_spell_list_itr->SpellId;
|
||||
int32 spell_id = bot_spell_list_itr->SpellId;
|
||||
|
||||
if (caster->TargetValidation(tar) && !caster->IsCommandedSpell() && caster->IsValidSpellRange(spell_id, tar)) {
|
||||
target_count = caster->GetNumberNeedingHealedInGroup(tar, spell_type, spell_id, caster->GetAOERange(spell_id));
|
||||
@@ -1373,7 +1373,7 @@ BotSpell Bot::GetBestBotSpellForGroupHealOverTime(Bot* caster, Mob* tar, uint16
|
||||
|
||||
for (std::list<BotSpell>::iterator bot_spell_list_itr = bot_spell_list.begin(); bot_spell_list_itr != bot_spell_list.end(); ++bot_spell_list_itr) {
|
||||
if (IsGroupHealOverTimeSpell(bot_spell_list_itr->SpellId)) {
|
||||
uint16 spell_id = bot_spell_list_itr->SpellId;
|
||||
int32 spell_id = bot_spell_list_itr->SpellId;
|
||||
|
||||
if (caster->TargetValidation(tar) && !caster->IsCommandedSpell() && caster->IsValidSpellRange(spell_id, tar)) {
|
||||
target_count = caster->GetNumberNeedingHealedInGroup(tar, spell_type, spell_id, caster->GetAOERange(spell_id));
|
||||
@@ -1411,7 +1411,7 @@ BotSpell Bot::GetBestBotSpellForGroupCompleteHeal(Bot* caster, Mob* tar, uint16
|
||||
|
||||
for (std::list<BotSpell>::iterator bot_spell_list_itr = bot_spell_list.begin(); bot_spell_list_itr != bot_spell_list.end(); ++bot_spell_list_itr) {
|
||||
if (IsGroupCompleteHealSpell(bot_spell_list_itr->SpellId)) {
|
||||
uint16 spell_id = bot_spell_list_itr->SpellId;
|
||||
int32 spell_id = bot_spell_list_itr->SpellId;
|
||||
|
||||
if (caster->TargetValidation(tar) && !caster->IsCommandedSpell() && caster->IsValidSpellRange(spell_id, tar)) {
|
||||
target_count = caster->GetNumberNeedingHealedInGroup(tar, spell_type, spell_id, caster->GetAOERange(spell_id));
|
||||
@@ -1459,7 +1459,7 @@ BotSpell Bot::GetBestBotSpellForMez(Bot* caster, uint16 spell_type) {
|
||||
return result;
|
||||
}
|
||||
|
||||
Mob* Bot::GetFirstIncomingMobToMez(Bot* caster, uint16 spell_id, uint16 spell_type, bool AE) {
|
||||
Mob* Bot::GetFirstIncomingMobToMez(Bot* caster, int32 spell_id, uint16 spell_type, bool AE) {
|
||||
Mob* result = nullptr;
|
||||
|
||||
if (caster && caster->GetOwner()) {
|
||||
@@ -2184,7 +2184,7 @@ uint8 Bot::GetChanceToCastBySpellType(uint16 spell_type)
|
||||
return RuleI(Bots, PercentChanceToCastOtherType);
|
||||
}
|
||||
|
||||
bool Bot::AI_AddBotSpells(uint32 bot_spell_id) {
|
||||
bool Bot::AI_AddBotSpells(int32 bot_spell_id) {
|
||||
// ok, this function should load the list, and the parent list then shove them into the struct and sort
|
||||
npc_spells_id = bot_spell_id;
|
||||
AIBot_spells.clear();
|
||||
@@ -2486,7 +2486,7 @@ bool Bot::AI_AddBotSpells(uint32 bot_spell_id) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool IsSpellInBotList(DBbotspells_Struct* spell_list, uint16 iSpellID) {
|
||||
bool IsSpellInBotList(DBbotspells_Struct* spell_list, int32 iSpellID) {
|
||||
auto it = std::find_if (
|
||||
spell_list->entries.begin(),
|
||||
spell_list->entries.end(),
|
||||
@@ -2498,7 +2498,7 @@ bool IsSpellInBotList(DBbotspells_Struct* spell_list, uint16 iSpellID) {
|
||||
return it != spell_list->entries.end();
|
||||
}
|
||||
|
||||
DBbotspells_Struct* ZoneDatabase::GetBotSpells(uint32 bot_spell_id)
|
||||
DBbotspells_Struct* ZoneDatabase::GetBotSpells(int32 bot_spell_id)
|
||||
{
|
||||
if (!bot_spell_id) {
|
||||
return nullptr;
|
||||
@@ -2591,7 +2591,7 @@ DBbotspells_Struct* ZoneDatabase::GetBotSpells(uint32 bot_spell_id)
|
||||
// adds a spell to the list, taking into account priority and resorting list as needed.
|
||||
void Bot::AddSpellToBotList(
|
||||
int16 in_priority,
|
||||
uint16 in_spell_id,
|
||||
int32 in_spell_id,
|
||||
uint32 in_type,
|
||||
int16 in_mana_cost,
|
||||
int32 in_recast_delay,
|
||||
@@ -2637,7 +2637,7 @@ void Bot::AddSpellToBotList(
|
||||
// adds spells to the list ^spells that are returned if ^enforce is enabled
|
||||
void Bot::AddSpellToBotEnforceList(
|
||||
int16 iPriority,
|
||||
uint16 iSpellID,
|
||||
int32 iSpellID,
|
||||
uint32 iType,
|
||||
int16 iManaCost,
|
||||
int32 iRecastDelay,
|
||||
@@ -2703,7 +2703,7 @@ void Bot::AI_Bot_Event_SpellCastFinished(bool iCastSucceeded, uint16 slot) {
|
||||
}
|
||||
}
|
||||
|
||||
bool Bot::HasBotSpellEntry(uint16 spell_id) {
|
||||
bool Bot::HasBotSpellEntry(int32 spell_id) {
|
||||
auto* spell_list = content_db.GetBotSpells(GetBotSpellID());
|
||||
|
||||
if (!spell_list) {
|
||||
@@ -2720,7 +2720,7 @@ bool Bot::HasBotSpellEntry(uint16 spell_id) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Bot::CanUseBotSpell(uint16 spell_id) {
|
||||
bool Bot::CanUseBotSpell(int32 spell_id) {
|
||||
if (AIBot_spells.empty()) {
|
||||
return false;
|
||||
}
|
||||
@@ -2744,7 +2744,7 @@ bool Bot::CanUseBotSpell(uint16 spell_id) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Bot::IsValidSpellRange(uint16 spell_id, Mob* tar) {
|
||||
bool Bot::IsValidSpellRange(int32 spell_id, Mob* tar) {
|
||||
if (!IsValidSpell(spell_id) || !tar) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user