mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-02-15 06:29:13 +01:00
Merge commit '32d9a71a4219ea353950979a2491e7879b7fa79a' into 4.3.4
Conflicts: README.md sql/base/auth_database.sql sql/updates/world/2014_12_27_01_world_335.sql src/server/game/Conditions/ConditionMgr.cpp src/server/game/Globals/ObjectMgr.cpp src/server/game/Server/WorldSession.cpp src/server/scripts/Commands/cs_misc.cpp src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp src/server/scripts/Kalimdor/zone_dustwallow_marsh.cpp src/server/scripts/Spells/spell_hunter.cpp
This commit is contained in:
@@ -3450,7 +3450,7 @@ void Spell::SendSpellCooldown()
|
||||
{
|
||||
// Handle pet cooldowns here if needed instead of in PetAI to avoid hidden cooldown restarts
|
||||
Creature* _creature = m_caster->ToCreature();
|
||||
if (_creature && _creature->IsPet())
|
||||
if (_creature && (_creature->IsPet() || _creature->IsGuardian()))
|
||||
_creature->AddCreatureSpellCooldown(m_spellInfo->Id);
|
||||
|
||||
return;
|
||||
@@ -7096,6 +7096,19 @@ bool Spell::CallScriptEffectHandlers(SpellEffIndex effIndex, SpellEffectHandleMo
|
||||
return preventDefault;
|
||||
}
|
||||
|
||||
void Spell::CallScriptSuccessfulDispel(SpellEffIndex effIndex)
|
||||
{
|
||||
for (std::list<SpellScript*>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end(); ++scritr)
|
||||
{
|
||||
(*scritr)->_PrepareScriptCall(SPELL_SCRIPT_HOOK_EFFECT_SUCCESSFUL_DISPEL);
|
||||
std::list<SpellScript::EffectHandler>::iterator hookItrEnd = (*scritr)->OnEffectSuccessfulDispel.end(), hookItr = (*scritr)->OnEffectSuccessfulDispel.begin();
|
||||
for (; hookItr != hookItrEnd; ++hookItr)
|
||||
hookItr->Call(*scritr, effIndex);
|
||||
|
||||
(*scritr)->_FinishScriptCall();
|
||||
}
|
||||
}
|
||||
|
||||
void Spell::CallScriptBeforeHitHandlers()
|
||||
{
|
||||
for (std::list<SpellScript*>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end(); ++scritr)
|
||||
|
||||
Reference in New Issue
Block a user