diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/map/atcommand.c | 8 | ||||
-rw-r--r-- | src/map/mob.c | 3 | ||||
-rw-r--r-- | src/map/pc.c | 2 | ||||
-rw-r--r-- | src/map/status.c | 5 |
4 files changed, 10 insertions, 8 deletions
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;
|