AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
BfWGGameObjectBuilding Struct Reference

#include "BattlefieldWG.h"

Public Member Functions

 BfWGGameObjectBuilding (BattlefieldWG *WG)
 
void Rebuild ()
 
void Damaged ()
 
void Destroyed ()
 
void Init (GameObject *gobj, uint32 type, uint32 worldstate, uint8 damageText, uint8 destroyText)
 
void UpdateCreatureAndGo ()
 
void UpdateTurretAttack (bool disable)
 
void Save ()
 

Public Attributes

TeamId m_Team
 
BattlefieldWGm_WG
 
ObjectGuid m_Build
 
uint32 m_Type
 
uint32 m_WorldState
 
uint32 m_State
 
uint8 m_damagedText
 
uint8 m_destroyedText
 
GameObjectSet m_GameObjectList [2]
 
GuidUnorderedSet m_CreatureBottomList [2]
 
GuidUnorderedSet m_CreatureTopList [2]
 
GuidUnorderedSet m_TowerCannonBottomList
 
GuidUnorderedSet m_TurretTopList
 

Detailed Description

Constructor & Destructor Documentation

◆ BfWGGameObjectBuilding()

BfWGGameObjectBuilding::BfWGGameObjectBuilding ( BattlefieldWG WG)
inline
1097 {
1098 m_WG = WG;
1100 m_Type = 0;
1101 m_WorldState = 0;
1102 m_State = 0;
1103 m_damagedText = 0;
1104 m_destroyedText = 0;
1105 }
@ TEAM_ALLIANCE
Definition: SharedDefines.h:732
BattlefieldWG * m_WG
Definition: BattlefieldWG.h:1111
uint32 m_State
Definition: BattlefieldWG.h:1123
uint32 m_WorldState
Definition: BattlefieldWG.h:1120
TeamId m_Team
Definition: BattlefieldWG.h:1108
uint8 m_destroyedText
Definition: BattlefieldWG.h:1127
uint32 m_Type
Definition: BattlefieldWG.h:1117
uint8 m_damagedText
Definition: BattlefieldWG.h:1126

References m_damagedText, m_destroyedText, m_State, m_Team, m_Type, m_WG, m_WorldState, and TEAM_ALLIANCE.

Member Function Documentation

◆ Damaged()

void BfWGGameObjectBuilding::Damaged ( )
inline
1172 {
1173 // Update worldstate
1176
1177 // Send warning message
1178 if (m_damagedText) // tower damage + name
1180
1181 for (GuidUnorderedSet::const_iterator itr = m_CreatureTopList[m_WG->GetAttackerTeam()].begin(); itr != m_CreatureTopList[m_WG->GetAttackerTeam()].end(); ++itr)
1182 if (Creature* creature = m_WG->GetCreature(*itr))
1183 m_WG->HideNpc(creature);
1184
1185 for (GuidUnorderedSet::const_iterator itr = m_TurretTopList.begin(); itr != m_TurretTopList.end(); ++itr)
1186 if (Creature* creature = m_WG->GetCreature(*itr))
1187 m_WG->HideNpc(creature);
1188
1191 }
@ BATTLEFIELD_WG_OBJECTTYPE_TOWER
Definition: BattlefieldWG.h:494
@ BATTLEFIELD_WG_OBJECTSTATE_ALLIANCE_DAMAGE
Definition: BattlefieldWG.h:507
Creature * GetCreature(ObjectGuid const guid)
Definition: Battlefield.cpp:843
void SendWarning(uint8 id, WorldObject const *target=nullptr)
Definition: Battlefield.cpp:468
void HideNpc(Creature *creature)
Definition: Battlefield.cpp:487
void SendUpdateWorldState(uint32 field, uint32 value)
Update data of a worldstate to all players present in zone.
Definition: Battlefield.cpp:474
TeamId GetAttackerTeam()
Definition: Battlefield.h:278
void UpdateDamagedTowerCount(TeamId team)
Called when a tower is damaged.
Definition: BattlefieldWG.cpp:1091
GuidUnorderedSet m_CreatureTopList[2]
Definition: BattlefieldWG.h:1134
GuidUnorderedSet m_TurretTopList
Definition: BattlefieldWG.h:1136
Definition: Creature.h:46

