mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 09:44:45 +01:00
Some replacements .count to .find for better performance - original patch by zhenya.
--HG-- branch : trunk
This commit is contained in:
@@ -91,7 +91,7 @@ void LoadSkillDiscoveryTable()
|
||||
SpellEntry const* reqSpellEntry = sSpellStore.LookupEntry(reqSkillOrSpell);
|
||||
if (!reqSpellEntry)
|
||||
{
|
||||
if(reportedReqSpells.count(reqSkillOrSpell)==0)
|
||||
if (reportedReqSpells.find(reqSkillOrSpell) == reportedReqSpells.end())
|
||||
{
|
||||
sLog.outErrorDb("Spell (ID: %u) have not existed spell (ID: %i) in `reqSpell` field in `skill_discovery_template` table",spellId,reqSkillOrSpell);
|
||||
reportedReqSpells.insert(reqSkillOrSpell);
|
||||
@@ -104,7 +104,7 @@ void LoadSkillDiscoveryTable()
|
||||
// explicit discovery ability
|
||||
!IsExplicitDiscoverySpell(reqSpellEntry))
|
||||
{
|
||||
if (reportedReqSpells.count(reqSkillOrSpell)==0)
|
||||
if (reportedReqSpells.find(reqSkillOrSpell) == reportedReqSpells.end())
|
||||
{
|
||||
sLog.outErrorDb("Spell (ID: %u) not have MECHANIC_DISCOVERY (28) value in Mechanic field in spell.dbc"
|
||||
" and not 100%% chance random discovery ability but listed for spellId %u (and maybe more) in `skill_discovery_template` table",
|
||||
|
||||
Reference in New Issue
Block a user