| | |
| | | |
| | | int displayState = manager.GetGuildBattleDisplayState(); |
| | | if (displayState != 3) |
| | | { |
| | | ScrollTip.ShowTip("Guild attack-defense battle is not active"); |
| | | return; |
| | | } |
| | | |
| | | if (!manager.HasMyJoinEligibility()) |
| | | { |
| | |
| | | |
| | | if (manager.GetMyRemainingChallengeCount() <= 0) |
| | | { |
| | | ScrollTip.ShowTip("Challenge is unavailable"); |
| | | SysNotifyMgr.Instance.ShowTip("GuildAtkDefBat5"); |
| | | return; |
| | | } |
| | | |
| | | if (manager.IsPropertyKilled(targetMem.KilledState, difficultyIndex)) |
| | | { |
| | | ScrollTip.ShowTip("Challenge is unavailable"); |
| | | DisplayDifficulties(); |
| | | return; |
| | | } |
| | | |
| | | GuildAtkDefBatManager.Instance.CurrentChallengeTargetPlayerID = targetMem.PlayerID; |
| | | UIManager.Instance.GetUI<GuildAtkDefBatBattlePanelWin>()?.SaveScrollPositionForNextOpen(); |
| | | BattleManager.Instance.SendTurnFight( |
| | | (uint)GuildAtkDefBatManager.DataMapID, |
| | | 0, |
| | | 1, |
| | | targetMem.PlayerID, |
| | | new[] { (uint)defBaseAttrPer, 0u }); |
| | | new[] { (uint)defBaseAttrPer, 0u }, |
| | | true, |
| | | targetMem.ServerID); |
| | | CloseWindow(); |
| | | } |
| | | |