Skip to content

Instantly share code, notes, and snippets.

@rsa
Created May 20, 2012 06:54
Show Gist options
  • Save rsa/2757063 to your computer and use it in GitHub Desktop.
Save rsa/2757063 to your computer and use it in GitHub Desktop.
void *__cdecl sub_58C5A0(WGUID objectGuid, int a2, int a3, int a4, int a5, int a6, int a7)
{
void *result; // eax@1
void *v8; // esi@1
int v9; // edi@3
char *v10; // [sp-10h] [bp-BD4h]@8
char *v11; // [sp-Ch] [bp-BD0h]@8
signed int v12; // [sp-8h] [bp-BCCh]@8
char v13; // [sp+4h] [bp-BC0h]@5
WGUID v14; // [sp+BBCh] [bp-8h]@5
result = ClntObjMgrGetObjectPtr(objectGuid, TYPEMASK_OBJECT);
v8 = result;
if ( result && *(*(result + 2) + 8) & 0x2A )
{
v9 = a4;
if ( !a4 )
sub_58B720();
v14 = ClntObjMgrGetActivePlayer();
sub_579590(a5, &v13, 3000, &v14, 0, 0);
if ( !v13 )
SStrCopy(&v13, L" ", 3000);
switch ( v9 )
{
case 0:
v12 = 2048;
v11 = &v13;
v10 = &byte_C0CC48;
goto LABEL_12;
case 1:
v12 = 3000;
v11 = &v13;
v10 = &byte_C0C090;
goto LABEL_12;
case 2:
v12 = 3000;
v11 = &v13;
v10 = &byte_C0A920;
goto LABEL_12;
case 3:
v12 = 3000;
v11 = &v13;
v10 = &byte_C09D68;
LABEL_12:
SStrCopy(v10, v11, v12);
break;
default:
break;
}
dword_C0D658 = v9;
dword_C0D65C = a6;
dword_C0D668 = a7;
if ( !((*(*(v8 + 2) + 8) >> 5) & 1)
|| objectGuid.guid_low != stru_BD07A8.guid_low
|| objectGuid.guid_high != stru_BD07A8.guid_high )
CGGameUI::SetInteractTarget(&objectGuid);
curr_gossip_object_guid.guid_low = objectGuid.guid_low;
result = a3;
curr_gossip_object_guid.guid_high = objectGuid.guid_high;
curr_quest_giver_guid = a2;
dword_C0D654 = a3;
dword_C0D66C = 0;
dword_C0D6AC = 0;
}
return result;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment