Skip to content
This repository has been archived by the owner on Jun 13, 2020. It is now read-only.

Commit

Permalink
매칭 신청 도중에 실행한 경우 UI 개선
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaehyuk-Lee committed Sep 17, 2019
1 parent 723022f commit 0056be2
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 8 deletions.
26 changes: 24 additions & 2 deletions App/Form/OverlayForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,28 @@ internal void SetDutyCount(int dutyCount)
});
}

internal void SetDutyStatus(Instance instance, byte order)
{
isMatched = false;
memberCount = null;
this.Invoke(() =>
{
label_DutyCount.SetLocalizedText("overlay-roulette");
if (order == 0) // 순번 대기
{
label_DutyStatus.SetLocalizedText("overlay-queue-waiting");
}
else // TODO: 순번이 1번일 때?
{
label_DutyStatus.SetLocalizedText("overlay-queue-order", order);
Roulette roulette = new Roulette();
roulette = Data.GetRoulette(0);
if (!isRoulette)
label_DutyName.Text = roulette.Name;
}
});
}

internal void SetDutyStatus(Instance instance, byte tank, byte dps, byte healer)
{
isMatched = false;
Expand All @@ -158,7 +180,7 @@ internal void SetDutyStatus(Instance instance, byte tank, byte dps, byte healer)
label_DutyStatus.SetLocalizedText("overlay-queue-waiting");
}
}
else if (isRoulette)
/* else if (isRoulette)
{
if (tank == 0) // 순번 대기
{
Expand All @@ -168,7 +190,7 @@ internal void SetDutyStatus(Instance instance, byte tank, byte dps, byte healer)
{
label_DutyStatus.SetLocalizedText("overlay-queue-order", tank);
}
}
} */
else
{
label_DutyName.Text = instance.Name;
Expand Down
10 changes: 5 additions & 5 deletions App/Network/Network.Analyser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -427,9 +427,9 @@ private void HandleMessage(byte[] message)
// 프로그램이 매칭 중간에 켜짐
state = State.QUEUED;
mainForm.overlayForm.SetDutyCount(-1); // 알 수 없음으로 설정함 (TODO: 알아낼 방법 있으면 정확히 나오게 수정하기)
if (rouletteCode > 0)
if (rouletteCode > 0 || (tank == 0 && dps == 0 && healer == 0))
{
mainForm.overlayForm.SetDutyStatus(instance, order, dps, healer);
mainForm.overlayForm.SetDutyStatus(instance, order);
}
else
{
Expand All @@ -438,9 +438,9 @@ private void HandleMessage(byte[] message)
}
else if (state == State.QUEUED)
{
if (rouletteCode > 0)
if (rouletteCode > 0 || (tank == 0 && dps == 0 && healer == 0))
{
mainForm.overlayForm.SetDutyStatus(instance, order, dps, healer);
mainForm.overlayForm.SetDutyStatus(instance, order);
}
else
{
Expand All @@ -451,7 +451,7 @@ private void HandleMessage(byte[] message)
// 직전 맴버 구성과 같은 상황이면 알림주지 않음
if (Settings.TelegramEnabled && Settings.TelegramQueueStatusEnabled)
{
if (rouletteCode == 0 && lastMember != member) // 무작위 임무가 아님 (Not roulette duty)
if (rouletteCode == 0 && lastMember != member || !(tank == 0 && dps == 0 && healer == 0)) // 무작위 임무가 아님 (Not roulette duty)
{
WebApi.Request("telegram", "duty-status", $"{instance.Name}, {tank}/{instance.Tank}, {healer}/{instance.Healer}, {dps}/{instance.DPS}");
}
Expand Down
2 changes: 1 addition & 1 deletion App/Resources/Localization/ko-kr.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
"overlay-not-queuing": "매칭중인 임무 없음",
"overlay-duty-count-unknown": "임무 매칭 중",
"overlay-duty-count": "총 {0}개 임무 매칭 중",
"overlay-queue-waiting-party": "파티 매칭: {0} / {1} / {2}",
"overlay-queue-waiting-party": "PvP 매칭: {0}명 대기 중",
"overlay-queue-waiting": "매칭 대기 중",
"overlay-queue-order": "대기 순번: {0}",
"overlay-roulette": "무작위 임무",
Expand Down

0 comments on commit 0056be2

Please sign in to comment.