[11785] Implement dungeon encounters (DBC part), thanks to rsa for porting it to mangos

Signed-off-by: Laise <fenrisse@gmail.com>
This commit is contained in:
Shauren 2011-09-04 13:14:47 +03:00 committed by Laise
parent dc932024ab
commit 8e4c46ff2a
18 changed files with 1457 additions and 20 deletions

View file

@ -3608,6 +3608,11 @@ void Spell::finish(bool ok)
// Stop Attack for some spells
if( m_spellInfo->Attributes & SPELL_ATTR_STOP_ATTACK_TARGET )
m_caster->AttackStop();
// update encounter state if needed
Map *map = m_caster->GetMap();
if (map->IsDungeon())
((DungeonMap*)map)->GetPersistanceState()->UpdateEncounterState(ENCOUNTER_CREDIT_CAST_SPELL, m_spellInfo->Id);
}
void Spell::SendCastResult(SpellCastResult result)