Переглянути джерело

- Fixed a bug that was making the no_spawn_on_player setting useless.
- Added Deadly Poison and Bleeding to status_get_sc_def, meaning that now vit does increases defense against being inflicted from it.
- Fixed a crash and an infinite loop in @whodrops @.@
- Expanded the item_db column sizes for the names to 50.


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

skotlex 19 роки тому
батько
коміт
d29bdd1949
6 змінених файлів з 17 додано та 10 видалено
  1. 5 0
      Changelog-Trunk.txt
  2. 2 2
      sql-files/item_db.sql
  3. 4 4
      src/map/atcommand.c
  4. 2 1
      src/map/mob.c
  5. 1 1
      src/map/pc.c
  6. 3 2
      src/map/status.c

+ 5 - 0
Changelog-Trunk.txt

@@ -5,6 +5,11 @@ IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.  EV
 GOES INTO TRUNK AND WILL BE MERGED INTO STABLE BY VALARIS AND WIZPUTER. -- VALARIS
 
 2006/03/08
+	* Fixed a bug that was making the no_spawn_on_player setting useless.
+	  [Skotlex]
+	* Added Deadly Poison and Bleeding to status_get_sc_def, meaning that now
+	  vit does increases defense against being inflicted from it. [Skotlex]
+	* Fixed and tested @whodrops [Skotlex]
 	* Updates to Gunslinger skills' DB entries. [blackhole89]
 	* Rewrote pc_jobchange to be sane by using the map internal codes instead
 	  of a mesh of complicated nested comparisons. [Skotlex]

+ 2 - 2
sql-files/item_db.sql

@@ -5,8 +5,8 @@
 DROP TABLE IF EXISTS `item_db`;
 CREATE TABLE `item_db` (
   `id` smallint(5) unsigned NOT NULL default '0',
-  `name_english` varchar(30) NOT NULL default '',
-  `name_japanese` varchar(30) NOT NULL default '',
+  `name_english` varchar(50) NOT NULL default '',
+  `name_japanese` varchar(50) NOT NULL default '',
   `type` tinyint(2) unsigned NOT NULL default '0',
   `price_buy` mediumint(10) unsigned default NULL,
   `price_sell` mediumint(10) unsigned default NULL,

+ 4 - 4
src/map/atcommand.c

@@ -9423,7 +9423,7 @@ int atcommand_whodrops(
 	const char* command, const char* message)
 {
 	struct item_data *item_data, *item_array[MAX_SEARCH];
-	int i, count = 1;
+	int i,j, count = 1;
 
 	if (!message || !*message) {
 		clif_displaymessage(fd, "Please, enter Item name or its ID (usage: @whodrops <item_name_or_ID>).");
@@ -9442,7 +9442,7 @@ int atcommand_whodrops(
 		clif_displaymessage(fd, atcmd_output);
 		count = MAX_SEARCH;
 	}
-	for (i = 0; i < MAX_SEARCH; i++) {
+	for (i = 0; i < count; i++) {
 		item_data = item_array[i];
 		sprintf(atcmd_output, "Item: '%s'[%d]",
 			item_data->jname,item_data->slot);
@@ -9455,9 +9455,9 @@ int atcommand_whodrops(
 			sprintf(atcmd_output, "- Common mobs with highest drop chance (only max %d are listed):", MAX_SEARCH);
 			clif_displaymessage(fd, atcmd_output);
 		
-			for (i=0; i < MAX_SEARCH && item_data->mob[i].chance > 0; i++)
+			for (j=0; j < MAX_SEARCH && item_data->mob[j].chance > 0; j++)
 			{
-				sprintf(atcmd_output, "- %s (%02.02f%%)", mob_db(item_data->mob[i].id)->jname, item_data->mob[i].chance/100.);
+				sprintf(atcmd_output, "- %s (%02.02f%%)", mob_db(item_data->mob[j].id)->jname, item_data->mob[j].chance/100.);
 				clif_displaymessage(fd, atcmd_output);
 			}
 		}

+ 2 - 1
src/map/mob.c

@@ -1079,7 +1079,8 @@ int mob_spawn (int id)
 		//Avoid spawning on the view-range of players. [Skotlex]
 		if (battle_config.no_spawn_on_player &&
 			c++ < battle_config.no_spawn_on_player &&
-			map_foreachinrange(mob_count_sub, &md->bl, AREA_SIZE, BL_PC)
+			map_foreachinarea(mob_count_sub, md->m,
+				x-AREA_SIZE, y-AREA_SIZE, x+AREA_SIZE, y+AREA_SIZE, BL_PC)
 		)
 			continue;
 		//Found a spot.

+ 1 - 1
src/map/pc.c

@@ -995,7 +995,7 @@ int pc_calc_skilltree(struct map_session_data *sd)
 			sd->status.skill[i].id=0; //First clear skills.
 	}
 	for(i=0;i<MAX_SKILL;i++){ 
-		if (sd->status.skill[i].flag && sd->status.skill[i].flag != 13){	
+		if (sd->status.skill[i].flag && sd->status.skill[i].flag != 13){ //Restore original level of skills after deleting earned skills.	
 			sd->status.skill[i].lv=(sd->status.skill[i].flag==1)?0:sd->status.skill[i].flag-2;
 			sd->status.skill[i].flag=0;
 		}

+ 3 - 2
src/map/status.c

@@ -1596,9 +1596,8 @@ int status_calc_pc(struct map_session_data* sd,int first)
 			clif_changelook(&sd->bl,LOOK_CLOTHES_COLOR,sd->status.clothes_color);
 	}
 
-	if( memcmp(b_skill,sd->status.skill,sizeof(sd->status.skill)) || b_attackrange != sd->attackrange)
+	if(memcmp(b_skill,sd->status.skill,sizeof(sd->status.skill)))
 		clif_skillinfoblock(sd);
-
 	if(b_speed != sd->speed)
 		clif_updatestatus(sd,SP_SPEED);
 	if(b_weight != sd->weight)
@@ -3317,7 +3316,9 @@ int status_get_sc_def(struct block_list *bl, int type)
 //		break;
 	case SC_STUN:
 	case SC_POISON:
+	case SC_DPOISON:
 	case SC_SILENCE:
+	case SC_BLEEDING:
 	case SC_STOP:
 		sc_def = 300 +100*status_get_vit(bl) +33*status_get_luk(bl);
 		break;