if (spellInfo->Attributes & 0xC000) { if (isOutside(player)) { if (spellInfo->Attributes & 0x4000) SpellError(SPELL_FAILED_ONLY_INDOORS); } else { if (spellInfo->Attributes & 0x8000) { for (int i = 0; i < 3; ++i) { if (spellInfo->Effect[i] == 6 && spellInfo->EffectApplyAuraName[i] == 78) break; } if (i==3) SpellError(SPELL_FAILED_ONLY_OUTDOORS); else SpellError(SPELL_FAILED_NO_MOUNTS_ALLOWED); } } } char __fastcall isOutside(int player) { return sub_66FF70(*(_DWORD *)(player + 244)); } char __cdecl sub_66FF70(int a1) { int v1; // ecx@1 char result; // al@2 char v3; // [sp+0h] [bp-Ch]@4 char v4; // [sp+4h] [bp-8h]@4 char v5; // [sp+8h] [bp-4h]@4 v1 = a1; if ( a1 && *(_BYTE *)(a1 + 144) & 1 ) { a1 = 0; if ( sub_6903D0(v1, (int)&v3, (int)&v4, (int)&v5, (int)&a1) ) result = (*(_DWORD *)(a1 + 0x2C) >> 15) & 1; else result = 0; } else { result = 1; } return result; } signed int __thiscall sub_6903D0(int this, int a2, int a3, int a4, int a5) { int v5; // eax@1 int v6; // ebx@3 int v7; // edi@5 int v8; // esi@5 int v9; // eax@8 int v10; // eax@9 int v12; // eax@12 int v13; // edx@12 int v14; // eax@12 int v15; // eax@12 int v16; // [sp+Ch] [bp-4h]@1 v5 = *(_DWORD *)(this + 32); v16 = this; if ( !(v5 & 1) && v5 ) v6 = v5; else v6 = 0; v7 = a5; v8 = a4; while ( !(v6 & 1) && v6 ) { v9 = *(_DWORD *)(v6 + 8); if ( *(_BYTE *)(v9 + 8) & 0x10 ) { *(_DWORD *)v8 = v9; v10 = *(_DWORD *)(v9 + 32); if ( v10 & 1 || !v10 ) v10 = 0; v12 = *(_DWORD *)(v10 + 8); v13 = a3; *(_DWORD *)a2 = v12; v14 = *(_DWORD *)(v12 + 280); *(_DWORD *)v13 = v14; v15 = sub_69D240(v14, *(_DWORD *)(*(_DWORD *)v8 + 124), 0); *(_DWORD *)v7 = v15; if ( v15 ) return 1; this = v16; } v6 = *(_DWORD *)(v6 + *(_DWORD *)(this + 24) + 4); } return 0; }