Skip to content

Commit

Permalink
OPVP: Disable sending worldstates if disabled for SI and EP
Browse files Browse the repository at this point in the history
Closes #571
  • Loading branch information
killerwife committed Jul 31, 2024
1 parent 9927bea commit 66906de
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
11 changes: 7 additions & 4 deletions src/game/OutdoorPvP/OutdoorPvPEP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,14 @@ OutdoorPvPEP::OutdoorPvPEP() : OutdoorPvP(),

void OutdoorPvPEP::FillInitialWorldStates(WorldPacket& data, uint32& count)
{
FillInitialWorldState(data, count, WORLD_STATE_EP_TOWER_COUNT_ALLIANCE, m_towersAlliance);
FillInitialWorldState(data, count, WORLD_STATE_EP_TOWER_COUNT_HORDE, m_towersHorde);
if (sWorld.getConfig(CONFIG_BOOL_OUTDOORPVP_EP_ENABLED))
{
FillInitialWorldState(data, count, WORLD_STATE_EP_TOWER_COUNT_ALLIANCE, m_towersAlliance);
FillInitialWorldState(data, count, WORLD_STATE_EP_TOWER_COUNT_HORDE, m_towersHorde);

for (unsigned int i : m_towerWorldState)
FillInitialWorldState(data, count, i, WORLD_STATE_ADD);
for (unsigned int i : m_towerWorldState)
FillInitialWorldState(data, count, i, WORLD_STATE_ADD);
}
}

void OutdoorPvPEP::SendRemoveWorldStates(Player* player)
Expand Down
9 changes: 6 additions & 3 deletions src/game/OutdoorPvP/OutdoorPvPSI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,12 @@ OutdoorPvPSI::OutdoorPvPSI() : OutdoorPvP(),
// Send initial world states
void OutdoorPvPSI::FillInitialWorldStates(WorldPacket& data, uint32& count)
{
FillInitialWorldState(data, count, WORLD_STATE_SI_GATHERED_A, m_resourcesAlliance);
FillInitialWorldState(data, count, WORLD_STATE_SI_GATHERED_H, m_resourcesHorde);
FillInitialWorldState(data, count, WORLD_STATE_SI_SILITHYST_MAX, MAX_SILITHYST);
if (sWorld.getConfig(CONFIG_BOOL_OUTDOORPVP_SI_ENABLED))
{
FillInitialWorldState(data, count, WORLD_STATE_SI_GATHERED_A, m_resourcesAlliance);
FillInitialWorldState(data, count, WORLD_STATE_SI_GATHERED_H, m_resourcesHorde);
FillInitialWorldState(data, count, WORLD_STATE_SI_SILITHYST_MAX, MAX_SILITHYST);
}
}

// Handle buffs when player enters the zone
Expand Down

0 comments on commit 66906de

Please sign in to comment.