References BATTLEFIELD_WG_OBJECTSTATE_ALLIANCE_DAMAGE, BATTLEFIELD_WG_OBJECTTYPE_TOWER, Battlefield::GetAttackerTeam(), Battlefield::GetCreature(), Battlefield::HideNpc(), m_CreatureTopList, m_damagedText, m_State, m_Team, m_TurretTopList, m_Type, m_WG, m_WorldState, Battlefield::SendUpdateWorldState(), Battlefield::SendWarning(), and BattlefieldWG::UpdateDamagedTowerCount().

◆ Destroyed()

void BfWGGameObjectBuilding::Destroyed ( )
inline
1195 {
1196 // Update worldstate
1199
1200 // Warn players
1201 if (m_destroyedText)
1203
1204 switch (m_Type)
1205 {
1206 // Inform the global wintergrasp script of the destruction of this object
1209 break;
1212 if (GameObject* go = m_WG->GetRelic())
1213 go->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
1214 else
1215 LOG_ERROR("bg.battlefield", "BattlefieldWG: Relic not found.");
1216 break;
1221 break;
1222 }
1223
1225 }
#define LOG_ERROR(filterType__,...)
Definition: Log.h:159
@ BATTLEFIELD_WG_OBJECTTYPE_DOOR
Definition: BattlefieldWG.h:489
@ BATTLEFIELD_WG_OBJECTTYPE_KEEP_TOWER
Definition: BattlefieldWG.h:493
@ BATTLEFIELD_WG_OBJECTTYPE_WALL
Definition: BattlefieldWG.h:491
@ BATTLEFIELD_WG_OBJECTTYPE_DOOR_LAST
Definition: BattlefieldWG.h:492
@ BATTLEFIELD_WG_OBJECTSTATE_ALLIANCE_DESTROY
Definition: BattlefieldWG.h:508
TeamId
Definition: SharedDefines.h:731
@ GO_FLAG_NOT_SELECTABLE
Definition: SharedDefines.h:1579
GameObject * GetGameObject(ObjectGuid const guid)
Definition: Battlefield.cpp:851
void UpdatedDestroyedTowerCount(TeamId team, GameObject *go)
Called when tower is broken.
Definition: BattlefieldWG.cpp:999
GameObject * GetRelic()
Return pointer to relic object.
Definition: BattlefieldWG.h:390
void SetRelicInteractible(bool allow)
Define if player can interact with the relic.
Definition: BattlefieldWG.h:399
void BrokenWallOrTower(TeamId team)
Called when a wall/tower is broken.
Definition: BattlefieldWG.cpp:985
ObjectGuid m_Build
Definition: BattlefieldWG.h:1114
Definition: GameObject.h:122

References BATTLEFIELD_WG_OBJECTSTATE_ALLIANCE_DESTROY, BATTLEFIELD_WG_OBJECTTYPE_DOOR, BATTLEFIELD_WG_OBJECTTYPE_DOOR_LAST, BATTLEFIELD_WG_OBJECTTYPE_KEEP_TOWER, BATTLEFIELD_WG_OBJECTTYPE_TOWER, BATTLEFIELD_WG_OBJECTTYPE_WALL, BattlefieldWG::BrokenWallOrTower(), Battlefield::GetGameObject(), BattlefieldWG::GetRelic(), GO_FLAG_NOT_SELECTABLE, LOG_ERROR, m_Build, m_destroyedText, m_State, m_Team, m_Type, m_WG, m_WorldState, Battlefield::SendUpdateWorldState(), Battlefield::SendWarning(), BattlefieldWG::SetRelicInteractible(), and BattlefieldWG::UpdatedDestroyedTowerCount().

◆ Init()

