mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 17:05:44 +01:00
Merge pull request #6490 from Vincent-Michael/notEvenAScratch
Battleground/Strand of the Ancients: Fix Achievement: Not Even a Scratch
This commit is contained in:
@@ -313,6 +313,27 @@ class achievement_tilted : public AchievementCriteriaScript
|
||||
}
|
||||
};
|
||||
|
||||
class achievement_not_even_a_scratch : public AchievementCriteriaScript
|
||||
{
|
||||
public:
|
||||
achievement_not_even_a_scratch() : AchievementCriteriaScript("achievement_not_even_a_scratch") { }
|
||||
|
||||
bool OnCheck(Player* source, Unit* /*target*/)
|
||||
{
|
||||
if (!source)
|
||||
return false;
|
||||
|
||||
Battleground* battleground = source->GetBattleground();
|
||||
if (!battleground)
|
||||
return false;
|
||||
|
||||
if (static_cast<BattlegroundSA*>(battleground)->notEvenAScratch(source->GetTeam()))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_achievement_scripts()
|
||||
{
|
||||
new achievement_resilient_victory();
|
||||
@@ -331,4 +352,5 @@ void AddSC_achievement_scripts()
|
||||
new achievement_arena_kills("achievement_arena_5v5_kills", ARENA_TYPE_5v5);
|
||||
new achievement_bg_sa_defense_of_ancients();
|
||||
new achievement_tilted();
|
||||
new achievement_not_even_a_scratch();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user