-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathd2_112a.c
More file actions
62 lines (50 loc) · 1.32 KB
/
Copy pathd2_112a.c
File metadata and controls
62 lines (50 loc) · 1.32 KB
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#include "common.h"
#include <patch.h>
#include "d2.h"
#include "mercmod.h"
extern void merc_inventory_modify_112a();
extern void merc_store_location_112a();
extern void merc_loc_check_item_game_112a();
extern void merc_check_item_compat_112a();
extern void merc_check_item_class_112a();
extern void merc_check_item_game_112a();
extern void merc_check_item_game_drop_112a();
extern void merc_check_item_client_112a();
extern void merc_check_item_client_drop_112a();
void *original_merc_check_item_compat_112a;
extern void merc_inventory_mpq_load_112a();
#define HEADER <d2_112a_client.h>
#define NAME d2client_112a
#include "declPatch.h"
#define HEADER <d2_112a_game.h>
#define NAME d2game_112a
#include "declPatch.h"
#define HEADER <d2_112a_common.h>
#define NAME d2common_112a
#include "declPatch.h"
#define HEADER <d2_112a_win.h>
#define NAME d2win_112a
#include "declPatch.h"
int patch_112a(void)
{
if (patch_d2client_112a()) goto err_client;
if (patch_d2game_112a()) goto err_game;
if (patch_d2common_112a()) goto err_common;
if (patch_d2win_112a()) goto err_win;
return 0;
err_win:
unpatch_d2common_112a();
err_common:
unpatch_d2game_112a();
err_game:
unpatch_d2client_112a();
err_client:
return -1;
}
void unpatch_112a(void)
{
unpatch_d2win_112a();
unpatch_d2common_112a();
unpatch_d2game_112a();
unpatch_d2client_112a();
}