[7673] Fixed pet spell cooldown values send in Player::PetSpellInitialize to client. Author: VladimirMangos

--HG--
branch : trunk
This commit is contained in:
megamage
2009-04-15 17:30:11 -05:00
parent c5310844db
commit 74fc50e5d4

View File

@@ -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();