Ejemplo n.º 1
0
 protected override string Execute(string[] InArguments, ref CSDT_CHEATCMD_DETAIL CheatCmdRef)
 {
     CheatCmdRef.stUpdAcntInfo           = new CSDT_CHEAT_UPDACNTINFO();
     CheatCmdRef.stUpdAcntInfo.iUpdType  = CheatCommandBase.StringToEnum(InArguments[0], typeof(AcntInfoUpdateType));
     CheatCmdRef.stUpdAcntInfo.iUpdValue = CheatCommandBase.SmartConvert <int>(InArguments[1]);
     return(CheatCommandBase.Done);
 }
    protected override string Execute(string[] InArguments, ref CSDT_CHEATCMD_DETAIL CheatCmdRef)
    {
        CheatCmdRef.stPassMultiGame = new CSDT_CHEAT_PASS_MULTI_GAME();
        EWinOrLose eWinOrLose = (EWinOrLose)CheatCommandBase.StringToEnum(InArguments[0], typeof(EWinOrLose));

        CheatCmdRef.stPassMultiGame.bGameResult = ((eWinOrLose == EWinOrLose.胜利) ? 1 : 2);
        return(CheatCommandBase.Done);
    }
    protected override string Execute(string[] InArguments, ref CSDT_CHEATCMD_DETAIL CheatCmdRef)
    {
        GMMailAccessType gMMailAccessType = (GMMailAccessType)CheatCommandBase.StringToEnum(InArguments[0], typeof(GMMailAccessType));

        CheatCmdRef.stSendMail = new CSDT_CHEAT_SENDMAIL();
        if (gMMailAccessType == GMMailAccessType.金币)
        {
            CheatCmdRef.stSendMail.bMailType                          = 1;
            CheatCmdRef.stSendMail.bMailsubType                       = 2;
            CheatCmdRef.stSendMail.bAccessCnt                         = 1;
            CheatCmdRef.stSendMail.astAccess                          = new COMDT_MAILACCESS[1];
            CheatCmdRef.stSendMail.astAccess[0]                       = new COMDT_MAILACCESS();
            CheatCmdRef.stSendMail.astAccess[0].bGeted                = 1;
            CheatCmdRef.stSendMail.astAccess[0].bAccessType           = 4;
            CheatCmdRef.stSendMail.astAccess[0].stAccessInfo          = new COMDT_MAILACCESS_INFO();
            CheatCmdRef.stSendMail.astAccess[0].stAccessInfo.stRongYu = new COMDT_MAILACCESS_RONGYU();
            CheatCmdRef.stSendMail.astAccess[0].stAccessInfo.stRongYu.dwRongYuPoint = (uint)CheatCommandBase.SmartConvert <int>(InArguments[1]);
        }
        else if (gMMailAccessType == GMMailAccessType.钻石)
        {
            CheatCmdRef.stSendMail.bMailType                                 = 1;
            CheatCmdRef.stSendMail.bMailsubType                              = 2;
            CheatCmdRef.stSendMail.bAccessCnt                                = 1;
            CheatCmdRef.stSendMail.astAccess                                 = new COMDT_MAILACCESS[1];
            CheatCmdRef.stSendMail.astAccess[0]                              = new COMDT_MAILACCESS();
            CheatCmdRef.stSendMail.astAccess[0].bGeted                       = 1;
            CheatCmdRef.stSendMail.astAccess[0].bAccessType                  = 2;
            CheatCmdRef.stSendMail.astAccess[0].stAccessInfo                 = new COMDT_MAILACCESS_INFO();
            CheatCmdRef.stSendMail.astAccess[0].stAccessInfo.stMoney         = new COMDT_MAILACCESS_MONEY();
            CheatCmdRef.stSendMail.astAccess[0].stAccessInfo.stMoney.bType   = 7;
            CheatCmdRef.stSendMail.astAccess[0].stAccessInfo.stMoney.dwMoney = (uint)CheatCommandBase.SmartConvert <int>(InArguments[1]);
        }
        else if (gMMailAccessType == GMMailAccessType.心)
        {
            DebugHelper.Assert(this.CachedFriendInfo != null);
            CheatCmdRef.stSendMail.szTo                                      = this.CachedFriendInfo.szUserName;
            CheatCmdRef.stSendMail.ullToUid                                  = this.CachedFriendInfo.stUin.ullUid;
            CheatCmdRef.stSendMail.dwToLogicWorld                            = this.CachedFriendInfo.stUin.dwLogicWorldId;
            CheatCmdRef.stSendMail.bMailType                                 = 2;
            CheatCmdRef.stSendMail.bMailsubType                              = 2;
            CheatCmdRef.stSendMail.bAccessCnt                                = 1;
            CheatCmdRef.stSendMail.astAccess                                 = new COMDT_MAILACCESS[1];
            CheatCmdRef.stSendMail.astAccess[0]                              = new COMDT_MAILACCESS();
            CheatCmdRef.stSendMail.astAccess[0].bGeted                       = 1;
            CheatCmdRef.stSendMail.astAccess[0].bAccessType                  = 3;
            CheatCmdRef.stSendMail.astAccess[0].stAccessInfo                 = new COMDT_MAILACCESS_INFO();
            CheatCmdRef.stSendMail.astAccess[0].stAccessInfo.stHeart         = new COMDT_MAILACCESS_HEART();
            CheatCmdRef.stSendMail.astAccess[0].stAccessInfo.stHeart.dwHeart = (uint)CheatCommandBase.SmartConvert <int>(InArguments[1]);
        }
        return(CheatCommandBase.Done);
    }
