diff options
author | Vincent-Michael <Vincent_Michael@gmx.de> | 2013-08-28 19:24:01 +0200 |
---|---|---|
committer | Vincent-Michael <Vincent_Michael@gmx.de> | 2013-08-28 19:24:01 +0200 |
commit | 316663807862ad2a4a24edbe8c2e508715d02cdc (patch) | |
tree | fb12194fcdd574f294b9ec05cef37efa87babd8a /src/server/game/Globals/ObjectMgr.cpp | |
parent | 14d80d269dd7f9624983bc5a610e511f31ed33f0 (diff) | |
parent | a9174617622a85599e8e2878f3036b35781192dd (diff) |
Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4
Conflicts:
src/server/game/Entities/Player/Player.cpp
src/server/game/Guilds/Guild.cpp
src/server/game/Spells/Auras/SpellAuraEffects.cpp
src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.cpp
Diffstat (limited to 'src/server/game/Globals/ObjectMgr.cpp')
-rw-r--r-- | src/server/game/Globals/ObjectMgr.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index e95779c1f20..38971cd3e30 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -6698,8 +6698,8 @@ void ObjectMgr::LoadReputationRewardRate() _repRewardRateStore.clear(); // for reload case - uint32 count = 0; // 0 1 2 3 4 5 6 - QueryResult result = WorldDatabase.Query("SELECT faction, quest_rate, quest_daily_rate, quest_weekly_rate, quest_monthly_rate, creature_rate, spell_rate FROM reputation_reward_rate"); + uint32 count = 0; // 0 1 2 3 4 5 6 7 + QueryResult result = WorldDatabase.Query("SELECT faction, quest_rate, quest_daily_rate, quest_weekly_rate, quest_monthly_rate, quest_repeatable_rate, creature_rate, spell_rate FROM reputation_reward_rate"); if (!result) { TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, ">> Loaded `reputation_reward_rate`, table is empty!"); @@ -6718,8 +6718,9 @@ void ObjectMgr::LoadReputationRewardRate() repRate.questDailyRate = fields[2].GetFloat(); repRate.questWeeklyRate = fields[3].GetFloat(); repRate.questMonthlyRate = fields[4].GetFloat(); - repRate.creatureRate = fields[5].GetFloat(); - repRate.spellRate = fields[6].GetFloat(); + repRate.questRepeatableRate = fields[5].GetFloat(); + repRate.creatureRate = fields[6].GetFloat(); + repRate.spellRate = fields[7].GetFloat(); FactionEntry const* factionEntry = sFactionStore.LookupEntry(factionId); if (!factionEntry) @@ -6752,6 +6753,12 @@ void ObjectMgr::LoadReputationRewardRate() continue; } + if (repRate.questRepeatableRate < 0.0f) + { + TC_LOG_ERROR(LOG_FILTER_SQL, "Table reputation_reward_rate has quest_repeatable_rate with invalid rate %f, skipping data for faction %u", repRate.questRepeatableRate, factionId); + continue; + } + if (repRate.creatureRate < 0.0f) { TC_LOG_ERROR(LOG_FILTER_SQL, "Table reputation_reward_rate has creature_rate with invalid rate %f, skipping data for faction %u", repRate.creatureRate, factionId); |