void BfWGGameObjectBuilding::Init ( GameObject gobj,
uint32  type,
uint32  worldstate,
uint8  damageText,
uint8  destroyText 
)
inline
1228 {
1229 if (!gobj)
1230 {
1231 return;
1232 }
1233
1234 // GameObject associated to object
1235 m_Build = gobj->GetGUID();
1236
1237 // Type of building (WALL/TOWER/DOOR)
1238 m_Type = type;
1239
1240 // WorldState for client (icon on map)
1241 m_WorldState = worldstate;
1242
1243 // NameId for Warning text
1244 m_damagedText = damageText;
1245 m_destroyedText = destroyText;
1246
1247 switch (m_Type)
1248 {
1253 m_Team = m_WG->GetDefenderTeam(); // Objects that are part of the keep should be the defender's
1254 break;
1256 m_Team = m_WG->GetAttackerTeam(); // The towers in the south should be the attacker's
1257 break;
1258 default:
1260 break;
1261 }
1262
1263 m_State = sWorld->getWorldState(m_WorldState);
1264 if (gobj)
1265 {
1266 switch (m_State)
1267 {
1271 break;
1275 break;
1279 break;
1280 }
1281 }
1282
1283 int32 towerid = -1;
1284 switch (gobj->GetEntry())
1285 {
1287 towerid = 0;
1288 break;
1290 towerid = 1;
1291 break;
1293 towerid = 2;
1294 break;
1296 towerid = 3;
1297 break;
1299 towerid = 4;
1300 break;
1302 towerid = 5;
1303 break;
1305 towerid = 6;
1306 break;
1307 }
1308
1309 if (towerid > 3) // Attacker towers
1310 {
1311 // Spawn associate gameobjects
1312 for (uint8 i = 0; i < AttackTowers[towerid - 4].nbObject; i++)
1313 {
1314 WintergraspObjectPositionData gobData = AttackTowers[towerid - 4].GameObject[i];
1315 if (GameObject* go = m_WG->SpawnGameObject(gobData.entryHorde, gobData.x, gobData.y, gobData.z, gobData.o))
1316 m_GameObjectList[TEAM_HORDE].insert(go);
1317 if (GameObject* go = m_WG->SpawnGameObject(gobData.entryAlliance, gobData.x, gobData.y, gobData.z, gobData.o))
1318 m_GameObjectList[TEAM_ALLIANCE].insert(go);
1319 }
1320
1321 // Spawn associate npc bottom
1322 for (uint8 i = 0; i < AttackTowers[towerid - 4].nbCreatureBottom; i++)
1323 {
1326 m_CreatureBottomList[TEAM_HORDE].insert(creature->GetGUID());
1328 m_CreatureBottomList[TEAM_ALLIANCE].insert(creature->GetGUID());
1329 }
1330
1331 // Spawn associate npc top
1332 for (uint8 i = 0; i < AttackTowers[towerid - 4].nbCreatureTop; i++)
1333 {
1336 m_CreatureTopList[TEAM_HORDE].insert(creature->GetGUID());
1338 m_CreatureTopList[TEAM_ALLIANCE].insert(creature->GetGUID());
1339 }
1340 }
1341
1342 if (towerid >= 0)
1343 {
1344 // Spawn Turret bottom
1345 for (uint8 i = 0; i < TowerCannon[towerid].nbTowerCannonBottom; i++)
1346 {
1347 Position turretPos = TowerCannon[towerid].TowerCannonBottom[i].GetPosition();
1349 {
1350 m_TowerCannonBottomList.insert(turret->GetGUID());
1351 m_WG->HideNpc(turret);
1352 }
1353 }
1354
1355 // Spawn Turret top
1356 for (uint8 i = 0; i < TowerCannon[towerid].nbTurretTop; i++)
1357 {
1358 Position towerCannonPos = TowerCannon[towerid].TurretTop[i].GetPosition();
1359 if (Creature* turret = m_WG->SpawnCreature(NPC_WINTERGRASP_TOWER_CANNON, towerCannonPos, TEAM_ALLIANCE))
1360 {
1361 m_TurretTopList.insert(turret->GetGUID());
1362 m_WG->HideNpc(turret);
1363 }
1364 }
1366 }
1367 }
std::int32_t int32
Definition: Define.h:104
std::uint8_t uint8
Definition: Define.h:110
@ NPC_WINTERGRASP_TOWER_CANNON
Definition: BattlefieldWG.h:216
const WintergraspTowerCannonData TowerCannon[WG_MAX_TOWER_CANNON]
Definition: BattlefieldWG.h:923
const WintergraspTowerData AttackTowers[WG_MAX_ATTACKTOWERS]
Definition: BattlefieldWG.h:807
@ GO_WINTERGRASP_FORTRESS_TOWER_3
Definition: BattlefieldWG.h:579
@ GO_WINTERGRASP_FORTRESS_TOWER_2
Definition: BattlefieldWG.h:578
@ GO_WINTERGRASP_FLAMEWATCH_TOWER
Definition: BattlefieldWG.h:584
@ GO_WINTERGRASP_FORTRESS_TOWER_4
Definition: BattlefieldWG.h:580
@ GO_WINTERGRASP_SHADOWSIGHT_TOWER
Definition: BattlefieldWG.h:582
@ GO_WINTERGRASP_FORTRESS_TOWER_1
Definition: BattlefieldWG.h:577
@ GO_WINTERGRASP_WINTER_S_EDGE_TOWER
Definition: BattlefieldWG.h:583
@ BATTLEFIELD_WG_OBJECTSTATE_HORDE_DESTROY
Definition: BattlefieldWG.h:505
@ BATTLEFIELD_WG_OBJECTSTATE_ALLIANCE_INTACT
Definition: BattlefieldWG.h:506
@ BATTLEFIELD_WG_OBJECTSTATE_HORDE_INTACT
Definition: BattlefieldWG.h:503
@ BATTLEFIELD_WG_OBJECTSTATE_HORDE_DAMAGE
Definition: BattlefieldWG.h:504
ObjectData const creatureData[]
Definition: instance_blackwing_lair.cpp:44
@ TEAM_NEUTRAL
Definition: SharedDefines.h:734
@ TEAM_HORDE
Definition: SharedDefines.h:733
@ GO_DESTRUCTIBLE_DESTROYED
Definition: SharedDefines.h:1601
@ GO_DESTRUCTIBLE_REBUILDING
Definition: SharedDefines.h:1602
@ GO_DESTRUCTIBLE_DAMAGED
Definition: SharedDefines.h:1600
#define sWorld
Definition: World.h:447
Creature * SpawnCreature(uint32 entry, float x, float y, float z, float o, TeamId teamId)
Definition: Battlefield.cpp:779
TeamId GetDefenderTeam()
Definition: Battlefield.h:277
GameObject * SpawnGameObject(uint32 entry, float x, float y, float z, float o)
Definition: Battlefield.cpp:819
Definition: BattlefieldWG.h:588
uint32 entryAlliance
Definition: BattlefieldWG.h:594
uint32 entryHorde
Definition: BattlefieldWG.h:593
float y
Definition: BattlefieldWG.h:590
float x
Definition: BattlefieldWG.h:589
float z
Definition: BattlefieldWG.h:591
float o
Definition: BattlefieldWG.h:592
uint8 nbCreatureTop
Definition: BattlefieldWG.h:800
WintergraspObjectPositionData CreatureTop[5]
Definition: BattlefieldWG.h:801
WintergraspObjectPositionData CreatureBottom[9]
Definition: BattlefieldWG.h:799
WintergraspObjectPositionData GameObject[6]
Definition: BattlefieldWG.h:795
uint8 nbObject
Definition: BattlefieldWG.h:794
uint8 nbCreatureBottom
Definition: BattlefieldWG.h:798
uint8 nbTowerCannonBottom
Definition: BattlefieldWG.h:915
Position TowerCannonBottom[5]
Definition: BattlefieldWG.h:916
uint8 nbTurretTop
Definition: BattlefieldWG.h:917
Position TurretTop[5]
Definition: BattlefieldWG.h:918
GameObjectSet m_GameObjectList[2]
Definition: BattlefieldWG.h:1130
GuidUnorderedSet m_CreatureBottomList[2]
Definition: BattlefieldWG.h:1133
GuidUnorderedSet m_TowerCannonBottomList
Definition: BattlefieldWG.h:1135
void UpdateCreatureAndGo()
Definition: BattlefieldWG.h:1369
void SetDestructibleState(GameObjectDestructibleState state, Player *eventInvoker=nullptr, bool setHealth=false)
Definition: GameObject.cpp:2330
uint32 GetEntry() const
Definition: Object.h:109
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:106
Definition: Position.h:28
void GetPosition(float &x, float &y) const
Definition: Position.h:122

