diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-01-06 17:36:33 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-01-06 17:36:33 +0300 |
commit | d5199cee806fb9f18987dea0c3a20a2d381927ca (patch) | |
tree | 135f15dadc1c7964b3078fd8223771f94d1ed0e6 /src/map/homunculus.c | |
parent | 756be9835054a3b2b8ebace388546fa15ffd4a92 (diff) | |
parent | e3eac134b1607cfe78331e298aaa20b260662571 (diff) | |
download | hercules-d5199cee806fb9f18987dea0c3a20a2d381927ca.tar.gz hercules-d5199cee806fb9f18987dea0c3a20a2d381927ca.tar.bz2 hercules-d5199cee806fb9f18987dea0c3a20a2d381927ca.tar.xz hercules-d5199cee806fb9f18987dea0c3a20a2d381927ca.zip |
Merge pull request #1034 from HerculesWS/bl_cast
Changed all TBL_* to the appropriate structs
Diffstat (limited to 'src/map/homunculus.c')
-rw-r--r-- | src/map/homunculus.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/map/homunculus.c b/src/map/homunculus.c index d81eeb2da..b642c197f 100644 --- a/src/map/homunculus.c +++ b/src/map/homunculus.c @@ -580,7 +580,7 @@ void homunculus_healed (struct homun_data *hd) { void homunculus_save(struct homun_data *hd) { // copy data that must be saved in homunculus struct ( hp / sp ) - TBL_PC * sd; + struct map_session_data *sd = NULL; //Do not check for max_hp/max_sp caps as current could be higher to max due //to status changes/skills (they will be capped as needed upon stat //calculation on login) @@ -786,9 +786,10 @@ bool homunculus_create(struct map_session_data *sd, struct s_homunculus *hom) { intif->homunculus_requestdelete(hom->hom_id); return false; } - sd->hd = hd = (struct homun_data*)aCalloc(1,sizeof(struct homun_data)); + CREATE(hd, struct homun_data, 1); hd->bl.type = BL_HOM; hd->bl.id = npc->get_new_npc_id(); + sd->hd = hd; hd->master = sd; hd->homunculusDB = &homun->dbs->db[i]; |