Core/Misc: Fix uninitialized values

Fix Position members not being always initialized.
Valgrind log:
 at : Position::NormalizeOrientation(float) (Object.h:388)
 by : Position::SetOrientation(float) (Object.h:315)
 by : Position::Relocate(Position const&) (Object.h:310)
 by : spell_ulduar_stone_grip::spell_ulduar_stone_grip_AuraScript::OnRemoveVehicle(AuraEffect const*, AuraEffectHandleModes) (boss_kologarn.cpp:592)
This commit is contained in:
jackpoz
2014-04-01 22:49:15 +02:00
parent b7ab8a1332
commit 0930482fa4
4 changed files with 12 additions and 1 deletions

View File

@@ -208,11 +208,13 @@ class boss_ayamiss : public CreatureScript
events.ScheduleEvent(EVENT_SWARMER_ATTACK, 60000);
break;
case EVENT_SUMMON_SWARMER:
{
Position Pos;
me->GetRandomPoint(SwarmerPos, 80.0f, Pos);
me->SummonCreature(NPC_SWARMER, Pos);
events.ScheduleEvent(EVENT_SUMMON_SWARMER, 5000);
break;
}
case EVENT_TRASH:
DoCastVictim(SPELL_TRASH);
events.ScheduleEvent(EVENT_TRASH, urand(5000, 7000));

View File

@@ -469,6 +469,7 @@ public:
DoCast(me, SPELL_VORTEX_3, true);
break;
case ACTION_LIFT_IN_AIR:
{
Position _zToLift;
me->GetPosition(&_zToLift);
if (_phase == PHASE_ONE)
@@ -482,6 +483,7 @@ public:
me->GetMotionMaster()->MoveTakeoff(POINT_PHASE_ONE_TO_TWO_TRANSITION, _zToLift);
}
break;
}
case ACTION_HANDLE_P_THREE_INTRO:
events.CancelEventGroup(0);
events.CancelEventGroup(1);

View File

@@ -132,11 +132,13 @@ class boss_mechano_lord_capacitus : public CreatureScript
events.ScheduleEvent(EVENT_POSITIVE_SHIFT, urand(45, 60) * IN_MILLISECONDS);
break;
case EVENT_SUMMON_NETHER_CHARGE:
{
Position pos;
me->GetRandomNearPosition(pos, 5.0f);
me->SummonCreature(NPC_NETHER_CHARGE, pos, TEMPSUMMON_TIMED_DESPAWN, 18000);
events.ScheduleEvent(EVENT_SUMMON_NETHER_CHARGE, 10 * IN_MILLISECONDS);
break;
}
case EVENT_BERSERK:
DoCast(me, SPELL_BERSERK);
break;