Advertisement
Guest User

Untitled

a guest
Jun 28th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 4.00 KB | None | 0 0
  1. void __thiscall MMatchServer__ResponseEquipItem(MMatchServer *this, MUID *uidPlayer, MUID *uidItem, MMatchCharItemParts parts)
  2. {
  3.   MMatchObject *v4; // eax@1
  4.   MObject *v5; // ebp@1
  5.   MMatchServer *v6; // edi@1
  6.   MMatchCharInfo *v7; // ebx@2
  7.   MMatchItem *v8; // eax@3
  8.   MMatchItem *v9; // esi@3
  9.   unsigned int v10; // edx@3
  10.   MMatchCharItemParts v11; // ebp@4
  11.   void *v12; // eax@6
  12.   MCommand *v13; // esi@6
  13.   MCommandParameter *v14; // eax@7
  14.   const unsigned int v15; // ST0C_4@8
  15.   unsigned int v16; // ST08_4@8
  16.   int v17; // ebp@11
  17.   void *v18; // eax@13
  18.   void *v19; // eax@18
  19.   MCommand *v20; // esi@18
  20.   MCommandParameter *v21; // eax@19
  21.   MObject *v22; // [sp-10h] [bp-40h]@16
  22.   MCommand *v23; // [sp-Ch] [bp-3Ch]@16
  23.   MMatchObject *v24; // [sp+8h] [bp-28h]@1
  24.   unsigned int uidRealItem; // [sp+Ch] [bp-24h]@3
  25.   unsigned int v26; // [sp+10h] [bp-20h]@3
  26.   MUID TargetUID; // [sp+14h] [bp-1Ch]@6
  27.   int v28; // [sp+1Ch] [bp-14h]@13
  28.   int v29; // [sp+20h] [bp-10h]@13
  29.   int v30; // [sp+2Ch] [bp-4h]@6
  30.  
  31.   v6 = this;
  32.   v4 = MMatchServer__GetObjectA(this, uidPlayer);
  33.   v5 = (MObject *)v4;
  34.   v24 = v4;
  35.   if ( v4 )
  36.   {
  37.     v7 = v4->m_pCharInfo;
  38.     if ( v7 )
  39.     {
  40.       v10 = uidItem->Low;
  41.       uidRealItem = uidItem->High;
  42.       v26 = v10;
  43.       v8 = MMatchItemMap__GetItem(&v7->m_ItemList, (MUID *)&uidRealItem);
  44.       v9 = v8;
  45.       if ( v8 )
  46.       {
  47.         v11 = parts;
  48.         if ( IsSuitableItemSlot(v8->m_pDesc->m_nSlot, parts) )
  49.         {
  50.           uidItem = (MUID *)MMatchServer__ValidateEquipItem(v6, v24, v9, v11);
  51.           if ( uidItem )
  52.           {
  53.             TargetUID.High = 0;
  54.             TargetUID.Low = 0;
  55.             v13 = MCommandCommunicator__CreateCommand(&v6->baseclass_0.baseclass_0, 1824, &TargetUID);
  56.             v12 = CMemPool_MCommandParameterInt___operator new(0x10u);
  57.             parts = (MMatchCharItemParts)v12;
  58.             v30 = 1;
  59.             if ( v12 )
  60.             {
  61.               MCommandParameterInt__MCommandParameterInt((MCommandParameterInt *)v12, (int)uidItem);
  62. LABEL_16:
  63.               v30 = -1;
  64.               MCommand__AddParameter(v13, v14);
  65.               v23 = v13;
  66.               v22 = (MObject *)v24;
  67. LABEL_22:
  68.               MMatchServer__RouteToListener(v6, v22, v23);
  69.               return;
  70.             }
  71.           }
  72.           else
  73.           {
  74.             v15 = v9->m_pDesc->m_nID;
  75.             v16 = v9->m_nCIID;
  76.             LOBYTE(uidPlayer) = 0;
  77.             if ( !MMatchDBMgr__UpdateEquipedItem(&v6->m_MatchDBMgr, v7->m_nCID, v11, v16, v15, (bool *)&uidPlayer) )
  78.             {
  79.               MLog("DB Query(ResponseEquipItem > UpdateEquipedItem) Failed\n");
  80.               uidItem = (MUID *)20003;
  81.             }
  82.             if ( (_BYTE)uidPlayer == 1 )
  83.             {
  84.               MMatchEquipedItem__SetItem(&v7->m_EquipedItem, v11, v9);
  85.               v17 = (int)uidItem;
  86.             }
  87.             else
  88.             {
  89.               v17 = 20003;
  90.             }
  91.             v28 = 0;
  92.             v29 = 0;
  93.             v13 = MCommandCommunicator__CreateCommand(&v6->baseclass_0.baseclass_0, 1824, (MUID *)&v28);
  94.             v18 = CMemPool_MCommandParameterInt___operator new(0x10u);
  95.             uidItem = (MUID *)v18;
  96.             v30 = 2;
  97.             if ( v18 )
  98.             {
  99.               MCommandParameterInt__MCommandParameterInt((MCommandParameterInt *)v14, v17);
  100.               goto LABEL_16;
  101.             }
  102.           }
  103.           v14 = 0;
  104.           goto LABEL_16;
  105.         }
  106.         v5 = (MObject *)v24;
  107.       }
  108.       TargetUID.High = 0;
  109.       TargetUID.Low = 0;
  110.       v20 = MCommandCommunicator__CreateCommand(&v6->baseclass_0.baseclass_0, 1824, &TargetUID);
  111.       v19 = CMemPool_MCommandParameterInt___operator new(0x10u);
  112.       uidItem = (MUID *)v19;
  113.       v30 = 0;
  114.       if ( v19 )
  115.         MCommandParameterInt__MCommandParameterInt((MCommandParameterInt *)v19, 20003);
  116.       else
  117.         v21 = 0;
  118.       v30 = -1;
  119.       MCommand__AddParameter(v20, v21);
  120.       v23 = v20;
  121.       v22 = v5;
  122.       goto LABEL_22;
  123.     }
  124.   }
  125. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement