Core/Dungeon Finder: Fixed LFG rewards in UK, ToCH, CoS and DTK.

This commit is contained in:
horn
2011-12-18 23:42:23 +01:00
parent 7a2f7b0e63
commit b119558ee1
5 changed files with 23 additions and 7 deletions
@@ -0,0 +1,7 @@
UPDATE spell_dbc SET EffectImplicitTargetA1 = 22, EffectImplicitTargetB1 = 7 WHERE Id = 58630;
DELETE FROM conditions WHERE SourceTypeOrReferenceId = 13 AND SourceEntry IN (61863, 68663);
INSERT INTO conditions (SourceTypeOrReferenceId, SourceEntry, ConditionTypeOrReference, ConditionValue1, Comment) VALUES
(13, 61863, 18, 1, 'The Prophet Tharon''ja - Achievement Check'),
(13, 68663, 18, 1, 'The Black Knight - Kill Credit'),
(13, 58630, 18, 1, 'Mal''Ganis - Kill Credit');
@@ -34,7 +34,8 @@ enum Spells
H_SPELL_MIND_BLAST = 58850, H_SPELL_MIND_BLAST = 58850,
SPELL_SLEEP = 52721, //Puts an enemy to sleep for up to 10 sec. Any damage caused will awaken the target. SPELL_SLEEP = 52721, //Puts an enemy to sleep for up to 10 sec. Any damage caused will awaken the target.
H_SPELL_SLEEP = 58849, H_SPELL_SLEEP = 58849,
SPELL_VAMPIRIC_TOUCH = 52723 //Heals the caster for half the damage dealt by a melee attack. SPELL_VAMPIRIC_TOUCH = 52723, //Heals the caster for half the damage dealt by a melee attack.
SPELL_KILL_CREDIT = 58630 // Non-existing spell as encounter credit, created in spell_dbc
}; };
enum Yells enum Yells
@@ -237,9 +238,8 @@ public:
{ {
instance->SetData(DATA_MAL_GANIS_EVENT, DONE); instance->SetData(DATA_MAL_GANIS_EVENT, DONE);
// give achievement credit to players. criteria use spell 58630 which doesn't exist. // give achievement credit and LFG rewards to players. criteria use spell 58630 which doesn't exist, but it was created in spell_dbc
if (instance) DoCast(me, SPELL_KILL_CREDIT);
instance->DoUpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET, 58630);
} }
} }
@@ -55,7 +55,9 @@ enum eSpells
SPELL_BLACK_KNIGHT_RES = 67693, SPELL_BLACK_KNIGHT_RES = 67693,
SPELL_LEAP = 67749, SPELL_LEAP = 67749,
SPELL_LEAP_H = 67880 SPELL_LEAP_H = 67880,
SPELL_KILL_CREDIT = 68663
}; };
enum eModels enum eModels
@@ -288,6 +290,8 @@ public:
void JustDied(Unit* /*killer*/) void JustDied(Unit* /*killer*/)
{ {
DoCast(me, SPELL_KILL_CREDIT);
if (instance) if (instance)
instance->SetData(BOSS_BLACK_KNIGHT, DONE); instance->SetData(BOSS_BLACK_KNIGHT, DONE);
} }
@@ -237,7 +237,8 @@ public:
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
if (Player* player = i->getSource()) if (Player* player = i->getSource())
player->DeMorph(); player->DeMorph();
instance->DoUpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET2, SPELL_ACHIEVEMENT_CHECK);
DoCast(me, SPELL_ACHIEVEMENT_CHECK);
instance->SetData(DATA_THARON_JA_EVENT, DONE); instance->SetData(DATA_THARON_JA_EVENT, DONE);
} }
@@ -173,8 +173,12 @@ public:
DoScriptText(YELL_DEAD_2, me); DoScriptText(YELL_DEAD_2, me);
if (instance) if (instance)
{
// Ingvar has MOB_INGVAR_UNDEAD id in this moment, so we have to update encounter state for his original id
instance->UpdateEncounterState(ENCOUNTER_CREDIT_KILL_CREATURE, MOB_INGVAR_HUMAN, me);
instance->SetData(DATA_INGVAR_EVENT, DONE); instance->SetData(DATA_INGVAR_EVENT, DONE);
} }
}
void KilledUnit(Unit* /*victim*/) void KilledUnit(Unit* /*victim*/)
{ {