public Player(PlayerTransferModel player) { PlayerName = player.PlayerName; playerHeroes = new List <PlayerHero>(); foreach (var item in player.PlayerHeroList) { playerHeroes.Add(new PlayerHero(GameDictionary.GameDic.HeroDic[item], player.PlayerCardList)); } }
public PlayerTransferModel Clone() { PlayerTransferModel clone = new PlayerTransferModel(); clone.TransferMessage = TransferMessage; clone.TransferState = TransferState; clone.TransferRequest = TransferRequest; clone.PlayerName = PlayerName; clone.AccountName = AccountName; clone.Password = Password; if (PlayerHeroList != null) { clone.PlayerHeroList = new List <string>(PlayerHeroList.ToArray()); } return(clone); }