mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 01:37:37 +01:00
Core: Removed more operator workarounds for ACE_Singleton (missed previously because of inconsistent naming)
--HG-- branch : trunk
This commit is contained in:
@@ -54,8 +54,8 @@ void LoadSkillDiscoveryTable()
|
||||
|
||||
if (!result)
|
||||
{
|
||||
sLog.outErrorDb(">> Loaded 0 skill discovery definitions. DB table `skill_discovery_template` is empty.");
|
||||
sLog.outString();
|
||||
sLog->outErrorDb(">> Loaded 0 skill discovery definitions. DB table `skill_discovery_template` is empty.");
|
||||
sLog->outString();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ void LoadSkillDiscoveryTable()
|
||||
{
|
||||
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);
|
||||
sLog->outErrorDb("Spell (ID: %u) have not existed spell (ID: %i) in `reqSpell` field in `skill_discovery_template` table",spellId,reqSkillOrSpell);
|
||||
reportedReqSpells.insert(reqSkillOrSpell);
|
||||
}
|
||||
continue;
|
||||
@@ -100,7 +100,7 @@ void LoadSkillDiscoveryTable()
|
||||
{
|
||||
if (reportedReqSpells.find(reqSkillOrSpell) == reportedReqSpells.end())
|
||||
{
|
||||
sLog.outErrorDb("Spell (ID: %u) not have MECHANIC_DISCOVERY (28) value in Mechanic field in spell.dbc"
|
||||
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",
|
||||
reqSkillOrSpell,spellId);
|
||||
reportedReqSpells.insert(reqSkillOrSpell);
|
||||
@@ -116,7 +116,7 @@ void LoadSkillDiscoveryTable()
|
||||
|
||||
if (bounds.first == bounds.second)
|
||||
{
|
||||
sLog.outErrorDb("Spell (ID: %u) not listed in `SkillLineAbility.dbc` but listed with `reqSpell`=0 in `skill_discovery_template` table",spellId);
|
||||
sLog->outErrorDb("Spell (ID: %u) not listed in `SkillLineAbility.dbc` but listed with `reqSpell`=0 in `skill_discovery_template` table",spellId);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -125,7 +125,7 @@ void LoadSkillDiscoveryTable()
|
||||
}
|
||||
else
|
||||
{
|
||||
sLog.outErrorDb("Spell (ID: %u) have negative value in `reqSpell` field in `skill_discovery_template` table",spellId);
|
||||
sLog->outErrorDb("Spell (ID: %u) have negative value in `reqSpell` field in `skill_discovery_template` table",spellId);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -133,7 +133,7 @@ void LoadSkillDiscoveryTable()
|
||||
} while (result->NextRow());
|
||||
|
||||
if (!ssNonDiscoverableEntries.str().empty())
|
||||
sLog.outErrorDb("Some items can't be successfully discovered: have in chance field value < 0.000001 in `skill_discovery_template` DB table . List:\n%s",ssNonDiscoverableEntries.str().c_str());
|
||||
sLog->outErrorDb("Some items can't be successfully discovered: have in chance field value < 0.000001 in `skill_discovery_template` DB table . List:\n%s",ssNonDiscoverableEntries.str().c_str());
|
||||
|
||||
// report about empty data for explicit discovery spells
|
||||
for (uint32 spell_id = 1; spell_id < sSpellStore.GetNumRows(); ++spell_id)
|
||||
@@ -147,11 +147,11 @@ void LoadSkillDiscoveryTable()
|
||||
continue;
|
||||
|
||||
if (SkillDiscoveryStore.find(spell_id) == SkillDiscoveryStore.end())
|
||||
sLog.outErrorDb("Spell (ID: %u) is 100%% chance random discovery ability but not have data in `skill_discovery_template` table",spell_id);
|
||||
sLog->outErrorDb("Spell (ID: %u) is 100%% chance random discovery ability but not have data in `skill_discovery_template` table",spell_id);
|
||||
}
|
||||
|
||||
sLog.outString(">> Loaded %u skill discovery definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
sLog.outString();
|
||||
sLog->outString(">> Loaded %u skill discovery definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
sLog->outString();
|
||||
}
|
||||
|
||||
uint32 GetExplicitDiscoverySpell(uint32 spellId, Player* player)
|
||||
@@ -202,7 +202,7 @@ uint32 GetSkillDiscoverySpell(uint32 skillId, uint32 spellId, Player* player)
|
||||
{
|
||||
for (SkillDiscoveryList::const_iterator item_iter = tab->second.begin(); item_iter != tab->second.end(); ++item_iter)
|
||||
{
|
||||
if (roll_chance_f(item_iter->chance * sWorld.getRate(RATE_SKILL_DISCOVERY)) &&
|
||||
if (roll_chance_f(item_iter->chance * sWorld->getRate(RATE_SKILL_DISCOVERY)) &&
|
||||
item_iter->reqSkillValue <= skillvalue &&
|
||||
!player->HasSpell(item_iter->spellId))
|
||||
return item_iter->spellId;
|
||||
@@ -220,7 +220,7 @@ uint32 GetSkillDiscoverySpell(uint32 skillId, uint32 spellId, Player* player)
|
||||
{
|
||||
for (SkillDiscoveryList::const_iterator item_iter = tab->second.begin(); item_iter != tab->second.end(); ++item_iter)
|
||||
{
|
||||
if (roll_chance_f(item_iter->chance * sWorld.getRate(RATE_SKILL_DISCOVERY)) &&
|
||||
if (roll_chance_f(item_iter->chance * sWorld->getRate(RATE_SKILL_DISCOVERY)) &&
|
||||
item_iter->reqSkillValue <= skillvalue &&
|
||||
!player->HasSpell(item_iter->spellId))
|
||||
return item_iter->spellId;
|
||||
|
||||
Reference in New Issue
Block a user