@@ -574,7 +574,7 @@ void BattlegroundAV::EventPlayerDestroyedPoint(BG_AV_Nodes node)
574574 {
575575 uint8 tmp = node-BG_AV_NODES_DUNBALDAR_SOUTH;
576576 // despawn marshal
577- if (BgCreatures[AV_CPLACE_A_MARSHAL_SOUTH + tmp])
577+ if (! BgCreatures[AV_CPLACE_A_MARSHAL_SOUTH + tmp]. IsEmpty () )
578578 DelCreature (AV_CPLACE_A_MARSHAL_SOUTH + tmp);
579579 else
580580 TC_LOG_ERROR (" bg.battleground" , " BG_AV: playerdestroyedpoint: marshal {} doesn't exist" , AV_CPLACE_A_MARSHAL_SOUTH + tmp);
@@ -632,10 +632,10 @@ void BattlegroundAV::ChangeMineOwner(uint8 mine, uint32 team, bool initial)
632632 TC_LOG_DEBUG (" bg.battleground" , " bg_av depopulating mine {} (0=north, 1=south)" , mine);
633633 if (mine == AV_SOUTH_MINE)
634634 for (uint16 i=AV_CPLACE_MINE_S_S_MIN; i <= AV_CPLACE_MINE_S_S_MAX; i++)
635- if (BgCreatures[i])
635+ if (! BgCreatures[i]. IsEmpty () )
636636 DelCreature (i); // / @todo just set the respawntime to 999999
637637 for (uint16 i=((mine == AV_NORTH_MINE)?AV_CPLACE_MINE_N_1_MIN:AV_CPLACE_MINE_S_1_MIN); i <= ((mine == AV_NORTH_MINE)?AV_CPLACE_MINE_N_3:AV_CPLACE_MINE_S_3); i++)
638- if (BgCreatures[i])
638+ if (! BgCreatures[i]. IsEmpty () )
639639 DelCreature (i); // / @todo here also
640640 }
641641 SendMineWorldStates (mine);
@@ -732,7 +732,7 @@ void BattlegroundAV::PopulateNode(BG_AV_Nodes node)
732732 else
733733 creatureid = (owner == ALLIANCE)? AV_NPC_A_GRAVEDEFENSE3 : AV_NPC_H_GRAVEDEFENSE3;
734734 // spiritguide
735- if (BgCreatures[node])
735+ if (! BgCreatures[node]. IsEmpty () )
736736 DelCreature (node);
737737 if (!AddSpiritGuide (node, BG_AV_CreaturePos[node], GetTeamIndexByTeamId (owner)))
738738 TC_LOG_ERROR (" bg.battleground" , " AV: couldn't spawn spiritguide at node {}" , node);
@@ -765,11 +765,11 @@ void BattlegroundAV::PopulateNode(BG_AV_Nodes node)
765765void BattlegroundAV::DePopulateNode (BG_AV_Nodes node)
766766{
767767 uint32 c_place = AV_CPLACE_DEFENSE_STORM_AID + (4 * node);
768- for (uint8 i= 0 ; i< 4 ; i++)
769- if (BgCreatures[c_place+i] )
770- DelCreature (c_place+ i);
768+ for (uint8 i = 0 ; i < 4 ; i++)
769+ if (! BgCreatures[c_place + i]. IsEmpty () )
770+ DelCreature (c_place + i);
771771 // spiritguide
772- if (!IsTower (node) && BgCreatures[node])
772+ if (!IsTower (node) && ! BgCreatures[node]. IsEmpty () )
773773 DelCreature (node);
774774
775775 // remove bonus honor aura trigger creature when node is lost
@@ -1496,7 +1496,7 @@ void BattlegroundAV::ResetBGSubclass()
14961496
14971497 m_Mine_Timer = AV_MINE_TICK_TIMER;
14981498 for (uint16 i = 0 ; i < AV_CPLACE_MAX + AsUnderlyingType (AV_STATICCPLACE_MAX); i++)
1499- if (BgCreatures[i])
1499+ if (! BgCreatures[i]. IsEmpty () )
15001500 DelCreature (i);
15011501}
15021502
0 commit comments