aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Wintergrasp_temp/Template_update.sql18
-rw-r--r--src/server/game/Battlefield/Zones/BattlefieldWG.cpp13
-rw-r--r--src/server/scripts/Northrend/wintergrasp.cpp3
3 files changed, 20 insertions, 14 deletions
diff --git a/Wintergrasp_temp/Template_update.sql b/Wintergrasp_temp/Template_update.sql
index 84df0017b06..6bae79da4bd 100644
--- a/Wintergrasp_temp/Template_update.sql
+++ b/Wintergrasp_temp/Template_update.sql
@@ -20,13 +20,13 @@ UPDATE `creature_template` SET `dynamicflags`=`dynamicflags`|4 WHERE `entry`=311
UPDATE `creature_template` SET `baseattacktime`=2000,`unit_flags`=`unit_flags`|768 WHERE `entry`=39173; -- Champion Ros'slai
UPDATE `creature_template` SET `unit_flags`=`unit_flags`|16 WHERE `entry`=30740; -- Valiance Expedition Champion (?)
UPDATE `creature_template` SET `InhabitType`=7 WHERE `entry`=27852; -- Wintergrasp Control Arms
-UPDATE `creature_template` SET `faction_A`=35,`faction_H`=35,`npcflag`=16777216 WHERE `entry`=28366; -- Wintergrasp Tower Cannon
-UPDATE `creature_template` SET `faction_A`=35,`faction_H`=35,`npcflag`=16777216,`unit_flags`=16384,`unit_class`=4,`speed_walk`=1.2 WHERE `entry`=32629; -- Wintergrasp Siege Turret
-UPDATE `creature_template` SET `faction_A`=35,`faction_H`=35,`npcflag`=16777216,`unit_flags`=16384,`unit_class`=4,`speed_walk`=1.2 WHERE `entry`=28319; -- Wintergrasp Siege Turret
-UPDATE `creature_template` SET `faction_A`=35,`faction_H`=35,`npcflag`=16777216,`unit_flags`=16384,`unit_class`=4,`speed_walk`=1.2,`speed_run`=1 WHERE `entry`=32627; -- Wintergrasp Siege Engine
-UPDATE `creature_template` SET `faction_A`=35,`faction_H`=35,`npcflag`=16777216,`unit_flags`=16384,`unit_class`=4,`speed_walk`=1.2,`speed_run`=1 WHERE `entry`=28312; -- Wintergrasp Siege Engine
-UPDATE `creature_template` SET `faction_A`=35,`faction_H`=35,`npcflag`=16777216,`unit_flags`=16384,`speed_walk`=1.2,`speed_run`=1 WHERE `entry`=28094; -- Wintergrasp Demolisher
-UPDATE `creature_template` SET `faction_A`=35,`faction_H`=35,`npcflag`=16777216,`unit_flags`=16384,`unit_class`=4,`speed_walk`=2.8,`speed_run`=1.71429 WHERE `entry`=27881; -- Wintergrasp Catapult
+UPDATE `creature_template` SET `faction_A`=1732,`faction_H`=1735,`npcflag`=16777216 WHERE `entry`=28366; -- Wintergrasp Tower Cannon
+UPDATE `creature_template` SET `faction_A`=1732,`faction_H`=1735,`npcflag`=16777216,`unit_flags`=16384,`unit_class`=4,`speed_walk`=1.2 WHERE `entry`=32629; -- Wintergrasp Siege Turret
+UPDATE `creature_template` SET `faction_A`=1732,`faction_H`=1735,`npcflag`=16777216,`unit_flags`=16384,`unit_class`=4,`speed_walk`=1.2 WHERE `entry`=28319; -- Wintergrasp Siege Turret
+UPDATE `creature_template` SET `faction_A`=1732,`faction_H`=1735,`npcflag`=16777216,`unit_flags`=16384,`unit_class`=4,`speed_walk`=1.2,`speed_run`=1 WHERE `entry`=32627; -- Wintergrasp Siege Engine
+UPDATE `creature_template` SET `faction_A`=1732,`faction_H`=1735,`npcflag`=16777216,`unit_flags`=16384,`unit_class`=4,`speed_walk`=1.2,`speed_run`=1 WHERE `entry`=28312; -- Wintergrasp Siege Engine
+UPDATE `creature_template` SET `faction_A`=1732,`faction_H`=1735,`npcflag`=16777216,`unit_flags`=16384,`speed_walk`=1.2,`speed_run`=1 WHERE `entry`=28094; -- Wintergrasp Demolisher
+UPDATE `creature_template` SET `faction_A`=1732,`faction_H`=1735,`npcflag`=16777216,`unit_flags`=16384,`unit_class`=4,`speed_walk`=2.8,`speed_run`=1.71429 WHERE `entry`=27881; -- Wintergrasp Catapult
UPDATE `creature_model_info` SET `bounding_radius`=0.3366,`combat_reach`=1.65,`gender`=0 WHERE `modelid`=27894; -- Knight Dameron
UPDATE `creature_model_info` SET `bounding_radius`=0.3366,`combat_reach`=1.65,`gender`=0 WHERE `modelid`=31346; -- Marshal Magruder
@@ -61,8 +61,8 @@ INSERT INTO `creature_template_addon` (`entry`,`mount`,`bytes1`,`bytes2`,`emote`
(32296,27245,0,1,0, NULL), -- Stone Guard Mukar
(39173,29261,0,1,0, NULL), -- Champion Ros'slai
(30740,0,0,257,375, NULL), -- Valiance Expedition Champion
-(32629,0,0,257,0, NULL), -- Wintergrasp Siege Turret
-(28319,0,0,257,0, NULL), -- Wintergrasp Siege Turret
+(32629,0,0,257,0,46598), -- Wintergrasp Siege Turret
+(28319,0,0,257,0,46598), -- Wintergrasp Siege Turret
(28366,0,0,257,0, NULL), -- Wintergrasp Tower Cannon
(32627,0,0,257,0, NULL), -- Wintergrasp Siege Engine
(28312,0,0,257,0, NULL), -- Wintergrasp Siege Engine
diff --git a/src/server/game/Battlefield/Zones/BattlefieldWG.cpp b/src/server/game/Battlefield/Zones/BattlefieldWG.cpp
index b98e3b52e83..8c68ee3f17e 100644
--- a/src/server/game/Battlefield/Zones/BattlefieldWG.cpp
+++ b/src/server/game/Battlefield/Zones/BattlefieldWG.cpp
@@ -524,7 +524,11 @@ void BattlefieldWG::OnCreatureCreate(Creature* creature)
case NPC_WINTERGRASP_DEMOLISHER:
{
if (!creature->GetCreatorGUID() || !sObjectAccessor->FindPlayer(creature->GetCreatorGUID()))
+ {
+ creature->setDeathState(DEAD);
+ creature->RemoveFromWorld();
return;
+ }
Player* creator = sObjectAccessor->FindPlayer(creature->GetCreatorGUID());
TeamId team = creator->GetTeamId();
@@ -533,7 +537,8 @@ void BattlefieldWG::OnCreatureCreate(Creature* creature)
if (GetData(BATTLEFIELD_WG_DATA_VEHICLE_H) < GetData(BATTLEFIELD_WG_DATA_MAX_VEHICLE_H))
{
UpdateData(BATTLEFIELD_WG_DATA_VEHICLE_H, 1);
- creature->CastSpell(creature, SPELL_HORDE_FLAG, true);
+ creature->AddAura(SPELL_HORDE_FLAG, creature);
+ creature->setFaction(creator->getFaction());
m_vehicles[team].insert(creature->GetGUID());
UpdateVehicleCountWG();
}
@@ -549,7 +554,8 @@ void BattlefieldWG::OnCreatureCreate(Creature* creature)
if (GetData(BATTLEFIELD_WG_DATA_VEHICLE_A) < GetData(BATTLEFIELD_WG_DATA_MAX_VEHICLE_A))
{
UpdateData(BATTLEFIELD_WG_DATA_VEHICLE_A, 1);
- creature->CastSpell(creature, SPELL_ALLIANCE_FLAG, true);
+ creature->AddAura(SPELL_ALLIANCE_FLAG,creature);
+ creature->setFaction(creator->getFaction());
m_vehicles[team].insert(creature->GetGUID());
UpdateVehicleCountWG();
}
@@ -561,8 +567,7 @@ void BattlefieldWG::OnCreatureCreate(Creature* creature)
}
}
- if (creature->GetCreatorGUID() && sObjectAccessor->FindUnit(creature->GetCreatorGUID()))
- creature->CastSpell(sObjectAccessor->FindUnit(creature->GetCreatorGUID()), SPELL_GRAB_PASSENGER, true);
+ creature->CastSpell(creator, SPELL_GRAB_PASSENGER, true);
break;
}
}
diff --git a/src/server/scripts/Northrend/wintergrasp.cpp b/src/server/scripts/Northrend/wintergrasp.cpp
index db10e00f13d..61646d0cc16 100644
--- a/src/server/scripts/Northrend/wintergrasp.cpp
+++ b/src/server/scripts/Northrend/wintergrasp.cpp
@@ -46,6 +46,7 @@ enum Spells
SPELL_BUILD_CATAPULT_FORCE = 56664,
SPELL_BUILD_DEMOLISHER_FORCE = 56659,
SPELL_ACTIVATE_CONTROL_ARMS = 49899,
+ SPELL_RIDE_WG_VEHICLE = 60968,
SPELL_VEHICLE_TELEPORT = 49759,
@@ -504,7 +505,7 @@ class spell_wintergrasp_grab_passenger : public SpellScriptLoader
void HandleScript(SpellEffIndex /*effIndex*/)
{
if (Player* target = GetHitPlayer())
- target->EnterVehicle(GetCaster());
+ target->CastSpell(GetCaster(), SPELL_RIDE_WG_VEHICLE, true);
}
void Register()