mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-30 05:43:12 +01:00
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:
@@ -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));
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user