From 2c169bcca51ca1b5cdbc73c9a4d402d46cdcfc15 Mon Sep 17 00:00:00 2001 From: Shauren Date: Wed, 13 Mar 2013 11:34:58 +0100 Subject: [PATCH 1/6] Core/Vehicles * Fixed crash happening when passenger died on vehicle he was controlling * Fixed crash happening if vehicle control aura was removed before passenger is fully added to vehicle Closes #7160 --- .../game/Entities/Creature/Creature.cpp | 4 +-- src/server/game/Entities/Player/Player.cpp | 1 + src/server/game/Entities/Unit/Unit.cpp | 6 +++++ src/server/game/Entities/Vehicle/Vehicle.cpp | 26 +++++++++++++++++++ src/server/game/Entities/Vehicle/Vehicle.h | 2 ++ .../game/Spells/Auras/SpellAuraEffects.cpp | 4 ++- 6 files changed, 40 insertions(+), 3 deletions(-) diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp index 6f88222bbb..83cdb52776 100644 --- a/src/server/game/Entities/Creature/Creature.cpp +++ b/src/server/game/Entities/Creature/Creature.cpp @@ -1294,8 +1294,8 @@ bool Creature::CreateFromProto(uint32 guidlow, uint32 Entry, uint32 vehId, uint3 if (!UpdateEntry(Entry, team, data)) return false; - if (vehId && !CreateVehicleKit(vehId, Entry)) - vehId = 0; + if (vehId) + CreateVehicleKit(vehId, Entry); return true; } diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 195a911892..6d83ea60db 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -25689,6 +25689,7 @@ void Player::ActivateSpec(uint8 spec) ClearComboPointHolders(); ClearAllReactives(); UnsummonAllTotems(); + ExitVehicle(); RemoveAllControlled(); /*RemoveAllAurasOnDeath(); if (GetPet()) diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 9d581fcdce..ba8c223927 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -12419,6 +12419,9 @@ void Unit::setDeathState(DeathState s) if (IsNonMeleeSpellCasted(false)) InterruptNonMeleeSpells(false); + ExitVehicle(); // Exit vehicle before calling RemoveAllControlled + // vehicles use special type of charm that is not removed by the next function + // triggering an assert UnsummonAllTotems(); RemoveAllControlled(); RemoveAllAurasOnDeath(); @@ -16842,7 +16845,10 @@ void Unit::_EnterVehicle(Vehicle* vehicle, int8 seatId, AuraApplication const* a if (Player* player = ToPlayer()) { if (vehicle->GetBase()->GetTypeId() == TYPEID_PLAYER && player->isInCombat()) + { + vehicle->GetBase()->RemoveAura(const_cast(aurApp)); return; + } } ASSERT(!m_vehicle); diff --git a/src/server/game/Entities/Vehicle/Vehicle.cpp b/src/server/game/Entities/Vehicle/Vehicle.cpp index 85215c5302..fad9115ee3 100755 --- a/src/server/game/Entities/Vehicle/Vehicle.cpp +++ b/src/server/game/Entities/Vehicle/Vehicle.cpp @@ -744,6 +744,31 @@ void Vehicle::RemovePendingEventsForSeat(int8 seatId) } } +/** + * @fn void Vehicle::RemovePendingEventsForSeat(uint8 seatId) + * + * @brief Removes any pending events for given passenger. Executed when vehicle control aura is removed while adding passenger is in progress + * + * @author Shauren + * @date 13-2-2013 + * + * @param passenger Unit that is supposed to enter the vehicle. + */ + +void Vehicle::RemovePendingEventsForPassenger(Unit* passenger) +{ + for (PendingJoinEventContainer::iterator itr = _pendingJoinEvents.begin(); itr != _pendingJoinEvents.end();) + { + if ((*itr)->Passenger == passenger) + { + (*itr)->to_Abort = true; + _pendingJoinEvents.erase(itr++); + } + else + ++itr; + } +} + VehicleJoinEvent::~VehicleJoinEvent() { if (Target) @@ -769,6 +794,7 @@ bool VehicleJoinEvent::Execute(uint64, uint32) { ASSERT(Passenger->IsInWorld()); ASSERT(Target && Target->GetBase()->IsInWorld()); + ASSERT(Target->GetBase()->HasAuraTypeWithCaster(SPELL_AURA_CONTROL_VEHICLE, Passenger->GetGUID())); Target->RemovePendingEventsForSeat(Seat->first); diff --git a/src/server/game/Entities/Vehicle/Vehicle.h b/src/server/game/Entities/Vehicle/Vehicle.h index 70b821de91..67975490ec 100644 --- a/src/server/game/Entities/Vehicle/Vehicle.h +++ b/src/server/game/Entities/Vehicle/Vehicle.h @@ -71,6 +71,8 @@ class Vehicle : public TransportBase VehicleSeatEntry const* GetSeatForPassenger(Unit const* passenger) const; + void RemovePendingEventsForPassenger(Unit* passenger); + protected: friend class VehicleJoinEvent; uint32 UsableSeatNum; ///< Number of seats that match VehicleSeatEntry::UsableByPlayer, used for proper display flags diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index e3d266eaaa..1f291d5d48 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -2323,7 +2323,7 @@ void AuraEffect::HandleAuraModPacifyAndSilence(AuraApplication const* aurApp, ui Unit* target = aurApp->GetTarget(); // Vengeance of the Blue Flight (@todo REMOVE THIS!) - /// @workaround + /// @workaround if (m_spellInfo->Id == 45839) { if (apply) @@ -2935,6 +2935,8 @@ void AuraEffect::HandleAuraControlVehicle(AuraApplication const* aurApp, uint8 m caster->_ExitVehicle(); // some SPELL_AURA_CONTROL_VEHICLE auras have a dummy effect on the player - remove them caster->RemoveAurasDueToSpell(GetId()); + + target->GetVehicleKit()->RemovePendingEventsForPassenger(caster); } } From 3bc7e5a7c84d308bc551c523a89ad2b1bcfca4c8 Mon Sep 17 00:00:00 2001 From: Pitcrawler Date: Wed, 13 Mar 2013 11:58:51 +0100 Subject: [PATCH 2/6] DB/Quests: Fix The Best of Intentions, closes #5716 Remove a bunch of incorrectly spawned NPCs and add some missing NPCs and GOs for quest Defiling the Defilers. --- .../world/2013_03_13_00_world_misc.sql | 78 +++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 sql/updates/world/2013_03_13_00_world_misc.sql diff --git a/sql/updates/world/2013_03_13_00_world_misc.sql b/sql/updates/world/2013_03_13_00_world_misc.sql new file mode 100644 index 0000000000..f579a82f5d --- /dev/null +++ b/sql/updates/world/2013_03_13_00_world_misc.sql @@ -0,0 +1,78 @@ +SET @CGUID := 49815; +SET @OGUID := 14972; +SET @SERINAR := 26593; +SET @NECROLYTE := 27356; +SET @BUNNY := 27369; +SET @RUNE := 188695; + +UPDATE `creature` SET `MovementType`=0, `spawndist`=0, `unit_flags`=33024 WHERE `guid`=116960; +DELETE FROM `creature` WHERE `guid` IN (117061,117371,117372,117421,117422,117423,117633,117634,117646,117648,117649); +DELETE FROM `creature` WHERE `guid` BETWEEN @CGUID+0 AND @CGUID+3; +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `MovementType`) VALUES +(117061, @BUNNY, 571, 1, 1, 13069, 4495.499, 1747.361, 175.1579, 0.6806784, 300, 0, 0), +(117371, @BUNNY, 571, 1, 1, 13069, 4544.45, 1739.195, 167.6779, 0.9075712, 300, 0, 0), +(117372, @BUNNY, 571, 1, 1, 13069, 4573.836, 1708.501, 171.742, 1.466077, 300, 0, 0), +(117421, @BUNNY, 571, 1, 1, 13069, 4604.599, 1727.422, 170.6874, 4.921828, 300, 0, 0), +(117422, @BUNNY, 571, 1, 1, 13069, 4601.996, 1700.385, 171.9938, 1.37881, 300, 0, 0), +(117423, @BUNNY, 571, 1, 1, 13069, 4576.454, 1755.058, 167.8554, 2.164208, 300, 0, 0), +(117633, @BUNNY, 571, 1, 1, 13069, 4625.904, 1754.476, 182.3284, 6.038839, 300, 0, 0), +(117634, @BUNNY, 571, 1, 1, 13069, 4561.219, 1731.186, 166.7194, 3.926991, 300, 0, 0), +(117646, @BUNNY, 571, 1, 1, 13069, 4497.56, 1880.672, 164.3632, 5.61996, 300, 0, 0), +(117648, 27362, 571, 1, 1, 0, 4567.375, 1724.495, 168.1724, 0.6806784, 300, 5, 1), +(117649, 27362, 571, 1, 1, 0, 4608.474, 1721.618, 170.9504, 3.124139, 300, 5, 1), +(@CGUID+0, 27358, 571, 1, 1, 0, 4576.38, 1711.559, 171.3237, 4.018391, 300, 5, 1), +(@CGUID+1, 27358, 571, 1, 1, 0, 4574.408, 1751.613, 167.8838, 1.03504, 300, 5, 1), +(@CGUID+2, 27363, 571, 1, 1, 0, 4570.443, 1678.617, 170.5762, 0.002298846, 300, 5, 1); + +DELETE FROM `gameobject` WHERE `guid` BETWEEN @OGUID+0 AND @OGUID+8; +INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`, `orientation`, `rotation0`, `rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES +(@OGUID+0,@RUNE,571,1,1,4495.527,1747.337,175.0751,0.7330382,0,0,0.3583679,0.9335805,300,100,1), +(@OGUID+1,@RUNE,571,1,1,4544.453,1739.186,167.594,-1.151916,0,0,-0.5446386,0.8386708,300,100,1), +(@OGUID+2,@RUNE,571,1,1,4573.879,1708.473,171.6586,-2.268925,0,0,-0.9063072,0.4226195,300,100,1), +(@OGUID+3,@RUNE,571,1,1,4604.577,1727.41,170.6038,-0.1919852,0,0,-0.09584522,0.9953963,300,100,1), +(@OGUID+4,@RUNE,571,1,1,4601.975,1700.365,171.9105,-0.4014249,0,0,-0.1993675,0.9799248,300,100,1), +(@OGUID+5,@RUNE,571,1,1,4576.479,1755.036,167.7747,-0.2792516,0,0,-0.1391726,0.9902682,300,100,1), +(@OGUID+6,@RUNE,571,1,1,4625.864,1754.506,182.2451,-0.7330382,0,0,-0.3583679,0.9335805,300,100,1), +(@OGUID+7,@RUNE,571,1,1,4561.233,1731.201,166.6359,-0.6108635,0,0,-0.300705,0.9537172,300,100,1), +(@OGUID+8,@RUNE,571,1,1,4497.559,1880.615,164.2788,0.8377574,0,0,0.4067364,0.9135455,300,100,1); + +DELETE FROM `creature_addon` WHERE `guid`=116960; +INSERT INTO `creature_addon` (`guid`,`auras`) VALUES +(116960,'29266'); + +DELETE FROM `creature_text` WHERE `entry`=@SERINAR; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@SERINAR,0,0, 'Perfect. As long as you don''t go hacking and slashing your way through, they''ll never know the difference.',12,0,100,0,0,0, 'Serinar'); + +DELETE FROM `spell_linked_spell` WHERE `spell_trigger`=48750; +INSERT INTO `spell_linked_spell` (`spell_trigger`,`spell_effect`,`type`,`comment`) VALUES +(48750,48770,2,'Serinar''s Vision is applied while aura Burning Depths Necrolyte Image is active'); + +UPDATE `quest_template` SET `PrevQuestId`=12447 WHERE `Id` IN (12261,12262); +UPDATE `quest_template` SET `PrevQuestId`=12263 WHERE `Id` IN (12264,12265); + +UPDATE `gameobject_template` SET `flags`=4 WHERE `entry`=188695; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@SERINAR; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@SERINAR AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@SERINAR*100 AND `source_type`=9; +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 +(@SERINAR, 0, 0, 1, 19, 0, 100, 0, 12263, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 19, @NECROLYTE, 20, 0, 0, 0, 0, 0, 'Serinar - On quest accept - Turn to'), +(@SERINAR, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 11, 48748, 0, 0, 0, 0, 0, 19, @NECROLYTE, 20, 0, 0, 0, 0, 0, 'Serinar - On quest accept - Spellcast Absorb Image'), +(@SERINAR, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 80, @SERINAR*100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Serinar - On quest accept - Run script'), +(@SERINAR, 0, 3, 4, 62, 0, 100, 0, 9537, 0, 0, 0, 11, 48750, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Serinar - On gossip select - Spellcast Burning Depths Necrolyte Image'), +(@SERINAR, 0, 4, 5, 61, 0, 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Serinar - On gossip select - Say line'), +(@SERINAR, 0, 5, 0, 61, 0, 100, 0, 0, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Serinar - On gossip select - Close gossip'), + +(@SERINAR*100, 9, 0, 0, 0, 0, 100, 0, 4000, 4000, 0, 0, 66, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Serinar script - Turn to'), +(@SERINAR*100, 9, 1, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 11, 48750, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Serinar script - Spellcast Burning Depths Necrolyte Image'), +(@SERINAR*100, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Serinar script - Say line'), +(@SERINAR*100, 9, 3, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 66, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Serinar script - Turn to'); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry` IN (48738,48748); +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=9537 AND `SourceEntry`=0; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(13, 1, 48738, 0, 0, 31, 0, 4, 0, 0, 0, 0, '', 'Spell Stamp Out Necromantic Rune effect0 targets player'), +(13, 2, 48738, 0, 0, 31, 0, 3, @BUNNY, 0, 0, 0, '', 'Spell Stamp Out Necromantic Rune effect1 targets Necromantic Rune Bunny'), +(13, 1, 48748, 0, 0, 31, 0, 3, @NECROLYTE, 0, 0, 0, '', 'Spell Absorb Image targets Burning Depths Necrolyte'), +(15, 9537, 0, 0, 0, 9, 0, 12263, 0, 0, 0, 0, '', 'Show gossip option only if player has taken quest The Best of Intentions'), +(15, 9537, 0, 0, 0, 1, 0, 48750, 0, 0, 1, 0, '', 'Show gossip option only if player doesn''t have aura Burning Depths Necrolyte Image'); From 9ae1ef2cf857828ad6c277ce3364ab38998b0bab Mon Sep 17 00:00:00 2001 From: Gacko Date: Tue, 12 Mar 2013 21:52:34 +0100 Subject: [PATCH 3/6] Script/Spell: Unlocking Zuluhed's Chains Closes #996 --- src/server/scripts/Outland/zone_shadowmoon_valley.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/server/scripts/Outland/zone_shadowmoon_valley.cpp b/src/server/scripts/Outland/zone_shadowmoon_valley.cpp index 5a9fcba8fd..b8f96e373f 100644 --- a/src/server/scripts/Outland/zone_shadowmoon_valley.cpp +++ b/src/server/scripts/Outland/zone_shadowmoon_valley.cpp @@ -1891,16 +1891,11 @@ class spell_unlocking_zuluheds_chains : public SpellScriptLoader { PrepareSpellScript(spell_unlocking_zuluheds_chains_SpellScript); - bool Load() - { - return GetCaster()->GetTypeId() == TYPEID_PLAYER; - } - void HandleAfterHit() { - Player* caster = GetCaster()->ToPlayer(); - if (caster->GetQuestStatus(QUEST_ZULUHED) == QUEST_STATUS_INCOMPLETE) - caster->KilledMonsterCredit(NPC_KARYNAKU, 0); + if (GetCaster()->GetTypeId() == TYPEID_PLAYER) + if (Creature* karynaku = GetCaster()->FindNearestCreature(NPC_KARYNAKU, 15.0f)) + GetCaster()->ToPlayer()->CastedCreatureOrGO(NPC_KARYNAKU, karynaku->GetGUID(), GetSpellInfo()->Id); } void Register() From 2f895f91ee0d700f01b13ab8863bf9ba8a99943b Mon Sep 17 00:00:00 2001 From: dr-j Date: Wed, 13 Mar 2013 19:52:31 +0100 Subject: [PATCH 4/6] DB/Loot: Correct Lootmode for some questitems (thx redsonja as well) Closes #9382 Closes #9381 --- .../world/2013_03_13_01_world_creature_loot_template.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sql/updates/world/2013_03_13_01_world_creature_loot_template.sql diff --git a/sql/updates/world/2013_03_13_01_world_creature_loot_template.sql b/sql/updates/world/2013_03_13_01_world_creature_loot_template.sql new file mode 100644 index 0000000000..ce1fbd0cec --- /dev/null +++ b/sql/updates/world/2013_03_13_01_world_creature_loot_template.sql @@ -0,0 +1,2 @@ +-- wrong lootmode +UPDATE `creature_loot_template` SET `lootmode`=1 WHERE `item` IN(46367,46381,46380); From c83b2b69b6c2b2de24695d614fddf02b8d0fb5c9 Mon Sep 17 00:00:00 2001 From: Kirkhammett Date: Wed, 13 Mar 2013 19:57:11 +0100 Subject: [PATCH 5/6] DB/SAI fix some event_flags and other conversion issues Closes #9144 --- sql/updates/world/2013_03_13_02_sai.sql | 49 +++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 sql/updates/world/2013_03_13_02_sai.sql diff --git a/sql/updates/world/2013_03_13_02_sai.sql b/sql/updates/world/2013_03_13_02_sai.sql new file mode 100644 index 0000000000..b3712d5219 --- /dev/null +++ b/sql/updates/world/2013_03_13_02_sai.sql @@ -0,0 +1,49 @@ +-- Darkwraith +UPDATE `smart_scripts` SET `event_flags`=1 WHERE `entryorguid`=15657 AND `source_type`=0 AND `id`=0 AND `link`=1; +-- Plaguehound +UPDATE `smart_scripts` SET `event_flags`=1 WHERE `entryorguid`=8598 AND `source_type`=0 AND `id`=0 AND `link`=1; +-- Amani Berserker +UPDATE `smart_scripts` SET `event_flags`=1 WHERE `entryorguid`=15643 AND `source_type`=0 AND `id`=0 AND `link`=1; +-- Enraged Wraith +UPDATE `smart_scripts` SET `event_flags`=1 WHERE `entryorguid`=17086 AND `source_type`=0 AND `id`=0 AND `link`=1; +-- Anok'suten +UPDATE `smart_scripts` SET `event_flags`=1 WHERE `entryorguid`=16357 AND `source_type`=0 AND `id`=3 AND `link`=0; +-- Bloodscalp Warrior +UPDATE `smart_scripts` SET `event_flags`=1 WHERE `entryorguid`=587 AND `source_type`=0 AND `id`=2 AND `link`=3; +-- Bloodscalp Berserker +UPDATE `smart_scripts` SET `event_flags`=1 WHERE `entryorguid`=597 AND `source_type`=0 AND `id`=0 AND `link`=1; +-- Commander Aggro'gosh +UPDATE `smart_scripts` SET `event_flags`=1 WHERE `entryorguid`=2464 AND `source_type`=0 AND `id`=3 AND `link`=4; +-- Vilebranch Berserker +UPDATE `smart_scripts` SET `event_flags`=1 WHERE `entryorguid`=2643 AND `source_type`=0 AND `id`=0 AND `link`=1; +-- Hungering Wraith +UPDATE `smart_scripts` SET `event_flags`=1 WHERE `entryorguid`=1802 AND `source_type`=0 AND `id`=1 AND `link`=2; +-- Dark Strand Enforcer +UPDATE `smart_scripts` SET `event_flags`=1 WHERE `entryorguid`=3727 AND `source_type`=0 AND `id`=0 AND `link`=1; +-- Scarlet Myrmidon +UPDATE `smart_scripts` SET `event_flags`=1 WHERE `entryorguid`=4295 AND `source_type`=0 AND `id`=0 AND `link`=1; +-- Ymirjar Flesh Hunter +UPDATE `smart_scripts` SET `event_flags`=7 WHERE `entryorguid`=26670 AND `source_type`=0 AND `id`=27 AND `link`=28; +-- Startup Errors +UPDATE `smart_scripts` SET `event_flags`=0 WHERE `entryorguid`=22895 AND `source_type`=0 AND `id`=0 AND `link`=0; +UPDATE `smart_scripts` SET `link`=0 WHERE `entryorguid`=1487 AND `source_type`=0 AND `id`=8 AND `link`=9; +UPDATE `smart_scripts` SET `link`=0 WHERE `entryorguid`=2245 AND `source_type`=0 AND `id`=14 AND `link`=15; +UPDATE `smart_scripts` SET `link`=0 WHERE `entryorguid`=2375 AND `source_type`=0 AND `id`=8 AND `link`=9; +UPDATE `smart_scripts` SET `link`=0 WHERE `entryorguid`=16344 AND `source_type`=0 AND `id`=8 AND `link`=9; +UPDATE `smart_scripts` SET `link`=0 WHERE `entryorguid`=29174 AND `source_type`=0 AND `id`=2 AND `link`=3; +UPDATE `smart_scripts` SET `link`=0 WHERE `entryorguid`=29174 AND `source_type`=0 AND `id`=3 AND `link`=4; +UPDATE `smart_scripts` SET `link`=0 WHERE `entryorguid`=29174 AND `source_type`=0 AND `id`=4 AND `link`=5; +-- Timed action scripts aren't supposed to have links set on them +UPDATE `smart_scripts` SET `link`=0, `event_type`=0 WHERE `entryorguid`=83600 AND `source_type`=9 AND `id`=1 AND `link`=2; +UPDATE `smart_scripts` SET `link`=0, `event_type`=0 WHERE `entryorguid`=83600 AND `source_type`=9 AND `id`=2 AND `link`=3; +UPDATE `smart_scripts` SET `event_type`=0 WHERE `entryorguid`=83600 AND `source_type`=9 AND `id`=3 AND `link`=0; +-- Aforementioned issue about links on timed scripts +UPDATE `smart_scripts` SET `event_type`=0 WHERE `entryorguid`=83600 AND `source_type`=9 AND `id`=3 AND `link`=0; +UPDATE `smart_scripts` SET `link`=0, `event_type`=0 WHERE `entryorguid`=305400 AND `source_type`=9 AND `id`=1 AND `link`=2; +UPDATE `smart_scripts` SET `link`=0 WHERE `entryorguid`=15938 AND `source_type`=0 AND `id`=7 AND `link`=8; +-- This one had messed up ID's too +UPDATE `smart_scripts` SET `id`=5, `link`=6 WHERE `entryorguid`=19456 AND `source_type`=0 AND `id`=6 AND `link`=7; +UPDATE `smart_scripts` SET `id`=6 WHERE `entryorguid`=19456 AND `source_type`=0 AND `id`=7 AND `link`=0; +UPDATE `smart_scripts` SET `id`=7 WHERE `entryorguid`=19456 AND `source_type`=0 AND `id`=8 AND `link`=0; +UPDATE `smart_scripts` SET `id`=8 WHERE `entryorguid`=19456 AND `source_type`=0 AND `id`=9 AND `link`=0; +UPDATE `smart_scripts` SET `id`=9 WHERE `entryorguid`=19456 AND `source_type`=0 AND `id`=10 AND `link`=0; From c47dceebff736ae37873aa220f989fdb00675030 Mon Sep 17 00:00:00 2001 From: Shauren Date: Wed, 13 Mar 2013 22:38:41 +0100 Subject: [PATCH 6/6] Core/Vehicles: Fixed a crash introduced in 2c169bcca51ca1b5cdbc73c9a4d402d46cdcfc15 --- src/server/game/Spells/Auras/SpellAuraEffects.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index 1f291d5d48..24c58a666d 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -2926,6 +2926,9 @@ void AuraEffect::HandleAuraControlVehicle(AuraApplication const* aurApp, uint8 m } else { + // Remove pending passengers before exiting vehicle - might cause an Uninstall + target->GetVehicleKit()->RemovePendingEventsForPassenger(caster); + if (GetId() == 53111) // Devour Humanoid { target->Kill(caster); @@ -2935,8 +2938,6 @@ void AuraEffect::HandleAuraControlVehicle(AuraApplication const* aurApp, uint8 m caster->_ExitVehicle(); // some SPELL_AURA_CONTROL_VEHICLE auras have a dummy effect on the player - remove them caster->RemoveAurasDueToSpell(GetId()); - - target->GetVehicleKit()->RemovePendingEventsForPassenger(caster); } }