summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-03-09 04:05:48 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-03-09 04:05:48 +0000
commit73662d19496bdc70665f2320197c5f44badf216c (patch)
tree3875e0d6394c8a9c0f48c1e0d6c441b701fcbf27
parent24529c54335507120027e9bee13c374dd4f0cd69 (diff)
downloadhercules-73662d19496bdc70665f2320197c5f44badf216c.tar.gz
hercules-73662d19496bdc70665f2320197c5f44badf216c.tar.bz2
hercules-73662d19496bdc70665f2320197c5f44badf216c.tar.xz
hercules-73662d19496bdc70665f2320197c5f44badf216c.zip
- 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://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5526 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog-Trunk.txt5
-rw-r--r--sql-files/item_db.sql4
-rw-r--r--src/map/atcommand.c8
-rw-r--r--src/map/mob.c3
-rw-r--r--src/map/pc.c2
-rw-r--r--src/map/status.c5
6 files changed, 17 insertions, 10 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 055705bee..0535a79ab 100644
--- a/Changelog-Trunk.txt
+++ b/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]
diff --git a/sql-files/item_db.sql b/sql-files/item_db.sql
index 0fdb37555..96631b086 100644
--- a/sql-files/item_db.sql
+++ b/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,
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 97682fc5d..38d335377 100644
--- a/src/map/atcommand.c
+++ b/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);
}
}
diff --git a/src/map/mob.c b/src/map/mob.c
index 036461ea3..5a0b7d422 100644
--- a/src/map/mob.c
+++ b/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.
diff --git a/src/map/pc.c b/src/map/pc.c
index c65f9c7af..b5c078d06 100644
--- a/src/map/pc.c
+++ b/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;
}
diff --git a/src/map/status.c b/src/map/status.c
index 20f0efcbf..6aff9bb4e 100644
--- a/src/map/status.c
+++ b/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;