References AttackTowers, BATTLEFIELD_WG_OBJECTSTATE_ALLIANCE_DAMAGE, BATTLEFIELD_WG_OBJECTSTATE_ALLIANCE_DESTROY, BATTLEFIELD_WG_OBJECTSTATE_ALLIANCE_INTACT, BATTLEFIELD_WG_OBJECTSTATE_HORDE_DAMAGE, BATTLEFIELD_WG_OBJECTSTATE_HORDE_DESTROY, BATTLEFIELD_WG_OBJECTSTATE_HORDE_INTACT, BATTLEFIELD_WG_OBJECTTYPE_DOOR, BATTLEFIELD_WG_OBJECTTYPE_DOOR_LAST, BATTLEFIELD_WG_OBJECTTYPE_KEEP_TOWER, BATTLEFIELD_WG_OBJECTTYPE_TOWER, BATTLEFIELD_WG_OBJECTTYPE_WALL, WintergraspTowerData::CreatureBottom, creatureData, WintergraspTowerData::CreatureTop, WintergraspObjectPositionData::entryAlliance, WintergraspObjectPositionData::entryHorde, WintergraspTowerData::GameObject, Battlefield::GetAttackerTeam(), Battlefield::GetDefenderTeam(), Object::GetEntry(), Object::GetGUID(), Position::GetPosition(), GO_DESTRUCTIBLE_DAMAGED, GO_DESTRUCTIBLE_DESTROYED, GO_DESTRUCTIBLE_REBUILDING, GO_WINTERGRASP_FLAMEWATCH_TOWER, GO_WINTERGRASP_FORTRESS_TOWER_1, GO_WINTERGRASP_FORTRESS_TOWER_2, GO_WINTERGRASP_FORTRESS_TOWER_3, GO_WINTERGRASP_FORTRESS_TOWER_4, GO_WINTERGRASP_SHADOWSIGHT_TOWER, GO_WINTERGRASP_WINTER_S_EDGE_TOWER, Battlefield::HideNpc(), m_Build, m_CreatureBottomList, m_CreatureTopList, m_damagedText, m_destroyedText, m_GameObjectList, m_State, m_Team, m_TowerCannonBottomList, m_TurretTopList, m_Type, m_WG, m_WorldState, WintergraspTowerData::nbCreatureBottom, WintergraspTowerData::nbCreatureTop, WintergraspTowerData::nbObject, WintergraspTowerCannonData::nbTowerCannonBottom, WintergraspTowerCannonData::nbTurretTop, NPC_WINTERGRASP_TOWER_CANNON, WintergraspObjectPositionData::o, GameObject::SetDestructibleState(), Battlefield::SpawnCreature(), Battlefield::SpawnGameObject(), sWorld, TEAM_ALLIANCE, TEAM_HORDE, TEAM_NEUTRAL, TowerCannon, WintergraspTowerCannonData::TowerCannonBottom, WintergraspTowerCannonData::TurretTop, UpdateCreatureAndGo(), WintergraspObjectPositionData::x, WintergraspObjectPositionData::y, and WintergraspObjectPositionData::z.

