Merge branch 'azerothcore:master' into Playerbot

This commit is contained in:
bash
2025-09-25 16:35:37 +02:00
committed by GitHub
10 changed files with 79 additions and 62 deletions

View File

@@ -4565,6 +4565,13 @@ MunchingBlizzlike.Enabled = 1
Daze.Enabled = 1 Daze.Enabled = 1
#
# InfiniteAmmo.Enabled
# Description: Enable or disable ammo consumption for ranged attacks and thrown weapons.
# Default: 0 - (Blizzlike)
InfiniteAmmo.Enabled = 0
# #
################################################################################################### ###################################################################################################

View File

@@ -1081,6 +1081,7 @@ void ConditionMgr::LoadConditions(bool isReload)
LOG_INFO("server.loading", "Reloading `gossip_menu_option` Table for Conditions!"); LOG_INFO("server.loading", "Reloading `gossip_menu_option` Table for Conditions!");
sObjectMgr->LoadGossipMenuItems(); sObjectMgr->LoadGossipMenuItems();
sSpellMgr->UnloadSpellInfoImplicitTargetConditionLists();
} }
QueryResult result = WorldDatabase.Query("SELECT SourceTypeOrReferenceId, SourceGroup, SourceEntry, SourceId, ElseGroup, ConditionTypeOrReference, ConditionTarget, " QueryResult result = WorldDatabase.Query("SELECT SourceTypeOrReferenceId, SourceGroup, SourceEntry, SourceId, ElseGroup, ConditionTypeOrReference, ConditionTarget, "
@@ -1404,7 +1405,7 @@ bool ConditionMgr::addToSpellImplicitTargetConditions(Condition* cond)
// build new shared mask with found effect // build new shared mask with found effect
uint32 sharedMask = (1 << i); uint32 sharedMask = (1 << i);
std::shared_ptr<ConditionList> cmp = spellInfo->Effects[i].ImplicitTargetConditions; ConditionList* cmp = spellInfo->Effects[i].ImplicitTargetConditions;
for (uint8 effIndex = i + 1; effIndex < MAX_SPELL_EFFECTS; ++effIndex) for (uint8 effIndex = i + 1; effIndex < MAX_SPELL_EFFECTS; ++effIndex)
{ {
if (spellInfo->Effects[effIndex].ImplicitTargetConditions == cmp) if (spellInfo->Effects[effIndex].ImplicitTargetConditions == cmp)
@@ -1427,7 +1428,7 @@ bool ConditionMgr::addToSpellImplicitTargetConditions(Condition* cond)
return false; return false;
// get shared data // get shared data
std::shared_ptr<ConditionList> sharedList = spellInfo->Effects[firstEffIndex].ImplicitTargetConditions; ConditionList* sharedList = spellInfo->Effects[firstEffIndex].ImplicitTargetConditions;
// there's already data entry for that sharedMask // there's already data entry for that sharedMask
if (sharedList) if (sharedList)
@@ -1446,25 +1447,22 @@ bool ConditionMgr::addToSpellImplicitTargetConditions(Condition* cond)
else else
{ {
// add new list, create new shared mask // add new list, create new shared mask
auto newList = std::make_shared<ConditionList>(); sharedList = new ConditionList();
bool assigned = false; bool assigned = false;
for (uint8 i = firstEffIndex; i < MAX_SPELL_EFFECTS; ++i) for (uint8 i = firstEffIndex; i < MAX_SPELL_EFFECTS; ++i)
{ {
if ((1 << i) & commonMask) if ((1 << i) & commonMask)
{ {
spellInfo->Effects[i].ImplicitTargetConditions = newList; spellInfo->Effects[i].ImplicitTargetConditions = sharedList;
assigned = true; assigned = true;
} }
} }
if (assigned) if (!assigned)
sharedList = newList; delete sharedList;
} }
if (sharedList) if (sharedList)
sharedList->push_back(cond); sharedList->push_back(cond);
break; break;
} }
} }

View File

