Scripts/BWD: finished Magmaw encounter implementation

This commit is contained in:
Ovahlord
2019-05-07 23:06:07 +02:00
parent 50ca9f7f9f
commit de643e8cb3
3 changed files with 88 additions and 15 deletions

View File

@@ -67,7 +67,7 @@ enum BWDCreatureIds
NPC_MAGMAW_SPIKE_STALKER = 41767,
NPC_NEFARIAN_MAGMAW = 49427,
NPC_BLAZING_BONE_CONSTRUCT = 49416,
NPC_IGNITION = 49447,
NPC_IGNITION = 49447
};
enum BWDGameObjectIds

View File

@@ -312,7 +312,7 @@ struct boss_magmaw : public BossAI
uint32 GetData(uint32 type) const override
{
if (type == DATA_ACHIEVEMENT_STATE)
return uint8(_achievementEnligible);
return _achievementEnligible;
return 0;
}
@@ -1172,6 +1172,23 @@ class spell_magmaw_shadow_breath_targeting : public SpellScript
}
};
class achievement_parasite_evening : public AchievementCriteriaScript
{
public:
achievement_parasite_evening() : AchievementCriteriaScript("achievement_parasite_evening") { }
bool OnCheck(Player* source, Unit* target) override
{
if (!target)
return false;
if (target->IsAIEnabled)
return target->GetAI()->GetData(DATA_ACHIEVEMENT_STATE);
return false;
}
};
void AddSC_boss_magmaw()
{
RegisterBlackwingDescentCreatureAI(boss_magmaw);
@@ -1189,4 +1206,5 @@ void AddSC_boss_magmaw()
RegisterAuraScript(spell_magmaw_lava_parasite);
RegisterSpellScript(spell_magmaw_blazing_inferno_targeting);
RegisterSpellScript(spell_magmaw_shadow_breath_targeting);
new achievement_parasite_evening();
}