diff options
| author | Shauren <shauren.trinity@gmail.com> | 2014-07-17 15:42:57 +0200 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2014-07-17 15:42:57 +0200 |
| commit | 7532864264dd3b3b820c4b3c39ee900d5ff7cb0e (patch) | |
| tree | 4c385674de3ef458300a0395ba7e64bafad1d0db /src/server/game/Quests | |
| parent | 345bed25d25d8e269fd7b863cd700d628a9500e0 (diff) | |
Buildsystem/MSVC: Warning fixes
C4800 'type' : forcing value to bool 'true' or 'false' (performance warning)
C4127 conditional expression is constant
Diffstat (limited to 'src/server/game/Quests')
| -rw-r--r-- | src/server/game/Quests/QuestDef.cpp | 4 | ||||
| -rw-r--r-- | src/server/game/Quests/QuestDef.h | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/server/game/Quests/QuestDef.cpp b/src/server/game/Quests/QuestDef.cpp index 099275ba8dc..a26b14af4b7 100644 --- a/src/server/game/Quests/QuestDef.cpp +++ b/src/server/game/Quests/QuestDef.cpp @@ -213,12 +213,12 @@ uint32 Quest::GetRewMoneyMaxLevel() const bool Quest::IsAutoAccept() const { - return sWorld->getBoolConfig(CONFIG_QUEST_IGNORE_AUTO_ACCEPT) ? false : (Flags & QUEST_FLAGS_AUTO_ACCEPT); + return !sWorld->getBoolConfig(CONFIG_QUEST_IGNORE_AUTO_ACCEPT) && HasFlag(QUEST_FLAGS_AUTO_ACCEPT); } bool Quest::IsAutoComplete() const { - return sWorld->getBoolConfig(CONFIG_QUEST_IGNORE_AUTO_COMPLETE) ? false : (Method == 0 || HasFlag(QUEST_FLAGS_AUTOCOMPLETE)); + return !sWorld->getBoolConfig(CONFIG_QUEST_IGNORE_AUTO_COMPLETE) && (Method == 0 || HasFlag(QUEST_FLAGS_AUTOCOMPLETE)); } bool Quest::IsRaidQuest(Difficulty difficulty) const diff --git a/src/server/game/Quests/QuestDef.h b/src/server/game/Quests/QuestDef.h index 995396c37f5..350ef104ed4 100644 --- a/src/server/game/Quests/QuestDef.h +++ b/src/server/game/Quests/QuestDef.h @@ -262,14 +262,14 @@ class Quest bool IsAutoAccept() const; bool IsAutoComplete() const; uint32 GetFlags() const { return Flags; } - bool IsDaily() const { return Flags & QUEST_FLAGS_DAILY; } - bool IsWeekly() const { return Flags & QUEST_FLAGS_WEEKLY; } - bool IsMonthly() const { return SpecialFlags & QUEST_SPECIAL_FLAGS_MONTHLY; } + bool IsDaily() const { return (Flags & QUEST_FLAGS_DAILY) != 0; } + bool IsWeekly() const { return (Flags & QUEST_FLAGS_WEEKLY) != 0; } + bool IsMonthly() const { return (SpecialFlags & QUEST_SPECIAL_FLAGS_MONTHLY) != 0; } bool IsSeasonal() const { return (ZoneOrSort == -QUEST_SORT_SEASONAL || ZoneOrSort == -QUEST_SORT_SPECIAL || ZoneOrSort == -QUEST_SORT_LUNAR_FESTIVAL || ZoneOrSort == -QUEST_SORT_MIDSUMMER || ZoneOrSort == -QUEST_SORT_BREWFEST || ZoneOrSort == -QUEST_SORT_LOVE_IS_IN_THE_AIR || ZoneOrSort == -QUEST_SORT_NOBLEGARDEN) && !IsRepeatable(); } - bool IsDailyOrWeekly() const { return Flags & (QUEST_FLAGS_DAILY | QUEST_FLAGS_WEEKLY); } + bool IsDailyOrWeekly() const { return (Flags & (QUEST_FLAGS_DAILY | QUEST_FLAGS_WEEKLY)) != 0; } bool IsRaidQuest(Difficulty difficulty) const; bool IsAllowedInRaid(Difficulty difficulty) const; - bool IsDFQuest() const { return SpecialFlags & QUEST_SPECIAL_FLAGS_DF_QUEST; } + bool IsDFQuest() const { return (SpecialFlags & QUEST_SPECIAL_FLAGS_DF_QUEST) != 0; } uint32 CalculateHonorGain(uint8 level) const; // multiple values |
