Jelajahi Sumber

Renamed files of 'mercenary' to 'homunculus'.
Applied relevant changes that were reverted (relevant = not unneccessary whitespace changes).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13136 54d463be-8e91-2dee-dedb-b68131a5f0ec

ultramage 16 tahun lalu
induk
melakukan
cbcc989ab9
2 mengubah file dengan 8 tambahan dan 11 penghapusan
  1. 4 6
      src/map/homunculus.c
  2. 4 5
      src/map/homunculus.h

+ 4 - 6
src/map/mercenary.c → src/map/homunculus.c

@@ -30,7 +30,7 @@
 #include "trade.h"
 #include "unit.h"
 
-#include "mercenary.h"
+#include "homunculus.h"
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -625,11 +625,9 @@ int merc_hom_alloc(struct map_session_data *sd, struct s_homunculus *hom)
 	hd->bl.m = sd->bl.m;
 	hd->bl.x = sd->bl.x;
 	hd->bl.y = sd->bl.y;
-	x = sd->bl.x + 1;
-	y = sd->bl.y + 1;
-	map_random_dir(&hd->bl, &x, &y);
-	hd->bl.x = x;
-	hd->bl.y = y;
+	unit_calc_pos(&hd->bl, sd->bl.x, sd->bl.y, sd->ud.dir);
+	hd->bl.x = hd->ud.to_x;
+	hd->bl.y = hd->ud.to_y;
 	
 	map_addiddb(&hd->bl);
 	status_calc_homunculus(hd,1);

+ 4 - 5
src/map/mercenary.h → src/map/homunculus.h

@@ -1,8 +1,8 @@
 // Copyright (c) Athena Dev Teams - Licensed under GNU GPL
 // For more information, see LICENCE in the main folder
 
-#ifndef _MERCENARY_H_
-#define _MERCENARY_H_
+#ifndef _HOMUNCULUS_H_
+#define _HOMUNCULUS_H_
 
 #include "status.h" // struct status_data, struct status_change
 #include "unit.h" // struct unit_data
@@ -30,7 +30,6 @@ enum {
 	SP_HUNGRY 		= 0x200
 };
 
-
 struct homun_data {
 	struct block_list bl;
 	struct unit_data  ud;
@@ -39,7 +38,7 @@ struct homun_data {
 	struct status_change sc;
 	struct regen_data regen;
 	struct s_homunculus_db *homunculusDB;	//[orn]
-	struct s_homunculus homunculus ;	//[orn]
+	struct s_homunculus homunculus;	//[orn]
 
 	struct map_session_data *master; //pointer back to its master
 	int hungry_timer;	//[orn]
@@ -87,4 +86,4 @@ void merc_hom_init_timers(struct homun_data * hd);
 void merc_skill_reload(void);
 void merc_reload(void);
 
-#endif /* _MERCENARY_H_ */
+#endif /* _HOMUNCULUS_H_ */