Forums WoW Modding Support Archives Azerothcore Discord Archives [DiscordArchive] void Battleground::UpdateWorldState(uint32 variable, uint32 value)

[DiscordArchive] void Battleground::UpdateWorldState(uint32 variable, uint32 value)

[DiscordArchive] void Battleground::UpdateWorldState(uint32 variable, uint32 value)

rektbyfaith
Administrator
0
04-18-2024, 06:40 AM
#1
Archived author: haidee • Posted: 2024-04-18T06:40:34.372000+00:00
Original source

void Battleground::UpdateWorldState(uint32 variable, uint32 value)
{
WorldPackets::WorldState::UpdateWorldState worldstate;
worldstate.VariableID = variable;
worldstate.Value = value;
SendPacketToAll(worldstate.Write());
}

Hello everyone, I have a question. Which DBC does the variable value obtained by the UpdateWorldState function correspond to?
rektbyfaith
04-18-2024, 06:40 AM #1

Archived author: haidee • Posted: 2024-04-18T06:40:34.372000+00:00
Original source

void Battleground::UpdateWorldState(uint32 variable, uint32 value)
{
WorldPackets::WorldState::UpdateWorldState worldstate;
worldstate.VariableID = variable;
worldstate.Value = value;
SendPacketToAll(worldstate.Write());
}

Hello everyone, I have a question. Which DBC does the variable value obtained by the UpdateWorldState function correspond to?

rektbyfaith
Administrator
0
04-18-2024, 06:53 AM
#2
Archived author: Anchy • Posted: 2024-04-18T06:53:59.795000+00:00
Original source

Value is not stored in the DBC, it's a dynamic value that is updated by the core
rektbyfaith
04-18-2024, 06:53 AM #2

Archived author: Anchy • Posted: 2024-04-18T06:53:59.795000+00:00
Original source

Value is not stored in the DBC, it's a dynamic value that is updated by the core

rektbyfaith
Administrator
0
04-18-2024, 06:54 AM
#3
Archived author: Anchy • Posted: 2024-04-18T06:54:33.050000+00:00
Original source

the Variable however is stored in WorldStateUI.dbc
rektbyfaith
04-18-2024, 06:54 AM #3

Archived author: Anchy • Posted: 2024-04-18T06:54:33.050000+00:00
Original source

the Variable however is stored in WorldStateUI.dbc

rektbyfaith
Administrator
0
04-18-2024, 06:58 AM
#4
Archived author: haidee • Posted: 2024-04-18T06:58:13.423000+00:00
Original source

<@228769085834395648>enum BG_EY_WorldStates
{
EY_ALLIANCE_RESOURCES = 2749,
EY_HORDE_RESOURCES = 2750,
}

void BattlegroundEY::AddPoints(TeamId teamId, uint32 points)
{
uint8 honorRewards = uint8(m_TeamScores[teamId] / _honorTics);
m_TeamScores[teamId] += points;
if (m_TeamScores[teamId] > BG_EY_MAX_TEAM_SCORE)
m_TeamScores[teamId] = BG_EY_MAX_TEAM_SCORE;


for (; honorRewards < uint8(m_TeamScores[teamId] / _honorTics); ++honorRewards)
RewardHonorToTeam(GetBonusHonorFromKill(1), teamId);

UpdateWorldState(teamId == TEAM_ALLIANCE ? EY_ALLIANCE_RESOURCES : EY_HORDE_RESOURCES, std::min<uint32>(m_TeamScores[teamId], BG_EY_MAX_TEAM_SCORE));
if (m_TeamScores[teamId] >= BG_EY_MAX_TEAM_SCORE)
EndBattleground(teamId);
}

For example, in the enumeration, EY_ALLIANCE_RESOURCES = 2749. Where is this 2749 corresponding setting value referenced?
rektbyfaith
04-18-2024, 06:58 AM #4

Archived author: haidee • Posted: 2024-04-18T06:58:13.423000+00:00
Original source

<@228769085834395648>enum BG_EY_WorldStates
{
EY_ALLIANCE_RESOURCES = 2749,
EY_HORDE_RESOURCES = 2750,
}

void BattlegroundEY::AddPoints(TeamId teamId, uint32 points)
{
uint8 honorRewards = uint8(m_TeamScores[teamId] / _honorTics);
m_TeamScores[teamId] += points;
if (m_TeamScores[teamId] > BG_EY_MAX_TEAM_SCORE)
m_TeamScores[teamId] = BG_EY_MAX_TEAM_SCORE;


for (; honorRewards < uint8(m_TeamScores[teamId] / _honorTics); ++honorRewards)
RewardHonorToTeam(GetBonusHonorFromKill(1), teamId);

UpdateWorldState(teamId == TEAM_ALLIANCE ? EY_ALLIANCE_RESOURCES : EY_HORDE_RESOURCES, std::min<uint32>(m_TeamScores[teamId], BG_EY_MAX_TEAM_SCORE));
if (m_TeamScores[teamId] >= BG_EY_MAX_TEAM_SCORE)
EndBattleground(teamId);
}

For example, in the enumeration, EY_ALLIANCE_RESOURCES = 2749. Where is this 2749 corresponding setting value referenced?

rektbyfaith
Administrator
0
04-18-2024, 06:59 AM
#5
Archived author: Anchy • Posted: 2024-04-18T06:59:35.739000+00:00
Original source

I'm not sure what you mean, the `EY_ALLIANCE_RESOURCES` is a key for an entry in `WorldStateUI.dbc` for the client, the server sends the client a new WorldPacket containing the key and the new value for the world state
rektbyfaith
04-18-2024, 06:59 AM #5

Archived author: Anchy • Posted: 2024-04-18T06:59:35.739000+00:00
Original source

I'm not sure what you mean, the `EY_ALLIANCE_RESOURCES` is a key for an entry in `WorldStateUI.dbc` for the client, the server sends the client a new WorldPacket containing the key and the new value for the world state

rektbyfaith
Administrator
0
04-18-2024, 07:02 AM
#6
Archived author: haidee • Posted: 2024-04-18T07:02:55.303000+00:00
Original source

Thank you very much for your answer, but there is no entry like 2749 in WorldStateUI.dbc
rektbyfaith
04-18-2024, 07:02 AM #6

Archived author: haidee • Posted: 2024-04-18T07:02:55.303000+00:00
Original source

Thank you very much for your answer, but there is no entry like 2749 in WorldStateUI.dbc

rektbyfaith
Administrator
0
04-18-2024, 07:04 AM
#7
Archived author: Anchy • Posted: 2024-04-18T07:04:24.842000+00:00
Original source

I do believe that not all world states are inside of WorldStateUI.dbc
rektbyfaith
04-18-2024, 07:04 AM #7

Archived author: Anchy • Posted: 2024-04-18T07:04:24.842000+00:00
Original source

I do believe that not all world states are inside of WorldStateUI.dbc

rektbyfaith
Administrator
0
04-18-2024, 07:05 AM
#8
Archived author: Anchy • Posted: 2024-04-18T07:05:37.349000+00:00
Original source

I can't remember
rektbyfaith
04-18-2024, 07:05 AM #8

Archived author: Anchy • Posted: 2024-04-18T07:05:37.349000+00:00
Original source

I can't remember

Recently Browsing
 
Recently Browsing