[7853] Start casting including take reagents/power and set cooldown aftre fill targets and re-check spell cast continue.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
Astellar 2009-05-19 23:08:14 +04:00 committed by VladimirMangos
parent 72b4ff2fac
commit 4e748b3786
2 changed files with 9 additions and 8 deletions

View file

@ -2417,18 +2417,19 @@ void Spell::cast(bool skipCheck)
((Player*)m_caster)->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_CAST_SPELL, m_spellInfo->Id); ((Player*)m_caster)->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_CAST_SPELL, m_spellInfo->Id);
} }
FillTargetMap();
if(m_spellState == SPELL_STATE_FINISHED) // stop cast if spell marked as finish somewhere in FillTargetMap
{
SetExecutedCurrently(false);
return;
}
// CAST SPELL // CAST SPELL
SendSpellCooldown(); SendSpellCooldown();
TakePower(); TakePower();
TakeReagents(); // we must remove reagents before HandleEffects to allow place crafted item in same slot TakeReagents(); // we must remove reagents before HandleEffects to allow place crafted item in same slot
FillTargetMap();
if(m_spellState == SPELL_STATE_FINISHED) // stop cast if spell marked as finish somewhere in Take*/FillTargetMap
{
SetExecutedCurrently(false);
return;
}
SendCastResult(castResult); SendCastResult(castResult);
SendSpellGo(); // we must send smsg_spell_go packet before m_castItem delete in TakeCastItem()... SendSpellGo(); // we must send smsg_spell_go packet before m_castItem delete in TakeCastItem()...

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "7852" #define REVISION_NR "7853"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__