diff options
| author | Shocker <shocker@freakz.ro> | 2011-07-27 03:33:11 +0700 |
|---|---|---|
| committer | tobmaps <spambot42@yandex.ru> | 2011-07-27 03:33:11 +0700 |
| commit | 0cedb54219dd8d33afd424e51b50fcfa86742340 (patch) | |
| tree | ba33853bbdb0124f565694274e544385b0cc2549 /src | |
| parent | 16a1435a0bafbe67418e635ec225f986a084f0aa (diff) | |
Core/Achievements: Fix Didn't Stand a Chance
Diffstat (limited to 'src')
| -rwxr-xr-x | src/server/scripts/World/achievement_scripts.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/server/scripts/World/achievement_scripts.cpp b/src/server/scripts/World/achievement_scripts.cpp index b2e4ba02666..25126b3750c 100755 --- a/src/server/scripts/World/achievement_scripts.cpp +++ b/src/server/scripts/World/achievement_scripts.cpp @@ -206,6 +206,30 @@ public: } }; +class achievement_wg_didnt_stand_a_chance : public AchievementCriteriaScript +{ +public: + achievement_wg_didnt_stand_a_chance() : AchievementCriteriaScript("achievement_wg_didnt_stand_a_chance") { } + + bool OnCheck(Player* source, Unit* target) + { + if (!target) + return false; + + if (Player* victim = target->ToPlayer()) + { + if (!victim->IsMounted()) + return false; + + if (Vehicle* vehicle = source->GetVehicle()) + if (vehicle->GetVehicleInfo()->m_ID == 244) // Wintergrasp Tower Cannon + return true; + } + + return false; + } +}; + void AddSC_achievement_scripts() { new achievement_storm_glory(); @@ -217,6 +241,7 @@ void AddSC_achievement_scripts() new achievement_bg_ic_mowed_down(); new achievement_bg_sa_artillery(); new achievement_sickly_gazelle(); + new achievement_wg_didnt_stand_a_chance(); 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); |
