Core/Players: fixed a possible crash when trying to send spell cooldowns for spells without a category entry
This commit is contained in:
1 parent
a311740d3b
commit
f8c35be20c
2 files changed
+3
-1
No files matched your search
@@ -2636,7 +2636,7 @@ void Player::SendKnownSpells()
|
||||
uint32 categoryCooldown = GetSpellHistory()->GetRemainingCategoryCooldown(spellInfo);
|
||||
|
||||
if (cooldown || categoryCooldown)
|
||||
knownSpells.SpellHistoryEntries.push_back({ spellInfo->Id, 0, uint16(spellInfo->CategoryEntry->ID), int32(cooldown), int32(categoryCooldown) });
|
||||
knownSpells.SpellHistoryEntries.push_back({ spellInfo->Id, 0, uint16(spellInfo->GetCategory()), int32(cooldown), int32(categoryCooldown) });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -537,6 +537,8 @@ uint32 SpellHistory::GetRemainingCooldown(SpellInfo const* spellInfo, bool withC
|
||||
|
||||
end = catItr->second->CategoryEnd;
|
||||
}
|
||||
else
|
||||
return 0;
|
||||
|
||||
Clock::time_point now = GameTime::GetGameTimeSystemPoint();
|
||||
if (end < now)
|
||||
|
||||
Reference in new issue
Block a user