mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 02:25:38 +01:00
Core/Instances: Implemented DungeonEncounter.dbc for creating completed encounters mask to use in packets
Core/Dungeon Finder: Implemented new way of giving random dungeon rewards, linked to DungeonEncounter.dbc
This commit is contained in:
@@ -51,6 +51,7 @@
|
||||
#include "ConditionMgr.h"
|
||||
#include "DisableMgr.h"
|
||||
#include "SpellScript.h"
|
||||
#include "InstanceScript.h"
|
||||
|
||||
#define SPELL_CHANNEL_UPDATE_INTERVAL (1 * IN_MILLISECONDS)
|
||||
|
||||
@@ -3717,16 +3718,17 @@ void Spell::finish(bool ok)
|
||||
// triggered spell pointer can be not set in some cases
|
||||
// this is needed for proper apply of triggered spell mods
|
||||
m_caster->ToPlayer()->SetSpellModTakingSpell(this, true);
|
||||
}
|
||||
|
||||
// Take mods after trigger spell (needed for 14177 to affect 48664)
|
||||
// mods are taken only on succesfull cast and independantly from targets of the spell
|
||||
if (m_caster->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
// Take mods after trigger spell (needed for 14177 to affect 48664)
|
||||
// mods are taken only on succesfull cast and independantly from targets of the spell
|
||||
m_caster->ToPlayer()->RemoveSpellMods(this);
|
||||
m_caster->ToPlayer()->SetSpellModTakingSpell(this, false);
|
||||
}
|
||||
|
||||
if (m_caster->GetTypeId() == TYPEID_UNIT)
|
||||
if (InstanceScript* instance = m_caster->GetInstanceScript())
|
||||
instance->UpdateEncounterState(ENCOUNTER_CREDIT_CAST_SPELL, m_spellInfo->Id, m_caster);
|
||||
|
||||
// Stop Attack for some spells
|
||||
if (m_spellInfo->Attributes & SPELL_ATTR0_STOP_ATTACK_TARGET)
|
||||
m_caster->AttackStop();
|
||||
|
||||
Reference in New Issue
Block a user