Referenced by BattlefieldWG::SetupBattlefield().

◆ Rebuild()

void BfWGGameObjectBuilding::Rebuild ( )
inline
1139 {
1140 switch (m_Type)
1141 {
1146 m_Team = m_WG->GetDefenderTeam(); // Objects that are part of the keep should be the defender's
1147 break;
1149 m_Team = m_WG->GetAttackerTeam(); // The towers in the south should be the attacker's
1150 break;
1151 default:
1153 break;
1154 }
1155
1157 if (go)
1158 {
1159 // Rebuild gameobject
1162 }
1163
1164 // Update worldstate
1168 }
const uint32 WintergraspFaction[3]
Definition: BattlefieldWG.h:43
@ GAMEOBJECT_FACTION
Definition: UpdateFields.h:402
void SetUInt32Value(uint16 index, uint32 value)
Definition: Object.cpp:650

References BATTLEFIELD_WG_OBJECTSTATE_ALLIANCE_INTACT, BATTLEFIELD_WG_OBJECTTYPE_DOOR, BATTLEFIELD_WG_OBJECTTYPE_DOOR_LAST, BATTLEFIELD_WG_OBJECTTYPE_KEEP_TOWER, BATTLEFIELD_WG_OBJECTTYPE_TOWER, BATTLEFIELD_WG_OBJECTTYPE_WALL, GAMEOBJECT_FACTION, Battlefield::GetAttackerTeam(), Battlefield::GetDefenderTeam(), Battlefield::GetGameObject(), GO_DESTRUCTIBLE_REBUILDING, m_Build, m_State, m_Team, m_Type, m_WG, m_WorldState, Battlefield::SendUpdateWorldState(), GameObject::SetDestructibleState(), Object::SetUInt32Value(), TEAM_NEUTRAL, UpdateCreatureAndGo(), and WintergraspFaction.

