|
| BattlegroundIC () |
|
void | AddPlayer (Player *player) override |
|
void | StartingEventCloseDoors () override |
|
void | StartingEventOpenDoors () override |
|
void | PostUpdateImpl (uint32 diff) override |
| Post-update hook. More...
|
|
void | RemovePlayer (Player *player) override |
|
void | HandleAreaTrigger (Player *player, uint32 trigger) override |
|
bool | SetupBattleground () override |
|
void | HandleKillUnit (Creature *unit, Player *killer) override |
|
void | HandleKillPlayer (Player *player, Player *killer) override |
|
void | EventPlayerClickedOnFlag (Player *source, GameObject *) override |
|
void | EventPlayerDamagedGO (Player *, GameObject *, uint32) override |
|
void | DestroyGate (Player *player, GameObject *go) override |
|
GraveyardStruct const * | GetClosestGraveyard (Player *player) override |
|
bool | UpdatePlayerScore (Player *player, uint32 type, uint32 value, bool doAddHonor=true) override |
|
void | FillInitialWorldStates (WorldPacket &data) override |
|
void | HandlePlayerResurrect (Player *player) override |
|
uint32 | GetNodeState (uint8 nodeType) const |
|
bool | AllNodesConrolledByTeam (TeamId teamId) const override |
|
bool | IsResourceGlutAllowed (TeamId teamId) const |
|
void | DoAction (uint32 action, ObjectGuid guid) override |
|
| Battleground () |
|
virtual | ~Battleground () |
|
void | Update (uint32 diff) |
|
virtual bool | SetupBattleground () |
|
virtual void | Init () |
|
virtual void | StartingEventCloseDoors () |
|
virtual void | StartingEventOpenDoors () |
|
virtual void | ResetBGSubclass () |
|
virtual void | DestroyGate (Player *, GameObject *) |
|
virtual bool | AllNodesConrolledByTeam (TeamId) const |
|
void | StartTimedAchievement (AchievementCriteriaTimedTypes type, uint32 entry) |
|
std::string | GetName () const |
|
BattlegroundTypeId | GetBgTypeID (bool GetRandom=false) const |
|
BattlegroundBracketId | GetBracketId () const |
|
uint32 | GetInstanceID () const |
|
BattlegroundStatus | GetStatus () const |
|
uint32 | GetClientInstanceID () const |
|
uint32 | GetStartTime () const |
|
uint32 | GetEndTime () const |
|
uint32 | GetLastResurrectTime () const |
|
uint32 | GetMinLevel () const |
|
uint32 | GetMaxLevel () const |
|
uint32 | GetMaxPlayersPerTeam () const |
|
uint32 | GetMinPlayersPerTeam () const |
|
int32 | GetStartDelayTime () const |
|
uint8 | GetArenaType () const |
|
PvPTeamId | GetWinner () const |
|
uint32 | GetScriptId () const |
|
uint32 | GetBonusHonorFromKill (uint32 kills) const |
|
void | SpiritOfCompetitionEvent (PvPTeamId winnerTeamId) const |
|
bool | IsRandom () |
|
void | SetName (std::string_view name) |
|
void | SetBgTypeID (BattlegroundTypeId TypeID) |
|
void | SetRandomTypeID (BattlegroundTypeId TypeID) |
|
void | SetBracket (PvPDifficultyEntry const *bracketEntry) |
|
void | SetInstanceID (uint32 InstanceID) |
|
void | SetStatus (BattlegroundStatus Status) |
|
void | SetClientInstanceID (uint32 InstanceID) |
|
void | SetStartTime (uint32 Time) |
|
void | SetEndTime (uint32 Time) |
|
void | SetLastResurrectTime (uint32 Time) |
|
void | SetLevelRange (uint32 min, uint32 max) |
|
void | SetRated (bool state) |
|
void | SetArenaType (uint8 type) |
|
void | SetArenaorBGType (bool _isArena) |
|
void | SetWinner (PvPTeamId winner) |
|
void | SetScriptId (uint32 scriptId) |
|
void | SetRandom (bool isRandom) |
|
void | ModifyStartDelayTime (int32 diff) |
|
void | SetStartDelayTime (int32 Time) |
|
void | SetMaxPlayersPerTeam (uint32 MaxPlayers) |
|
void | SetMinPlayersPerTeam (uint32 MinPlayers) |
|
void | AddToBGFreeSlotQueue () |
|
void | RemoveFromBGFreeSlotQueue () |
|
void | DecreaseInvitedCount (TeamId teamId) |
|
void | IncreaseInvitedCount (TeamId teamId) |
|
uint32 | GetInvitedCount (TeamId teamId) const |
|
bool | HasFreeSlots () const |
|
uint32 | GetFreeSlotsForTeam (TeamId teamId) const |
|
uint32 | GetMaxFreeSlots () const |
|
void | AddSpectator (Player *p) |
|
void | RemoveSpectator (Player *p) |
|
bool | HaveSpectators () |
|
const SpectatorList & | GetSpectators () const |
|
void | AddToBeTeleported (ObjectGuid spectator, ObjectGuid participant) |
|
void | RemoveToBeTeleported (ObjectGuid spectator) |
|
void | SpectatorsSendPacket (WorldPacket &data) |
|
bool | isArena () const |
|
bool | isBattleground () const |
|
bool | isRated () const |
|
BattlegroundPlayerMap const & | GetPlayers () const |
|
uint32 | GetPlayersSize () const |
|
void | ReadyMarkerClicked (Player *p) |
|
BattlegroundScoreMap const * | GetPlayerScores () const |
|
std::size_t | GetPlayerScoresSize () const |
|
uint32 | GetReviveQueueSize () const |
|
void | AddPlayerToResurrectQueue (ObjectGuid npc_guid, ObjectGuid player_guid) |
|
void | RemovePlayerFromResurrectQueue (Player *player) |
|
void | RelocateDeadPlayers (ObjectGuid queueIndex) |
| Relocate all players in ReviveQueue to the closest graveyard. More...
|
|
void | StartBattleground () |
|
GameObject * | GetBGObject (uint32 type) |
|
Creature * | GetBGCreature (uint32 type) |
|
void | SetMapId (uint32 MapID) |
|
uint32 | GetMapId () const |
|
void | SetBgMap (BattlegroundMap *map) |
|
BattlegroundMap * | GetBgMap () const |
|
BattlegroundMap * | FindBgMap () const |
|
void | SetTeamStartPosition (TeamId teamId, Position const &pos) |
|
Position const * | GetTeamStartPosition (TeamId teamId) const |
|
void | SetStartMaxDist (float startMaxDist) |
|
float | GetStartMaxDist () const |
|
virtual void | FillInitialWorldStates (WorldPacket &) |
|
void | SendPacketToTeam (TeamId teamId, WorldPacket const *packet, Player *sender=nullptr, bool self=true) |
|
void | SendPacketToAll (WorldPacket const *packet) |
|
void | YellToAll (Creature *creature, const char *text, uint32 language) |
|
void | SendChatMessage (Creature *source, uint8 textId, WorldObject *target=nullptr) |
|
void | SendBroadcastText (uint32 id, ChatMsg msgType, WorldObject const *target=nullptr) |
|
template<class Do > |
void | BroadcastWorker (Do &_do) |
|
void | PlaySoundToAll (uint32 soundId) |
|
void | CastSpellOnTeam (uint32 spellId, TeamId teamId) |
|
void | RemoveAuraOnTeam (uint32 spellId, TeamId teamId) |
|
void | RewardHonorToTeam (uint32 honor, TeamId teamId) |
|
void | RewardReputationToTeam (uint32 factionId, uint32 reputation, TeamId teamId) |
|
uint32 | GetRealRepFactionForPlayer (uint32 factionId, Player *player) |
|
void | UpdateWorldState (uint32 variable, uint32 value) |
|
void | EndBattleground (PvPTeamId winnerTeamId) |
|
virtual void | EndBattleground (TeamId winnerTeamId) |
|
void | BlockMovement (Player *player) |
|
Group * | GetBgRaid (TeamId teamId) const |
|
void | SetBgRaid (TeamId teamId, Group *bg_raid) |
|
void | BuildPvPLogDataPacket (WorldPacket &data) |
|
virtual bool | UpdatePlayerScore (Player *player, uint32 type, uint32 value, bool doAddHonor=true) |
|
uint32 | GetPlayersCountByTeam (TeamId teamId) const |
|
uint32 | GetAlivePlayersCountByTeam (TeamId teamId) const |
|
void | UpdatePlayersCountByTeam (TeamId teamId, bool remove) |
|
virtual void | CheckWinConditions () |
|
void | SetArenaTeamIdForTeam (TeamId teamId, uint32 ArenaTeamId) |
|
uint32 | GetArenaTeamIdForTeam (TeamId teamId) const |
|
void | SetArenaMatchmakerRating (TeamId teamId, uint32 MMR) |
|
uint32 | GetArenaMatchmakerRating (TeamId teamId) const |
|
virtual void | HandleAreaTrigger (Player *, uint32) |
|
virtual void | HandleKillPlayer (Player *player, Player *killer) |
|
virtual void | HandleKillUnit (Creature *, Player *) |
|
virtual void | EventPlayerDroppedFlag (Player *) |
|
virtual void | EventPlayerClickedOnFlag (Player *, GameObject *) |
|
virtual void | EventPlayerDamagedGO (Player *, GameObject *, uint32) |
|
virtual void | EventPlayerUsedGO (Player *, GameObject *) |
|
virtual void | DoAction (uint32, ObjectGuid) |
|
virtual void | HandlePlayerResurrect (Player *) |
|
virtual GraveyardStruct const * | GetClosestGraveyard (Player *player) |
|
virtual void | AddPlayer (Player *player) |
|
void | AddOrSetPlayerToCorrectBgGroup (Player *player, TeamId teamId) |
|
virtual void | RemovePlayerAtLeave (Player *player) |
|
void | HandleTriggerBuff (GameObject *gameObject) |
|
void | SetHoliday (bool is_holiday) |
|
void | SpawnBGObject (uint32 type, uint32 respawntime, uint32 forceRespawnDelay=0) |
|
bool | AddObject (uint32 type, uint32 entry, float x, float y, float z, float o, float rotation0, float rotation1, float rotation2, float rotation3, uint32 respawnTime=0, GOState goState=GO_STATE_READY) |
|
Creature * | AddCreature (uint32 entry, uint32 type, float x, float y, float z, float o, uint32 respawntime=0, MotionTransport *transport=nullptr) |
|
bool | DelCreature (uint32 type) |
|
bool | DelObject (uint32 type) |
|
bool | AddSpiritGuide (uint32 type, float x, float y, float z, float o, TeamId teamId) |
|
int32 | GetObjectType (ObjectGuid guid) |
|
void | DoorOpen (uint32 type) |
|
void | DoorClose (uint32 type) |
|
const char * | GetAcoreString (int32 entry) |
|
virtual bool | HandlePlayerUnderMap (Player *) |
|
bool | IsPlayerInBattleground (ObjectGuid guid) const |
|
bool | ToBeDeleted () const |
|
void | RewardXPAtKill (Player *killer, Player *victim) |
|
virtual ObjectGuid | GetFlagPickerGUID (TeamId=TEAM_NEUTRAL) const |
|
virtual void | SetDroppedFlagGUID (ObjectGuid, TeamId=TEAM_NEUTRAL) |
|
uint32 | GetTeamScore (TeamId teamId) const |
|
virtual TeamId | GetPrematureWinner () |
|
uint8 | GetUniqueBracketId () const |
|
BattlegroundAV * | ToBattlegroundAV () |
|
BattlegroundAV const * | ToBattlegroundAV () const |
|
BattlegroundWS * | ToBattlegroundWS () |
|
BattlegroundWS const * | ToBattlegroundWS () const |
|
BattlegroundAB * | ToBattlegroundAB () |
|
BattlegroundAB const * | ToBattlegroundAB () const |
|
BattlegroundNA * | ToBattlegroundNA () |
|
BattlegroundNA const * | ToBattlegroundNA () const |
|
BattlegroundBE * | ToBattlegroundBE () |
|
BattlegroundBE const * | ToBattlegroundBE () const |
|
BattlegroundEY * | ToBattlegroundEY () |
|
BattlegroundEY const * | ToBattlegroundEY () const |
|
BattlegroundRL * | ToBattlegroundRL () |
|
BattlegroundRL const * | ToBattlegroundRL () const |
|
BattlegroundSA * | ToBattlegroundSA () |
|
BattlegroundSA const * | ToBattlegroundSA () const |
|
BattlegroundDS * | ToBattlegroundDS () |
|
BattlegroundDS const * | ToBattlegroundDS () const |
|
BattlegroundRV * | ToBattlegroundRV () |
|
BattlegroundRV const * | ToBattlegroundRV () const |
|
BattlegroundIC * | ToBattlegroundIC () |
|
BattlegroundIC const * | ToBattlegroundIC () const |
|
void BattlegroundIC::EventPlayerClickedOnFlag |
( |
Player * |
source, |
|
|
GameObject * |
gameObject |
|
) |
| |
|
overridevirtual |
Reimplemented from Battleground.
552{
554 return;
555
556
558 {
561 {
562
563 if (point.
faction == player->GetTeamId())
564 {
565 return;
566 }
567
568
570 {
572 {
573 return;
574 }
575 }
577 {
579 {
580 return;
581 }
582 }
583
585
586
587 point.
faction = player->GetTeamId();
590
591
593 {
596
598 {
600
601
603 {
605 {
607 }
608 }
609 }, 500ms);
610
612
614 {
616 }
617 else
618 {
620 }
621
623 }
625
626 {
629
631 {
633 }
634 else
635 {
637 }
638
641 }
642
644
645 if (!banner)
646 {
647 return;
648 }
649
651
653 AddObject(point.
gameobject_type, point.
gameobject_entry,
cords[0],
cords[1],
cords[2],
cords[3], 0, 0, 0, 0,
RESPAWN_ONE_DAY);
654
656
658
659
660 return;
661 }
662 }
663}
std::uint16_t uint16
Definition: Define.h:108
const uint32 BG_IC_Factions[PVP_TEAMS_COUNT]
Definition: BattlegroundIC.h:25
@ BANNER_STATE_CHANGE_TIME
Definition: BattlegroundIC.h:199
ICNodeInfo const ICNodes[MAX_NODE_TYPES]
Definition: BattlegroundIC.h:876
@ BG_IC_H_FRONT
Definition: BattlegroundIC.h:809
@ BG_IC_A_WEST
Definition: BattlegroundIC.h:813
@ BG_IC_H_WEST
Definition: BattlegroundIC.h:810
@ BG_IC_A_FRONT
Definition: BattlegroundIC.h:812
@ BG_IC_A_EAST
Definition: BattlegroundIC.h:814
@ BG_IC_H_EAST
Definition: BattlegroundIC.h:811
@ BANNER_A_CONTROLLED
Definition: BattlegroundIC.h:440
@ BANNER_H_CONTESTED
Definition: BattlegroundIC.h:443
@ BANNER_H_CONTROLLED
Definition: BattlegroundIC.h:442
@ BANNER_A_CONTESTED
Definition: BattlegroundIC.h:441
@ GO_ALLIANCE_BANNER
Definition: BattlegroundIC.h:56
@ GO_HORDE_BANNER
Definition: BattlegroundIC.h:109
@ BG_IC_NPC_SPIRIT_GUIDE_1
Definition: BattlegroundIC.h:429
@ RESPAWN_ONE_DAY
Definition: Battleground.h:163
@ STATUS_IN_PROGRESS
Definition: Battleground.h:197
@ SCORE_BASES_ASSAULTED
Definition: BattlegroundScore.h:41
@ SCORE_BASES_DEFENDED
Definition: BattlegroundScore.h:42
@ GAMEOBJECT_FACTION
Definition: UpdateFields.h:402
float cords[4][4]
Definition: boss_urom.cpp:83
void AddEventAtOffset(BasicEvent *event, Milliseconds offset)
Definition: EventProcessor.h:107
bool DelCreature(uint32 type)
Definition: Battleground.cpp:1590
bool AddObject(uint32 type, uint32 entry, float x, float y, float z, float o, float rotation0, float rotation1, float rotation2, float rotation3, uint32 respawnTime=0, GOState goState=GO_STATE_READY)
Definition: Battleground.cpp:1405
void RelocateDeadPlayers(ObjectGuid queueIndex)
Relocate all players in ReviveQueue to the closest graveyard.
Definition: Battleground.cpp:1381
EventProcessor _reviveEvents
Definition: Battleground.h:638
bool DelObject(uint32 type)
Definition: Battleground.cpp:1609
BattlegroundStatus GetStatus() const
Definition: Battleground.h:327
Definition: BattlegroundIC.h:889
uint32 banners[4]
Definition: BattlegroundIC.h:894
ICNodePointType nodeType
Definition: BattlegroundIC.h:893
uint32 timer
Definition: BattlegroundIC.h:896
uint32 last_entry
Definition: BattlegroundIC.h:897
TeamId faction
Definition: BattlegroundIC.h:892
uint32 gameobject_type
Definition: BattlegroundIC.h:890
bool needChange
Definition: BattlegroundIC.h:895
uint32 gameobject_entry
Definition: BattlegroundIC.h:891
uint32 GetNextBanner(ICNodePoint *nodePoint, uint32 team, bool returnDefinitve)
Definition: BattlegroundIC.cpp:686
bool UpdatePlayerScore(Player *player, uint32 type, uint32 value, bool doAddHonor=true) override
Definition: BattlegroundIC.cpp:366
void HandleContestedNodes(ICNodePoint *nodePoint)
Definition: BattlegroundIC.cpp:711
void HandleCapturedNodes(ICNodePoint *nodePoint, bool recapture)
Definition: BattlegroundIC.cpp:751
void UpdateNodeWorldState(ICNodePoint *nodePoint)
Definition: BattlegroundIC.cpp:665
Definition: GameObject.h:121
void SetUInt32Value(uint16 index, uint32 value)
Definition: Object.cpp:650
References Battleground::_reviveEvents, EventProcessor::AddEventAtOffset(), Battleground::AddObject(), BANNER_A_CONTESTED, BANNER_A_CONTROLLED, BANNER_H_CONTESTED, BANNER_H_CONTROLLED, BANNER_STATE_CHANGE_TIME, ICNodePoint::banners, BG_IC_A_EAST, BG_IC_A_FRONT, BG_IC_A_WEST, BG_IC_Factions, BG_IC_GATE_DESTROYED, BG_IC_H_EAST, BG_IC_H_FRONT, BG_IC_H_WEST, BG_IC_NPC_SPIRIT_GUIDE_1, Battleground::BgCreatures, CHAT_MSG_BG_SYSTEM_ALLIANCE, CHAT_MSG_BG_SYSTEM_HORDE, cords, Battleground::DelCreature(), Battleground::DelObject(), ICNodePoint::faction, ICNodePoint::gameobject_entry, GAMEOBJECT_FACTION, ICNodePoint::gameobject_type, GateStatus, Battleground::GetBGObject(), Object::GetEntry(), GetNextBanner(), Position::GetOrientation(), Position::GetPositionX(), Position::GetPositionY(), Position::GetPositionZ(), Battleground::GetStatus(), Player::GetTeamId(), GO_ALLIANCE_BANNER, GO_HORDE_BANNER, HandleCapturedNodes(), HandleContestedNodes(), ICNodes, ICNodePoint::last_entry, MAX_NODE_TYPES, ICNodePoint::needChange, NODE_TYPE_QUARRY, NODE_TYPE_REFINERY, nodePoint, ICNodePoint::nodeType, Battleground::RelocateDeadPlayers(), RESPAWN_ONE_DAY, SCORE_BASES_ASSAULTED, SCORE_BASES_DEFENDED, Battleground::SendBroadcastText(), Object::SetUInt32Value(), STATUS_IN_PROGRESS, TEAM_ALLIANCE, ICNodePoint::timer, UpdateNodeWorldState(), and UpdatePlayerScore().
void BattlegroundIC::HandleCapturedNodes |
( |
ICNodePoint * |
nodePoint, |
|
|
bool |
recapture |
|
) |
| |
|
private |
752{
754 {
760 }
761
763 {
765 {
767 break;
768
769 std::list<Creature*> cannons;
772 else
774
775 for (std::list<Creature*>::const_iterator itr = cannons.begin(); itr != cannons.end(); ++itr)
777
779 {
781 if (!
AddObject(type, (
nodePoint->
faction ==
TEAM_ALLIANCE ?
GO_ALLIANCE_GUNSHIP_PORTAL :
GO_HORDE_GUNSHIP_PORTAL),
BG_IC_HangarTeleporters[u].
GetPositionX(),
BG_IC_HangarTeleporters[u].
GetPositionY(),
BG_IC_HangarTeleporters[u].
GetPositionZ(),
BG_IC_HangarTeleporters[u].
GetOrientation(), 0, 0, 0, 0,
RESPAWN_ONE_DAY))
783 }
784
786 {
788 if (!
AddObject(type, (
nodePoint->
faction ==
TEAM_ALLIANCE ?
GO_ALLIANCE_GUNSHIP_PORTAL_EFFECTS :
GO_HORDE_GUNSHIP_PORTAL_EFFECTS),
BG_IC_HangarTeleporterEffects[u].
GetPositionX(),
BG_IC_HangarTeleporterEffects[u].
GetPositionY(),
BG_IC_HangarTeleporterEffects[u].
GetPositionZ(),
BG_IC_HangarTeleporterEffects[u].
GetOrientation(), 0, 0, 0, 0,
RESPAWN_ONE_DAY,
GO_STATE_ACTIVE))
790 }
791
793 {
796 }
797
799 {
801
805
809 }
810
812 break;
813 }
817 break;
821 break;
823 if (recapture)
824 break;
825
828
829
831 {
833
835 continue;
836
842 }
843
844
846 {
848
850 continue;
851
857 }
858 break;
860 {
863
864 if (!recapture)
865 {
867 {
869
871 continue;
872
878 }
879
882 {
887 }
888
890 {
892 siegeEngine->SetCorpseDelay(5 *
MINUTE);
893
894 if (siegeEngine->IsAlive())
895 if (
Vehicle* siegeVehicle = siegeEngine->GetVehicleKit())
896 if (!siegeVehicle->IsVehicleInUse())
898
900 }
901 }
902
904 {
908 0, 0, 0, 0, 10);
909
911 {
912 seaforiumBombs->SetRespawnTime(10);
914 }
915 }
916 break;
917 }
918 default:
919 break;
920 }
921}
constexpr auto MINUTE
Definition: Common.h:47
@ ACTION_GUNSHIP_READY
Definition: BattlegroundIC.h:205
@ NPC_SIEGE_ENGINE_H
Definition: BattlegroundIC.h:40
@ NPC_HORDE_GUNSHIP_CAPTAIN
Definition: BattlegroundIC.h:47
@ NPC_SIEGE_ENGINE_A
Definition: BattlegroundIC.h:41
@ NPC_GLAIVE_THROWER_A
Definition: BattlegroundIC.h:42
@ NPC_WORLD_TRIGGER_NOT_FLOATING
Definition: BattlegroundIC.h:49
@ NPC_GLAIVE_THROWER_H
Definition: BattlegroundIC.h:43
@ NPC_DEMOLISHER
Definition: BattlegroundIC.h:39
@ NPC_CATAPULT
Definition: BattlegroundIC.h:44
@ NPC_ALLIANCE_GUNSHIP_CANNON
Definition: BattlegroundIC.h:46
@ NPC_HORDE_GUNSHIP_CANNON
Definition: BattlegroundIC.h:45
@ NPC_ALLIANCE_GUNSHIP_CAPTAIN
Definition: BattlegroundIC.h:48
@ VEHICLE_RESPAWN_TIME
Definition: BattlegroundIC.h:196
@ BG_IC_GO_HANGAR_BANNER
Definition: BattlegroundIC.h:285
@ BG_IC_GO_WORKSHOP_BANNER
Definition: BattlegroundIC.h:302
@ BG_IC_GO_HANGAR_TELEPORTER_1
Definition: BattlegroundIC.h:323
@ BG_IC_GO_REFINERY_BANNER
Definition: BattlegroundIC.h:304
@ BG_IC_GO_SEAFORIUM_BOMBS_1
Definition: BattlegroundIC.h:320
@ BG_IC_GO_QUARRY_BANNER
Definition: BattlegroundIC.h:295
@ BG_IC_GO_DOCKS_BANNER
Definition: BattlegroundIC.h:261
@ BG_IC_GO_HANGAR_TELEPORTER_EFFECT_1
Definition: BattlegroundIC.h:327
const Position BG_IC_WorkshopVehicles[5]
Definition: BattlegroundIC.h:516
@ MAX_GLAIVE_THROWERS_SPAWNS_PER_FACTION
Definition: BattlegroundIC.h:462
@ MAX_WORKSHOP_BOMBS_SPAWNS_PER_FACTION
Definition: BattlegroundIC.h:467
@ MAX_CATAPULTS_SPAWNS_PER_FACTION
Definition: BattlegroundIC.h:463
@ MAX_DEMOLISHERS_SPAWNS_PER_FACTION
Definition: BattlegroundIC.h:466
@ MAX_TRIGGER_SPAWNS_PER_FACTION
Definition: BattlegroundIC.h:470
@ MAX_CAPTAIN_SPAWNS_PER_FACTION
Definition: BattlegroundIC.h:471
const float BG_IC_SpiritGuidePos[MAX_NODE_TYPES+2][4]
Definition: BattlegroundIC.h:844
const Position BG_IC_HangarTeleporters[3]
Definition: BattlegroundIC.h:539
const Position workshopBombs[2]
Definition: BattlegroundIC.h:704
const Position BG_IC_DocksVehiclesGlaives[2]
Definition: BattlegroundIC.h:525
const Position BG_IC_DocksVehiclesCatapults[4]
Definition: BattlegroundIC.h:531
@ GO_ALLIANCE_GUNSHIP_PORTAL_EFFECTS
Definition: BattlegroundIC.h:64
@ GO_HORDE_GUNSHIP_PORTAL_EFFECTS
Definition: BattlegroundIC.h:117
@ GO_SEAFORIUM_BOMBS
Definition: BattlegroundIC.h:126
@ GO_ALLIANCE_GUNSHIP_PORTAL
Definition: BattlegroundIC.h:62
@ GO_HORDE_GUNSHIP_PORTAL
Definition: BattlegroundIC.h:115
@ BG_IC_NPC_GLAIVE_THROWER_1_H
Definition: BattlegroundIC.h:412
@ BG_IC_NPC_GUNSHIP_CAPTAIN_1
Definition: BattlegroundIC.h:426
@ BG_IC_NPC_SIEGE_ENGINE_H
Definition: BattlegroundIC.h:398
@ BG_IC_NPC_DEMOLISHER_1_H
Definition: BattlegroundIC.h:405
@ BG_IC_NPC_GUNSHIP_CAPTAIN_2
Definition: BattlegroundIC.h:427
@ BG_IC_NPC_CATAPULT_1_A
Definition: BattlegroundIC.h:415
@ BG_IC_NPC_CATAPULT_1_H
Definition: BattlegroundIC.h:420
@ BG_IC_NPC_DEMOLISHER_1_A
Definition: BattlegroundIC.h:400
@ BG_IC_NPC_SIEGE_ENGINE_A
Definition: BattlegroundIC.h:397
@ BG_IC_NPC_GLAIVE_THROWER_1_A
Definition: BattlegroundIC.h:410
@ BG_IC_NPC_WORLD_TRIGGER_NOT_FLOATING
Definition: BattlegroundIC.h:425
const Position BG_IC_HangarTeleporterEffects[3]
Definition: BattlegroundIC.h:546
const Position BG_IC_HangarCaptains[4]
Definition: BattlegroundIC.h:559
@ UNIT_FLAG_NOT_SELECTABLE
Definition: UnitDefines.h:254
@ GO_STATE_ACTIVE
Definition: GameObjectData.h:690
Creature * GetCreature(WorldObject const &u, ObjectGuid const guid)
Definition: ObjectAccessor.cpp:213
Seconds GetGameTime()
Definition: GameTime.cpp:38
virtual void DoAction(int32)
Definition: UnitAI.h:212
bool AddSpiritGuide(uint32 type, float x, float y, float z, float o, TeamId teamId)
Definition: Battleground.cpp:1629
static TeamId GetOtherTeamId(TeamId teamId)
Definition: Battleground.cpp:1752
BattlegroundMap * GetBgMap() const
Definition: Battleground.h:432
Creature * AddCreature(uint32 entry, uint32 type, float x, float y, float z, float o, uint32 respawntime=0, MotionTransport *transport=nullptr)
Definition: Battleground.cpp:1527
void RemoveAuraOnTeam(uint32 spellId, TeamId teamId)
Definition: Battleground.cpp:711
void CastSpellOnTeam(uint32 spellId, TeamId teamId)
Definition: Battleground.cpp:704
Creature * GetBGCreature(uint32 type)
Definition: Battleground.cpp:1498
Definition: Creature.h:46
void GetCreatureListWithEntryInGrid(std::list< Creature * > &lList, uint32 uiEntry, float fMaxSearchRange) const
Definition: Object.cpp:2500
void SetFaction(uint32 faction)
Definition: Unit.cpp:10018
static void Kill(Unit *killer, Unit *victim, bool durabilityLoss=true, WeaponAttackType attackType=BASE_ATTACK, SpellInfo const *spellProto=nullptr, Spell const *spell=nullptr)
Definition: Unit.cpp:17658
UnitAI * GetAI()
Definition: Unit.h:658
Creature * GetCreature(ObjectGuid const guid)
Definition: Map.cpp:3314
References ACTION_GUNSHIP_READY, Battleground::AddCreature(), Battleground::AddObject(), Battleground::AddSpiritGuide(), BG_IC_DocksVehiclesCatapults, BG_IC_DocksVehiclesGlaives, BG_IC_Factions, BG_IC_GO_DOCKS_BANNER, BG_IC_GO_HANGAR_BANNER, BG_IC_GO_HANGAR_TELEPORTER_1, BG_IC_GO_HANGAR_TELEPORTER_EFFECT_1, BG_IC_GO_QUARRY_BANNER, BG_IC_GO_REFINERY_BANNER, BG_IC_GO_SEAFORIUM_BOMBS_1, BG_IC_GO_WORKSHOP_BANNER, BG_IC_HangarCaptains, BG_IC_HangarTeleporterEffects, BG_IC_HangarTeleporters, BG_IC_HangarTrigger, BG_IC_NPC_CATAPULT_1_A, BG_IC_NPC_CATAPULT_1_H, BG_IC_NPC_DEMOLISHER_1_A, BG_IC_NPC_DEMOLISHER_1_H, BG_IC_NPC_GLAIVE_THROWER_1_A, BG_IC_NPC_GLAIVE_THROWER_1_H, BG_IC_NPC_GUNSHIP_CAPTAIN_1, BG_IC_NPC_GUNSHIP_CAPTAIN_2, BG_IC_NPC_SIEGE_ENGINE_A, BG_IC_NPC_SIEGE_ENGINE_H, BG_IC_NPC_SPIRIT_GUIDE_1, BG_IC_NPC_WORLD_TRIGGER_NOT_FLOATING, BG_IC_SpiritGuidePos, BG_IC_WorkshopVehicles, Battleground::BgCreatures, Battleground::CastSpellOnTeam(), UnitAI::DoAction(), DOCKS_UPDATE_TIME, docksTimer, ICNodePoint::faction, GAMEOBJECT_FACTION, ICNodePoint::gameobject_type, Unit::GetAI(), Battleground::GetBGCreature(), Battleground::GetBgMap(), Battleground::GetBGObject(), Map::GetCreature(), WorldObject::GetCreatureListWithEntryInGrid(), GameTime::GetGameTime(), Position::GetOrientation(), Battleground::GetOtherTeamId(), Position::GetPositionX(), Position::GetPositionY(), Position::GetPositionZ(), GO_ALLIANCE_GUNSHIP_PORTAL, GO_ALLIANCE_GUNSHIP_PORTAL_EFFECTS, GO_HORDE_GUNSHIP_PORTAL, GO_HORDE_GUNSHIP_PORTAL_EFFECTS, GO_SEAFORIUM_BOMBS, GO_STATE_ACTIVE, gunshipAlliance, gunshipHorde, Unit::Kill(), LOG_ERROR, MAX_CAPTAIN_SPAWNS_PER_FACTION, MAX_CATAPULTS_SPAWNS_PER_FACTION, MAX_DEMOLISHERS_SPAWNS_PER_FACTION, MAX_GLAIVE_THROWERS_SPAWNS_PER_FACTION, MAX_HANGAR_TELEPORTER_EFFECTS_SPAWNS, MAX_HANGAR_TELEPORTERS_SPAWNS, MAX_TRIGGER_SPAWNS_PER_FACTION, MAX_WORKSHOP_BOMBS_SPAWNS_PER_FACTION, MINUTE, NODE_TYPE_QUARRY, NODE_TYPE_REFINERY, nodePoint, ICNodePoint::nodeType, NPC_ALLIANCE_GUNSHIP_CANNON, NPC_ALLIANCE_GUNSHIP_CAPTAIN, NPC_CATAPULT, NPC_DEMOLISHER, NPC_GLAIVE_THROWER_A, NPC_GLAIVE_THROWER_H, NPC_HORDE_GUNSHIP_CANNON, NPC_HORDE_GUNSHIP_CAPTAIN, NPC_SIEGE_ENGINE_A, NPC_SIEGE_ENGINE_H, NPC_WORLD_TRIGGER_NOT_FLOATING, Battleground::RemoveAuraOnTeam(), RESPAWN_ONE_DAY, respawnMap, Unit::SetFaction(), siegeEngineWorkshopTimer, SPELL_OIL_REFINERY, SPELL_QUARRY, TEAM_ALLIANCE, TEAM_HORDE, UNIT_FLAG_NOT_SELECTABLE, VEHICLE_RESPAWN_TIME, WORKSHOP_UPDATE_TIME, and workshopBombs.
Referenced by EventPlayerClickedOnFlag(), and PostUpdateImpl().
void BattlegroundIC::PostUpdateImpl |
( |
uint32 |
| ) |
|
|
overridevirtual |
Post-update hook.
Will be called after battleground update has passed. May be used to implement custom update effects in subclasses.
- Parameters
-
diff | a time difference between two worldserver update loops in milliseconds. |
- See also
- Update(), PreUpdateImpl().
Reimplemented from Battleground.
94{
96 return;
97
99 {
101 {
108
115
117 }
119 }
120
122 {
124 {
127 {
129 {
130
132 {
135 if (!catapult->IsAlive())
136 {
137
138 RespawnMap::iterator itr =
respawnMap.find(catapult->GetGUID());
140 continue;
141
143 catapult->Respawn(true);
145 }
146 }
147
148
150 {
153 if (!glaiveThrower->IsAlive())
154 {
155
156 RespawnMap::iterator itr =
respawnMap.find(glaiveThrower->GetGUID());
158 continue;
159
161 glaiveThrower->Respawn(true);
163 }
164 }
165
167 }
168 else
170 }
171 }
172
174 {
177 {
179 {
182 if (!siege->IsAlive())
183 {
184
185 RespawnMap::iterator itr =
respawnMap.find(siege->GetGUID());
187 continue;
188
190 siege->Respawn(true);
192 }
193
194
196 {
199 if (!demolisher->IsAlive())
200 {
201
202 RespawnMap::iterator itr =
respawnMap.find(demolisher->GetGUID());
204 continue;
205
207 demolisher->Respawn(true);
209 }
210 }
211
213 }
214 else
216 }
217 }
218
219
221 {
223 {
225
228
229
231
232 if (!banner)
233 return;
234
236
238 AddObject(
nodePoint[i].gameobject_type,
nodePoint[i].gameobject_entry,
cords[0],
cords[1],
cords[2],
cords[3], 0, 0, 0, 0,
RESPAWN_ONE_DAY);
239
241
244
246 {
248 }
249 else
250 {
252 }
253
256 }
258 }
259 }
260
262 {
264 {
267 {
271 }
272 }
274 }
276}
@ RESOURCE_HONOR_AMOUNT
Definition: BattlegroundIC.h:915
@ NODE_TYPE_DOCKS
Definition: BattlegroundIC.h:822
@ BG_IC_GO_DOODAD_ND_WINTERORC_WALL_GATEFX_DOOR01
Definition: BattlegroundIC.h:316
@ BG_IC_GO_HORDE_GATE_3
Definition: BattlegroundIC.h:291
@ BG_IC_GO_HORDE_GATE_2
Definition: BattlegroundIC.h:290
@ BG_IC_GO_DOODAD_ND_WINTERORC_WALL_GATEFX_DOOR02
Definition: BattlegroundIC.h:317
@ BG_IC_GO_ALLIANCE_GATE_3
Definition: BattlegroundIC.h:228
@ BG_IC_GO_DOODAD_ND_WINTERORC_WALL_GATEFX_DOOR03
Definition: BattlegroundIC.h:318
@ BG_IC_GO_DOODAD_ND_HUMAN_GATE_CLOSEDFX_DOOR01
Definition: BattlegroundIC.h:266
@ BG_IC_GO_ALLIANCE_GATE_1
Definition: BattlegroundIC.h:226
@ BG_IC_GO_DOODAD_ND_HUMAN_GATE_CLOSEDFX_DOOR03
Definition: BattlegroundIC.h:268
@ BG_IC_GO_DOODAD_ND_HUMAN_GATE_CLOSEDFX_DOOR02
Definition: BattlegroundIC.h:267
@ BG_IC_GO_HORDE_GATE_1
Definition: BattlegroundIC.h:289
@ BG_IC_GO_ALLIANCE_GATE_2
Definition: BattlegroundIC.h:227
@ GO_DESTRUCTIBLE_DAMAGED
Definition: SharedDefines.h:1628
void RemoveFromWorld() override
Definition: GameObject.cpp:168
void SetDestructibleState(GameObjectDestructibleState state, Player *eventInvoker=nullptr, bool setHealth=false)
Definition: GameObject.cpp:2340
References Battleground::AddObject(), BANNER_STATE_CHANGE_TIME, BG_IC_ALLIANCE_RENFORT, BG_IC_DocksVehiclesCatapults, BG_IC_DocksVehiclesGlaives, BG_IC_Factions, BG_IC_GO_ALLIANCE_GATE_1, BG_IC_GO_ALLIANCE_GATE_2, BG_IC_GO_ALLIANCE_GATE_3, BG_IC_GO_DOODAD_ND_HUMAN_GATE_CLOSEDFX_DOOR01, BG_IC_GO_DOODAD_ND_HUMAN_GATE_CLOSEDFX_DOOR02, BG_IC_GO_DOODAD_ND_HUMAN_GATE_CLOSEDFX_DOOR03, BG_IC_GO_DOODAD_ND_WINTERORC_WALL_GATEFX_DOOR01, BG_IC_GO_DOODAD_ND_WINTERORC_WALL_GATEFX_DOOR02, BG_IC_GO_DOODAD_ND_WINTERORC_WALL_GATEFX_DOOR03, BG_IC_GO_HORDE_GATE_1, BG_IC_GO_HORDE_GATE_2, BG_IC_GO_HORDE_GATE_3, BG_IC_HORDE_RENFORT, BG_IC_NPC_CATAPULT_1_A, BG_IC_NPC_CATAPULT_1_H, BG_IC_NPC_DEMOLISHER_1_A, BG_IC_NPC_DEMOLISHER_1_H, BG_IC_NPC_GLAIVE_THROWER_1_A, BG_IC_NPC_GLAIVE_THROWER_1_H, BG_IC_NPC_SIEGE_ENGINE_A, BG_IC_NPC_SIEGE_ENGINE_H, BG_IC_WorkshopVehicles, Battleground::BgCreatures, CHAT_MSG_BG_SYSTEM_ALLIANCE, CHAT_MSG_BG_SYSTEM_HORDE, closeFortressDoorsTimer, cords, Battleground::DelObject(), DOCKS_UPDATE_TIME, docksTimer, doorsClosed, ICNodePoint::faction, factionReinforcements, ICNodePoint::gameobject_entry, GAMEOBJECT_FACTION, Battleground::GetBGCreature(), Battleground::GetBgMap(), Battleground::GetBGObject(), Map::GetCreature(), GameTime::GetGameTime(), GetNextBanner(), Position::GetOrientation(), Position::GetPositionX(), Position::GetPositionY(), Position::GetPositionZ(), Battleground::GetStatus(), GO_DESTRUCTIBLE_DAMAGED, HandleCapturedNodes(), IC_RESOURCE_TIME, ICNodes, ICNodePoint::last_entry, MAX_CATAPULTS_SPAWNS_PER_FACTION, MAX_DEMOLISHERS_SPAWNS_PER_FACTION, MAX_GLAIVE_THROWERS_SPAWNS_PER_FACTION, MAX_NODE_TYPES, ICNodePoint::needChange, NODE_STATE_CONTROLLED_A, NODE_STATE_CONTROLLED_H, NODE_TYPE_DOCKS, NODE_TYPE_REFINERY, NODE_TYPE_WORKSHOP, nodePoint, GameObject::RemoveFromWorld(), RESOURCE_HONOR_AMOUNT, resourceTimer, RESPAWN_ONE_DAY, respawnMap, Battleground::RewardHonorToTeam(), Battleground::SendBroadcastText(), GameObject::SetDestructibleState(), Object::SetUInt32Value(), siegeEngineWorkshopTimer, STATUS_IN_PROGRESS, TEAM_ALLIANCE, ICNodePoint::timer, UpdateNodeWorldState(), Battleground::UpdateWorldState(), and WORKSHOP_UPDATE_TIME.