Advertisement
Guest User

Untitled

a guest
Jun 24th, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 5.08 KB | None | 0 0
  1. void __thiscall MMatchServer__OnRequestSpawn(MMatchServer *this, MUID *uidChar, MVector3 *pos, MVector3 *dir)
  2. {
  3.   MMatchObject *v4; // eax@1
  4.   MMatchObject *v5; // edi@1
  5.   MMatchServer *v6; // esi@1
  6.   MMatchUserGradeID v7; // eax@2
  7.   std::_Tree_nod<std::_Tmap_traits<MUID,MMatchStage *,std::less<MUID>,std::allocator<std::pair<MUID const ,MMatchStage *> >,0> >::_Node *v8; // eax@6
  8.   unsigned int v9; // ebx@6
  9.   unsigned int v10; // ebp@6
  10.   unsigned int v11; // esi@6
  11.   int v12; // esi@6
  12.   unsigned int v13; // ecx@7
  13.   MUID *v14; // eax@10
  14.   unsigned int v15; // eax@12
  15.   int v16; // esi@13
  16.   unsigned int v17; // eax@15
  17.   int v18; // esi@16
  18.   void *v19; // eax@21
  19.   MCommand *v20; // esi@21
  20.   MCommandParameter *v21; // eax@22
  21.   void *v22; // eax@24
  22.   signed int v23; // ebp@24
  23.   MCommandParameter *v24; // eax@25
  24.   void *v25; // ebx@27
  25.   MCommandParameter *v26; // eax@28
  26.   unsigned int v27; // eax@30
  27.   MMatchServer *v28; // [sp+8h] [bp-20h]@1
  28.   MUID uidStage; // [sp+Ch] [bp-1Ch]@6
  29.   MUID _Keyval; // [sp+14h] [bp-14h]@6
  30.   int v31; // [sp+24h] [bp-4h]@21
  31.  
  32.   v6 = this;
  33.   v28 = this;
  34.   v4 = MMatchServer__GetObjectA(this, uidChar);
  35.   v5 = v4;
  36.   if ( v4 )
  37.   {
  38.     v7 = v4->m_AccountInfo.m_nUGrade;
  39.     if ( v7 != 252 && v7 != 255 && v7 != 254 || !(v5->m_nPlayerFlags & 1) )
  40.     {
  41.       v9 = v5->m_uidStage.High;
  42.       v10 = v5->m_uidStage.Low;
  43.       v12 = (int)&v6->m_StageMap.baseclass_4;
  44.       _Keyval.High = v5->m_uidStage.High;
  45.       _Keyval.Low = v10;
  46.       v8 = std___Tree_std___Tmap_traits_MUID_MQuestPlayerLogInfo___std__less_MUID__std__allocator_std__pair_MUID_const_MQuestPlayerLogInfo_____0_____Lbound(
  47.              (std::_Tree<std::_Tmap_traits<MUID,MMatchStage *,std::less<MUID>,std::allocator<std::pair<MUID const ,MMatchStage *> >,0> > *)v12,
  48.              &_Keyval);
  49.       v11 = *(_DWORD *)(v12 + 4);
  50.       uidStage.High = (unsigned int)v8;
  51.       if ( v8 == (std::_Tree_nod<std::_Tmap_traits<MUID,MMatchStage *,std::less<MUID>,std::allocator<std::pair<MUID const ,MMatchStage *> >,0> >::_Node *)v11
  52.         || (v13 = v8->_Myval.first.High, v9 < v13)
  53.         || v9 == v13 && v10 < v8->_Myval.first.Low )
  54.       {
  55.         _Keyval.High = v11;
  56.         v14 = &_Keyval;
  57.       }
  58.       else
  59.       {
  60.         v14 = &uidStage;
  61.       }
  62.       v15 = v14->High;
  63.       if ( (std::_Tree_nod<std::_Tmap_traits<MUID,MMatchStage *,std::less<MUID>,std::allocator<std::pair<MUID const ,MMatchStage *> >,0> >::_Node *)v15 != v28->m_StageMap.baseclass_4.baseclass_0._Myhead )
  64.       {
  65.         v16 = *(_DWORD *)(v15 + 20);
  66.         if ( v16 )
  67.         {
  68.           if ( !*(_DWORD *)(*(_DWORD *)(v16 + 472) + 12)
  69.             || (v17 = MMatchServer__GetTickTime(v28), MMatchObject__IsEnabledRespawnDeathTime(v5, v17)) )
  70.           {
  71.             v18 = *(_DWORD *)(v16 + 472);
  72.             if ( (*(int (__thiscall **)(int))(*(_DWORD *)v18 + 80))(v18) == 10
  73.               && (uidChar->Low != *(_DWORD *)(v18 + 152) || uidChar->High != *(_DWORD *)(v18 + 148))
  74.               && operator__(uidChar, (MUID *)(v18 + 156)) )
  75.             {
  76.               MMatchServer__OnDuelSetObserver(v28, uidChar);
  77.             }
  78.             else
  79.             {
  80.               v5->m_bAlive = 1;
  81.               _Keyval.High = 0;
  82.               _Keyval.Low = 0;
  83.               v20 = MCommandCommunicator__CreateCommand(&v28->baseclass_0.baseclass_0, 1516, &_Keyval);
  84.               v19 = CMemPool_MCommandParameterUID___operator new(0x14u);
  85.               v31 = 0;
  86.               if ( v19 )
  87.                 MCommandParameterUID__MCommandParameterUID((MCommandParameterUID *)v19, uidChar);
  88.               else
  89.                 v21 = 0;
  90.               v23 = -1;
  91.               v31 = -1;
  92.               MCommand__AddParameter(v20, v21);
  93.               v22 = CMemPool_MCommandParameterShortVector___operator new(0x14u);
  94.               v31 = 1;
  95.               if ( v22 )
  96.                 MCommandParameterShortVector__MCommandParameterShortVector(
  97.                   (MCommandParameterShortVector *)v22,
  98.                   pos->___u0._s0.x,
  99.                   pos->___u0._s0.y,
  100.                   pos->___u0._s0.z);
  101.               else
  102.                 v24 = 0;
  103.               v31 = -1;
  104.               MCommand__AddParameter(v20, v24);
  105.               v25 = CMemPool_MCommandParameterShortVector___operator new(0x14u);
  106.               v31 = 2;
  107.               if ( v25 )
  108.               {
  109.                 MCommandParameterShortVector__MCommandParameterShortVector(
  110.                   (MCommandParameterShortVector *)v25,
  111.                   (unsigned __int64)(dir->___u0._s0.x * 32000.0),
  112.                   (unsigned __int64)(dir->___u0._s0.y * 32000.0),
  113.                   (unsigned __int64)(dir->___u0._s0.z * 32000.0));
  114.                 v23 = -1;
  115.               }
  116.               else
  117.               {
  118.                 v26 = 0;
  119.               }
  120.               v31 = v23;
  121.               MCommand__AddParameter(v20, v26);
  122.               v27 = v5->m_uidStage.Low;
  123.               uidStage.High = v5->m_uidStage.High;
  124.               uidStage.Low = v27;
  125.               MMatchServer__RouteToBattle(v28, &uidStage, v20);
  126.             }
  127.           }
  128.         }
  129.       }
  130.     }
  131.   }
  132. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement