Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void __thiscall MMatchServer__ResponseEquipItem(MMatchServer *this, MUID *uidPlayer, MUID *uidItem, MMatchCharItemParts parts)
- {
- MMatchObject *v4; // eax@1
- MObject *v5; // ebp@1
- MMatchServer *v6; // edi@1
- MMatchCharInfo *v7; // ebx@2
- MMatchItem *v8; // eax@3
- MMatchItem *v9; // esi@3
- unsigned int v10; // edx@3
- MMatchCharItemParts v11; // ebp@4
- void *v12; // eax@6
- MCommand *v13; // esi@6
- MCommandParameter *v14; // eax@7
- const unsigned int v15; // ST0C_4@8
- unsigned int v16; // ST08_4@8
- int v17; // ebp@11
- void *v18; // eax@13
- void *v19; // eax@18
- MCommand *v20; // esi@18
- MCommandParameter *v21; // eax@19
- MObject *v22; // [sp-10h] [bp-40h]@16
- MCommand *v23; // [sp-Ch] [bp-3Ch]@16
- MMatchObject *v24; // [sp+8h] [bp-28h]@1
- unsigned int uidRealItem; // [sp+Ch] [bp-24h]@3
- unsigned int v26; // [sp+10h] [bp-20h]@3
- MUID TargetUID; // [sp+14h] [bp-1Ch]@6
- int v28; // [sp+1Ch] [bp-14h]@13
- int v29; // [sp+20h] [bp-10h]@13
- int v30; // [sp+2Ch] [bp-4h]@6
- v6 = this;
- v4 = MMatchServer__GetObjectA(this, uidPlayer);
- v5 = (MObject *)v4;
- v24 = v4;
- if ( v4 )
- {
- v7 = v4->m_pCharInfo;
- if ( v7 )
- {
- v10 = uidItem->Low;
- uidRealItem = uidItem->High;
- v26 = v10;
- v8 = MMatchItemMap__GetItem(&v7->m_ItemList, (MUID *)&uidRealItem);
- v9 = v8;
- if ( v8 )
- {
- v11 = parts;
- if ( IsSuitableItemSlot(v8->m_pDesc->m_nSlot, parts) )
- {
- uidItem = (MUID *)MMatchServer__ValidateEquipItem(v6, v24, v9, v11);
- if ( uidItem )
- {
- TargetUID.High = 0;
- TargetUID.Low = 0;
- v13 = MCommandCommunicator__CreateCommand(&v6->baseclass_0.baseclass_0, 1824, &TargetUID);
- v12 = CMemPool_MCommandParameterInt___operator new(0x10u);
- parts = (MMatchCharItemParts)v12;
- v30 = 1;
- if ( v12 )
- {
- MCommandParameterInt__MCommandParameterInt((MCommandParameterInt *)v12, (int)uidItem);
- LABEL_16:
- v30 = -1;
- MCommand__AddParameter(v13, v14);
- v23 = v13;
- v22 = (MObject *)v24;
- LABEL_22:
- MMatchServer__RouteToListener(v6, v22, v23);
- return;
- }
- }
- else
- {
- v15 = v9->m_pDesc->m_nID;
- v16 = v9->m_nCIID;
- LOBYTE(uidPlayer) = 0;
- if ( !MMatchDBMgr__UpdateEquipedItem(&v6->m_MatchDBMgr, v7->m_nCID, v11, v16, v15, (bool *)&uidPlayer) )
- {
- MLog("DB Query(ResponseEquipItem > UpdateEquipedItem) Failed\n");
- uidItem = (MUID *)20003;
- }
- if ( (_BYTE)uidPlayer == 1 )
- {
- MMatchEquipedItem__SetItem(&v7->m_EquipedItem, v11, v9);
- v17 = (int)uidItem;
- }
- else
- {
- v17 = 20003;
- }
- v28 = 0;
- v29 = 0;
- v13 = MCommandCommunicator__CreateCommand(&v6->baseclass_0.baseclass_0, 1824, (MUID *)&v28);
- v18 = CMemPool_MCommandParameterInt___operator new(0x10u);
- uidItem = (MUID *)v18;
- v30 = 2;
- if ( v18 )
- {
- MCommandParameterInt__MCommandParameterInt((MCommandParameterInt *)v14, v17);
- goto LABEL_16;
- }
- }
- v14 = 0;
- goto LABEL_16;
- }
- v5 = (MObject *)v24;
- }
- TargetUID.High = 0;
- TargetUID.Low = 0;
- v20 = MCommandCommunicator__CreateCommand(&v6->baseclass_0.baseclass_0, 1824, &TargetUID);
- v19 = CMemPool_MCommandParameterInt___operator new(0x10u);
- uidItem = (MUID *)v19;
- v30 = 0;
- if ( v19 )
- MCommandParameterInt__MCommandParameterInt((MCommandParameterInt *)v19, 20003);
- else
- v21 = 0;
- v30 = -1;
- MCommand__AddParameter(v20, v21);
- v23 = v20;
- v22 = v5;
- goto LABEL_22;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement