mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-19 13:28:25 +00:00
Rename BotSpells_Struct/BotSpells_Struct_wIndex
This commit is contained in:
+3
-3
@@ -12329,7 +12329,7 @@ void Bot::CleanBotBlockedBuffs()
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<BotSpells_Struct_wIndex> Bot::BotGetSpellsByType(uint16 spell_type) {
|
||||
std::vector<BotSpells_wIndex> Bot::BotGetSpellsByType(uint16 spell_type) {
|
||||
if (AIBot_spells_by_type[spell_type].empty()) {
|
||||
spell_type = GetParentSpellType(spell_type);
|
||||
}
|
||||
@@ -12337,7 +12337,7 @@ std::vector<BotSpells_Struct_wIndex> Bot::BotGetSpellsByType(uint16 spell_type)
|
||||
return AIBot_spells_by_type[spell_type];
|
||||
}
|
||||
|
||||
void Bot::AssignBotSpellsToTypes(std::vector<BotSpells_Struct>& AIBot_spells, std::unordered_map<uint16, std::vector<BotSpells_Struct_wIndex>>& AIBot_spells_by_type) {
|
||||
void Bot::AssignBotSpellsToTypes(std::vector<BotSpells>& AIBot_spells, std::unordered_map<uint16, std::vector<BotSpells_wIndex>>& AIBot_spells_by_type) {
|
||||
AIBot_spells_by_type.clear();
|
||||
|
||||
for (size_t i = 0; i < AIBot_spells.size(); ++i) {
|
||||
@@ -12347,7 +12347,7 @@ void Bot::AssignBotSpellsToTypes(std::vector<BotSpells_Struct>& AIBot_spells, st
|
||||
continue;
|
||||
}
|
||||
|
||||
BotSpells_Struct_wIndex spell_with_index{
|
||||
BotSpells_wIndex spell_with_index{
|
||||
static_cast<uint32>(i),
|
||||
spell.type,
|
||||
spell.spellid,
|
||||
|
||||
+5
-5
@@ -304,7 +304,7 @@ public:
|
||||
uint16 BotGetSpells(int spellslot) { return AIBot_spells[spellslot].spellid; }
|
||||
uint32 BotGetSpellType(int spellslot) { return AIBot_spells[spellslot].type; }
|
||||
uint16 BotGetSpellPriority(int spellslot) { return AIBot_spells[spellslot].priority; }
|
||||
std::vector<BotSpells_Struct_wIndex> BotGetSpellsByType(uint16 spell_type);
|
||||
std::vector<BotSpells_wIndex> BotGetSpellsByType(uint16 spell_type);
|
||||
float GetProcChances(float ProcBonus, uint16 hand) override;
|
||||
int GetHandToHandDamage(void) override;
|
||||
bool TryFinishingBlow(Mob *defender, int64 &damage) override;
|
||||
@@ -540,7 +540,7 @@ public:
|
||||
void SetVerifiedRaid(bool status) { _verifiedRaid = status; }
|
||||
uint16 GetTempSpellType() { return _tempSpellType; }
|
||||
void SetTempSpellType(uint16 spell_type) { _tempSpellType = spell_type; }
|
||||
void AssignBotSpellsToTypes(std::vector<BotSpells_Struct>& AIBot_spells, std::unordered_map<uint16, std::vector<BotSpells_Struct_wIndex>>& AIBot_spells_by_type);
|
||||
void AssignBotSpellsToTypes(std::vector<BotSpells>& AIBot_spells, std::unordered_map<uint16, std::vector<BotSpells_wIndex>>& AIBot_spells_by_type);
|
||||
bool IsTargetAlreadyReceivingSpell(Mob* tar, uint16 spell_id);
|
||||
bool DoResistCheck(Mob* target, uint16 spell_id, int32 resist_limit);
|
||||
bool DoResistCheckBySpellType(Mob* tar, uint16 spell_id, uint16 spell_type);
|
||||
@@ -1072,9 +1072,9 @@ protected:
|
||||
void SetGroupDoter(bool flag = true) { m_CastingRoles.GroupDoter = flag; }
|
||||
std::deque<int> bot_signal_q;
|
||||
|
||||
std::vector<BotSpells_Struct> AIBot_spells;
|
||||
std::vector<BotSpells_Struct> AIBot_spells_enforced;
|
||||
std::unordered_map<uint16, std::vector<BotSpells_Struct_wIndex>> AIBot_spells_by_type;
|
||||
std::vector<BotSpells> AIBot_spells;
|
||||
std::vector<BotSpells> AIBot_spells_enforced;
|
||||
std::unordered_map<uint16, std::vector<BotSpells_wIndex>> AIBot_spells_by_type;
|
||||
|
||||
std::map<int32_t, std::map<int32_t, BotSpellTypesByClass>> commanded_spells_min_level;
|
||||
|
||||
|
||||
@@ -134,7 +134,7 @@ void bot_command_discipline(Client* c, const Seperator* sep)
|
||||
}
|
||||
|
||||
if (spell_id == UINT16_MAX) { // Aggressive/Defensive type
|
||||
std::vector<BotSpells_Struct_wIndex> bot_spell_list;
|
||||
std::vector<BotSpells_wIndex> bot_spell_list;
|
||||
|
||||
if (aggressive) {
|
||||
bot_spell_list = bot_iter->BotGetSpellsByType(BotSpellTypes::DiscAggressive);
|
||||
|
||||
+2
-2
@@ -64,7 +64,7 @@ struct BotSpellSetting {
|
||||
bool is_enabled = true;
|
||||
};
|
||||
|
||||
struct BotSpells_Struct {
|
||||
struct BotSpells {
|
||||
uint32 type; // 0 = never, must be one (and only one) of the defined values
|
||||
int16 spellid; // <= 0 = no spell
|
||||
int16 manacost; // -1 = use spdat, -2 = no cast time
|
||||
@@ -81,7 +81,7 @@ struct BotSpells_Struct {
|
||||
uint8 bucket_comparison;
|
||||
};
|
||||
|
||||
struct BotSpells_Struct_wIndex {
|
||||
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
|
||||
|
||||
+11
-11
@@ -907,7 +907,7 @@ std::list<BotSpell> Bot::GetBotSpellsForSpellEffect(Bot* caster, uint16 spell_ty
|
||||
}
|
||||
|
||||
if (caster->AI_HasSpells()) {
|
||||
std::vector<BotSpells_Struct_wIndex> bot_spell_list = caster->BotGetSpellsByType(spell_type);
|
||||
std::vector<BotSpells_wIndex> bot_spell_list = caster->BotGetSpellsByType(spell_type);
|
||||
|
||||
for (int i = bot_spell_list.size() - 1; i >= 0; i--) {
|
||||
if (!IsValidSpellAndLoS(bot_spell_list[i].spellid, caster->HasLoS())) {
|
||||
@@ -945,7 +945,7 @@ std::list<BotSpell> Bot::GetBotSpellsForSpellEffectAndTargetType(Bot* caster, ui
|
||||
}
|
||||
|
||||
if (caster->AI_HasSpells()) {
|
||||
std::vector<BotSpells_Struct_wIndex> bot_spell_list = caster->BotGetSpellsByType(spell_type);
|
||||
std::vector<BotSpells_wIndex> bot_spell_list = caster->BotGetSpellsByType(spell_type);
|
||||
|
||||
for (int i = bot_spell_list.size() - 1; i >= 0; i--) {
|
||||
if (!IsValidSpellAndLoS(bot_spell_list[i].spellid, caster->HasLoS())) {
|
||||
@@ -986,7 +986,7 @@ std::list<BotSpell> Bot::GetBotSpellsBySpellType(Bot* caster, uint16 spell_type)
|
||||
}
|
||||
|
||||
if (caster->AI_HasSpells()) {
|
||||
std::vector<BotSpells_Struct_wIndex> bot_spell_list = caster->BotGetSpellsByType(spell_type);
|
||||
std::vector<BotSpells_wIndex> bot_spell_list = caster->BotGetSpellsByType(spell_type);
|
||||
|
||||
for (int i = bot_spell_list.size() - 1; i >= 0; i--) {
|
||||
if (!IsValidSpellAndLoS(bot_spell_list[i].spellid, caster->HasLoS())) {
|
||||
@@ -1015,7 +1015,7 @@ std::vector<BotSpell_wPriority> Bot::GetPrioritizedBotSpellsBySpellType(Bot* cas
|
||||
std::vector<BotSpell_wPriority> result;
|
||||
|
||||
if (caster && caster->AI_HasSpells()) {
|
||||
std::vector<BotSpells_Struct_wIndex> bot_spell_list = caster->BotGetSpellsByType(spell_type);
|
||||
std::vector<BotSpells_wIndex> bot_spell_list = caster->BotGetSpellsByType(spell_type);
|
||||
|
||||
for (int i = bot_spell_list.size() - 1; i >= 0; i--) {
|
||||
if (!IsValidSpellAndLoS(bot_spell_list[i].spellid, caster->HasLoS())) {
|
||||
@@ -1104,7 +1104,7 @@ BotSpell Bot::GetFirstBotSpellBySpellType(Bot* caster, uint16 spell_type) {
|
||||
result.ManaCost = 0;
|
||||
|
||||
if (caster && caster->AI_HasSpells()) {
|
||||
std::vector<BotSpells_Struct_wIndex> bot_spell_list = caster->BotGetSpellsByType(spell_type);
|
||||
std::vector<BotSpells_wIndex> bot_spell_list = caster->BotGetSpellsByType(spell_type);
|
||||
|
||||
for (int i = bot_spell_list.size() - 1; i >= 0; i--) {
|
||||
if (!IsValidSpellAndLoS(bot_spell_list[i].spellid, caster->HasLoS())) {
|
||||
@@ -1212,7 +1212,7 @@ BotSpell Bot::GetBestBotSpellForPercentageHeal(Bot* caster, Mob* tar, uint16 spe
|
||||
result.ManaCost = 0;
|
||||
|
||||
if (caster && caster->AI_HasSpells()) {
|
||||
std::vector<BotSpells_Struct_wIndex> bot_spell_list = caster->BotGetSpellsByType(spell_type);
|
||||
std::vector<BotSpells_wIndex> bot_spell_list = caster->BotGetSpellsByType(spell_type);
|
||||
for (int i = bot_spell_list.size() - 1; i >= 0; i--) {
|
||||
if (!IsValidSpell(bot_spell_list[i].spellid)) {
|
||||
continue;
|
||||
@@ -1932,7 +1932,7 @@ BotSpell Bot::GetDebuffBotSpell(Bot* caster, Mob *tar, uint16 spell_type) {
|
||||
return result;
|
||||
|
||||
if (caster->AI_HasSpells()) {
|
||||
std::vector<BotSpells_Struct_wIndex> bot_spell_list = caster->BotGetSpellsByType(spell_type);
|
||||
std::vector<BotSpells_wIndex> bot_spell_list = caster->BotGetSpellsByType(spell_type);
|
||||
|
||||
for (int i = bot_spell_list.size() - 1; i >= 0; i--) {
|
||||
if (!IsValidSpellAndLoS(bot_spell_list[i].spellid, caster->HasLoS())) {
|
||||
@@ -1978,7 +1978,7 @@ BotSpell Bot::GetBestBotSpellForResistDebuff(Bot* caster, Mob *tar, uint16 spell
|
||||
bool needs_disease_resist_debuff = (tar->GetDR() + level_mod) > 100;
|
||||
|
||||
if (caster->AI_HasSpells()) {
|
||||
std::vector<BotSpells_Struct_wIndex> bot_spell_list = caster->BotGetSpellsByType(spell_type);
|
||||
std::vector<BotSpells_wIndex> bot_spell_list = caster->BotGetSpellsByType(spell_type);
|
||||
|
||||
for (int i = bot_spell_list.size() - 1; i >= 0; i--) {
|
||||
if (!IsValidSpellAndLoS(bot_spell_list[i].spellid, caster->HasLoS())) {
|
||||
@@ -2437,7 +2437,7 @@ bool Bot::AI_AddBotSpells(uint32 bot_spell_id) {
|
||||
}
|
||||
}
|
||||
|
||||
std::sort(AIBot_spells.begin(), AIBot_spells.end(), [](const BotSpells_Struct& a, const BotSpells_Struct& b) {
|
||||
std::sort(AIBot_spells.begin(), AIBot_spells.end(), [](const BotSpells& a, const BotSpells& b) {
|
||||
return a.priority > b.priority;
|
||||
});
|
||||
|
||||
@@ -2604,7 +2604,7 @@ void Bot::AddSpellToBotList(
|
||||
}
|
||||
|
||||
HasAISpell = true;
|
||||
BotSpells_Struct t;
|
||||
BotSpells t;
|
||||
|
||||
t.priority = in_priority;
|
||||
t.spellid = in_spell_id;
|
||||
@@ -2650,7 +2650,7 @@ void Bot::AddSpellToBotEnforceList(
|
||||
}
|
||||
|
||||
HasAISpell = true;
|
||||
BotSpells_Struct t;
|
||||
BotSpells t;
|
||||
|
||||
t.priority = iPriority;
|
||||
t.spellid = iSpellID;
|
||||
|
||||
Reference in New Issue
Block a user