Esempio n. 1
0
 private void HandleAwakeItemBreakUpCmd(CommandParser.Command param)
 {
     ulong iD = 0uL;
     ulong.TryParse(param.GetParam(1), out iD);
     int count = 0;
     int.TryParse(param.GetParam(2), out count);
     MC2S_AwakeItemBreakUp mC2S_AwakeItemBreakUp = new MC2S_AwakeItemBreakUp();
     mC2S_AwakeItemBreakUp.ID = iD;
     mC2S_AwakeItemBreakUp.Count = count;
     Globals.Instance.CliSession.Send(538, mC2S_AwakeItemBreakUp);
 }
Esempio n. 2
0
 public void UseItem(ItemDataEx data, int count)
 {
     this.mCurData = data;
     this.mCurCount = count;
     switch (data.Info.Type)
     {
     case 2:
         switch (data.Info.SubType)
         {
         case 0:
         case 1:
         case 3:
         case 4:
         case 5:
         case 6:
         case 9:
         {
             MC2S_UseItem mC2S_UseItem = new MC2S_UseItem();
             mC2S_UseItem.ItemID = data.GetID();
             mC2S_UseItem.Count = count;
             Globals.Instance.CliSession.Send(516, mC2S_UseItem);
             break;
         }
         case 2:
         {
             MC2S_OpenItem mC2S_OpenItem = new MC2S_OpenItem();
             mC2S_OpenItem.ItemID = data.GetID();
             mC2S_OpenItem.Count = count;
             Globals.Instance.CliSession.Send(508, mC2S_OpenItem);
             break;
         }
         case 7:
         {
             MC2S_OpenSelectBox mC2S_OpenSelectBox = new MC2S_OpenSelectBox();
             mC2S_OpenSelectBox.ItemID = data.GetID();
             mC2S_OpenSelectBox.Index = count;
             Globals.Instance.CliSession.Send(540, mC2S_OpenSelectBox);
             break;
         }
         case 8:
         {
             MC2S_OpenRewardBox mC2S_OpenRewardBox = new MC2S_OpenRewardBox();
             mC2S_OpenRewardBox.ItemID = data.GetID();
             mC2S_OpenRewardBox.Count = count;
             Globals.Instance.CliSession.Send(544, mC2S_OpenRewardBox);
             break;
         }
         }
         break;
     case 5:
     {
         MC2S_AwakeItemBreakUp mC2S_AwakeItemBreakUp = new MC2S_AwakeItemBreakUp();
         mC2S_AwakeItemBreakUp.ID = data.GetID();
         mC2S_AwakeItemBreakUp.Count = count;
         Globals.Instance.CliSession.Send(538, mC2S_AwakeItemBreakUp);
         break;
     }
     }
 }