summaryrefslogtreecommitdiff
path: root/src/emap/homunculus.c
blob: c51a24cd07666ab4596397fe16b92d3b653826e5 (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
// Copyright (c) Copyright (c) Hercules Dev Team, licensed under GNU GPL.
// Copyright (c) 2014 - 2015 Evol developers

#include "common/hercules.h"
#include "map/homunculus.h"

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include "common/HPMi.h"
#include "common/nullpo.h"

#include "emap/send.h"

int ehomunculus_gainexp_pre(struct homun_data **hdPtr,
                            unsigned int *expPtr)
{
    struct homun_data *hd = *hdPtr;
    nullpo_ret(hd);
    const int exp = *expPtr;

    if (hd->homunculus.vaporize == HOM_ST_ACTIVE)
        send_homun_exp(hd, exp);
    return 0;
}