/// <summary> /// event triggered when player submitting a fighter to the pre-arena. /// "a combination of other methods primarily" /// ((Not used if pressing the "preset" button)) /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void SubmitMove_Button(object sender, RoutedEventArgs e) { string participantToMove = MemberListBox.SelectedItem.ToString(); Fighter_DTO pDTO = pImpl.GetParticipant(participantToMove); pDTO.TeamColorGS = AllianceTeamColor; int x = int.Parse(txtXCoord.Text); int y = int.Parse(txtYCoord.Text); ArenaFieldPoint_DTO AFP_DTO = ArenaImpl.GetArenaField(x, y); /** MOVING **/ bool run = ArenaImpl.CheckField(AFP_DTO, pDTO); //checks the field we are trying to go to if (run) { ClearsImage(pDTO); //removes image //updates the point we are leaving. ArenaImpl.UpdateLeavingArenaFieldPoint(pDTO, "preArena"); //Updating the fieldstatus since we are leaving to another field. pImpl.MoveParticipant(pDTO, ArenaImpl.GetArenaField(x, y)); ArenaImpl.UpdateMovingToArenaFieldStatus(AFP_DTO, "preArena"); SetsImage(pDTO); } /** MOVING ENDS **/ }
//is called by both alliance and horde public void ActivateMovement(Fighter_DTO pDTO, ArenaFieldPoint_DTO AFP_DTO) { ClearsImage(pDTO); //removes image //updates the point we are leaving. arenaImpl.UpdateLeavingArenaFieldPoint(pDTO, "actualArena"); //Updating the fieldstatus since we are leaving to another field. pImpl.MoveParticipant(pDTO, AFP_DTO); arenaImpl.UpdateMovingToArenaFieldStatus(AFP_DTO, "actualArena"); SetsImage(pDTO); }