@@ -1126,7 +1126,7 @@ void Spell::SelectImplicitNearbyTargets(SpellEffIndex effIndex, SpellImplicitTar
break; break;
} }
std::shared_ptr<ConditionList> condList = m_spellInfo->Effects[effIndex].ImplicitTargetConditions; ConditionList* condList = m_spellInfo->Effects[effIndex].ImplicitTargetConditions;
// handle emergency case - try to use other provided targets if no conditions provided // handle emergency case - try to use other provided targets if no conditions provided
if (targetType.GetCheckType() == TARGET_CHECK_ENTRY && (!condList || condList->empty())) if (targetType.GetCheckType() == TARGET_CHECK_ENTRY && (!condList || condList->empty()))
@@ -1221,7 +1221,7 @@ void Spell::SelectImplicitConeTargets(SpellEffIndex effIndex, SpellImplicitTarge
std::list<WorldObject*> targets; std::list<WorldObject*> targets;
SpellTargetObjectTypes objectType = targetType.GetObjectType(); SpellTargetObjectTypes objectType = targetType.GetObjectType();
SpellTargetCheckTypes selectionType = targetType.GetCheckType(); SpellTargetCheckTypes selectionType = targetType.GetCheckType();
std::shared_ptr<ConditionList> condList = m_spellInfo->Effects[effIndex].ImplicitTargetConditions; ConditionList* condList = m_spellInfo->Effects[effIndex].ImplicitTargetConditions;
float coneAngle = M_PI / 2; float coneAngle = M_PI / 2;
float radius = m_spellInfo->Effects[effIndex].CalcRadius(m_caster) * m_spellValue->RadiusMod; float radius = m_spellInfo->Effects[effIndex].CalcRadius(m_caster) * m_spellValue->RadiusMod;
@@ -2119,7 +2119,7 @@ void Spell::SelectEffectTypeImplicitTargets(uint8 effIndex)
} }
} }
uint32 Spell::GetSearcherTypeMask(SpellTargetObjectTypes objType, std::shared_ptr<ConditionList> condList) uint32 Spell::GetSearcherTypeMask(SpellTargetObjectTypes objType, ConditionList* condList)
{ {
// this function selects which containers need to be searched for spell target // this function selects which containers need to be searched for spell target
uint32 retMask = GRID_MAP_TYPE_MASK_ALL; uint32 retMask = GRID_MAP_TYPE_MASK_ALL;
@@ -2164,9 +2164,7 @@ void Spell::SearchTargets(SEARCHER& searcher, uint32 containerMask, Unit* refere
Cell::VisitObjects(pos->GetPositionX(), pos->GetPositionY(), referer->GetMap(), searcher, radius); Cell::VisitObjects(pos->GetPositionX(), pos->GetPositionY(), referer->GetMap(), searcher, radius);
} }
WorldObject* Spell::SearchNearbyTarget(float range, SpellTargetObjectTypes objectType, WorldObject* Spell::SearchNearbyTarget(float range, SpellTargetObjectTypes objectType, SpellTargetCheckTypes selectionType, ConditionList* condList)
SpellTargetCheckTypes selectionType,
std::shared_ptr<ConditionList> condList)
{ {
WorldObject* target = nullptr; WorldObject* target = nullptr;
uint32 containerTypeMask = GetSearcherTypeMask(objectType, condList); uint32 containerTypeMask = GetSearcherTypeMask(objectType, condList);
@@ -2178,11 +2176,7 @@ WorldObject* Spell::SearchNearbyTarget(float range, SpellTargetObjectTypes objec
return target; return target;
} }
void Spell::SearchAreaTargets(std::list<WorldObject*> &targets, float range, void Spell::SearchAreaTargets(std::list<WorldObject*>& targets, float range, Position const* position, Unit* referer, SpellTargetObjectTypes objectType, SpellTargetCheckTypes selectionType, ConditionList* condList)
Position const *position, Unit *referer,
SpellTargetObjectTypes objectType,
SpellTargetCheckTypes selectionType,
std::shared_ptr<ConditionList> condList)
{ {
uint32 containerTypeMask = GetSearcherTypeMask(objectType, condList); uint32 containerTypeMask = GetSearcherTypeMask(objectType, condList);
if (!containerTypeMask) if (!containerTypeMask)
@@ -2192,11 +2186,7 @@ void Spell::SearchAreaTargets(std::list<WorldObject*> &targets, float range,
SearchTargets<Acore::WorldObjectListSearcher<Acore::WorldObjectSpellAreaTargetCheck> > (searcher, containerTypeMask, m_caster, position, range); SearchTargets<Acore::WorldObjectListSearcher<Acore::WorldObjectSpellAreaTargetCheck> > (searcher, containerTypeMask, m_caster, position, range);
} }
void Spell::SearchChainTargets( void Spell::SearchChainTargets(std::list<WorldObject*>& targets, uint32 chainTargets, WorldObject* target, SpellTargetObjectTypes objectType, SpellTargetCheckTypes selectType, SpellTargetSelectionCategories /*selectCategory*/, ConditionList* condList, bool isChainHeal)
std::list<WorldObject*> &targets, uint32 chainTargets, WorldObject *target,
SpellTargetObjectTypes objectType, SpellTargetCheckTypes selectType,
SpellTargetSelectionCategories /*selectCategory*/,
std::shared_ptr<ConditionList> condList, bool isChainHeal)
{ {
// max dist for jump target selection // max dist for jump target selection
float jumpRadius = 0.0f; float jumpRadius = 0.0f;
@@ -2233,8 +2223,7 @@ void Spell::SearchChainTargets(
WorldObject* chainSource = m_spellInfo->HasAttribute(SPELL_ATTR2_CHAIN_FROM_CASTER) ? m_caster : target; WorldObject* chainSource = m_spellInfo->HasAttribute(SPELL_ATTR2_CHAIN_FROM_CASTER) ? m_caster : target;
std::list<WorldObject*> tempTargets; std::list<WorldObject*> tempTargets;
SearchAreaTargets(tempTargets, searchRadius, chainSource, m_caster, SearchAreaTargets(tempTargets, searchRadius, chainSource, m_caster, objectType, selectType, condList);
objectType, selectType, condList);
tempTargets.remove(target); tempTargets.remove(target);
// remove targets which are always invalid for chain spells // remove targets which are always invalid for chain spells
@@ -5422,14 +5411,15 @@ void Spell::TakeAmmo()
// decrease durability for non-stackable throw weapon // decrease durability for non-stackable throw weapon
m_caster->ToPlayer()->DurabilityPointLossForEquipSlot(EQUIPMENT_SLOT_RANGED); m_caster->ToPlayer()->DurabilityPointLossForEquipSlot(EQUIPMENT_SLOT_RANGED);
} }
else else if (!sWorld->getBoolConfig(CONFIG_ENABLE_INFINITEAMMO))
{ {
// decrease items amount for stackable throw weapon // decrease items amount for stackable throw weapon
uint32 count = 1; uint32 count = 1;
m_caster->ToPlayer()->DestroyItemCount(pItem, count, true); m_caster->ToPlayer()->DestroyItemCount(pItem, count, true);
} }
} }
else if (uint32 ammo = m_caster->ToPlayer()->GetUInt32Value(PLAYER_AMMO_ID)) else if (!sWorld->getBoolConfig(CONFIG_ENABLE_INFINITEAMMO))
if (uint32 ammo = m_caster->ToPlayer()->GetUInt32Value(PLAYER_AMMO_ID))
m_caster->ToPlayer()->DestroyItemCount(ammo, 1, true); m_caster->ToPlayer()->DestroyItemCount(ammo, 1, true);
} }
} }
@@ -8995,7 +8985,7 @@ namespace Acore
{ {
WorldObjectSpellTargetCheck::WorldObjectSpellTargetCheck(Unit* caster, Unit* referer, SpellInfo const* spellInfo, WorldObjectSpellTargetCheck::WorldObjectSpellTargetCheck(Unit* caster, Unit* referer, SpellInfo const* spellInfo,
SpellTargetCheckTypes selectionType, std::shared_ptr<ConditionList> condList) : _caster(caster), _referer(referer), _spellInfo(spellInfo), SpellTargetCheckTypes selectionType, ConditionList* condList) : _caster(caster), _referer(referer), _spellInfo(spellInfo),
_targetSelectionType(selectionType), _condList(condList) _targetSelectionType(selectionType), _condList(condList)
{ {
if (condList) if (condList)
@@ -9078,7 +9068,7 @@ namespace Acore
} }
WorldObjectSpellNearbyTargetCheck::WorldObjectSpellNearbyTargetCheck(float range, Unit* caster, SpellInfo const* spellInfo, WorldObjectSpellNearbyTargetCheck::WorldObjectSpellNearbyTargetCheck(float range, Unit* caster, SpellInfo const* spellInfo,
SpellTargetCheckTypes selectionType, std::shared_ptr<ConditionList> condList) SpellTargetCheckTypes selectionType, ConditionList* condList)
: WorldObjectSpellTargetCheck(caster, caster, spellInfo, selectionType, condList), _range(range), _position(caster) : WorldObjectSpellTargetCheck(caster, caster, spellInfo, selectionType, condList), _range(range), _position(caster)
{ {
} }
@@ -9095,7 +9085,7 @@ namespace Acore
} }
WorldObjectSpellAreaTargetCheck::WorldObjectSpellAreaTargetCheck(float range, Position const* position, Unit* caster, WorldObjectSpellAreaTargetCheck::WorldObjectSpellAreaTargetCheck(float range, Position const* position, Unit* caster,
Unit* referer, SpellInfo const* spellInfo, SpellTargetCheckTypes selectionType, std::shared_ptr<ConditionList> condList) Unit* referer, SpellInfo const* spellInfo, SpellTargetCheckTypes selectionType, ConditionList* condList)
: WorldObjectSpellTargetCheck(caster, referer, spellInfo, selectionType, condList), _range(range), _position(position) : WorldObjectSpellTargetCheck(caster, referer, spellInfo, selectionType, condList), _range(range), _position(position)
{ {
} }
@@ -9115,7 +9105,7 @@ namespace Acore
} }
WorldObjectSpellConeTargetCheck::WorldObjectSpellConeTargetCheck(float coneAngle, float range, Unit* caster, WorldObjectSpellConeTargetCheck::WorldObjectSpellConeTargetCheck(float coneAngle, float range, Unit* caster,
SpellInfo const* spellInfo, SpellTargetCheckTypes selectionType, std::shared_ptr<ConditionList> condList) SpellInfo const* spellInfo, SpellTargetCheckTypes selectionType, ConditionList* condList)
: WorldObjectSpellAreaTargetCheck(range, caster, caster, caster, spellInfo, selectionType, condList), _coneAngle(coneAngle) : WorldObjectSpellAreaTargetCheck(range, caster, caster, caster, spellInfo, selectionType, condList), _coneAngle(coneAngle)
{ {
} }
@@ -9141,7 +9131,7 @@ namespace Acore
} }
WorldObjectSpellTrajTargetCheck::WorldObjectSpellTrajTargetCheck(float range, Position const* position, Unit* caster, WorldObjectSpellTrajTargetCheck::WorldObjectSpellTrajTargetCheck(float range, Position const* position, Unit* caster,
SpellInfo const* spellInfo, SpellTargetCheckTypes selectionType, std::shared_ptr<ConditionList> condList) SpellInfo const* spellInfo, SpellTargetCheckTypes selectionType, ConditionList* condList)
: WorldObjectSpellAreaTargetCheck(range, position, caster, caster, spellInfo, selectionType, condList) : WorldObjectSpellAreaTargetCheck(range, position, caster, caster, spellInfo, selectionType, condList)
{ {
} }

