diff options
Diffstat (limited to 'src/server/scripts')
5 files changed, 11 insertions, 11 deletions
diff --git a/src/server/scripts/EasternKingdoms/Deadmines/deadmines.cpp b/src/server/scripts/EasternKingdoms/Deadmines/deadmines.cpp index 9e8890b7064..896d27bd768 100644 --- a/src/server/scripts/EasternKingdoms/Deadmines/deadmines.cpp +++ b/src/server/scripts/EasternKingdoms/Deadmines/deadmines.cpp @@ -47,8 +47,7 @@ public: } if (pInstance->GetData(EVENT_STATE)!= CANNON_NOT_USED) return false; - if (targets.getGOTarget() && targets.getGOTarget()->GetTypeId() == TYPEID_GAMEOBJECT && - targets.getGOTarget()->GetEntry() == GO_DEFIAS_CANNON) + if (targets.GetGOTarget() && targets.GetGOTarget()->GetEntry() == GO_DEFIAS_CANNON) { pInstance->SetData(EVENT_STATE, CANNON_GUNPOWDER_USED); } diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp index 3e66cf5ec8e..4a394cffe62 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp @@ -1478,9 +1478,10 @@ class spell_valanar_kinetic_bomb : public SpellScriptLoader void ChangeSummonPos(SpellEffIndex /*effIndex*/) { - WorldLocation* summonPos = GetTargetDest(); + WorldLocation summonPos = *GetTargetDest(); Position offset = {0.0f, 0.0f, 20.0f, 0.0f}; - summonPos->RelocateOffset(offset); // +20 in height + summonPos.RelocateOffset(offset); + SetTargetDest(summonPos); } void Register() diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp index 2dbca8f4f8f..ffc0b7fb026 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp @@ -1260,7 +1260,7 @@ class spell_rimefang_icy_blast : public SpellScriptLoader void HandleTriggerMissile(SpellEffIndex effIndex) { PreventHitDefaultEffect(effIndex); - if (Position* pos = GetTargetDest()) + if (Position const* pos = GetTargetDest()) if (TempSummon* summon = GetCaster()->SummonCreature(NPC_ICY_BLAST, *pos, TEMPSUMMON_TIMED_DESPAWN, 40000)) summon->CastSpell(summon, SPELL_ICY_BLAST_AREA, true); } diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/boss_razorscale.cpp b/src/server/scripts/Northrend/Ulduar/ulduar/boss_razorscale.cpp index 789c17b1b1f..73baeae441f 100644 --- a/src/server/scripts/Northrend/Ulduar/ulduar/boss_razorscale.cpp +++ b/src/server/scripts/Northrend/Ulduar/ulduar/boss_razorscale.cpp @@ -988,7 +988,7 @@ class spell_razorscale_devouring_flame : public SpellScriptLoader PreventHitDefaultEffect(effIndex); Unit* caster = GetCaster(); uint32 entry = uint32(GetSpellInfo()->EffectMiscValue[effIndex]); - WorldLocation* summonLocation = GetTargetDest(); + WorldLocation const* summonLocation = GetTargetDest(); if (!caster || !summonLocation) return; diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp index 45b8b5d3590..93903e4f297 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp @@ -988,11 +988,11 @@ public: Vashj = (Unit::GetCreature((*pPlayer), pInstance->GetData64(DATA_LADYVASHJ))); if (Vashj && (CAST_AI(boss_lady_vashj::boss_lady_vashjAI, Vashj->AI())->Phase == 2)) { - if (targets.getGOTarget() && targets.getGOTarget()->GetTypeId() == TYPEID_GAMEOBJECT) + if (GameObject* gObj = targets.GetGOTarget()) { uint32 identifier; uint8 channel_identifier; - switch(targets.getGOTarget()->GetEntry()) + switch(gObj->GetEntry()) { case 185052: identifier = DATA_SHIELDGENERATOR1; @@ -1035,12 +1035,12 @@ public: pPlayer->DestroyItemCount(31088, 1, true); return true; } - else if (targets.getUnitTarget()->GetTypeId() == TYPEID_UNIT) + else if (targets.GetUnitTarget()->GetTypeId() == TYPEID_UNIT) return false; - else if (targets.getUnitTarget()->GetTypeId() == TYPEID_PLAYER) + else if (targets.GetUnitTarget()->GetTypeId() == TYPEID_PLAYER) { pPlayer->DestroyItemCount(31088, 1, true); - pPlayer->CastSpell(targets.getUnitTarget(), 38134, true); + pPlayer->CastSpell(targets.GetUnitTarget(), 38134, true); return true; } } |