mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 08:55:32 +01:00
Core/Achievements: Implemented ACHIEVEMENT_CRITERIA_TYPE_GET_KILLING_BLOWS
This commit is contained in:
@@ -1112,6 +1112,20 @@ public:
|
||||
};
|
||||
};
|
||||
|
||||
class achievement_denyin_the_scion : public AchievementCriteriaScript
|
||||
{
|
||||
public:
|
||||
achievement_denyin_the_scion() : AchievementCriteriaScript("achievement_denyin_the_scion") { }
|
||||
|
||||
bool OnCheck(Player* source, Unit* /*target*/)
|
||||
{
|
||||
if (Unit* disk = source->GetVehicleBase())
|
||||
if (disk->GetEntry() == NPC_HOVER_DISK_CASTER || disk->GetEntry() == NPC_HOVER_DISK_MELEE)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_boss_malygos()
|
||||
{
|
||||
new boss_malygos();
|
||||
@@ -1123,4 +1137,5 @@ void AddSC_boss_malygos()
|
||||
new spell_malygos_vortex_dummy();
|
||||
new spell_malygos_vortex_visual();
|
||||
new npc_alexstrasza_eoe();
|
||||
new achievement_denyin_the_scion();
|
||||
}
|
||||
|
||||
@@ -167,6 +167,27 @@ class achievement_bg_sa_artillery : public AchievementCriteriaScript
|
||||
}
|
||||
};
|
||||
|
||||
class achievement_arena_kills : public AchievementCriteriaScript
|
||||
{
|
||||
public:
|
||||
achievement_arena_kills(char const* name, uint8 arenaType) : AchievementCriteriaScript(name),
|
||||
_arenaType(arenaType)
|
||||
{
|
||||
}
|
||||
|
||||
bool OnCheck(Player* source, Unit* /*target*/)
|
||||
{
|
||||
// this checks GetBattleground() for NULL already
|
||||
if (!source->InArena())
|
||||
return false;
|
||||
|
||||
return source->GetBattleground()->GetArenaType() == _arenaType;
|
||||
}
|
||||
|
||||
private:
|
||||
uint8 const _arenaType;
|
||||
};
|
||||
|
||||
void AddSC_achievement_scripts()
|
||||
{
|
||||
new achievement_storm_glory();
|
||||
@@ -177,4 +198,7 @@ void AddSC_achievement_scripts()
|
||||
new achievement_bg_ic_glaive_grave();
|
||||
new achievement_bg_ic_mowed_down();
|
||||
new achievement_bg_sa_artillery();
|
||||
new achievement_arena_kills("achievement_arena_2v2_kills", ARENA_TYPE_2v2);
|
||||
new achievement_arena_kills("achievement_arena_3v3_kills", ARENA_TYPE_3v3);
|
||||
new achievement_arena_kills("achievement_arena_5v5_kills", ARENA_TYPE_5v5);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user