mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 02:25:38 +01:00
Core/Scripts: Fixed uninitialized variable and memory leaks
This commit is contained in:
@@ -364,10 +364,8 @@ public:
|
||||
me->GetRandomNearPosition(pos, 60);
|
||||
else
|
||||
{
|
||||
std::vector<InfernalPoint*>::iterator itr = positions.begin()+rand()%positions.size();
|
||||
point = *itr;
|
||||
positions.erase(itr);
|
||||
pos.Relocate(point->x, point->y, INFERNAL_Z, 0.0f);
|
||||
point = Trinity::Containers::SelectRandomContainerElement(positions);
|
||||
pos.Relocate(point->x, point->y, INFERNAL_Z, frand(0.0f, float(M_PI * 2)));
|
||||
}
|
||||
|
||||
Creature* infernal = me->SummonCreature(NETHERSPITE_INFERNAL, pos, TEMPSUMMON_TIMED_DESPAWN, 180000);
|
||||
|
||||
@@ -493,7 +493,7 @@ class npc_green_dragon_combat_trigger : public CreatureScript
|
||||
|
||||
struct npc_green_dragon_combat_triggerAI : public BossAI
|
||||
{
|
||||
npc_green_dragon_combat_triggerAI(Creature* creature) : BossAI(creature, DATA_VALITHRIA_DREAMWALKER)
|
||||
npc_green_dragon_combat_triggerAI(Creature* creature) : BossAI(creature, DATA_VALITHRIA_DREAMWALKER), _evadeCheck(false)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user