Scripts/Forge of Souls: Properly fixed achievement Three Faced
This commit is contained in:
@@ -0,0 +1,4 @@
|
|||||||
|
DELETE FROM `achievement_criteria_data` WHERE `criteria_id`=12976 AND `type`=11;
|
||||||
|
INSERT INTO `achievement_criteria_data` (`criteria_id`,`type`,`value1`,`value2`,`ScriptName`)
|
||||||
|
VALUES
|
||||||
|
(12976,11,0,0,'achievement_three_faced');
|
||||||
@@ -77,7 +77,6 @@ enum Events
|
|||||||
|
|
||||||
enum eEnum
|
enum eEnum
|
||||||
{
|
{
|
||||||
ACHIEV_THREE_FACED = 4523,
|
|
||||||
DISPLAY_ANGER = 30148,
|
DISPLAY_ANGER = 30148,
|
||||||
DISPLAY_SORROW = 30149,
|
DISPLAY_SORROW = 30149,
|
||||||
DISPLAY_DESIRE = 30150,
|
DISPLAY_DESIRE = 30150,
|
||||||
@@ -115,6 +114,8 @@ struct outroPosition
|
|||||||
{ { 0, 0 }, { 0.0f, 0.0f, 0.0f, 0.0f } }
|
{ { 0, 0 }, { 0.0f, 0.0f, 0.0f, 0.0f } }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define DATA_THREE_FACED 1
|
||||||
|
|
||||||
class boss_devourer_of_souls : public CreatureScript
|
class boss_devourer_of_souls : public CreatureScript
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -143,7 +144,7 @@ class boss_devourer_of_souls : public CreatureScript
|
|||||||
events.Reset();
|
events.Reset();
|
||||||
summons.DespawnAll();
|
summons.DespawnAll();
|
||||||
|
|
||||||
threeFaceAchievement = true;
|
threeFaced = true;
|
||||||
mirroredSoulTarget = 0;
|
mirroredSoulTarget = 0;
|
||||||
|
|
||||||
instance->SetData(DATA_DEVOURER_EVENT, NOT_STARTED);
|
instance->SetData(DATA_DEVOURER_EVENT, NOT_STARTED);
|
||||||
@@ -214,9 +215,6 @@ class boss_devourer_of_souls : public CreatureScript
|
|||||||
|
|
||||||
instance->SetData(DATA_DEVOURER_EVENT, DONE);
|
instance->SetData(DATA_DEVOURER_EVENT, DONE);
|
||||||
|
|
||||||
if (threeFaceAchievement && IsHeroic())
|
|
||||||
instance->DoCompleteAchievement(ACHIEV_THREE_FACED);
|
|
||||||
|
|
||||||
int32 entryIndex;
|
int32 entryIndex;
|
||||||
if (instance->GetData(DATA_TEAM_IN_INSTANCE) == ALLIANCE)
|
if (instance->GetData(DATA_TEAM_IN_INSTANCE) == ALLIANCE)
|
||||||
entryIndex = 0;
|
entryIndex = 0;
|
||||||
@@ -239,7 +237,15 @@ class boss_devourer_of_souls : public CreatureScript
|
|||||||
void SpellHitTarget(Unit* /*target*/, const SpellEntry *spell)
|
void SpellHitTarget(Unit* /*target*/, const SpellEntry *spell)
|
||||||
{
|
{
|
||||||
if (spell->Id == H_SPELL_PHANTOM_BLAST)
|
if (spell->Id == H_SPELL_PHANTOM_BLAST)
|
||||||
threeFaceAchievement = false;
|
threeFaced = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32 GetData(uint32 type)
|
||||||
|
{
|
||||||
|
if (type == DATA_THREE_FACED)
|
||||||
|
return threeFaced;
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateAI(const uint32 diff)
|
void UpdateAI(const uint32 diff)
|
||||||
@@ -344,7 +350,7 @@ class boss_devourer_of_souls : public CreatureScript
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool threeFaceAchievement;
|
bool threeFaced;
|
||||||
|
|
||||||
// wailing soul event
|
// wailing soul event
|
||||||
float beamAngle;
|
float beamAngle;
|
||||||
@@ -360,7 +366,25 @@ class boss_devourer_of_souls : public CreatureScript
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class achievement_three_faced : public AchievementCriteriaScript
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
achievement_three_faced() : AchievementCriteriaScript("achievement_three_faced")
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
bool OnCheck(Player* /*player*/, Unit* target)
|
||||||
|
{
|
||||||
|
if (Creature* Devourer = target->ToCreature())
|
||||||
|
if (Devourer->AI()->GetData(DATA_THREE_FACED))
|
||||||
|
return true;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
void AddSC_boss_devourer_of_souls()
|
void AddSC_boss_devourer_of_souls()
|
||||||
{
|
{
|
||||||
new boss_devourer_of_souls();
|
new boss_devourer_of_souls();
|
||||||
|
new achievement_three_faced();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user