-
-
Notifications
You must be signed in to change notification settings - Fork 131
Expand file tree
/
Copy pathHooks.cpp
More file actions
26 lines (22 loc) · 589 Bytes
/
Hooks.cpp
File metadata and controls
26 lines (22 loc) · 589 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include <Ext/AITriggerType/Body.h>
#include <Helpers/Macro.h>
DEFINE_HOOK(0x41E8FF, AITriggerTypeClass_NewTeam_CheckConditions, 0x9) // ConditionMet() in YRpp
{
enum { ContinueGameChecks = 0x41E908, ReturnFromFunction = 0x41E9E1, Success = 0x41E9EA };
GET(AITriggerTypeClass*, pThis, ESI);
GET(HouseClass*, pOwner, EDI);
GET(HouseClass*, pEnemy, EBX);
int result = AITriggerTypeExt::CheckConditions(pThis, pOwner, pEnemy);
switch (result)
{
case 0:
return ReturnFromFunction;
break;
case 1:
return Success;
break;
default:
return ContinueGameChecks;
break;
}
}