Skip to content

Commit

Permalink
공격 단어와 방어 단어가 동시에 추천되지 않는 버그 수정
Browse files Browse the repository at this point in the history
이전 버전에서 제대로 해결되지 않았음
  • Loading branch information
hsheric0210 committed Apr 17, 2022
1 parent 4911cd1 commit 57f4bb2
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions DatabaseManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -523,22 +523,22 @@ private static string CreateQuery(CommonHandler.ResponsePresentedWord data, stri

// 한방 단어
if (!flags.HasFlag(PathFinderFlags.USING_END_WORD))
auxiliaryCondition = $"AND (flags & {endWordFlag} = 0)";
auxiliaryCondition += $"AND (flags & {endWordFlag} = 0)";
else if (wordPreference == WordPreference.ATTACK_DAMAGE)
auxiliaryOrderCondition = $"(CASE WHEN (flags & {endWordFlag} != 0) THEN 768 ELSE 0 END) +";
auxiliaryOrderCondition += $"(CASE WHEN (flags & {endWordFlag} != 0) THEN 768 ELSE 0 END) +";

// 공격 단어
if (!flags.HasFlag(PathFinderFlags.USING_ATTACK_WORD))
auxiliaryCondition = $"AND (flags & {attackWordFlag} = 0)";
auxiliaryCondition += $"AND (flags & {attackWordFlag} = 0)";
else if (wordPreference == WordPreference.ATTACK_DAMAGE)
auxiliaryOrderCondition = $"(CASE WHEN (flags & {attackWordFlag} != 0) THEN 512 ELSE 0 END) +";
auxiliaryOrderCondition += $"(CASE WHEN (flags & {attackWordFlag} != 0) THEN 512 ELSE 0 END) +";

// 미션 단어
string orderCondition = "";
string orderCondition;
if (string.IsNullOrWhiteSpace(missionChar))
orderCondition += $"({auxiliaryOrderCondition} LENGTH(word))";
orderCondition = $"({auxiliaryOrderCondition} LENGTH(word))";
else
orderCondition += $"(checkMissionChar(word, '{missionChar}') + {auxiliaryOrderCondition} LENGTH(word))";
orderCondition = $"(checkMissionChar(word, '{missionChar}') + {auxiliaryOrderCondition} LENGTH(word))";

if (mode == GameMode.All)
condition = auxiliaryCondition = "";
Expand Down

0 comments on commit 57f4bb2

Please sign in to comment.