Send SMSG_TIME_SYNC_REQ periodicly (period guessed though)
--HG-- branch : trunk
This commit is contained in:
+26
-3
@@ -1323,6 +1323,14 @@ void Player::Update( uint32 p_time )
|
|||||||
m_zoneUpdateTimer -= p_time;
|
m_zoneUpdateTimer -= p_time;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (m_timeSyncTimer > 0)
|
||||||
|
{
|
||||||
|
if(p_time >= m_timeSyncTimer)
|
||||||
|
SendTimeSync();
|
||||||
|
else
|
||||||
|
m_timeSyncTimer -= p_time;
|
||||||
|
}
|
||||||
|
|
||||||
if (isAlive())
|
if (isAlive())
|
||||||
{
|
{
|
||||||
m_regenTimer += p_time;
|
m_regenTimer += p_time;
|
||||||
@@ -20204,9 +20212,8 @@ void Player::SendInitialPacketsAfterAddToMap()
|
|||||||
GetZoneAndAreaId(newzone,newarea);
|
GetZoneAndAreaId(newzone,newarea);
|
||||||
UpdateZone(newzone,newarea); // also call SendInitWorldStates();
|
UpdateZone(newzone,newarea); // also call SendInitWorldStates();
|
||||||
|
|
||||||
WorldPacket data(SMSG_TIME_SYNC_REQ, 4); // new 2.0.x, enable movement
|
ResetTimeSync();
|
||||||
data << uint32(0x00000000); // on blizz it increments periodically
|
SendTimeSync();
|
||||||
GetSession()->SendPacket(&data);
|
|
||||||
|
|
||||||
CastSpell(this, SPELL_LOGINEFFECT_836, true); // LOGINEFFECT
|
CastSpell(this, SPELL_LOGINEFFECT_836, true); // LOGINEFFECT
|
||||||
|
|
||||||
@@ -23026,6 +23033,22 @@ void Player::ActivateSpec(uint8 spec)
|
|||||||
SetPower(pw, 0);
|
SetPower(pw, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Player::ResetTimeSync()
|
||||||
|
{
|
||||||
|
m_timeSyncCount = 0;
|
||||||
|
m_timeSyncTimer = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Player::SendTimeSync()
|
||||||
|
{
|
||||||
|
WorldPacket data(SMSG_TIME_SYNC_REQ, 4);
|
||||||
|
data << uint32(m_timeSyncCount++);
|
||||||
|
GetSession()->SendPacket(&data);
|
||||||
|
|
||||||
|
// Send another opcode in 10s again
|
||||||
|
m_timeSyncTimer = 10000;
|
||||||
|
}
|
||||||
|
|
||||||
void Player::SetReputation(uint32 factionentry, uint32 value)
|
void Player::SetReputation(uint32 factionentry, uint32 value)
|
||||||
{
|
{
|
||||||
GetReputationMgr().SetReputation(sFactionStore.LookupEntry(factionentry),value);
|
GetReputationMgr().SetReputation(sFactionStore.LookupEntry(factionentry),value);
|
||||||
|
|||||||
@@ -2437,6 +2437,9 @@ Spell * m_spellModTakingSpell;
|
|||||||
EnchantDurationList m_enchantDuration;
|
EnchantDurationList m_enchantDuration;
|
||||||
ItemDurationList m_itemDuration;
|
ItemDurationList m_itemDuration;
|
||||||
|
|
||||||
|
void ResetTimeSync();
|
||||||
|
void SendTimeSync();
|
||||||
|
|
||||||
uint64 m_resurrectGUID;
|
uint64 m_resurrectGUID;
|
||||||
uint32 m_resurrectMap;
|
uint32 m_resurrectMap;
|
||||||
float m_resurrectX, m_resurrectY, m_resurrectZ;
|
float m_resurrectX, m_resurrectY, m_resurrectZ;
|
||||||
@@ -2572,6 +2575,9 @@ Spell * m_spellModTakingSpell;
|
|||||||
SpellCooldowns m_spellCooldowns;
|
SpellCooldowns m_spellCooldowns;
|
||||||
|
|
||||||
uint32 m_ChampioningFaction;
|
uint32 m_ChampioningFaction;
|
||||||
|
|
||||||
|
uint32 m_timeSyncCount;
|
||||||
|
uint32 m_timeSyncTimer;
|
||||||
};
|
};
|
||||||
|
|
||||||
void AddItemsSetItem(Player*player,Item *item);
|
void AddItemsSetItem(Player*player,Item *item);
|
||||||
|
|||||||
Reference in New Issue
Block a user