View File

@@ -445,25 +445,12 @@ public:
void SelectEffectTypeImplicitTargets(uint8 effIndex); void SelectEffectTypeImplicitTargets(uint8 effIndex);
uint32 GetSearcherTypeMask(SpellTargetObjectTypes objType, uint32 GetSearcherTypeMask(SpellTargetObjectTypes objType, ConditionList* condList);
std::shared_ptr<ConditionList> condList);
template<class SEARCHER> void SearchTargets(SEARCHER& searcher, uint32 containerMask, Unit* referer, Position const* pos, float radius); template<class SEARCHER> void SearchTargets(SEARCHER& searcher, uint32 containerMask, Unit* referer, Position const* pos, float radius);
WorldObject* SearchNearbyTarget(float range, SpellTargetObjectTypes objectType, WorldObject* SearchNearbyTarget(float range, SpellTargetObjectTypes objectType, SpellTargetCheckTypes selectionType, ConditionList* condList = nullptr);
SpellTargetCheckTypes selectionType, void SearchAreaTargets(std::list<WorldObject*>& targets, float range, Position const* position, Unit* referer, SpellTargetObjectTypes objectType, SpellTargetCheckTypes selectionType, ConditionList* condList);
std::shared_ptr<ConditionList> condList = nullptr); void SearchChainTargets(std::list<WorldObject*>& targets, uint32 chainTargets, WorldObject* target, SpellTargetObjectTypes objectType, SpellTargetCheckTypes selectType, SpellTargetSelectionCategories selectCategory, ConditionList* condList, bool isChainHeal);
void SearchAreaTargets(std::list<WorldObject *> &targets, float range,
Position const *position, Unit *referer,
SpellTargetObjectTypes objectType,
SpellTargetCheckTypes selectionType,
std::shared_ptr<ConditionList> condList);
void SearchChainTargets(std::list<WorldObject *> &targets,
uint32 chainTargets, WorldObject *target,
SpellTargetObjectTypes objectType,
SpellTargetCheckTypes selectType,
SpellTargetSelectionCategories selectCategory,
std::shared_ptr<ConditionList> condList,
bool isChainHeal);
SpellCastResult prepare(SpellCastTargets const* targets, AuraEffect const* triggeredByAura = nullptr); SpellCastResult prepare(SpellCastTargets const* targets, AuraEffect const* triggeredByAura = nullptr);
void cancel(bool bySelf = false); void cancel(bool bySelf = false);
@@ -814,10 +801,10 @@ namespace Acore
SpellInfo const* _spellInfo; SpellInfo const* _spellInfo;
SpellTargetCheckTypes _targetSelectionType; SpellTargetCheckTypes _targetSelectionType;
ConditionSourceInfo* _condSrcInfo; ConditionSourceInfo* _condSrcInfo;
std::shared_ptr<ConditionList> _condList; ConditionList* _condList;
WorldObjectSpellTargetCheck(Unit* caster, Unit* referer, SpellInfo const* spellInfo, WorldObjectSpellTargetCheck(Unit* caster, Unit* referer, SpellInfo const* spellInfo,
SpellTargetCheckTypes selectionType, std::shared_ptr<ConditionList> condList); SpellTargetCheckTypes selectionType, ConditionList* condList);
~WorldObjectSpellTargetCheck(); ~WorldObjectSpellTargetCheck();
bool operator()(WorldObject* target); bool operator()(WorldObject* target);
}; };
@@ -827,7 +814,7 @@ namespace Acore
float _range; float _range;
Position const* _position; Position const* _position;
WorldObjectSpellNearbyTargetCheck(float range, Unit* caster, SpellInfo const* spellInfo, WorldObjectSpellNearbyTargetCheck(float range, Unit* caster, SpellInfo const* spellInfo,
SpellTargetCheckTypes selectionType, std::shared_ptr<ConditionList> condList); SpellTargetCheckTypes selectionType, ConditionList* condList);
bool operator()(WorldObject* target); bool operator()(WorldObject* target);
}; };
@@ -836,7 +823,7 @@ namespace Acore
float _range; float _range;
Position const* _position; Position const* _position;
WorldObjectSpellAreaTargetCheck(float range, Position const* position, Unit* caster, WorldObjectSpellAreaTargetCheck(float range, Position const* position, Unit* caster,
Unit* referer, SpellInfo const* spellInfo, SpellTargetCheckTypes selectionType, std::shared_ptr<ConditionList> condList); Unit* referer, SpellInfo const* spellInfo, SpellTargetCheckTypes selectionType, ConditionList* condList);
bool operator()(WorldObject* target); bool operator()(WorldObject* target);
}; };
@@ -844,14 +831,14 @@ namespace Acore
{ {
float _coneAngle; float _coneAngle;
WorldObjectSpellConeTargetCheck(float coneAngle, float range, Unit* caster, WorldObjectSpellConeTargetCheck(float coneAngle, float range, Unit* caster,
SpellInfo const* spellInfo, SpellTargetCheckTypes selectionType, std::shared_ptr<ConditionList> condList); SpellInfo const* spellInfo, SpellTargetCheckTypes selectionType, ConditionList* condList);
bool operator()(WorldObject* target); bool operator()(WorldObject* target);
}; };
struct WorldObjectSpellTrajTargetCheck : public WorldObjectSpellAreaTargetCheck struct WorldObjectSpellTrajTargetCheck : public WorldObjectSpellAreaTargetCheck
{ {
WorldObjectSpellTrajTargetCheck(float range, Position const* position, Unit* caster, WorldObjectSpellTrajTargetCheck(float range, Position const* position, Unit* caster,
SpellInfo const* spellInfo, SpellTargetCheckTypes selectionType, std::shared_ptr<ConditionList> condList); SpellInfo const* spellInfo, SpellTargetCheckTypes selectionType, ConditionList* condList);
bool operator()(WorldObject* target); bool operator()(WorldObject* target);
}; };
} }

