示例#1
0
        public override TestValue GetCaseValue(IEventArgs args)
        {
            TestValue tv = new TestValue();

            FreeData fd = (FreeData)args.GetUnit(UnitTestConstant.Tester);

            if (fd != null)
            {
                EWeaponSlotType currentSlot = fd.Player.GetBagLogicImp().GetCurrentWeaponSlot();

                if (args.GetInt(slot) > 0)
                {
                    currentSlot = FreeWeaponUtil.GetSlotType(args.GetInt(slot));
                }

                WeaponInfo info = fd.Player.GetBagLogicImp().GetWeaponInfo(currentSlot);
                tv.AddField("id", info.Id);
                tv.AddField("clip", info.Bullet);
                tv.AddField("carryClip", info.ReservedBullet);
            }

            return(tv);
        }
示例#2
0
        public override TestValue GetCaseValue(IEventArgs args)
        {
            TestValue tv = new TestValue();

            FreeData fd = (FreeData)args.GetUnit(UnitTestConstant.Tester);

            if (fd != null)
            {
                EWeaponSlotType currentSlot = fd.Player.WeaponController().HeldSlotType;

                if (args.GetInt(slot) > 0)
                {
                    currentSlot = FreeWeaponUtil.GetSlotType(args.GetInt(slot));
                }

                WeaponScanStruct info = fd.Player.WeaponController().HeldWeaponAgent.ComponentScan;
                tv.AddField("id", info.ConfigId);
                tv.AddField("clip", info.Bullet);
                tv.AddField("carryClip", info.ReservedBullet);
            }

            return(tv);
        }