Fix Didn't Stand a Chance achievement

This commit is contained in:
Shocker
2011-07-05 01:48:03 +03:00
committed by Kandera
parent afd9c28d8e
commit ff85ebe632
3 changed files with 30 additions and 0 deletions

View File

@@ -0,0 +1,4 @@
DELETE FROM `achievement_criteria_data` WHERE criteria_id = 7703;
INSERT INTO `achievement_criteria_data` VALUES
(7703, 6, 4197, 0, ''),
(7703, 11, 0, 0, 'achievement_wg_didnt_stand_a_chance');

View File

@@ -0,0 +1 @@
DELETE FROM `disables` WHERE `entry` = 7703 AND `sourceType` = 4;

View File

@@ -419,6 +419,30 @@ class npc_wg_quest_giver : public CreatureScript
}
};
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_wintergrasp()
{
new npc_wg_queue();
@@ -426,4 +450,5 @@ void AddSC_wintergrasp()
new npc_wg_demolisher_engineer();
new go_wg_vehicle_teleporter();
new npc_wg_quest_giver();
new achievement_wg_didnt_stand_a_chance();
}