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

This commit is contained in:
VladimirMangos 2009-04-15 11:46:24 +04:00
parent 78dd259c38
commit 3e4b31debb
2 changed files with 5 additions and 11 deletions

View file

@ -16258,28 +16258,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
}
GetSession()->SendPacket(&data);

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "7672"
#define REVISION_NR "7673"
#endif // __REVISION_NR_H__