aboutsummaryrefslogtreecommitdiff
path: root/src/server/game
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game')
-rw-r--r--src/server/game/Scripting/ScriptMgr.cpp13
-rw-r--r--src/server/game/Spells/Spell.cpp5
2 files changed, 9 insertions, 9 deletions
diff --git a/src/server/game/Scripting/ScriptMgr.cpp b/src/server/game/Scripting/ScriptMgr.cpp
index 09e3f4eca11..e1c8af38d0c 100644
--- a/src/server/game/Scripting/ScriptMgr.cpp
+++ b/src/server/game/Scripting/ScriptMgr.cpp
@@ -1343,15 +1343,12 @@ void ScriptMgr::Initialize()
// Remove the used scripts from the given container.
sScriptRegistryCompositum->RemoveUsedScriptsFromContainer(unusedScriptNames);
- for (std::string const& scriptName : unusedScriptNames)
- {
- // Avoid complaining about empty script names since the
- // script name container contains a placeholder as the 0 element.
- if (scriptName.empty())
- continue;
+ // Avoid complaining about empty script names since the
+ // script name container contains a placeholder as the 0 element.
+ unusedScriptNames.erase("");
+ for (std::string const& scriptName : unusedScriptNames)
TC_LOG_ERROR("sql.sql", "Script '{}' is referenced by the database, but does not exist in the core!", scriptName);
- }
TC_LOG_INFO("server.loading", ">> Loaded {} C++ scripts in {} ms",
GetScriptCount(), GetMSTimeDiffToNow(oldMSTime));
@@ -2595,7 +2592,7 @@ BattlegroundMapScript::BattlegroundMapScript(char const* name, uint32 mapId) noe
if (!GetEntry())
TC_LOG_ERROR("scripts", "Invalid BattlegroundMapScript for {}; no such map ID.", mapId);
- if (GetEntry() && !GetEntry()->IsBattleground())
+ if (GetEntry() && !GetEntry()->IsBattlegroundOrArena())
TC_LOG_ERROR("scripts", "BattlegroundMapScript for map {} is invalid.", mapId);
ScriptRegistry<BattlegroundMapScript>::Instance()->AddScript(this);
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index 986c8376a00..c4260860fb3 100644
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -2948,7 +2948,10 @@ void Spell::TargetInfo::DoDamageAndTriggers(Spell* spell)
if (MissCondition == SPELL_MISS_RESIST && spell->m_spellInfo->HasAttribute(SPELL_ATTR1_FAILURE_BREAKS_STEALTH) && spell->unitTarget->GetTypeId() == TYPEID_UNIT)
{
Unit* unitCaster = ASSERT_NOTNULL(spell->m_caster->ToUnit());
- unitCaster->RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags::Interacting);
+ unitCaster->RemoveAppliedAuras([](AuraApplication const* aurApp)
+ {
+ return aurApp->GetBase()->GetSpellInfo()->Dispel == DISPEL_STEALTH;
+ });
spell->unitTarget->ToCreature()->EngageWithTarget(unitCaster);
}
}