Ejemplo n.º 4
0
    protected override string Execute(string[] InArguments, ref CSDT_CHEATCMD_DETAIL CheatCmdRef)
    {
        string empty = string.Empty;

        if (this.CheckArguments(InArguments, out empty))
        {
            CheatCmdRef.stSetFreeHero       = new CSDT_CHEAT_SET_FREE_HERO();
            CheatCmdRef.stSetFreeHero.wYear = CheatCommandBase.SmartConvert <ushort>(InArguments[0]);
            EMonth eMonth = (EMonth)CheatCommandBase.StringToEnum(InArguments[1], typeof(EMonth));
            CheatCmdRef.stSetFreeHero.bMonth        = (byte)eMonth;
            CheatCmdRef.stSetFreeHero.bDay          = CheatCommandBase.SmartConvert <byte>(InArguments[2]);
            CheatCmdRef.stSetFreeHero.bHour         = CheatCommandBase.SmartConvert <byte>(InArguments[3]);
            CheatCmdRef.stSetFreeHero.dwHeroID      = CheatCommandBase.SmartConvert <uint>(InArguments[4]);
            CheatCmdRef.stSetFreeHero.dwCreditLevel = CheatCommandBase.SmartConvert <uint>(InArguments[5]);
            return(CheatCommandBase.Done);
        }
        return(empty);
    }
 public override bool CheckArguments(string[] InArguments, out string OutMessage)
 {
     this.CachedFriendInfo = null;
     if (!base.CheckArguments(InArguments, out OutMessage))
     {
         return(false);
     }
     if (CheatCommandBase.StringToEnum(InArguments[0], typeof(GMMailAccessType)) == 2)
     {
         if (Singleton <CFriendContoller> .instance != null && Singleton <CFriendContoller> .instance.model != null)
         {
             this.CachedFriendInfo = Singleton <CFriendContoller> .instance.model.getFriendByName(InArguments[2], CFriendModel.FriendType.GameFriend);
         }
         if (this.CachedFriendInfo == null)
         {
             OutMessage = string.Format("当前命令无法在当前状态下被使用或者无法找名称为\"{0}\"的好友", InArguments[2]);
             return(false);
         }
     }
     return(true);
 }
Ejemplo n.º 6
0
    protected override string Execute(string[] InArguments, ref CSDT_CHEATCMD_DETAIL CheatCmdRef)
    {
        int num = CheatCommandBase.StringToEnum(InArguments[0], typeof(GMMailAccessCount));

        CheatCmdRef.set_stSendMail(new CSDT_CHEAT_SENDMAIL());
        CheatCmdRef.get_stSendMail().bMailType    = 1;
        CheatCmdRef.get_stSendMail().bMailsubType = 2;
        CheatCmdRef.get_stSendMail().bAccessCnt   = (byte)num;
        CheatCmdRef.get_stSendMail().astAccess    = new COMDT_MAILACCESS[num];
        for (int i = 0; i < num; i++)
        {
            CheatCmdRef.get_stSendMail().astAccess[i]              = new COMDT_MAILACCESS();
            CheatCmdRef.get_stSendMail().astAccess[i].bGeted       = 1;
            CheatCmdRef.get_stSendMail().astAccess[i].bAccessType  = 1;
            CheatCmdRef.get_stSendMail().astAccess[i].stAccessInfo = new COMDT_MAILACCESS_INFO();
            CheatCmdRef.get_stSendMail().astAccess[i].stAccessInfo.set_stProp(new COMDT_MAILACCESS_PROP());
            CheatCmdRef.get_stSendMail().astAccess[i].stAccessInfo.get_stProp().wPropType = (ushort)CheatCommandBase.SmartConvert <int>(InArguments[i * 3 + 1]);
            CheatCmdRef.get_stSendMail().astAccess[i].stAccessInfo.get_stProp().dwPropID  = (uint)CheatCommandBase.SmartConvert <int>(InArguments[i * 3 + 2]);
            CheatCmdRef.get_stSendMail().astAccess[i].stAccessInfo.get_stProp().iPropNum  = CheatCommandBase.SmartConvert <int>(InArguments[i * 3 + 3]);
        }
        return(CheatCommandBase.Done);
    }