public void StopPvp() { if (!IsActive) { return; } IsActive = false; if (Losser == null) { Losser = FirstCharacter; } FirstCharacter.EnemyCharacters.Remove(SecondCharacter); SecondCharacter.EnemyCharacters.Remove(FirstCharacter); FirstCharacter.CheckEnemysCount(); SecondCharacter.CheckEnemysCount(); Asda2PvpHandler.SendDuelEndedResponse(Winner, Losser); Asda2TitleChecker.OnWinDuel(Winner); FirstCharacter.Asda2Duel = null; SecondCharacter.Asda2Duel = null; FirstCharacter.Asda2DuelingOponent = null; SecondCharacter.Asda2DuelingOponent = null; FirstCharacter = null; SecondCharacter = null; }
/// <summary> /// Create an instance of this class function /// </summary> private SecondCharacter() { if (_instance != null) { return; } _instance = this; }
public Fight Transform() { Fight fight = new Fight(); fight.FirstCharacter = FirstCharacter.Transform(); fight.SecondCharacter = SecondCharacter.Transform(); fight.ID_Winner = ID_Winner; fight.ID_Territory = ID_Territory; fight.ID_War = ID_War; return(fight); }