[Constants] Convert SE Defines to SpellEffect Namespace (#4999)

This commit is contained in:
Alex King
2025-08-30 15:33:19 -04:00
committed by GitHub
parent 92c8b0e585
commit 060f6e377d
26 changed files with 2865 additions and 2866 deletions
+90 -90
View File
@@ -296,8 +296,8 @@ Bot::Bot(
for (int x1 = 0; x1 < EFFECT_COUNT; x1++) {
switch (spell.effect_id[x1]) {
case SE_IllusionCopy:
case SE_Illusion: {
case SpellEffect::IllusionCopy:
case SpellEffect::Illusion: {
if (GetIllusionBlock()) {
break;
}
@@ -375,63 +375,63 @@ Bot::Bot(
}
break;
}
case SE_Silence:
case SpellEffect::Silence:
{
Silence(true);
break;
}
case SE_Amnesia:
case SpellEffect::Amnesia:
{
Amnesia(true);
break;
}
case SE_DivineAura:
case SpellEffect::DivineAura:
{
invulnerable = true;
break;
}
case SE_Invisibility2:
case SE_Invisibility:
case SpellEffect::Invisibility2:
case SpellEffect::Invisibility:
{
invisible = true;
SendAppearancePacket(AppearanceType::Invisibility, 1);
break;
}
case SE_Levitate:
case SpellEffect::Levitate:
{
if (!zone->CanLevitate())
{
SendAppearancePacket(AppearanceType::FlyMode, 0);
BuffFadeByEffect(SE_Levitate);
BuffFadeByEffect(SpellEffect::Levitate);
}
else {
SendAppearancePacket(AppearanceType::FlyMode, 2);
}
break;
}
case SE_InvisVsUndead2:
case SE_InvisVsUndead:
case SpellEffect::InvisVsUndead2:
case SpellEffect::InvisVsUndead:
{
invisible_undead = true;
break;
}
case SE_InvisVsAnimals:
case SpellEffect::InvisVsAnimals:
{
invisible_animals = true;
break;
}
case SE_AddMeleeProc:
case SE_WeaponProc:
case SpellEffect::AddMeleeProc:
case SpellEffect::WeaponProc:
{
AddProcToWeapon(GetProcID(buffs[j1].spellid, x1), false, 100 + spells[buffs[j1].spellid].limit_value[x1], buffs[j1].spellid, buffs[j1].casterlevel);
break;
}
case SE_DefensiveProc:
case SpellEffect::DefensiveProc:
{
AddDefensiveProc(GetProcID(buffs[j1].spellid, x1), 100 + spells[buffs[j1].spellid].limit_value[x1], buffs[j1].spellid);
break;
}
case SE_RangedProc:
case SpellEffect::RangedProc:
{
AddRangedProc(GetProcID(buffs[j1].spellid, x1), 100 + spells[buffs[j1].spellid].limit_value[x1], buffs[j1].spellid);
break;
@@ -1527,7 +1527,7 @@ bool Bot::LoadPet()
auto my_buffs = GetBuffs();
if (buffs_max && my_buffs) {
for (int index = 0; index < buffs_max; ++index) {
if (IsEffectInSpell(my_buffs[index].spellid, SE_Familiar)) {
if (IsEffectInSpell(my_buffs[index].spellid, SpellEffect::Familiar)) {
MakePet(my_buffs[index].spellid, spells[my_buffs[index].spellid].teleport_zone);
return true;
}
@@ -3578,7 +3578,7 @@ void Bot::Depop() {
if (bot_pet) {
if (bot_pet->Charmed()) {
bot_pet->BuffFadeByEffect(SE_Charm);
bot_pet->BuffFadeByEffect(SpellEffect::Charm);
}
else {
bot_pet->Depop();
@@ -5974,7 +5974,7 @@ bool Bot::SpellOnTarget(
if (spelltar->IsPet()) {
for (int i = 0; i < EFFECT_COUNT; ++i) {
if (spells[spell_id].effect_id[i] == SE_Illusion) {
if (spells[spell_id].effect_id[i] == SpellEffect::Illusion) {
return false;
}
}
@@ -6214,7 +6214,7 @@ bool Bot::DoFinishedSpellSingleTarget(uint16 spell_id, Mob* spellTarget, EQ::spe
if (!noGroupSpell) {
for (Mob* m : GetBuffTargets(spellTarget)) {
if (IsEffectInSpell(thespell, SE_AbsorbMagicAtt) || IsEffectInSpell(thespell, SE_Rune)) {
if (IsEffectInSpell(thespell, SpellEffect::AbsorbMagicAtt) || IsEffectInSpell(thespell, SpellEffect::Rune)) {
for (int i = 0; i < m->GetMaxTotalSlots(); i++) {
uint32 buff_count = m->GetMaxTotalSlots();
@@ -7831,7 +7831,7 @@ bool Bot::GetNeedsCured(Mob *tar) {
bool need_cured = false;
if (tar) {
if (tar->FindType(SE_PoisonCounter) || tar->FindType(SE_DiseaseCounter) || tar->FindType(SE_CurseCounter) || tar->FindType(SE_CorruptionCounter)) {
if (tar->FindType(SpellEffect::PoisonCounter) || tar->FindType(SpellEffect::DiseaseCounter) || tar->FindType(SpellEffect::CurseCounter) || tar->FindType(SpellEffect::CorruptionCounter)) {
uint32 buff_count = tar->GetMaxTotalSlots();
for (unsigned int j = 0; j < buff_count; j++) {
@@ -8616,7 +8616,7 @@ void Bot::Escape()
}
void Bot::Fling(float value, float target_x, float target_y, float target_z, bool ignore_los, bool clip_through_walls, bool calculate_speed) {
BuffFadeByEffect(SE_Levitate);
BuffFadeByEffect(SpellEffect::Levitate);
if (CheckLosFN(target_x, target_y, target_z, 6.0f) || ignore_los) {
auto p = new EQApplicationPacket(OP_Fling, sizeof(fling_struct));
auto* f = (fling_struct*) p->pBuffer;
@@ -9553,9 +9553,9 @@ bool Bot::CastChecks(uint16 spell_id, Mob* tar, uint16 spell_type, bool precheck
if (spells[spell_id].target_type == ST_Self && tar != this) {
if (
!IsEffectInSpell(spell_id, SE_SummonCorpse) ||
!IsEffectInSpell(spell_id, SpellEffect::SummonCorpse) ||
(
IsEffectInSpell(spell_id, SE_SummonCorpse) &&
IsEffectInSpell(spell_id, SpellEffect::SummonCorpse) &&
!RuleB(Bots, AllowCommandedSummonCorpse)
)
) {
@@ -9667,7 +9667,7 @@ bool Bot::CastChecks(uint16 spell_id, Mob* tar, uint16 spell_type, bool precheck
if (
!zone->CanLevitate() &&
IsEffectInSpell(spell_id, SE_Levitate)
IsEffectInSpell(spell_id, SpellEffect::Levitate)
) {
LogBotSpellChecksDetail("{} says, 'Cancelling cast of {} due to !CanLevitate.'", GetCleanName(), GetSpellName(spell_id));
return false;
@@ -9907,8 +9907,8 @@ bool Bot::CanCastSpellType(uint16 spell_type, uint16 spell_id, Mob* tar) {
spell_type != BotSpellTypes::Succor
) &&
(
IsEffectInSpell(spell_id, SE_Teleport) ||
IsEffectInSpell(spell_id, SE_Succor)
IsEffectInSpell(spell_id, SpellEffect::Teleport) ||
IsEffectInSpell(spell_id, SpellEffect::Succor)
)
) {
LogBotSpellChecksDetail("{} says, 'Cancelling cast of {} on {} due to Teleport.'", GetCleanName(), GetSpellName(spell_id), tar->GetCleanName());
@@ -9918,7 +9918,7 @@ bool Bot::CanCastSpellType(uint16 spell_type, uint16 spell_id, Mob* tar) {
if (
tar->IsPet() &&
!RuleB(Bots, CanCastIllusionsOnPets) &&
IsEffectInSpell(spell_id, SE_Illusion)
IsEffectInSpell(spell_id, SpellEffect::Illusion)
) {
LogBotSpellChecksDetail("{} says, 'Cancelling cast of {} on {} due to PetSE_Illusion.'", GetCleanName(), GetSpellName(spell_id), tar->GetCleanName());
return false;
@@ -9962,13 +9962,13 @@ bool Bot::CanCastSpellType(uint16 spell_type, uint16 spell_id, Mob* tar) {
tar->IsBot() &&
(tar->GetLevel() >= tar->CastToBot()->GetStopMeleeLevel()) &&
(
IsEffectInSpell(spell_id, SE_AttackSpeed) ||
IsEffectInSpell(spell_id, SE_ReverseDS)
IsEffectInSpell(spell_id, SpellEffect::AttackSpeed) ||
IsEffectInSpell(spell_id, SpellEffect::ReverseDS)
) ||
(
SpellEffectsCount(spell_id) == 1 &&
(
IsEffectInSpell(spell_id, SE_ATK) || IsEffectInSpell(spell_id, SE_STR)
IsEffectInSpell(spell_id, SpellEffect::ATK) || IsEffectInSpell(spell_id, SpellEffect::STR)
)
)
) {
@@ -9978,11 +9978,11 @@ bool Bot::CanCastSpellType(uint16 spell_type, uint16 spell_id, Mob* tar) {
break;
case Archetype::Melee:
if (
IsEffectInSpell(spell_id, SE_IncreaseSpellHaste) ||
IsEffectInSpell(spell_id, SE_ManaPool) ||
IsEffectInSpell(spell_id, SE_CastingLevel) ||
IsEffectInSpell(spell_id, SE_ManaRegen_v2) ||
IsEffectInSpell(spell_id, SE_CurrentMana)
IsEffectInSpell(spell_id, SpellEffect::IncreaseSpellHaste) ||
IsEffectInSpell(spell_id, SpellEffect::ManaPool) ||
IsEffectInSpell(spell_id, SpellEffect::CastingLevel) ||
IsEffectInSpell(spell_id, SpellEffect::ManaRegen_v2) ||
IsEffectInSpell(spell_id, SpellEffect::CurrentMana)
) {
LogBotSpellChecksDetail("{} says, 'Cancelling cast of {} on {} due to Archetype::Melee.'", GetCleanName(), GetSpellName(spell_id), tar->GetCleanName());
return false;
@@ -9997,8 +9997,8 @@ bool Bot::CanCastSpellType(uint16 spell_type, uint16 spell_id, Mob* tar) {
// Differences for each type
if (spell_type != BotSpellTypes::InCombatBuff) {
if (
IsEffectInSpell(spell_id, SE_AbsorbMagicAtt) ||
IsEffectInSpell(spell_id, SE_Rune)
IsEffectInSpell(spell_id, SpellEffect::AbsorbMagicAtt) ||
IsEffectInSpell(spell_id, SpellEffect::Rune)
) {
for (int i = 0; i < tar->GetMaxTotalSlots(); i++) {
uint32 buff_count = tar->GetMaxTotalSlots();
@@ -10026,14 +10026,14 @@ bool Bot::CanCastSpellType(uint16 spell_type, uint16 spell_id, Mob* tar) {
tar->IsBot() &&
(tar->GetLevel() >= tar->CastToBot()->GetStopMeleeLevel()) &&
(
IsEffectInSpell(spell_id, SE_AttackSpeed) ||
IsEffectInSpell(spell_id, SE_ReverseDS)
IsEffectInSpell(spell_id, SpellEffect::AttackSpeed) ||
IsEffectInSpell(spell_id, SpellEffect::ReverseDS)
) ||
(
SpellEffectsCount(spell_id) == 1 &&
(
IsEffectInSpell(spell_id, SE_ATK) ||
IsEffectInSpell(spell_id, SE_STR)
IsEffectInSpell(spell_id, SpellEffect::ATK) ||
IsEffectInSpell(spell_id, SpellEffect::STR)
)
)
) {
@@ -10043,11 +10043,11 @@ bool Bot::CanCastSpellType(uint16 spell_type, uint16 spell_id, Mob* tar) {
break;
case Archetype::Melee:
if (
IsEffectInSpell(spell_id, SE_IncreaseSpellHaste) ||
IsEffectInSpell(spell_id, SE_ManaPool) ||
IsEffectInSpell(spell_id, SE_CastingLevel) ||
IsEffectInSpell(spell_id, SE_ManaRegen_v2) ||
IsEffectInSpell(spell_id, SE_CurrentMana)
IsEffectInSpell(spell_id, SpellEffect::IncreaseSpellHaste) ||
IsEffectInSpell(spell_id, SpellEffect::ManaPool) ||
IsEffectInSpell(spell_id, SpellEffect::CastingLevel) ||
IsEffectInSpell(spell_id, SpellEffect::ManaRegen_v2) ||
IsEffectInSpell(spell_id, SpellEffect::CurrentMana)
) {
LogBotSpellChecksDetail("{} says, 'Cancelling cast of {} on {} due to Archetype::Melee.'", GetCleanName(), GetSpellName(spell_id), tar->GetCleanName());
return false;
@@ -10329,7 +10329,7 @@ bool Bot::IsValidMezTarget(Mob* owner, Mob* npc, uint16 spell_id) {
auto npc_buffs = npc->GetBuffs();
for (int i = 0; i < buff_count; i++) {
if (IsDetrimentalSpell(npc_buffs[i].spellid) && IsEffectInSpell(npc_buffs[i].spellid, SE_CurrentHP)) {
if (IsDetrimentalSpell(npc_buffs[i].spellid) && IsEffectInSpell(npc_buffs[i].spellid, SpellEffect::CurrentHP)) {
return false;
}
}
@@ -11684,7 +11684,7 @@ bool Bot::IsValidSpellTypeBySpellID(uint16 spell_type, uint16 spell_id) {
return false;
case BotSpellTypes::Root:
case BotSpellTypes::AERoot:
if (IsDetrimentalSpell(spell_id) && IsEffectInSpell(spell_id, SE_Root)) {
if (IsDetrimentalSpell(spell_id) && IsEffectInSpell(spell_id, SpellEffect::Root)) {
return true;
}
@@ -11718,7 +11718,7 @@ bool Bot::IsValidSpellTypeBySpellID(uint16 spell_type, uint16 spell_id) {
return false;
case BotSpellTypes::Pet:
if (IsSummonPetSpell(spell_id) || IsEffectInSpell(spell_id, SE_TemporaryPets)) {
if (IsSummonPetSpell(spell_id) || IsEffectInSpell(spell_id, SpellEffect::TemporaryPets)) {
return true;
}
@@ -11732,7 +11732,7 @@ bool Bot::IsValidSpellTypeBySpellID(uint16 spell_type, uint16 spell_id) {
return false;
case BotSpellTypes::Snare:
case BotSpellTypes::AESnare:
if (IsDetrimentalSpell(spell_id) && IsEffectInSpell(spell_id, SE_MovementSpeed)) {
if (IsDetrimentalSpell(spell_id) && IsEffectInSpell(spell_id, SpellEffect::MovementSpeed)) {
return true;
}
@@ -11806,7 +11806,7 @@ bool Bot::IsValidSpellTypeBySpellID(uint16 spell_type, uint16 spell_id) {
return false;
case BotSpellTypes::Resurrect:
if (IsEffectInSpell(spell_id, SE_Revive)) {
if (IsEffectInSpell(spell_id, SpellEffect::Revive)) {
return true;
}
@@ -11911,14 +11911,14 @@ bool Bot::IsValidSpellTypeBySpellID(uint16 spell_type, uint16 spell_id) {
return false;
case BotSpellTypes::ResistBuffs:
case BotSpellTypes::PetResistBuffs:
if (IsResistanceBuffSpell(spell_id) && !IsEffectInSpell(spell_id, SE_DamageShield)) {
if (IsResistanceBuffSpell(spell_id) && !IsEffectInSpell(spell_id, SpellEffect::DamageShield)) {
return true;
}
return false;
case BotSpellTypes::DamageShields:
case BotSpellTypes::PetDamageShields:
if (IsBeneficialSpell(spell_id) && IsEffectInSpell(spell_id, SE_DamageShield)) {
if (IsBeneficialSpell(spell_id) && IsEffectInSpell(spell_id, SpellEffect::DamageShield)) {
return true;
}
@@ -11926,7 +11926,7 @@ bool Bot::IsValidSpellTypeBySpellID(uint16 spell_type, uint16 spell_id) {
case BotSpellTypes::Teleport:
if (
IsBeneficialSpell(spell_id) &&
(IsEffectInSpell(spell_id, SE_Teleport) || IsEffectInSpell(spell_id, SE_Translocate))
(IsEffectInSpell(spell_id, SpellEffect::Teleport) || IsEffectInSpell(spell_id, SpellEffect::Translocate))
) {
return true;
}
@@ -11942,40 +11942,40 @@ bool Bot::IsValidSpellTypeBySpellID(uint16 spell_type, uint16 spell_id) {
case BotSpellTypes::Succor:
if (
IsBeneficialSpell(spell_id) &&
IsEffectInSpell(spell_id, SE_Succor)
IsEffectInSpell(spell_id, SpellEffect::Succor)
) {
return true;
}
return false;
case BotSpellTypes::BindAffinity:
if (IsEffectInSpell(spell_id, SE_BindAffinity)) {
if (IsEffectInSpell(spell_id, SpellEffect::BindAffinity)) {
return true;
}
return false;
case BotSpellTypes::Identify:
if (IsEffectInSpell(spell_id, SE_Identify)) {
if (IsEffectInSpell(spell_id, SpellEffect::Identify)) {
return true;
}
return false;
case BotSpellTypes::Levitate:
if (IsBeneficialSpell(spell_id) && IsEffectInSpell(spell_id, SE_Levitate)) {
if (IsBeneficialSpell(spell_id) && IsEffectInSpell(spell_id, SpellEffect::Levitate)) {
return true;
}
return false;
case BotSpellTypes::Rune:
if (IsBeneficialSpell(spell_id) &&
(IsEffectInSpell(spell_id, SE_AbsorbMagicAtt) || IsEffectInSpell(spell_id, SE_Rune))
(IsEffectInSpell(spell_id, SpellEffect::AbsorbMagicAtt) || IsEffectInSpell(spell_id, SpellEffect::Rune))
) {
return true;
}
return false;
case BotSpellTypes::WaterBreathing:
if (IsBeneficialSpell(spell_id) && IsEffectInSpell(spell_id, SE_WaterBreathing)) {
if (IsBeneficialSpell(spell_id) && IsEffectInSpell(spell_id, SpellEffect::WaterBreathing)) {
return true;
}
@@ -11983,7 +11983,7 @@ bool Bot::IsValidSpellTypeBySpellID(uint16 spell_type, uint16 spell_id) {
case BotSpellTypes::Size:
if (
IsBeneficialSpell(spell_id) &&
(IsEffectInSpell(spell_id, SE_ModelSize) || IsEffectInSpell(spell_id, SE_ChangeHeight))
(IsEffectInSpell(spell_id, SpellEffect::ModelSize) || IsEffectInSpell(spell_id, SpellEffect::ChangeHeight))
) {
return true;
}
@@ -11991,14 +11991,14 @@ bool Bot::IsValidSpellTypeBySpellID(uint16 spell_type, uint16 spell_id) {
return false;
case BotSpellTypes::Invisibility:
if (IsBeneficialSpell(spell_id) &&
(IsEffectInSpell(spell_id, SE_SeeInvis) ||IsInvisibleSpell(spell_id))
(IsEffectInSpell(spell_id, SpellEffect::SeeInvis) ||IsInvisibleSpell(spell_id))
) {
return true;
}
return false;
case BotSpellTypes::MovementSpeed:
if (IsBeneficialSpell(spell_id) && IsEffectInSpell(spell_id, SE_MovementSpeed)) {
if (IsBeneficialSpell(spell_id) && IsEffectInSpell(spell_id, SpellEffect::MovementSpeed)) {
return true;
}
@@ -12007,10 +12007,10 @@ bool Bot::IsValidSpellTypeBySpellID(uint16 spell_type, uint16 spell_id) {
if (
IsBeneficialSpell(spell_id) &&
(
IsEffectInSpell(spell_id, SE_GateToHomeCity) ||
IsEffectInSpell(spell_id, SpellEffect::GateToHomeCity) ||
(
teleport_zone.compare("") &&
(IsEffectInSpell(spell_id, SE_Teleport) || IsEffectInSpell(spell_id, SE_Translocate))
(IsEffectInSpell(spell_id, SpellEffect::Teleport) || IsEffectInSpell(spell_id, SpellEffect::Translocate))
)
)
) {
@@ -12019,7 +12019,7 @@ bool Bot::IsValidSpellTypeBySpellID(uint16 spell_type, uint16 spell_id) {
return false;
case BotSpellTypes::SummonCorpse:
if (IsEffectInSpell(spell_id, SE_SummonCorpse)) {
if (IsEffectInSpell(spell_id, SpellEffect::SummonCorpse)) {
return true;
}
@@ -12510,15 +12510,15 @@ bool Bot::IsValidSpellTypeSubType(uint16 spell_type, uint16 sub_type, uint16 spe
break;
case CommandedSubTypes::SeeInvis:
if (IsEffectInSpell(spell_id, SE_SeeInvis)) {
if (IsEffectInSpell(spell_id, SpellEffect::SeeInvis)) {
return true;
}
break;
case CommandedSubTypes::Invis:
if (
IsEffectInSpell(spell_id, SE_Invisibility) ||
IsEffectInSpell(spell_id, SE_Invisibility2)
IsEffectInSpell(spell_id, SpellEffect::Invisibility) ||
IsEffectInSpell(spell_id, SpellEffect::Invisibility2)
) {
return true;
}
@@ -12526,8 +12526,8 @@ bool Bot::IsValidSpellTypeSubType(uint16 spell_type, uint16 sub_type, uint16 spe
break;
case CommandedSubTypes::InvisUndead:
if (
IsEffectInSpell(spell_id, SE_InvisVsUndead) ||
IsEffectInSpell(spell_id, SE_InvisVsUndead2)
IsEffectInSpell(spell_id, SpellEffect::InvisVsUndead) ||
IsEffectInSpell(spell_id, SpellEffect::InvisVsUndead2)
) {
return true;
}
@@ -12535,8 +12535,8 @@ bool Bot::IsValidSpellTypeSubType(uint16 spell_type, uint16 sub_type, uint16 spe
break;
case CommandedSubTypes::InvisAnimals:
if (
IsEffectInSpell(spell_id, SE_InvisVsAnimals) ||
IsEffectInSpell(spell_id, SE_ImprovedInvisAnimals)
IsEffectInSpell(spell_id, SpellEffect::InvisVsAnimals) ||
IsEffectInSpell(spell_id, SpellEffect::ImprovedInvisAnimals)
) {
return true;
}
@@ -12545,13 +12545,13 @@ bool Bot::IsValidSpellTypeSubType(uint16 spell_type, uint16 sub_type, uint16 spe
case CommandedSubTypes::Shrink:
if (
(
IsEffectInSpell(spell_id, SE_ModelSize) &&
CalcSpellEffectValue(spell_id, GetSpellEffectIndex(spell_id, SE_ModelSize), GetLevel()) < 100
IsEffectInSpell(spell_id, SpellEffect::ModelSize) &&
CalcSpellEffectValue(spell_id, GetSpellEffectIndex(spell_id, SpellEffect::ModelSize), GetLevel()) < 100
)
||
(
IsEffectInSpell(spell_id, SE_ChangeHeight) &&
CalcSpellEffectValue(spell_id, GetSpellEffectIndex(spell_id, SE_ChangeHeight), GetLevel()) < 100
IsEffectInSpell(spell_id, SpellEffect::ChangeHeight) &&
CalcSpellEffectValue(spell_id, GetSpellEffectIndex(spell_id, SpellEffect::ChangeHeight), GetLevel()) < 100
)
) {
return true;
@@ -12561,13 +12561,13 @@ bool Bot::IsValidSpellTypeSubType(uint16 spell_type, uint16 sub_type, uint16 spe
case CommandedSubTypes::Grow:
if (
(
IsEffectInSpell(spell_id, SE_ModelSize) &&
CalcSpellEffectValue(spell_id, GetSpellEffectIndex(spell_id, SE_ModelSize), GetLevel()) > 100
IsEffectInSpell(spell_id, SpellEffect::ModelSize) &&
CalcSpellEffectValue(spell_id, GetSpellEffectIndex(spell_id, SpellEffect::ModelSize), GetLevel()) > 100
)
||
(
IsEffectInSpell(spell_id, SE_ChangeHeight) &&
CalcSpellEffectValue(spell_id, GetSpellEffectIndex(spell_id, SE_ChangeHeight), GetLevel()) > 100
IsEffectInSpell(spell_id, SpellEffect::ChangeHeight) &&
CalcSpellEffectValue(spell_id, GetSpellEffectIndex(spell_id, SpellEffect::ChangeHeight), GetLevel()) > 100
)
) {
return true;
@@ -12577,7 +12577,7 @@ bool Bot::IsValidSpellTypeSubType(uint16 spell_type, uint16 sub_type, uint16 spe
case CommandedSubTypes::Selo:
if (
IsBeneficialSpell(spell_id) &&
IsEffectInSpell(spell_id, SE_MovementSpeed) &&
IsEffectInSpell(spell_id, SpellEffect::MovementSpeed) &&
IsBardSong(spell_id)
) {
return true;
@@ -13347,7 +13347,7 @@ bool Bot::IsImmuneToBotSpell(uint16 spell_id, Mob* caster) {
if (!GetSpecialAbility(SpecialAbility::MesmerizeImmunity) && IsMesmerizeSpell(spell_id)) {
// check max level for spell
effect_index = GetSpellEffectIndex(spell_id, SE_Mez);
effect_index = GetSpellEffectIndex(spell_id, SpellEffect::Mez);
assert(effect_index >= 0);
// NPCs get to ignore the max level
if (
@@ -13359,13 +13359,13 @@ bool Bot::IsImmuneToBotSpell(uint16 spell_id, Mob* caster) {
}
// slow and haste spells
if (GetSpecialAbility(SpecialAbility::SlowImmunity) && IsEffectInSpell(spell_id, SE_AttackSpeed)) {
if (GetSpecialAbility(SpecialAbility::SlowImmunity) && IsEffectInSpell(spell_id, SpellEffect::AttackSpeed)) {
return true;
}
// client vs client fear
if (!GetSpecialAbility(SpecialAbility::FearImmunity) && IsEffectInSpell(spell_id, SE_Fear)) {
effect_index = GetSpellEffectIndex(spell_id, SE_Fear);
if (!GetSpecialAbility(SpecialAbility::FearImmunity) && IsEffectInSpell(spell_id, SpellEffect::Fear)) {
effect_index = GetSpellEffectIndex(spell_id, SpellEffect::Fear);
if (IsClient() && caster->IsClient() && (caster->CastToClient()->GetGM() == false)) {
LogSpells("Clients cannot fear eachother!");
@@ -13389,7 +13389,7 @@ bool Bot::IsImmuneToBotSpell(uint16 spell_id, Mob* caster) {
//let npcs cast whatever charm on anyone
if (!caster->IsNPC()) {
// check level limit of charm spell
effect_index = GetSpellEffectIndex(spell_id, SE_Charm);
effect_index = GetSpellEffectIndex(spell_id, SpellEffect::Charm);
assert(effect_index >= 0);
if (GetLevel() > spells[spell_id].max_value[effect_index] && spells[spell_id].max_value[effect_index] != 0) {
return true;
@@ -13400,8 +13400,8 @@ bool Bot::IsImmuneToBotSpell(uint16 spell_id, Mob* caster) {
if (
GetSpecialAbility(SpecialAbility::SnareImmunity) &&
(
IsEffectInSpell(spell_id, SE_Root) ||
IsEffectInSpell(spell_id, SE_MovementSpeed)
IsEffectInSpell(spell_id, SpellEffect::Root) ||
IsEffectInSpell(spell_id, SpellEffect::MovementSpeed)
)
) {
return true;