Created
August 18, 2012 13:24
-
-
Save rsa/3386851 to your computer and use it in GitHub Desktop.
update to SD2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/scripts/battlegrounds/battlegroundIC.cpp b/scripts/battlegrounds/battlegroundIC.cpp | |
index cbfdeef..4c96a46 100644 | |
--- a/scripts/battlegrounds/battlegroundIC.cpp | |
+++ b/scripts/battlegrounds/battlegroundIC.cpp | |
@@ -135,7 +135,7 @@ struct MANGOS_DLL_DECL npc_ic_vehicleAI : public ScriptedAI | |
{ | |
if (BattleGround *bg = pPlayer->GetBattleGround()) | |
{ | |
- if (VehicleKit *vehicle = pCreature->GetVehicleKit()) | |
+ if (VehicleKitPtr vehicle = pCreature->GetVehicleKit()) | |
{ | |
if (!pCreature->GetCharmerGuid().IsEmpty()) | |
pPlayer->EnterVehicle(vehicle); | |
@@ -232,7 +232,7 @@ struct MANGOS_DLL_DECL npc_ic_cannonAI : public ScriptedAI | |
if (bg->GetStatus() == STATUS_WAIT_JOIN) | |
return; | |
- if (VehicleKit *vehicle = pCreature->GetVehicleKit()) | |
+ if (VehicleKitPtr vehicle = pCreature->GetVehicleKit()) | |
{ | |
if (!pCreature->GetCharmerGuid().IsEmpty()) | |
pPlayer->EnterVehicle(vehicle); | |
diff --git a/scripts/battlegrounds/battlegroundSA.cpp b/scripts/battlegrounds/battlegroundSA.cpp | |
index cc78c02..b4c3b6d 100644 | |
--- a/scripts/battlegrounds/battlegroundSA.cpp | |
+++ b/scripts/battlegrounds/battlegroundSA.cpp | |
@@ -59,7 +59,7 @@ struct MANGOS_DLL_DECL npc_sa_demolisherAI : public ScriptedAI | |
if (((BattleGroundSA*)bg)->GetDefender() == pPlayer->GetTeam() || bg->GetStatus() == STATUS_WAIT_JOIN) | |
return; | |
- if (VehicleKit *vehicle = pCreature->GetVehicleKit()) | |
+ if (VehicleKitPtr vehicle = pCreature->GetVehicleKit()) | |
{ | |
if (!pCreature->GetCharmerGuid().IsEmpty()) | |
pPlayer->EnterVehicle(vehicle); | |
@@ -163,7 +163,7 @@ struct MANGOS_DLL_DECL npc_sa_cannonAI : public ScriptedAI | |
if (bg->GetDefender() != pPlayer->GetTeam()) | |
return; | |
- if (VehicleKit *vehicle = pCreature->GetVehicleKit()) | |
+ if (VehicleKitPtr vehicle = pCreature->GetVehicleKit()) | |
{ | |
if (!pCreature->GetCharmerGuid().IsEmpty()) | |
pPlayer->EnterVehicle(vehicle); | |
diff --git a/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp | |
index 283e8df..87105a0 100644 | |
--- a/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp | |
+++ b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp | |
@@ -3465,7 +3465,7 @@ struct MANGOS_DLL_DECL npc_mine_carAI : public ScriptedAI | |
void UpdateAI(const uint32 uiDiff) | |
{ | |
- if (m_creature->GetVehicleKit()->HasEmptySeat(0)) | |
+ if (!m_creature->GetVehicleKit() || m_creature->GetVehicleKit()->HasEmptySeat(0)) | |
{ | |
m_creature->ForcedDespawn(); | |
} | |
diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_professor_putricide.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_professor_putricide.cpp | |
index 3fc97c6..c4773f5 100644 | |
--- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_professor_putricide.cpp | |
+++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_professor_putricide.cpp | |
@@ -300,7 +300,7 @@ struct MANGOS_DLL_DECL boss_professor_putricideAI : public base_icc_bossAI | |
if (m_pInstance) | |
m_pInstance->SetData(TYPE_PUTRICIDE, FAIL); | |
- if (VehicleKit *pKit = m_creature->GetVehicleKit()) | |
+ if (VehicleKitPtr pKit = m_creature->GetVehicleKit()) | |
{ | |
pKit->RemoveAllPassengers(); | |
pKit->Reset(); | |
diff --git a/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp b/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp | |
index c3a1a0e..73086fc 100644 | |
--- a/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp | |
+++ b/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp | |
@@ -364,7 +364,7 @@ struct MANGOS_DLL_DECL boss_malygosAI : public ScriptedAI | |
{ | |
pDisk->SetLevitate(true); | |
pDisk->CastSpell(pDisk, SPELL_FLIGHT, true); | |
- if (VehicleKit* pDiskVehicle = pDisk->GetVehicleKit()) | |
+ if (VehicleKitPtr pDiskVehicle = pDisk->GetVehicleKit()) | |
pSummoned->EnterVehicle(pDiskVehicle, 0); | |
} | |
pSummoned->SetInCombatWithZone(); | |
@@ -376,7 +376,7 @@ struct MANGOS_DLL_DECL boss_malygosAI : public ScriptedAI | |
{ | |
pDisk->SetLevitate(true); | |
pDisk->CastSpell(pDisk, SPELL_FLIGHT, true); | |
- if (VehicleKit* pDiskVehicle = pDisk->GetVehicleKit()) | |
+ if (VehicleKitPtr pDiskVehicle = pDisk->GetVehicleKit()) | |
pSummoned->EnterVehicle(pDiskVehicle, 0); | |
} | |
pSummoned->SetInCombatWithZone(); | |
@@ -1042,7 +1042,7 @@ struct MANGOS_DLL_DECL npc_nexus_lordAI : public ScriptedAI | |
{ | |
if (m_uiMoveTimer <=uiDiff) | |
{ | |
- if (VehicleKit* pVehicleBase = m_creature->GetVehicle()) | |
+ if (VehicleKitPtr pVehicleBase = m_creature->GetVehicle()) | |
{ | |
if (Unit* pDisk = pVehicleBase->GetBase()) | |
{ | |
@@ -1122,7 +1122,7 @@ struct MANGOS_DLL_DECL npc_scion_of_eternityAI : public ScriptedAI | |
if (m_uiMoveTimer < uiDiff) | |
{ | |
- if (VehicleKit* pVehicle = m_creature->GetVehicle()) | |
+ if (VehicleKitPtr pVehicle = m_creature->GetVehicle()) | |
{ | |
if (Unit* pDisk = pVehicle->GetBase()) | |
{ | |
diff --git a/scripts/northrend/nexus/eye_of_eternity/instance_eye_of_eternity.cpp b/scripts/northrend/nexus/eye_of_eternity/instance_eye_of_eternity.cpp | |
index b987c8e..ef52390 100644 | |
--- a/scripts/northrend/nexus/eye_of_eternity/instance_eye_of_eternity.cpp | |
+++ b/scripts/northrend/nexus/eye_of_eternity/instance_eye_of_eternity.cpp | |
@@ -299,7 +299,7 @@ void instance_eye_of_eternity::HandleRiderOfVortex(Unit* pTarget) | |
{ | |
if (Creature* pVortex = instance->GetCreature(*iter)) | |
{ | |
- if (VehicleKit* pVehicle = pVortex->GetVehicleKit()) | |
+ if (VehicleKitPtr pVehicle = pVortex->GetVehicleKit()) | |
{ | |
if (pVehicle->GetNextEmptySeatWithFlag(0) != -1) | |
{ | |
diff --git a/scripts/northrend/ulduar/ulduar/boss_ignis.cpp b/scripts/northrend/ulduar/ulduar/boss_ignis.cpp | |
index a1115d1..5d78951 100644 | |
--- a/scripts/northrend/ulduar/ulduar/boss_ignis.cpp | |
+++ b/scripts/northrend/ulduar/ulduar/boss_ignis.cpp | |
@@ -245,7 +245,7 @@ struct MANGOS_DLL_DECL boss_ignisAI : public ScriptedAI | |
{ | |
if (m_pInstance) | |
m_pInstance->SetData(TYPE_IGNIS, FAIL); | |
- if (VehicleKit *pVehKit = m_creature->GetVehicleKit()) | |
+ if (VehicleKitPtr pVehKit = m_creature->GetVehicleKit()) | |
pVehKit->RemoveAllPassengers(); | |
} | |
@@ -322,7 +322,7 @@ struct MANGOS_DLL_DECL boss_ignisAI : public ScriptedAI | |
{ | |
if (m_uiSlagPotSwitchTimer <= uiDiff) | |
{ | |
- if (VehicleKit *pVehKit = m_creature->GetVehicleKit()) | |
+ if (VehicleKitPtr pVehKit = m_creature->GetVehicleKit()) | |
if (Unit *pPassenger = pVehKit->GetPassenger(0)) | |
{ | |
pVehKit->RemovePassenger(pPassenger); | |
@@ -336,7 +336,7 @@ struct MANGOS_DLL_DECL boss_ignisAI : public ScriptedAI | |
if (m_uiSlagPotDmgTimer <= uiDiff) | |
{ | |
- if (VehicleKit *pVehKit = m_creature->GetVehicleKit()) | |
+ if (VehicleKitPtr pVehKit = m_creature->GetVehicleKit()) | |
if (Unit *pPassenger = pVehKit->GetPassenger(1)) | |
{ | |
pPassenger->CastSpell(pPassenger, m_bIsRegularMode ? SPELL_SLAG_POT_DMG : SPELL_SLAG_POT_DMG_H, true ,0 ,0, m_creature->GetObjectGuid()); | |
@@ -348,7 +348,7 @@ struct MANGOS_DLL_DECL boss_ignisAI : public ScriptedAI | |
if (m_uiSlagPotExitTimer <= uiDiff) | |
{ | |
- if (VehicleKit *pVehKit = m_creature->GetVehicleKit()) | |
+ if (VehicleKitPtr pVehKit = m_creature->GetVehicleKit()) | |
pVehKit->RemoveAllPassengers(); | |
m_uiSlagPotExitTimer = 10000; | |
m_bIsSlagPot = false; | |
diff --git a/scripts/northrend/ulduar/ulduar/boss_kologarn.cpp b/scripts/northrend/ulduar/ulduar/boss_kologarn.cpp | |
index d74a04d..1a15c3e 100644 | |
--- a/scripts/northrend/ulduar/ulduar/boss_kologarn.cpp | |
+++ b/scripts/northrend/ulduar/ulduar/boss_kologarn.cpp | |
@@ -159,7 +159,7 @@ struct MANGOS_DLL_DECL boss_kologarnAI : public ScriptedAI | |
} | |
instance_ulduar* m_pInstance; | |
- VehicleKit* vehicle; | |
+ VehicleKitPtr vehicle; | |
bool m_bIsRegularMode; | |
uint32 m_uiSpell_Timer; | |
@@ -564,7 +564,7 @@ struct MANGOS_DLL_DECL boss_right_armAI : public ScriptedAI | |
} | |
instance_ulduar* m_pInstance; | |
- VehicleKit* vehicle; | |
+ VehicleKitPtr vehicle; | |
bool m_bIsRegularMode; | |
uint32 m_uiStone_Grip_Timer; | |
diff --git a/scripts/northrend/ulduar/ulduar/boss_mimiron.cpp b/scripts/northrend/ulduar/ulduar/boss_mimiron.cpp | |
index 6410b62..7df832a 100644 | |
--- a/scripts/northrend/ulduar/ulduar/boss_mimiron.cpp | |
+++ b/scripts/northrend/ulduar/ulduar/boss_mimiron.cpp | |
@@ -194,7 +194,7 @@ struct MANGOS_DLL_DECL boss_leviathan_mkAI : public ScriptedAI | |
bool m_bIsRegularMode; | |
instance_ulduar* m_pInstance; | |
- VehicleKit* pVehicleTank; | |
+ VehicleKitPtr pVehicleTank; | |
bool m_bStartAttack; | |
@@ -348,7 +348,7 @@ struct MANGOS_DLL_DECL boss_leviathan_mkAI : public ScriptedAI | |
m_creature->SetHealthPercent(50.0f); | |
if(Creature* pTorso = m_pInstance->GetSingleCreatureFromStorage(NPC_VX001)) | |
{ | |
- if (VehicleKit* pVehicleTank = m_creature->GetVehicleKit()) | |
+ if (VehicleKitPtr pVehicleTank = m_creature->GetVehicleKit()) | |
{ | |
pVehicleTank->RemoveAllPassengers(); | |
pTorso->EnterVehicle(pVehicleTank, SEAT_FOR_ROBOT); | |
@@ -356,7 +356,7 @@ struct MANGOS_DLL_DECL boss_leviathan_mkAI : public ScriptedAI | |
if(Creature* pHead = m_pInstance->GetSingleCreatureFromStorage(NPC_AERIAL_UNIT)) | |
{ | |
- if (VehicleKit* pVehicleTorso = pTorso->GetVehicleKit()) | |
+ if (VehicleKitPtr pVehicleTorso = pTorso->GetVehicleKit()) | |
{ | |
pHead->EnterVehicle(pVehicleTorso, SEAT_FOR_ROBOT); | |
} | |
@@ -713,7 +713,7 @@ struct MANGOS_DLL_DECL boss_vx001AI : public ScriptedAI | |
{ | |
if (Creature* pTank = m_pInstance->GetSingleCreatureFromStorage(NPC_LEVIATHAN_MK)) | |
{ | |
- if (VehicleKit* pTankV = pTank->GetVehicleKit()) | |
+ if (VehicleKitPtr pTankV = pTank->GetVehicleKit()) | |
{ | |
if (!pTankV->GetPassenger(SEAT_FOR_ROBOT)) | |
{ | |
@@ -721,7 +721,7 @@ struct MANGOS_DLL_DECL boss_vx001AI : public ScriptedAI | |
} | |
} | |
} | |
- if (VehicleKit* pVX001V = m_creature->GetVehicleKit()) | |
+ if (VehicleKitPtr pVX001V = m_creature->GetVehicleKit()) | |
{ | |
if (!pVX001V->GetPassenger(SEAT_FOR_ROBOT)) | |
{ | |
diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp | |
index 8df5d18..7a61376 100644 | |
--- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp | |
+++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp | |
@@ -234,7 +234,7 @@ struct boss_skadi_graufAI : public ScriptedAI | |
} | |
instance_pinnacle* m_pInstance; | |
- VehicleKit* vehicle; | |
+ VehicleKitPtr vehicle; | |
bool m_bIsRegularMode; | |
bool isInFlight; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment