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
1095 {
1096 m_WG = WG;
1098 m_Type = 0;
1099 m_WorldState = 0;
1100 m_State = 0;
1101 m_damagedText = 0;
1102 m_destroyedText = 0;
1103 }
@ TEAM_ALLIANCE
Definition: SharedDefines.h:760
BattlefieldWG * m_WG
Definition: BattlefieldWG.h:1109
uint32 m_State
Definition: BattlefieldWG.h:1121
uint32 m_WorldState
Definition: BattlefieldWG.h:1118
TeamId m_Team
Definition: BattlefieldWG.h:1106
uint8 m_destroyedText
Definition: BattlefieldWG.h:1125
uint32 m_Type
Definition: BattlefieldWG.h:1115
uint8 m_damagedText
Definition: BattlefieldWG.h:1124

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
1170 {
1171 // Update worldstate
1174
1175 // Send warning message
1176 if (m_damagedText) // tower damage + name
1178
1179 for (GuidUnorderedSet::const_iterator itr = m_CreatureTopList[m_WG->GetAttackerTeam()].begin(); itr != m_CreatureTopList[m_WG->GetAttackerTeam()].end(); ++itr)
1180 if (Creature* creature = m_WG->GetCreature(*itr))
1181 m_WG->HideNpc(creature);
1182
1183 for (GuidUnorderedSet::const_iterator itr = m_TurretTopList.begin(); itr != m_TurretTopList.end(); ++itr)
1184 if (Creature* creature = m_WG->GetCreature(*itr))
1185 m_WG->HideNpc(creature);
1186
1189 }
@ BATTLEFIELD_WG_OBJECTTYPE_TOWER
Definition: BattlefieldWG.h:492
@ BATTLEFIELD_WG_OBJECTSTATE_ALLIANCE_DAMAGE
Definition: BattlefieldWG.h:505
Creature * GetCreature(ObjectGuid const guid)
Definition: Battlefield.cpp:848
void SendWarning(uint8 id, WorldObject const *target=nullptr)
Definition: Battlefield.cpp:473
void HideNpc(Creature *creature)
Definition: Battlefield.cpp:492
void SendUpdateWorldState(uint32 field, uint32 value)
Update data of a worldstate to all players present in zone.
Definition: Battlefield.cpp:479
TeamId GetAttackerTeam()
Definition: Battlefield.h:276
void UpdateDamagedTowerCount(TeamId team)
Called when a tower is damaged.
Definition: BattlefieldWG.cpp:1092
GuidUnorderedSet m_CreatureTopList[2]
Definition: BattlefieldWG.h:1132
GuidUnorderedSet m_TurretTopList
Definition: BattlefieldWG.h:1134
Definition: Creature.h:43

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
1193 {
1194 // Update worldstate
1197
1198 // Warn players
1199 if (m_destroyedText)
1201
1202 switch (m_Type)
1203 {
1204 // Inform the global wintergrasp script of the destruction of this object
1207 break;
1210 if (GameObject* go = m_WG->GetRelic())
1211 go->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
1212 else
1213 LOG_ERROR("bg.battlefield", "BattlefieldWG: Relic not found.");
1214 break;
1219 break;
1220 }
1221
1223 }
#define LOG_ERROR(filterType__,...)
Definition: Log.h:157
@ GO_FLAG_NOT_SELECTABLE
Definition: SharedDefines.h:1607
TeamId
Definition: SharedDefines.h:759
@ BATTLEFIELD_WG_OBJECTTYPE_DOOR
Definition: BattlefieldWG.h:487
@ BATTLEFIELD_WG_OBJECTTYPE_KEEP_TOWER
Definition: BattlefieldWG.h:491
@ BATTLEFIELD_WG_OBJECTTYPE_WALL
Definition: BattlefieldWG.h:489
@ BATTLEFIELD_WG_OBJECTTYPE_DOOR_LAST
Definition: BattlefieldWG.h:490
@ BATTLEFIELD_WG_OBJECTSTATE_ALLIANCE_DESTROY
Definition: BattlefieldWG.h:506
GameObject * GetGameObject(ObjectGuid const guid)
Definition: Battlefield.cpp:856
void UpdatedDestroyedTowerCount(TeamId team, GameObject *go)
Called when tower is broken.
Definition: BattlefieldWG.cpp:1000
GameObject * GetRelic()
Return pointer to relic object.
Definition: BattlefieldWG.h:388
void SetRelicInteractible(bool allow)
Define if player can interact with the relic.
Definition: BattlefieldWG.h:397
void BrokenWallOrTower(TeamId team)
Called when a wall/tower is broken.
Definition: BattlefieldWG.cpp:986
ObjectGuid m_Build
Definition: BattlefieldWG.h:1112
Definition: GameObject.h:120

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
1226 {
1227 if (!gobj)
1228 {
1229 return;
1230 }
1231
1232 // GameObject associated to object
1233 m_Build = gobj->GetGUID();
1234
1235 // Type of building (WALL/TOWER/DOOR)
1236 m_Type = type;
1237
1238 // WorldState for client (icon on map)
1239 m_WorldState = worldstate;
1240
1241 // NameId for Warning text
1242 m_damagedText = damageText;
1243 m_destroyedText = destroyText;
1244
1245 switch (m_Type)
1246 {
1251 m_Team = m_WG->GetDefenderTeam(); // Objects that are part of the keep should be the defender's
1252 break;
1254 m_Team = m_WG->GetAttackerTeam(); // The towers in the south should be the attacker's
1255 break;
1256 default:
1258 break;
1259 }
1260
1261 m_State = sWorld->getWorldState(m_WorldState);
1262 if (gobj)
1263 {
1264 switch (m_State)
1265 {
1269 break;
1273 break;
1277 break;
1278 }
1279 }
1280
1281 int32 towerid = -1;
1282 switch (gobj->GetEntry())
1283 {
1285 towerid = 0;
1286 break;
1288 towerid = 1;
1289 break;
1291 towerid = 2;
1292 break;
1294 towerid = 3;
1295 break;
1297 towerid = 4;
1298 break;
1300 towerid = 5;
1301 break;
1303 towerid = 6;
1304 break;
1305 }
1306
1307 if (towerid > 3) // Attacker towers
1308 {
1309 // Spawn associate gameobjects
1310 for (uint8 i = 0; i < AttackTowers[towerid - 4].nbObject; i++)
1311 {
1312 WintergraspObjectPositionData gobData = AttackTowers[towerid - 4].GameObject[i];
1313 if (GameObject* go = m_WG->SpawnGameObject(gobData.entryHorde, gobData.x, gobData.y, gobData.z, gobData.o))
1314 m_GameObjectList[TEAM_HORDE].insert(go);
1315 if (GameObject* go = m_WG->SpawnGameObject(gobData.entryAlliance, gobData.x, gobData.y, gobData.z, gobData.o))
1316 m_GameObjectList[TEAM_ALLIANCE].insert(go);
1317 }
1318
1319 // Spawn associate npc bottom
1320 for (uint8 i = 0; i < AttackTowers[towerid - 4].nbCreatureBottom; i++)
1321 {
1324 m_CreatureBottomList[TEAM_HORDE].insert(creature->GetGUID());
1326 m_CreatureBottomList[TEAM_ALLIANCE].insert(creature->GetGUID());
1327 }
1328
1329 // Spawn associate npc top
1330 for (uint8 i = 0; i < AttackTowers[towerid - 4].nbCreatureTop; i++)
1331 {
1334 m_CreatureTopList[TEAM_HORDE].insert(creature->GetGUID());
1336 m_CreatureTopList[TEAM_ALLIANCE].insert(creature->GetGUID());
1337 }
1338 }
1339
1340 if (towerid >= 0)
1341 {
1342 // Spawn Turret bottom
1343 for (uint8 i = 0; i < TowerCannon[towerid].nbTowerCannonBottom; i++)
1344 {
1345 Position turretPos = TowerCannon[towerid].TowerCannonBottom[i].GetPosition();
1347 {
1348 m_TowerCannonBottomList.insert(turret->GetGUID());
1349 m_WG->HideNpc(turret);
1350 }
1351 }
1352
1353 // Spawn Turret top
1354 for (uint8 i = 0; i < TowerCannon[towerid].nbTurretTop; i++)
1355 {
1356 Position towerCannonPos = TowerCannon[towerid].TurretTop[i].GetPosition();
1357 if (Creature* turret = m_WG->SpawnCreature(NPC_WINTERGRASP_TOWER_CANNON, towerCannonPos, TEAM_ALLIANCE))
1358 {
1359 m_TurretTopList.insert(turret->GetGUID());
1360 m_WG->HideNpc(turret);
1361 }
1362 }
1364 }
1365 }
std::int32_t int32
Definition: Define.h:103
std::uint8_t uint8
Definition: Define.h:109
ObjectData const creatureData[]
Definition: instance_blackwing_lair.cpp:45
@ GO_DESTRUCTIBLE_DESTROYED
Definition: SharedDefines.h:1629
@ GO_DESTRUCTIBLE_REBUILDING
Definition: SharedDefines.h:1630
@ GO_DESTRUCTIBLE_DAMAGED
Definition: SharedDefines.h:1628
@ TEAM_NEUTRAL
Definition: SharedDefines.h:762
@ TEAM_HORDE
Definition: SharedDefines.h:761
@ NPC_WINTERGRASP_TOWER_CANNON
Definition: BattlefieldWG.h:214
const WintergraspTowerCannonData TowerCannon[WG_MAX_TOWER_CANNON]
Definition: BattlefieldWG.h:921
const WintergraspTowerData AttackTowers[WG_MAX_ATTACKTOWERS]
Definition: BattlefieldWG.h:805
@ GO_WINTERGRASP_FORTRESS_TOWER_3
Definition: BattlefieldWG.h:577
@ GO_WINTERGRASP_FORTRESS_TOWER_2
Definition: BattlefieldWG.h:576
@ GO_WINTERGRASP_FLAMEWATCH_TOWER
Definition: BattlefieldWG.h:582
@ GO_WINTERGRASP_FORTRESS_TOWER_4
Definition: BattlefieldWG.h:578
@ GO_WINTERGRASP_SHADOWSIGHT_TOWER
Definition: BattlefieldWG.h:580
@ GO_WINTERGRASP_FORTRESS_TOWER_1
Definition: BattlefieldWG.h:575
@ GO_WINTERGRASP_WINTER_S_EDGE_TOWER
Definition: BattlefieldWG.h:581
@ BATTLEFIELD_WG_OBJECTSTATE_HORDE_DESTROY
Definition: BattlefieldWG.h:503
@ BATTLEFIELD_WG_OBJECTSTATE_ALLIANCE_INTACT
Definition: BattlefieldWG.h:504
@ BATTLEFIELD_WG_OBJECTSTATE_HORDE_INTACT
Definition: BattlefieldWG.h:501
@ BATTLEFIELD_WG_OBJECTSTATE_HORDE_DAMAGE
Definition: BattlefieldWG.h:502
#define sWorld
Definition: World.h:443
Creature * SpawnCreature(uint32 entry, float x, float y, float z, float o, TeamId teamId)
Definition: Battlefield.cpp:784
TeamId GetDefenderTeam()
Definition: Battlefield.h:275
GameObject * SpawnGameObject(uint32 entry, float x, float y, float z, float o)
Definition: Battlefield.cpp:824
Definition: BattlefieldWG.h:586
uint32 entryAlliance
Definition: BattlefieldWG.h:592
uint32 entryHorde
Definition: BattlefieldWG.h:591
float y
Definition: BattlefieldWG.h:588
float x
Definition: BattlefieldWG.h:587
float z
Definition: BattlefieldWG.h:589
float o
Definition: BattlefieldWG.h:590
uint8 nbCreatureTop
Definition: BattlefieldWG.h:798
WintergraspObjectPositionData CreatureTop[5]
Definition: BattlefieldWG.h:799
WintergraspObjectPositionData CreatureBottom[9]
Definition: BattlefieldWG.h:797
WintergraspObjectPositionData GameObject[6]
Definition: BattlefieldWG.h:793
uint8 nbObject
Definition: BattlefieldWG.h:792
uint8 nbCreatureBottom
Definition: BattlefieldWG.h:796
uint8 nbTowerCannonBottom
Definition: BattlefieldWG.h:913
Position TowerCannonBottom[5]
Definition: BattlefieldWG.h:914
uint8 nbTurretTop
Definition: BattlefieldWG.h:915
Position TurretTop[5]
Definition: BattlefieldWG.h:916
GameObjectSet m_GameObjectList[2]
Definition: BattlefieldWG.h:1128
GuidUnorderedSet m_CreatureBottomList[2]
Definition: BattlefieldWG.h:1131
GuidUnorderedSet m_TowerCannonBottomList
Definition: BattlefieldWG.h:1133
void UpdateCreatureAndGo()
Definition: BattlefieldWG.h:1367
void SetDestructibleState(GameObjectDestructibleState state, Player *eventInvoker=nullptr, bool setHealth=false)
Definition: GameObject.cpp:2342
uint32 GetEntry() const
Definition: Object.h:115
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:112
Definition: Position.h:27
void GetPosition(float &x, float &y) const
Definition: Position.h:121

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
1137 {
1138 switch (m_Type)
1139 {
1144 m_Team = m_WG->GetDefenderTeam(); // Objects that are part of the keep should be the defender's
1145 break;
1147 m_Team = m_WG->GetAttackerTeam(); // The towers in the south should be the attacker's
1148 break;
1149 default:
1151 break;
1152 }
1153
1155 if (go)
1156 {
1157 // Rebuild gameobject
1160 }
1161
1162 // Update worldstate
1166 }
const uint32 WintergraspFaction[3]
Definition: BattlefieldWG.h:41
@ 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
1440 {
1441 sWorld->setWorldState(m_WorldState, m_State);
1442 }

References m_State, m_WorldState, and sWorld.

◆ UpdateCreatureAndGo()

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

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
1393 {
1395 if (!build)
1396 return;
1397
1398 uint32 faction = 0;
1399 switch (build->GetEntry())
1400 {
1406 break;
1411 break;
1412 }
1413
1414 for (GuidUnorderedSet::const_iterator itr = m_TowerCannonBottomList.begin(); itr != m_TowerCannonBottomList.end(); ++itr)
1415 {
1416 if (Creature* creature = m_WG->GetCreature(*itr))
1417 {
1418 creature->SetFaction(faction);
1419 if (disable)
1420 m_WG->HideNpc(creature);
1421 else
1422 m_WG->ShowNpc(creature, true);
1423 }
1424 }
1425
1426 for (GuidUnorderedSet::const_iterator itr = m_TurretTopList.begin(); itr != m_TurretTopList.end(); ++itr)
1427 {
1428 if (Creature* creature = m_WG->GetCreature(*itr))
1429 {
1430 creature->SetFaction(faction);
1431 if (disable)
1432 m_WG->HideNpc(creature);
1433 else
1434 m_WG->ShowNpc(creature, true);
1435 }
1436 }
1437 }
std::uint32_t uint32
Definition: Define.h:107

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