mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
[7673] Fixed pet spell cooldown values send in Player::PetSpellInitialize to client.
This commit is contained in:
parent
78dd259c38
commit
3e4b31debb
2 changed files with 5 additions and 11 deletions
|
|
@ -16258,28 +16258,22 @@ void Player::PetSpellInitialize()
|
||||||
|
|
||||||
for(CreatureSpellCooldowns::const_iterator itr = pet->m_CreatureSpellCooldowns.begin(); itr != pet->m_CreatureSpellCooldowns.end(); ++itr)
|
for(CreatureSpellCooldowns::const_iterator itr = pet->m_CreatureSpellCooldowns.begin(); itr != pet->m_CreatureSpellCooldowns.end(); ++itr)
|
||||||
{
|
{
|
||||||
time_t cooldown = 0;
|
time_t cooldown = (itr->second > curTime) ? (itr->second - curTime) * IN_MILISECONDS : 0;
|
||||||
|
|
||||||
if(itr->second > curTime)
|
|
||||||
cooldown = (itr->second - curTime) * IN_MILISECONDS;
|
|
||||||
|
|
||||||
data << uint16(itr->first); // spellid
|
data << uint16(itr->first); // spellid
|
||||||
data << uint16(0); // spell category?
|
data << uint16(0); // spell category?
|
||||||
data << uint32(itr->second); // cooldown
|
data << uint32(cooldown); // cooldown
|
||||||
data << uint32(0); // category cooldown
|
data << uint32(0); // category cooldown
|
||||||
}
|
}
|
||||||
|
|
||||||
for(CreatureSpellCooldowns::const_iterator itr = pet->m_CreatureCategoryCooldowns.begin(); itr != pet->m_CreatureCategoryCooldowns.end(); ++itr)
|
for(CreatureSpellCooldowns::const_iterator itr = pet->m_CreatureCategoryCooldowns.begin(); itr != pet->m_CreatureCategoryCooldowns.end(); ++itr)
|
||||||
{
|
{
|
||||||
time_t cooldown = 0;
|
time_t cooldown = (itr->second > curTime) ? (itr->second - curTime) * IN_MILISECONDS : 0;
|
||||||
|
|
||||||
if(itr->second > curTime)
|
|
||||||
cooldown = (itr->second - curTime) * IN_MILISECONDS;
|
|
||||||
|
|
||||||
data << uint16(itr->first); // spellid
|
data << uint16(itr->first); // spellid
|
||||||
data << uint16(0); // spell category?
|
data << uint16(0); // spell category?
|
||||||
data << uint32(0); // cooldown
|
data << uint32(0); // cooldown
|
||||||
data << uint32(itr->second); // category cooldown
|
data << uint32(cooldown); // category cooldown
|
||||||
}
|
}
|
||||||
|
|
||||||
GetSession()->SendPacket(&data);
|
GetSession()->SendPacket(&data);
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "7672"
|
#define REVISION_NR "7673"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue