blob: 21f117a21faf9a3f060837c342499ed6d75c3ca6 (
plain) (
blame)
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
|
// Copyright (c) Copyright (c) Hercules Dev Team, licensed under GNU GPL.
// Copyright (c) 2014 - 2015 Evol developers
#include "common/hercules.h"
#include "common/nullpo.h"
#include "char/int_party.h"
#include "char/char.h"
#include "char/inter.h"
#include "char/mapif.h"
#include "common/mmo.h"
#include "common/sql.h"
#include "plugins/HPMHooking.h"
HPExport struct HPMHooking_interface HPMHooking_s;
#include "common/HPMDataCheck.h" /* should always be the last file included! (if you don't make it last, it'll intentionally break compile time) */
int einter_party_check_lv(struct party_data **p)
{
hookStop();
nullpo_ret(p);
// Force EXP sharing to be active
if ((*p)->party.exp == 0) {
(*p)->party.exp = 1;
mapif->party_optionchanged(0, &(*p)->party, 0, 0);
inter_party->tosql(&(*p)->party, PS_BASIC, 0);
}
return 1;
}
//Party setting change request
// Overrides exp to always be true
bool einter_party_change_option_pre(int *party_id __attribute__ ((unused)),
int *account_id __attribute__ ((unused)),
int *exp,
int *item __attribute__ ((unused)),
int *map_fd __attribute__ ((unused)))
{
if (!exp)
(*exp) = 1;
return true;
}
|