◆ Save()

void BfWGGameObjectBuilding::Save ( )
inline
1442 {
1443 sWorld->setWorldState(m_WorldState, m_State);
1444 }

References m_State, m_WorldState, and sWorld.

◆ UpdateCreatureAndGo()

void BfWGGameObjectBuilding::UpdateCreatureAndGo ( )
inline
1370 {
1371 for (GuidUnorderedSet::const_iterator itr = m_CreatureTopList[m_WG->GetDefenderTeam()].begin(); itr != m_CreatureTopList[m_WG->GetDefenderTeam()].end(); ++itr)
1372 if (Creature* creature = m_WG->GetCreature(*itr))
1373 m_WG->HideNpc(creature);
1374
1375 for (GuidUnorderedSet::const_iterator itr = m_CreatureTopList[m_WG->GetAttackerTeam()].begin(); itr != m_CreatureTopList[m_WG->GetAttackerTeam()].end(); ++itr)
1376 if (Creature* creature = m_WG->GetCreature(*itr))
1377 m_WG->ShowNpc(creature, true);
1378
1379 for (GuidUnorderedSet::const_iterator itr = m_CreatureBottomList[m_WG->GetDefenderTeam()].begin(); itr != m_CreatureBottomList[m_WG->GetDefenderTeam()].end(); ++itr)
1380 if (Creature* creature = m_WG->GetCreature(*itr))
1381 m_WG->HideNpc(creature);
1382
1383 for (GuidUnorderedSet::const_iterator itr = m_CreatureBottomList[m_WG->GetAttackerTeam()].begin(); itr != m_CreatureBottomList[m_WG->GetAttackerTeam()].end(); ++itr)
1384 if (Creature* creature = m_WG->GetCreature(*itr))
1385 m_WG->ShowNpc(creature, true);
1386
1387 for (GameObjectSet::const_iterator itr = m_GameObjectList[m_WG->GetDefenderTeam()].begin(); itr != m_GameObjectList[m_WG->GetDefenderTeam()].end(); ++itr)
1388 (*itr)->SetRespawnTime(RESPAWN_ONE_DAY);
1389
1390 for (GameObjectSet::const_iterator itr = m_GameObjectList[m_WG->GetAttackerTeam()].begin(); itr != m_GameObjectList[m_WG->GetAttackerTeam()].end(); ++itr)
1391 (*itr)->SetRespawnTime(RESPAWN_IMMEDIATELY);
1392 }
@ RESPAWN_IMMEDIATELY
Definition: Battleground.h:164
@ RESPAWN_ONE_DAY
Definition: Battleground.h:163
void ShowNpc(Creature *creature, bool aggressive)
Definition: Battlefield.cpp:497

