Ejemplo n.º 1
0
        public override TestValue GetCaseValue(IEventArgs args)
        {
            TestValue tv = new TestValue();

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

            //tv.AddField("动作", fd.Player.state.ActionStateId);
            //tv.AddField("移动", fd.Player.state.MovementStateId);

            tv.AddField("动作状态标识", fd.Player.state.ActionStateId);       //动作

            tv.AddField("动作转换标识", fd.Player.state.ActionTransitionId);

            tv.AddField("移动状态标识", fd.Player.state.MovementStateId);     //移动

            tv.AddField("移动转换标识", fd.Player.state.MovementTransitionId);

            tv.AddField("保持状态标识", fd.Player.state.KeepStateId);

            tv.AddField("保持转换标识", fd.Player.state.KeepTransitionId);

            tv.AddField("姿势状态标识", fd.Player.state.PostureStateId);

            tv.AddField("姿势转换标识", fd.Player.state.PostureTransitionId);

            tv.AddField("倾斜状态标识", fd.Player.state.LeanStateId);

            tv.AddField("倾斜转换标识", fd.Player.state.LeanTransitionId);

            return(tv);
        }
Ejemplo n.º 2
0
        public override TestValue GetCaseValue(IEventArgs args)
        {
            TestValue tv = new TestValue();

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

            tv.AddField("动作", fd.Player.state.ActionStateId);
            tv.AddField("移动", fd.Player.state.MovementStateId);

            return(tv);
        }
Ejemplo n.º 3
0
        public override TestValue GetCaseValue(IEventArgs args)
        {
            TestValue tv = new TestValue();

            if (number)
            {
                tv.AddField(exp, args.getDouble(exp));
            }
            else
            {
                tv.AddField(exp, args.GetString(exp));
            }

            return(tv);
        }
Ejemplo n.º 4
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);
        }
Ejemplo n.º 5
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);
        }
Ejemplo n.º 6
0
        public override TestValue GetCaseValue(IEventArgs args)
        {
            TestValue tv = new TestValue();
            FreeData  fd = (FreeData)args.GetUnit(UnitTestConstant.Tester);

            if (fd != null)
            {
                IPara para = fd.GetParameters().Get(field);
                if (para != null)
                {
                    tv.AddField(field, para.GetValue().ToString());
                }
            }

            return(tv);
        }
Ejemplo n.º 7
0
        public static TestValue FromRecord(string v)
        {
            TestValue tv = new TestValue();

            string[] rs = StringUtil.Split(v, StringUtil.SPLITER_RECORD);

            foreach (string r in rs)
            {
                string[] fs = r.Split(':');
                if (fs.Length == 3)
                {
                    tv.AddField(fs[0], tv.GetValue(int.Parse(fs[1]), fs[2]));
                }
            }

            return(tv);
        }
Ejemplo n.º 8
0
        public override TestValue GetCaseValue(IEventArgs args)
        {
            TestValue tv = new TestValue();

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

            if (fd != null)
            {
                SimpleProto msg = FreePool.Allocate();
                msg.Key = FreeMessageConstant.FetchUIValue;
                msg.Ss.Add(ui);
                FreeMessageSender.SendMessage(fd.Player, msg);

                if (UIValues != null && UIValues.Length % 2 == 0)
                {
                    for (int i = 0; i < UIValues.Length; i = i + 2)
                    {
                        tv.AddField(UIValues[i], UIValues[i + 1]);
                    }
                }
            }

            return(tv);
        }
Ejemplo n.º 9
0
        public static TestValue[] RecordsFromString(string v)
        {
            List <TestValue> list = new List <TestValue>();

            string[] tvs = StringUtil.Split(v, StringUtil.SPLITER_RECORD);

            foreach (string t in tvs)
            {
                string[]  rs = StringUtil.Split(t, StringUtil.SPLITER_FIELD);
                TestValue tv = new TestValue();
                foreach (string r in rs)
                {
                    string[] fs = r.Split(':');
                    if (fs.Length == 3)
                    {
                        tv.AddField(fs[0], tv.GetValue(int.Parse(fs[1]), fs[2]));
                    }
                }

                list.Add(tv);
            }

            return(list.ToArray());
        }