Core/Scripts: Fixed uninitialized variable and memory leaks
This commit is contained in:
1 parent
664ed816df
commit
4f44cdf2b5
4 files changed
+26
-15
No files matched your search
@@ -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