mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-21 23:08:21 +00:00
Change GetSpellListSpellType to GetParentSpellType
This commit is contained in:
+1
-1
@@ -11168,7 +11168,7 @@ bool Bot::AttemptForcedCastSpell(Mob* tar, uint16 spell_id) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint16 Bot::GetSpellListSpellType(uint16 spellType) {
|
uint16 Bot::GetParentSpellType(uint16 spellType) {
|
||||||
switch (spellType) {
|
switch (spellType) {
|
||||||
case BotSpellTypes::AENukes:
|
case BotSpellTypes::AENukes:
|
||||||
case BotSpellTypes::AERains:
|
case BotSpellTypes::AERains:
|
||||||
|
|||||||
+1
-1
@@ -539,7 +539,7 @@ public:
|
|||||||
bool HasLoS() const { return _hasLoS; }
|
bool HasLoS() const { return _hasLoS; }
|
||||||
|
|
||||||
std::list<BotSpellTypeOrder> GetSpellTypesPrioritized(uint8 priorityType);
|
std::list<BotSpellTypeOrder> GetSpellTypesPrioritized(uint8 priorityType);
|
||||||
uint16 GetSpellListSpellType(uint16 spellType);
|
uint16 GetParentSpellType(uint16 spellType);
|
||||||
bool IsValidSpellTypeBySpellID(uint16 spellType, uint16 spell_id);
|
bool IsValidSpellTypeBySpellID(uint16 spellType, uint16 spell_id);
|
||||||
inline uint16 GetCastedSpellType() const { return _castedSpellType; }
|
inline uint16 GetCastedSpellType() const { return _castedSpellType; }
|
||||||
void SetCastedSpellType(uint16 spellType);
|
void SetCastedSpellType(uint16 spellType);
|
||||||
|
|||||||
@@ -885,7 +885,7 @@ std::list<BotSpell> Bot::GetBotSpellsForSpellEffect(Bot* botCaster, uint16 spell
|
|||||||
|
|
||||||
if (
|
if (
|
||||||
botCaster->CheckSpellRecastTimer(botSpellList[i].spellid) &&
|
botCaster->CheckSpellRecastTimer(botSpellList[i].spellid) &&
|
||||||
(botSpellList[i].type == spellType || botSpellList[i].type == botCaster->GetSpellListSpellType(spellType)) &&
|
(botSpellList[i].type == spellType || botSpellList[i].type == botCaster->GetParentSpellType(spellType)) &&
|
||||||
botCaster->IsValidSpellTypeBySpellID(spellType, botSpellList[i].spellid) &&
|
botCaster->IsValidSpellTypeBySpellID(spellType, botSpellList[i].spellid) &&
|
||||||
(IsEffectInSpell(botSpellList[i].spellid, spellEffect) || GetSpellTriggerSpellID(botSpellList[i].spellid, spellEffect))
|
(IsEffectInSpell(botSpellList[i].spellid, spellEffect) || GetSpellTriggerSpellID(botSpellList[i].spellid, spellEffect))
|
||||||
) {
|
) {
|
||||||
@@ -923,7 +923,7 @@ std::list<BotSpell> Bot::GetBotSpellsForSpellEffectAndTargetType(Bot* botCaster,
|
|||||||
|
|
||||||
if (
|
if (
|
||||||
botCaster->CheckSpellRecastTimer(botSpellList[i].spellid) &&
|
botCaster->CheckSpellRecastTimer(botSpellList[i].spellid) &&
|
||||||
(botSpellList[i].type == spellType || botSpellList[i].type == botCaster->GetSpellListSpellType(spellType)) &&
|
(botSpellList[i].type == spellType || botSpellList[i].type == botCaster->GetParentSpellType(spellType)) &&
|
||||||
botCaster->IsValidSpellTypeBySpellID(spellType, botSpellList[i].spellid) &&
|
botCaster->IsValidSpellTypeBySpellID(spellType, botSpellList[i].spellid) &&
|
||||||
(
|
(
|
||||||
IsEffectInSpell(botSpellList[i].spellid, spellEffect) ||
|
IsEffectInSpell(botSpellList[i].spellid, spellEffect) ||
|
||||||
@@ -964,7 +964,7 @@ std::list<BotSpell> Bot::GetBotSpellsBySpellType(Bot* botCaster, uint16 spellTyp
|
|||||||
|
|
||||||
if (
|
if (
|
||||||
botCaster->CheckSpellRecastTimer(botSpellList[i].spellid) &&
|
botCaster->CheckSpellRecastTimer(botSpellList[i].spellid) &&
|
||||||
(botSpellList[i].type == spellType || botSpellList[i].type == botCaster->GetSpellListSpellType(spellType)) &&
|
(botSpellList[i].type == spellType || botSpellList[i].type == botCaster->GetParentSpellType(spellType)) &&
|
||||||
botCaster->IsValidSpellTypeBySpellID(spellType, botSpellList[i].spellid)
|
botCaster->IsValidSpellTypeBySpellID(spellType, botSpellList[i].spellid)
|
||||||
) {
|
) {
|
||||||
BotSpell botSpell;
|
BotSpell botSpell;
|
||||||
@@ -999,7 +999,7 @@ std::list<BotSpell_wPriority> Bot::GetPrioritizedBotSpellsBySpellType(Bot* botCa
|
|||||||
|
|
||||||
if (
|
if (
|
||||||
botCaster->CheckSpellRecastTimer(botSpellList[i].spellid) &&
|
botCaster->CheckSpellRecastTimer(botSpellList[i].spellid) &&
|
||||||
(botSpellList[i].type == spellType || botSpellList[i].type == botCaster->GetSpellListSpellType(spellType)) &&
|
(botSpellList[i].type == spellType || botSpellList[i].type == botCaster->GetParentSpellType(spellType)) &&
|
||||||
botCaster->IsValidSpellTypeBySpellID(spellType, botSpellList[i].spellid)
|
botCaster->IsValidSpellTypeBySpellID(spellType, botSpellList[i].spellid)
|
||||||
) {
|
) {
|
||||||
if (
|
if (
|
||||||
@@ -1080,7 +1080,7 @@ BotSpell Bot::GetFirstBotSpellBySpellType(Bot* botCaster, uint16 spellType) {
|
|||||||
|
|
||||||
if (
|
if (
|
||||||
botCaster->CheckSpellRecastTimer(botSpellList[i].spellid) &&
|
botCaster->CheckSpellRecastTimer(botSpellList[i].spellid) &&
|
||||||
(botSpellList[i].type == spellType || botSpellList[i].type == botCaster->GetSpellListSpellType(spellType)) &&
|
(botSpellList[i].type == spellType || botSpellList[i].type == botCaster->GetParentSpellType(spellType)) &&
|
||||||
botCaster->IsValidSpellTypeBySpellID(spellType, botSpellList[i].spellid)
|
botCaster->IsValidSpellTypeBySpellID(spellType, botSpellList[i].spellid)
|
||||||
) {
|
) {
|
||||||
result.SpellId = botSpellList[i].spellid;
|
result.SpellId = botSpellList[i].spellid;
|
||||||
@@ -1186,7 +1186,7 @@ BotSpell Bot::GetBestBotSpellForPercentageHeal(Bot *botCaster, Mob* tar, uint16
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
(botSpellList[i].type == spellType || botSpellList[i].type == botCaster->GetSpellListSpellType(spellType)) &&
|
(botSpellList[i].type == spellType || botSpellList[i].type == botCaster->GetParentSpellType(spellType)) &&
|
||||||
botCaster->IsValidSpellTypeBySpellID(spellType, botSpellList[i].spellid) &&
|
botCaster->IsValidSpellTypeBySpellID(spellType, botSpellList[i].spellid) &&
|
||||||
IsCompleteHealSpell(botSpellList[i].spellid) &&
|
IsCompleteHealSpell(botSpellList[i].spellid) &&
|
||||||
botCaster->CastChecks(botSpellList[i].spellid, tar, spellType)
|
botCaster->CastChecks(botSpellList[i].spellid, tar, spellType)
|
||||||
@@ -2839,7 +2839,7 @@ void Bot::CheckBotSpells() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
correctType = GetCorrectSpellType(s.type, spell_id);
|
correctType = GetCorrectSpellType(s.type, spell_id);
|
||||||
parentType = GetSpellListSpellType(correctType);
|
parentType = GetParentSpellType(correctType);
|
||||||
|
|
||||||
if (RuleB(Bots, UseParentSpellTypeForChecks)) {
|
if (RuleB(Bots, UseParentSpellTypeForChecks)) {
|
||||||
if (s.type == parentType || s.type == correctType) {
|
if (s.type == parentType || s.type == correctType) {
|
||||||
|
|||||||
Reference in New Issue
Block a user