Terraria.Player.clientClone C# (CSharp) Method

clientClone() public method

public clientClone ( ) : object
return object
        public object clientClone()
        {
            Player player = new Player();
            player.zone1 = this.zone1;
            player.zone2 = this.zone2;
            player.MinionTargetPoint = this.MinionTargetPoint;
            player.direction = this.direction;
            player.selectedItem = this.selectedItem;
            player.controlUp = this.controlUp;
            player.controlDown = this.controlDown;
            player.controlLeft = this.controlLeft;
            player.controlRight = this.controlRight;
            player.controlJump = this.controlJump;
            player.controlUseItem = this.controlUseItem;
            player.statLife = this.statLife;
            player.statLifeMax = this.statLifeMax;
            player.statMana = this.statMana;
            player.statManaMax = this.statManaMax;
            player.position.X = this.position.X;
            player.chest = this.chest;
            player.talkNPC = this.talkNPC;
            player.hideVisual = this.hideVisual;
            player.hideMisc = this.hideMisc;
            for (int index = 0; index < 59; ++index)
            {
                player.inventory[index] = this.inventory[index].Clone();
                if (index < this.armor.Length)
                    player.armor[index] = this.armor[index].Clone();
                if (index < this.dye.Length)
                    player.dye[index] = this.dye[index].Clone();
                if (index < this.miscEquips.Length)
                    player.miscEquips[index] = this.miscEquips[index].Clone();
                if (index < this.miscDyes.Length)
                    player.miscDyes[index] = this.miscDyes[index].Clone();
                if (index < this.bank.item.Length)
                    player.bank.item[index] = this.bank.item[index].Clone();
                if (index < this.bank2.item.Length)
                    player.bank2.item[index] = this.bank2.item[index].Clone();
            }
            player.trashItem = this.trashItem.Clone();
            for (int index = 0; index < 22; ++index)
            {
                player.buffType[index] = this.buffType[index];
                player.buffTime[index] = this.buffTime[index];
            }
            return (object)player;
        }
Player