References Battlefield::GetAttackerTeam(), Battlefield::GetCreature(), Battlefield::GetDefenderTeam(), Battlefield::HideNpc(), m_CreatureBottomList, m_CreatureTopList, m_GameObjectList, m_WG, RESPAWN_IMMEDIATELY, RESPAWN_ONE_DAY, and Battlefield::ShowNpc().

Referenced by Init(), and Rebuild().

◆ UpdateTurretAttack()

void BfWGGameObjectBuilding::UpdateTurretAttack ( bool  disable)
inline
1395 {
1397 if (!build)
1398 return;
1399
1400 uint32 faction = 0;
1401 switch (build->GetEntry())
1402 {
1408 break;
1413 break;
1414 }
1415
1416 for (GuidUnorderedSet::const_iterator itr = m_TowerCannonBottomList.begin(); itr != m_TowerCannonBottomList.end(); ++itr)
1417 {
1418 if (Creature* creature = m_WG->GetCreature(*itr))
1419 {
1420 creature->SetFaction(faction);
1421 if (disable)
1422 m_WG->HideNpc(creature);
1423 else
1424 m_WG->ShowNpc(creature, true);
1425 }
1426 }
1427
1428 for (GuidUnorderedSet::const_iterator itr = m_TurretTopList.begin(); itr != m_TurretTopList.end(); ++itr)
1429 {
1430 if (Creature* creature = m_WG->GetCreature(*itr))
1431 {
1432 creature->SetFaction(faction);
1433 if (disable)
1434 m_WG->HideNpc(creature);
1435 else
1436 m_WG->ShowNpc(creature, true);
1437 }
1438 }
1439 }
std::uint32_t uint32
Definition: Define.h:108

References Battlefield::GetAttackerTeam(), Battlefield::GetCreature(), Battlefield::GetDefenderTeam(), Object::GetEntry(), Battlefield::GetGameObject(), GO_WINTERGRASP_FLAMEWATCH_TOWER, GO_WINTERGRASP_FORTRESS_TOWER_1, GO_WINTERGRASP_FORTRESS_TOWER_2, GO_WINTERGRASP_FORTRESS_TOWER_3, GO_WINTERGRASP_FORTRESS_TOWER_4, GO_WINTERGRASP_SHADOWSIGHT_TOWER, GO_WINTERGRASP_WINTER_S_EDGE_TOWER, Battlefield::HideNpc(), m_Build, m_TowerCannonBottomList, m_TurretTopList, m_WG, Battlefield::ShowNpc(), and WintergraspFaction.

Member Data Documentation

◆ m_Build

ObjectGuid BfWGGameObjectBuilding::m_Build

◆ m_CreatureBottomList

GuidUnorderedSet BfWGGameObjectBuilding::m_CreatureBottomList[2]

Referenced by Init(), and UpdateCreatureAndGo().

◆ m_CreatureTopList

GuidUnorderedSet BfWGGameObjectBuilding::m_CreatureTopList[2]

Referenced by Damaged(), Init(), and UpdateCreatureAndGo().

◆ m_damagedText

uint8 BfWGGameObjectBuilding::m_damagedText

◆ m_destroyedText

uint8 BfWGGameObjectBuilding::m_destroyedText

◆ m_GameObjectList

GameObjectSet BfWGGameObjectBuilding::m_GameObjectList[2]

Referenced by Init(), and UpdateCreatureAndGo().

◆ m_State

uint32 BfWGGameObjectBuilding::m_State

◆ m_Team

TeamId BfWGGameObjectBuilding::m_Team

◆ m_TowerCannonBottomList

GuidUnorderedSet BfWGGameObjectBuilding::m_TowerCannonBottomList

Referenced by Init(), and UpdateTurretAttack().

◆ m_TurretTopList

GuidUnorderedSet BfWGGameObjectBuilding::m_TurretTopList

Referenced by Damaged(), Init(), and UpdateTurretAttack().

◆ m_Type

uint32 BfWGGameObjectBuilding::m_Type

◆ m_WG

◆ m_WorldState

uint32 BfWGGameObjectBuilding::m_WorldState