public void RewindTo(WeaponBagContainer right)
 {
     for (int i = 0; i < GlobalConst.WeaponSlotMaxLength; i++)
     {
         slotWeapons[i].Sync(right.slotWeapons[i]);
     }
 }
 //public void Trash()
 //{
 //    HeldSlotPointer = 0;
 //    LastSlotPointer = 0;
 //    for (int i = 0; i < GameGlobalConst.WeaponSlotMaxLength; i++)
 //    {
 //        slotWeapons[i].Remove();
 //    }
 //}
 public void MergeFromPatch(WeaponBagContainer from)
 {
     for (int i = 0; i < GlobalConst.WeaponSlotMaxLength; i++)
     {
         // if (from._bitArray[i+2] )
         slotWeapons[i].Sync(from.slotWeapons[i]);
     }
     //from._bitArray.ReleaseReference();
     //from._bitArray = null;
 }
        public WeaponBagContainer Clone()
        {
            WeaponBagContainer clone = new WeaponBagContainer(false);

            for (int i = 0; i < GlobalConst.WeaponSlotMaxLength; i++)
            {
                clone.slotWeapons[i] = slotWeapons[i].Clone();
            }
            return(clone);
        }
 /// <summary>
 /// 等值判定
 /// </summary>
 /// <param name="right"></param>
 /// <returns></returns>
 public bool IsSimilar(WeaponBagContainer right)
 {
     if (right == null)
     {
         return(false);
     }
     for (int i = 0; i < GlobalConst.WeaponSlotMaxLength; i++)
     {
         if (slotWeapons[i] != right.slotWeapons[i])
         {
             return(false);
         }
     }
     return(true);
 }