Beispiel #1
0
        public BattleShipFmt(Mem_ship ship)
        {
            Id          = ship.Rid;
            ShipId      = ship.Ship_id;
            Level       = ship.Level;
            NowHp       = ship.Nowhp;
            MaxHp       = ship.Maxhp;
            BattleParam = ship.GetBattleBaseParam().Copy();
            EscapeFlag  = ship.Escape_sts;
            Slot        = new List <int>();
            if (!ship.IsEnemy())
            {
                ship.Slot.ForEach(delegate(int x)
                {
                    int item = -1;
                    if (Comm_UserDatas.Instance.User_slot.ContainsKey(x))
                    {
                        item = Comm_UserDatas.Instance.User_slot[x].Slotitem_id;
                    }
                    Slot.Add(item);
                });
            }
            else
            {
                ship.Slot.ForEach(delegate(int x)
                {
                    Slot.Add(x);
                });
            }
            Mst_slotitem mstSlotItemToExSlot = ship.GetMstSlotItemToExSlot();

            if (mstSlotItemToExSlot != null)
            {
                ExSlot = mstSlotItemToExSlot.Id;
            }
        }
        public BattleShipFmt(Mem_ship ship)
        {
            this.Id          = ship.Rid;
            this.ShipId      = ship.Ship_id;
            this.Level       = ship.Level;
            this.NowHp       = ship.Nowhp;
            this.MaxHp       = ship.Maxhp;
            this.BattleParam = ship.GetBattleBaseParam().Copy();
            this.EscapeFlag  = ship.Escape_sts;
            this.Slot        = new List <int>();
            if (!ship.IsEnemy())
            {
                ship.Slot.ForEach(delegate(int x)
                {
                    int num = -1;
                    if (Comm_UserDatas.Instance.User_slot.ContainsKey(x))
                    {
                        num = Comm_UserDatas.Instance.User_slot.get_Item(x).Slotitem_id;
                    }
                    this.Slot.Add(num);
                });
            }
            else
            {
                ship.Slot.ForEach(delegate(int x)
                {
                    this.Slot.Add(x);
                });
            }
            Mst_slotitem mstSlotItemToExSlot = ship.GetMstSlotItemToExSlot();

            if (mstSlotItemToExSlot != null)
            {
                this.ExSlot = mstSlotItemToExSlot.Id;
            }
        }