Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/game/AI/BaseAI/UnitAI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

#include "UnitAI.h"
#include "Entities/Creature.h"
#include "Globals/SharedDefines.h"
#include "Server/DBCStores.h"
#include "Spells/Spell.h"
#include "AI/ScriptDevAI/ScriptDevAIMgr.h"
Expand Down Expand Up @@ -731,7 +732,7 @@ CreatureList UnitAI::DoFindFriendlyEligibleDispel(SpellEntry const* spellInfo, b
dispelMask |= GetDispellMask(DispelType(spellInfo->EffectMiscValue[i]));
else if (spellInfo->Effect[i] == SPELL_EFFECT_DISPEL_MECHANIC)
mechanicMask |= (1 << (spellInfo->EffectMiscValue[i] - 1));
}
}
float maxRange = CalculateSpellRange(spellInfo);
return DoFindFriendlyEligibleDispel(maxRange, dispelMask, mechanicMask, self);
}
Expand Down Expand Up @@ -972,6 +973,8 @@ void UnitAI::AddMainSpell(uint32 spellId)
SpellEntry const* spellInfo = sSpellTemplate.LookupEntry<SpellEntry>(m_mainSpellId);
m_mainSpellCost = Spell::CalculatePowerCost(spellInfo, m_unit);
m_mainSpellMinRange = GetSpellMinRange(sSpellRangeStore.LookupEntry(spellInfo->rangeIndex));
if (sSpellRangeStore.LookupEntry(spellInfo->rangeIndex)->Flags != static_cast<uint32>(SpellRangeFlags::SPELL_RANGE_FLAG_MELEE))
m_chaseDistance = GetSpellMaxRange(sSpellRangeStore.LookupEntry(spellInfo->rangeIndex));
m_mainAttackMask = SpellSchoolMask(m_mainAttackMask + spellInfo->SchoolMask);
m_mainSpellInfo = spellInfo;
}
Expand Down Expand Up @@ -1148,6 +1151,9 @@ bool UnitAI::IsMainSpellPrevented(SpellEntry const* spellInfo) const
if (spellInfo->PreventionType == SPELL_PREVENTION_TYPE_PACIFY && m_unit->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PACIFIED))
return true;

if (m_unit->GetPower(static_cast<Powers>(spellInfo->powerType)) < m_mainSpellCost)
return true;

return false;
}

Expand Down Expand Up @@ -1376,4 +1382,3 @@ void UnitAI::AddInitialCooldowns()
}
}
}

10 changes: 5 additions & 5 deletions src/mangosd/mangosd.conf.dist.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#####################################
# MaNGOS Configuration file
#
# MaNGOS Configuration file
#
# To overwrite configuration fields with environment variables
# use the following pattern to generate environment variable names:
#
Expand Down Expand Up @@ -56,7 +56,7 @@ ConfVersion=2024020101
# Please, note, for data consistency only one connection for each database is used for transactions and async SELECTs.
# So formula to find out how many connections will be established: X = #_connections + 1
# Default: 1 connection for SELECT statements
#
#
# MaxPingTime
# Settings for maximum database-ping interval (minutes between pings)
#
Expand Down Expand Up @@ -986,7 +986,7 @@ TalentsInspecting = 1
#
# LeashRadius
# Radius for default leash due to being too far from refresh position
# Default: 30 (yards)
# Default: 45 (yards)
#
# CreatureFamilyFleeAssistanceRadius
# Radius which creature will use to seek for a near creature for assistance. Creature will flee to this creature.
Expand Down Expand Up @@ -1096,7 +1096,7 @@ TalentsInspecting = 1

Rate.Creature.Aggro = 1
CreatureRespawnAggroDelay = 5000
LeashRadius = 30
LeashRadius = 45
CreatureFamilyFleeAssistanceRadius = 30
CreatureFamilyAssistanceRadius = 5
CreatureFamilyAssistanceDelay = 1500
Expand Down