Core/Misc: Fix static analysis issues

This commit is contained in:
jackpoz
2017-04-08 20:59:48 +02:00
committed by Aokromes
parent 5387b34f3c
commit 53939cd14e
2 changed files with 3 additions and 7 deletions

View File

@@ -128,8 +128,8 @@ namespace VMAP
iTilesY = other.iTilesY;
iCorner = other.iCorner;
iType = other.iType;
delete iHeight;
delete iFlags;
delete[] iHeight;
delete[] iFlags;
if (other.iHeight)
{
iHeight = new float[(iTilesX+1)*(iTilesY+1)];

View File

@@ -721,8 +721,7 @@ void BattlegroundEY::EventTeamLostPoint(Player* player, uint32 Point)
UpdatePointsCount(Team);
//remove bonus honor aura trigger creature when node is lost
if (Point < EY_POINTS_MAX)
DelCreature(Point + 6);//NULL checks are in DelCreature! 0-5 spirit guides
DelCreature(Point + 6);//NULL checks are in DelCreature! 0-5 spirit guides
}
void BattlegroundEY::EventTeamCapturedPoint(Player* player, uint32 Point)
@@ -775,9 +774,6 @@ void BattlegroundEY::EventTeamCapturedPoint(Player* player, uint32 Point)
UpdatePointsIcons(Team, Point);
UpdatePointsCount(Team);
if (Point >= EY_POINTS_MAX)
return;
Creature* trigger = GetBGCreature(Point + 6, false);//0-5 spirit guides
if (!trigger)
trigger = AddCreature(WORLD_TRIGGER, Point+6, BG_EY_TriggerPositions[Point], GetTeamIndexByTeamId(Team));