private PlayerWeaponBagData FindWeaponBagDataBySlot(int index) { int length = ModeController.GetUsableWeapnBagLength(RelatedPlayerInfo); if (index == HeldBagPointer) { return(null); } List <PlayerWeaponBagData> bagDatas = ModeController.FilterSortedWeaponBagDatas(RelatedPlayerInfo); if (bagDatas == null || bagDatas.Count <= index) { return(null); } PlayerWeaponBagData tarBag = bagDatas.Find(bag => bag.BagIndex == index); if (tarBag == null) { return(null); } HeldBagPointer = index; return(tarBag); }