mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-24 02:46:33 +01:00
[7673] Fixed pet spell cooldown values send in Player::PetSpellInitialize to client. Author: VladimirMangos
--HG-- branch : trunk
This commit is contained in:
@@ -16647,28 +16647,22 @@ void Player::PetSpellInitialize()
|
||||
|
||||
for(CreatureSpellCooldowns::const_iterator itr = pet->m_CreatureSpellCooldowns.begin(); itr != pet->m_CreatureSpellCooldowns.end(); ++itr)
|
||||
{
|
||||
time_t cooldown = 0;
|
||||
|
||||
if(itr->second > curTime)
|
||||
cooldown = (itr->second - curTime) * IN_MILISECONDS;
|
||||
time_t cooldown = (itr->second > curTime) ? (itr->second - curTime) * IN_MILISECONDS : 0;
|
||||
|
||||
data << uint16(itr->first); // spellid
|
||||
data << uint16(0); // spell category?
|
||||
data << uint32(itr->second); // cooldown
|
||||
data << uint32(cooldown); // cooldown
|
||||
data << uint32(0); // category cooldown
|
||||
}
|
||||
|
||||
for(CreatureSpellCooldowns::const_iterator itr = pet->m_CreatureCategoryCooldowns.begin(); itr != pet->m_CreatureCategoryCooldowns.end(); ++itr)
|
||||
{
|
||||
time_t cooldown = 0;
|
||||
|
||||
if(itr->second > curTime)
|
||||
cooldown = (itr->second - curTime) * IN_MILISECONDS;
|
||||
time_t cooldown = (itr->second > curTime) ? (itr->second - curTime) * IN_MILISECONDS : 0;
|
||||
|
||||
data << uint16(itr->first); // spellid
|
||||
data << uint16(0); // spell category?
|
||||
data << uint32(0); // cooldown
|
||||
data << uint32(itr->second); // category cooldown
|
||||
data << uint32(cooldown); // category cooldown
|
||||
}
|
||||
|
||||
data.hexlike();
|
||||
|
||||
Reference in New Issue
Block a user