Sfoglia il codice sorgente

- Ops!! this is mine (homunculus hungry messages).
- Fixed a bug on char delete.


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

zephyrus 17 anni fa
parent
commit
daf7030ce9
2 ha cambiato i file con 1 aggiunte e 8 eliminazioni
  1. 1 1
      src/char_sql/char.c
  2. 0 7
      src/map/homunculus.c

+ 1 - 1
src/char_sql/char.c

@@ -1363,7 +1363,7 @@ int delete_char_sql(int char_id)
 		mapif_homunculus_delete(hom_id);
 	/* remove mercenary */ 
 	if( mer_id )
-		mapif_mercenary_delete(hom_id);
+		mapif_mercenary_delete(mer_id);
 
 	/* delete char's friends list */
 	if( SQL_ERROR == Sql_Query(sql_handle, "DELETE FROM `%s` WHERE `char_id` = '%d'", friend_db, char_id) )

+ 0 - 7
src/map/homunculus.c

@@ -487,8 +487,6 @@ static int merc_hom_hungry(int tid, unsigned int tick, int id, intptr data)
 {
 	struct map_session_data *sd;
 	struct homun_data *hd;
-	char mes[255];
-	bool talk = true;
 
 	sd=map_id2sd(id);
 	if(!sd)
@@ -507,18 +505,13 @@ static int merc_hom_hungry(int tid, unsigned int tick, int id, intptr data)
 	hd->homunculus.hunger-- ;
 	if(hd->homunculus.hunger <= 10) {
 		clif_emotion(&hd->bl, 6) ;	//an
-		snprintf(mes, sizeof mes,"%s : Tengo mucha hambre...",hd->homunculus.name);
 	} else if(hd->homunculus.hunger == 25) {
 		clif_emotion(&hd->bl, 20) ;	//hmm
-		snprintf(mes, sizeof mes,"%s : Tengo hambre...",hd->homunculus.name);
 	} else if(hd->homunculus.hunger == 75) {
 		clif_emotion(&hd->bl, 33) ;	//ok
-		snprintf(mes, sizeof mes,"%s : Tengo un poco de hambre...",hd->homunculus.name);
 	} else
 		talk = false;
 
-	if( talk ) clif_message(&hd->bl, mes);
-
 	if(hd->homunculus.hunger < 0) {
 		hd->homunculus.hunger = 0;
 		// Delete the homunculus if intimacy <= 100