aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorw1sht0l1v3 <w1sht0l1v3@gmail.com>2014-04-27 02:23:33 +0300
committerw1sht0l1v3 <w1sht0l1v3@gmail.com>2014-04-27 02:23:33 +0300
commitc20d0cb77e0bf1e8770856d2080205a1dc2e76fd (patch)
treeffaa956a94fa35521ca9cfbcf24eb8a066fed00b
parent113e6b0162f88679c12981756b1dd87b79993e4f (diff)
Scripts/Sholazar Basin: Reconnaissance Flight (12671)
Add workaround for the player/accessory mounting issue. Some small additions. Closes: 9443
-rw-r--r--sql/updates/world/2014_04_27_00_world_misc.sql24
-rw-r--r--src/server/scripts/Northrend/zone_sholazar_basin.cpp8
2 files changed, 32 insertions, 0 deletions
diff --git a/sql/updates/world/2014_04_27_00_world_misc.sql b/sql/updates/world/2014_04_27_00_world_misc.sql
new file mode 100644
index 00000000000..4046efcc190
--- /dev/null
+++ b/sql/updates/world/2014_04_27_00_world_misc.sql
@@ -0,0 +1,24 @@
+-- Reconnaissance Flight (12671)
+-- additions
+SET @PLANE := 28710; -- Vic's Flying Machine
+SET @SPELL_PLANE := 52256; -- Vic's Flying Machine Validate (must have condition to target player)
+SET @SPELL_LAND := 52226; -- Land Flying Machine
+SET @GOB_LANDING := 190708; -- Landing Pad Focus
+SET @SPELL_AGGRO := 52259; -- Vic's Flying Machine Aggro Dummy
+SET @NPC_SCREECHER := 28170; -- Frosthowl Screecher
+SET @SPELL_SBOLT := 52257; -- Shadow Bolt
+
+UPDATE `creature_template` SET InhabitType='4' WHERE `entry`=@PLANE;
+DELETE FROM `vehicle_template_accessory` WHERE `entry`=@PLANE;
+
+DELETE FROM `conditions` WHERE (`SourceEntry`=@SPELL_LAND AND `SourceTypeOrReferenceId`=17) OR (`SourceEntry` IN (@SPELL_AGGRO,@SPELL_SBOLT) AND `SourceTypeOrReferenceId`=13);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorType`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+-- because vehicles ignore spell focus we add an extra condition to fill in for this
+(17,0,@SPELL_LAND,0,0,30,0,@GOB_LANDING,10,0,0,0,0,'','Requires Landing Pad Focus near to cast Land Flying Machine'),
+(13,1,@SPELL_AGGRO,0,0,31,0,3,@NPC_SCREECHER,0,0,0,0,'','Vic''s Flying Machine Aggro Dummy to Frosthowl Screecher'),
+(13,1,@SPELL_SBOLT,0,0,31,0,3,@PLANE,0,0,0,0,'','Shadow Bolt to Vic''s Flying Machine');
+
+-- Frosthowl Screecher
+DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@NPC_SCREECHER;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@NPC_SCREECHER,0,0,0,0,0,100,0,0,0,3000,4000,11,52257,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cast Shadow Bolt');
diff --git a/src/server/scripts/Northrend/zone_sholazar_basin.cpp b/src/server/scripts/Northrend/zone_sholazar_basin.cpp
index 6e39d341c58..770a95c23d7 100644
--- a/src/server/scripts/Northrend/zone_sholazar_basin.cpp
+++ b/src/server/scripts/Northrend/zone_sholazar_basin.cpp
@@ -1021,7 +1021,14 @@ public:
void PassengerBoarded(Unit* passenger, int8 /*seatId*/, bool apply) OVERRIDE
{
if (apply && passenger->GetTypeId() == TYPEID_PLAYER)
+ {
+ /// @workaround - Because accessory gets unmounted when using vehicle_template_accessory.
+ /// When vehicle spawns accessory is mounted to seat 0,but when player mounts
+ /// he uses the same seat (instead of mounting to seat 1) kicking the accessory out.
+ passenger->ChangeSeat(1, false);
+ me->GetVehicleKit()->InstallAccessory(NPC_PILOT, 0, true, TEMPSUMMON_DEAD_DESPAWN, 0);
me->GetMotionMaster()->MovePath(NPC_PLANE, false);
+ }
}
void MovementInform(uint32 type, uint32 id) OVERRIDE
@@ -1056,6 +1063,7 @@ public:
case 25:
Talk(PLANE_EMOTE);
DoCast(SPELL_ENGINE);
+ me->SetFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_FORCE_MOVEMENT);
break;
}
}