Selaa lähdekoodia

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

celest 20 vuotta sitten
vanhempi
commit
39521cb4a5
7 muutettua tiedostoa jossa 26 lisäystä ja 10 poistoa
  1. 4 0
      Changelog.txt
  2. 6 0
      conf-tmpl/mapflag/gvg.txt
  3. 0 4
      db/item_avail.txt
  4. 2 0
      npc/Changelog.txt
  5. 4 2
      src/char/int_guild.c
  6. 4 2
      src/char_sql/int_guild.c
  7. 6 2
      src/map/script.c

+ 4 - 0
Changelog.txt

@@ -1,5 +1,9 @@
 Date	Added
 12/29
+        * Changed int_guild.c so it will calculate average guild level only if > 0
+          members are found - prevent divide by zero crashes (why would an empty guild
+          be requested to update its' member info in the first place?) [celest]
+        * Added Shinomori's fixes for string copying in script.c [celest]
 	* Removed @giveitem since #item it's the one that does this and added some of it's support to #item [MC Cameri]
 	  -#item <item_name> <item_count> <charname|all|everyone>
 	* Uncommented out import in charcommand_athena.conf, there is

+ 6 - 0
conf-tmpl/mapflag/gvg.txt

@@ -38,3 +38,9 @@ prtg_cas02.gat	mapflag	gvg
 prtg_cas03.gat	mapflag	gvg
 prtg_cas04.gat	mapflag	gvg
 prtg_cas05.gat	mapflag	gvg
+
+// Guild Dungeons ==========
+gld_dun01.gat	mapflag	gvg
+gld_dun02.gat	mapflag	gvg
+gld_dun03.gat	mapflag	gvg
+gld_dun04.gat	mapflag	gvg

+ 0 - 4
db/item_avail.txt

@@ -1,9 +1,5 @@
 // item id,sprite id
 // Client will use sprite ID to display particular item.
 // If 0 is used then item will be disabled.
-660,5028	//Forbidden_Red_Candle,Candle (Will use candle sprite and description)
-661,7047	//Flapping_Apron,Alice's_Apron
-9026,720	//Alice_Egg,Aquamarine
-9027,723	//Zherlthsh_Egg,Ruby
 2237,2241	//Bandit_Beard",2240 BEARD
 2240,2241

+ 2 - 0
npc/Changelog.txt

@@ -35,6 +35,8 @@ Other Ppl
 Date		Added
 ======
 12/29
+        * Added gvg mapflags to the guild dungeons, and removed 4 items from 
+          item_avail.txt, thanks Poki [celest]
 	* Translated npc/sample/npc_extend_shop.txt [MC Cameri]
 	* Translated npc/sample/bank_test.txt [MC Cameri]
         * Fixed respawn delay of Toad and Golden Thief Bug (it was the actual_delay/2). Mob placement files should be revised again [Lupus]

+ 4 - 2
src/char/int_guild.c

@@ -1111,8 +1111,10 @@ int mapif_parse_GuildChangeMemberInfoShort(int fd, int guild_id, int account_id,
 		if (g->member[i].online)
 			g->connect_member++;
 	}
-	// •½‹ÏƒŒƒxƒ‹
-	g->average_lv = alv / c;
+	
+	if (c)
+		// •½‹ÏƒŒƒxƒ‹
+		g->average_lv = alv / c;
 
 	return 0;
 }

+ 4 - 2
src/char_sql/int_guild.c

@@ -1294,8 +1294,10 @@ int mapif_parse_GuildChangeMemberInfoShort(int fd,int guild_id,
 		if( g->member[i].online )
 			g->connect_member++;
 	}
-	// •½‹ÏƒŒƒxƒ‹
-	g->average_lv=alv/c;
+
+	if (c)
+		// •½‹ÏƒŒƒxƒ‹
+		g->average_lv=alv/c;
 
 	sprintf(tmp_sql, "UPDATE `%s` SET `connect_member`=%d,`average_lv`=%d WHERE `guild_id`='%d'", guild_db,  g->connect_member, g->average_lv,  g->guild_id);
 	if(mysql_query(&mysql_handle, tmp_sql) ) 

+ 6 - 2
src/map/script.c

@@ -5466,14 +5466,18 @@ int buildin_strmobinfo(struct script_state *st)
 	if(num==1) {
 		char *buf;
 		buf=aCalloc(24, 1);
-		buf=mob_db[class].name;
+//		buf=mob_db[class].name;
+// for string assignments you would need to go for c++ [Shinomori]
+		strcpy(buf,mob_db[class].name);
 		push_str(st->stack,C_STR,buf);
 		return 0;
 	}
 	else if(num==2)	{
 		char *buf;
 		buf=aCalloc(24, 1);
-		buf=mob_db[class].jname;
+//		buf=mob_db[class].jname;
+// for string assignments you would need to go for c++ [Shinomori]
+		strcpy(buf,mob_db[class].jname);
 		push_str(st->stack,C_STR,buf);
 		return 0;
 	}