fix(Core/Spells): properly handle item cooldowns (#9176)
- Closes #8918
This commit is contained in:
parent
05552d9d85
commit
a0002afe07
1 changed files with 7 additions and 1 deletions
|
|
@ -10139,6 +10139,7 @@ void Player::AddSpellAndCategoryCooldowns(SpellInfo const* spellInfo, uint32 ite
|
|||
// cooldown information stored in item prototype
|
||||
// This used in same way in WorldSession::HandleItemQuerySingleOpcode data sending to client.
|
||||
|
||||
bool useSpellCooldown = false;
|
||||
if (itemId)
|
||||
{
|
||||
if (ItemTemplate const* proto = sObjectMgr->GetItemTemplate(itemId))
|
||||
|
|
@ -10150,6 +10151,12 @@ void Player::AddSpellAndCategoryCooldowns(SpellInfo const* spellInfo, uint32 ite
|
|||
cat = proto->Spells[idx].SpellCategory;
|
||||
rec = proto->Spells[idx].SpellCooldown;
|
||||
catrec = proto->Spells[idx].SpellCategoryCooldown;
|
||||
|
||||
if (static_cast<int32>(cat) != catrec)
|
||||
{
|
||||
useSpellCooldown = true;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -10168,7 +10175,6 @@ void Player::AddSpellAndCategoryCooldowns(SpellInfo const* spellInfo, uint32 ite
|
|||
time_t recTime;
|
||||
|
||||
bool needsCooldownPacket = false;
|
||||
bool useSpellCooldown = false;
|
||||
|
||||
// overwrite time for selected category
|
||||
if (infinityCooldown)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue