Restore work Wintergrasp timer by Chesterfield
--HG-- branch : trunk
This commit is contained in:
@@ -801,14 +801,14 @@ void OutdoorPvPWG::SendInitWorldStatesTo(Player *player) const
|
||||
data << uint32(571);
|
||||
data << uint32(ZONE_WINTERGRASP);
|
||||
data << uint32(0);
|
||||
data << uint16(4+5+4+m_buildingStates.size());
|
||||
data << uint16(4+2+4+m_buildingStates.size());
|
||||
|
||||
data << uint32(3803) << uint32(getDefenderTeam() == TEAM_ALLIANCE ? 1 : 0);
|
||||
data << uint32(3802) << uint32(getDefenderTeam() != TEAM_ALLIANCE ? 1 : 0);
|
||||
data << uint32(3801) << uint32(isWarTime() ? 0 : 1);
|
||||
data << uint32(3710) << uint32(isWarTime() ? 1 : 0);
|
||||
|
||||
for (uint32 i = 0; i < 5; ++i)
|
||||
for (uint32 i = 0; i < 2; ++i)
|
||||
data << ClockWorldState[i] << m_clock[i];
|
||||
|
||||
data << uint32(3490) << uint32(m_vehicles[TEAM_HORDE].size());
|
||||
@@ -1219,19 +1219,17 @@ void OutdoorPvPWG::UpdateClockDigit(uint32 &timer, uint32 digit, uint32 mod)
|
||||
if (m_clock[digit] != value)
|
||||
{
|
||||
m_clock[digit] = value;
|
||||
SendUpdateWorldState(ClockWorldState[digit], value);
|
||||
SendUpdateWorldState(ClockWorldState[digit], (timer + time(NULL)));
|
||||
}
|
||||
}
|
||||
|
||||
void OutdoorPvPWG::UpdateClock()
|
||||
{
|
||||
uint32 timer = m_timer / 1000;
|
||||
UpdateClockDigit(timer, 0, 10);
|
||||
UpdateClockDigit(timer, 1, 6);
|
||||
UpdateClockDigit(timer, 2, 10);
|
||||
UpdateClockDigit(timer, 3, 6);
|
||||
if (!isWarTime())
|
||||
UpdateClockDigit(timer, 4, 10);
|
||||
UpdateClockDigit(timer, 1, 10);
|
||||
else
|
||||
UpdateClockDigit(timer, 0, 10);
|
||||
}
|
||||
|
||||
bool OutdoorPvPWG::Update(uint32 diff)
|
||||
|
||||
@@ -29,7 +29,7 @@ const uint32 WintergraspFaction[3] = {1732, 1735, 35};
|
||||
const uint32 WG_MARK_OF_HONOR = 43589;
|
||||
const uint32 VehNumWorldState[2] = {3680,3490};
|
||||
const uint32 MaxVehNumWorldState[2] = {3681,3491};
|
||||
const uint32 ClockWorldState[5] = {3785,3784,3782,3976,3975};
|
||||
const uint32 ClockWorldState[2] = {3781,4354};
|
||||
|
||||
enum OutdoorPvPWGSpell
|
||||
{
|
||||
@@ -268,7 +268,7 @@ class OutdoorPvPWG : public OutdoorPvP
|
||||
bool m_wartime;
|
||||
bool m_changeDefender;
|
||||
uint32 m_timer;
|
||||
uint32 m_clock[5];
|
||||
uint32 m_clock[2];
|
||||
uint32 m_workshopCount[2];
|
||||
uint32 m_towerDestroyedCount[2];
|
||||
uint32 m_towerDamagedCount[2];
|
||||
|
||||
Reference in New Issue
Block a user