Ejemplo n.º 1
0
        private void Action_MenuLink(ActionInfo info, PlayerObject play)
        {
            NetMsg.MsgNpcReply msg = new NetMsg.MsgNpcReply();
            msg.Create(null, play.GetGamePackKeyEx());
            msg.interactType = 258;
            msg.param = 111;
            msg.param2 = 112;
            msg.param3[1] = 113;
            msg.param3[2] = 114;
            msg.param3[0] = 115;
            if (info.id_next == 0) msg.optionid = 255;
            else msg.optionid = mnSelectIndex;/**选项索引**/

            String[] option = info.param.Split(' ');
            play.GetMenuLink()[mnSelectIndex] = Convert.ToUInt32(option[1]);
            msg.text = option[0];
            play.SendData(msg.GetBuffer());
        }
Ejemplo n.º 2
0
 private void Action_MenuText(ActionInfo info, PlayerObject play)
 {
     NetMsg.MsgNpcReply msg = new NetMsg.MsgNpcReply();
     msg.Create(null, play.GetGamePackKeyEx());
     msg.interactType = 257;
     msg.optionid = 255;
     msg.text = Sprintf_string(info.param, play);
     play.SendData(msg.GetBuffer());
 }
Ejemplo n.º 3
0
        private void Action_MenuEdit(ActionInfo info, PlayerObject play)
        {
            NetMsg.MsgNpcReply msg = new NetMsg.MsgNpcReply();
            msg.Create(null, play.GetGamePackKeyEx());
            msg.interactType = 259;

            String[] option = info.param.Split(' ');
            if (option.Length != 3)
            {
                Log.Instance().WriteLog("Action_MenuEdit参数数量不对." + info.param);
            }
            ushort nAcceptLen = Convert.ToUInt16(option[0]);
            uint idTask = Convert.ToUInt32(option[1]);
            play.SetTaskID(idTask);
            String sText = option[2];
            msg.param2 = nAcceptLen;
            msg.text = sText;
            play.SendData(msg.GetBuffer());
            //byte[] data1 = { 29, 0, 240, 7, 0, 0, 0, 0, 15, 0, 0, 3, 1, 12, 190, 252, 205, 197, 207, 235, 189, 208, 161, 173, 161, 173, 0, 0, 0 };
            //play.GetGamePackKeyEx().EncodePacket(ref data1, data1.Length);
            //play.SendData(data1);
        }