View File

@@ -863,6 +863,11 @@ SpellInfo::SpellInfo(SpellEntry const* spellEntry)
_requireCooldownInfo = false; _requireCooldownInfo = false;
} }
SpellInfo::~SpellInfo()
{
_UnloadImplicitTargetConditionLists();
}
uint32 SpellInfo::GetCategory() const uint32 SpellInfo::GetCategory() const
{ {
return CategoryEntry ? CategoryEntry->Id : 0; return CategoryEntry ? CategoryEntry->Id : 0;
@@ -2868,6 +2873,23 @@ bool SpellInfo::_IsPositiveTarget(uint32 targetA, uint32 targetB)
return true; return true;
} }
void SpellInfo::_UnloadImplicitTargetConditionLists()
{
// find the same instances of ConditionList and delete them.
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
{
ConditionList* cur = Effects[i].ImplicitTargetConditions;
if (!cur)
continue;
for (uint8 j = i; j < MAX_SPELL_EFFECTS; ++j)
{
if (Effects[j].ImplicitTargetConditions == cur)
Effects[j].ImplicitTargetConditions = nullptr;
}
delete cur;
}
}
bool SpellInfo::CheckElixirStacking(Unit const* caster) const bool SpellInfo::CheckElixirStacking(Unit const* caster) const
{ {
if (!caster) if (!caster)

View File

@@ -39,7 +39,6 @@ struct SpellRadiusEntry;
struct SpellEntry; struct SpellEntry;
struct SpellCastTimesEntry; struct SpellCastTimesEntry;
struct Condition; struct Condition;
typedef std::list<Condition*> ConditionList;
enum SpellCastTargetFlags enum SpellCastTargetFlags
{ {
@@ -271,12 +270,12 @@ public:
uint32 ItemType; uint32 ItemType;
uint32 TriggerSpell; uint32 TriggerSpell;
flag96 SpellClassMask; flag96 SpellClassMask;
std::shared_ptr<ConditionList> ImplicitTargetConditions; std::list<Condition*>* ImplicitTargetConditions;
SpellEffectInfo() : _spellInfo(nullptr), _effIndex(0), Effect(0), ApplyAuraName(0), Amplitude(0), DieSides(0), SpellEffectInfo() : _spellInfo(nullptr), _effIndex(0), Effect(0), ApplyAuraName(0), Amplitude(0), DieSides(0),
RealPointsPerLevel(0), BasePoints(0), PointsPerComboPoint(0), ValueMultiplier(0), DamageMultiplier(0), RealPointsPerLevel(0), BasePoints(0), PointsPerComboPoint(0), ValueMultiplier(0), DamageMultiplier(0),
BonusMultiplier(0), MiscValue(0), MiscValueB(0), Mechanic(MECHANIC_NONE), RadiusEntry(nullptr), ChainTarget(0), BonusMultiplier(0), MiscValue(0), MiscValueB(0), Mechanic(MECHANIC_NONE), RadiusEntry(nullptr), ChainTarget(0),
ItemType(0), TriggerSpell(0), ImplicitTargetConditions() {} ItemType(0), TriggerSpell(0), ImplicitTargetConditions(nullptr) {}
SpellEffectInfo(SpellEntry const* spellEntry, SpellInfo const* spellInfo, uint8 effIndex); SpellEffectInfo(SpellEntry const* spellEntry, SpellInfo const* spellInfo, uint8 effIndex);
bool IsEffect() const; bool IsEffect() const;
@@ -404,6 +403,7 @@ public:
bool _requireCooldownInfo; bool _requireCooldownInfo;
SpellInfo(SpellEntry const* spellEntry); SpellInfo(SpellEntry const* spellEntry);
~SpellInfo();
uint32 GetCategory() const; uint32 GetCategory() const;
bool HasEffect(SpellEffects effect) const; bool HasEffect(SpellEffects effect) const;

View File

@@ -2766,6 +2766,15 @@ void SpellMgr::UnloadSpellInfoStore()
mSpellInfoMap.clear(); mSpellInfoMap.clear();
} }
void SpellMgr::UnloadSpellInfoImplicitTargetConditionLists()
{
for (uint32 i = 0; i < GetSpellInfoStoreSize(); ++i)
{
if (mSpellInfoMap[i])
mSpellInfoMap[i]->_UnloadImplicitTargetConditionLists();
}
}
void SpellMgr::LoadSpellSpecificAndAuraState() void SpellMgr::LoadSpellSpecificAndAuraState()
{ {
uint32 oldMSTime = getMSTime(); uint32 oldMSTime = getMSTime();

View File

@@ -786,6 +786,7 @@ public:
void LoadSpellInfoStore(); void LoadSpellInfoStore();
void LoadSpellCooldownOverrides(); void LoadSpellCooldownOverrides();
void UnloadSpellInfoStore(); void UnloadSpellInfoStore();
void UnloadSpellInfoImplicitTargetConditionLists();
void LoadSpellInfoCustomAttributes(); void LoadSpellInfoCustomAttributes();
void LoadSpellInfoCorrections(); void LoadSpellInfoCorrections();
void LoadSpellSpecificAndAuraState(); void LoadSpellSpecificAndAuraState();

View File

@@ -505,6 +505,8 @@ void WorldConfig::BuildConfigCache()
SetConfigValue<bool>(CONFIG_ENABLE_DAZE, "Daze.Enabled", true); SetConfigValue<bool>(CONFIG_ENABLE_DAZE, "Daze.Enabled", true);
SetConfigValue<bool>(CONFIG_ENABLE_INFINITEAMMO, "InfiniteAmmo.Enabled", false);
SetConfigValue<uint32>(CONFIG_DAILY_RBG_MIN_LEVEL_AP_REWARD, "DailyRBGArenaPoints.MinLevel", 71); SetConfigValue<uint32>(CONFIG_DAILY_RBG_MIN_LEVEL_AP_REWARD, "DailyRBGArenaPoints.MinLevel", 71);
// Respawn // Respawn

View File

@@ -142,6 +142,7 @@ enum ServerConfigs
CONFIG_ALLOWS_RANK_MOD_FOR_PET_HEALTH, CONFIG_ALLOWS_RANK_MOD_FOR_PET_HEALTH,
CONFIG_MUNCHING_BLIZZLIKE, CONFIG_MUNCHING_BLIZZLIKE,
CONFIG_ENABLE_DAZE, CONFIG_ENABLE_DAZE,
CONFIG_ENABLE_INFINITEAMMO,
CONFIG_SPELL_QUEUE_ENABLED, CONFIG_SPELL_QUEUE_ENABLED,
CONFIG_GROUP_XP_DISTANCE, CONFIG_GROUP_XP_DISTANCE,
CONFIG_MAX_RECRUIT_A_FRIEND_DISTANCE, CONFIG_MAX_RECRUIT_A_FRIEND_DISTANCE,