- Fixed a 'variable may be used uninitialized' error.

- Removed 'type' being passed to skill_trap_splash since it was not used at all.
- Fixed Land Mine doing nothing.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11872 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
skotlex 2007-12-08 23:32:30 +00:00
parent b3fe52fa6b
commit e816cafde6
2 changed files with 5 additions and 4 deletions

View File

@ -8567,6 +8567,8 @@ void clif_parse_TakeItem(int fd, struct map_session_data *sd)
void clif_parse_DropItem(int fd, struct map_session_data *sd)
{
int item_index, item_amount;
item_index = RFIFOW(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0])-2;
item_amount = RFIFOW(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[1]);
do {
if (pc_isdead(sd))
break;
@ -8581,8 +8583,6 @@ void clif_parse_DropItem(int fd, struct map_session_data *sd)
))
break;
item_index = RFIFOW(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0])-2;
item_amount = RFIFOW(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[1]);
if (!pc_dropitem(sd, item_index, item_amount))
break;

View File

@ -6847,7 +6847,7 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns
case UNT_SANDMAN:
case UNT_FLASHER:
case UNT_FREEZINGTRAP:
map_foreachinrange(skill_trap_splash,&src->bl, skill_get_splash(sg->skill_id, sg->skill_lv), sg->bl_flag, &src->bl,tick,type);
map_foreachinrange(skill_trap_splash,&src->bl, skill_get_splash(sg->skill_id, sg->skill_lv), sg->bl_flag, &src->bl,tick);
clif_changetraplook(&src->bl, sg->unit_id==UNT_LANDMINE?UNT_FIREPILLAR_ACTIVE:UNT_USED_TRAPS);
src->range = -1; //Disable range so it does not invoke a for each in area again.
sg->limit=DIFF_TICK(tick,sg->tick)+1500;
@ -7014,7 +7014,7 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns
case UNT_GROUNDDRIFT_FIRE:
map_foreachinrange(skill_trap_splash,&src->bl,
skill_get_splash(sg->skill_id, sg->skill_lv), sg->bl_flag,
&src->bl,tick,0);
&src->bl,tick);
sg->unit_id = UNT_USED_TRAPS;
clif_changetraplook(&src->bl, UNT_FIREPILLAR_ACTIVE);
sg->limit=DIFF_TICK(tick,sg->tick)+1500;
@ -9072,6 +9072,7 @@ int skill_trap_splash (struct block_list *bl, va_list ap)
case UNT_FLASHER:
skill_additional_effect(ss,bl,sg->skill_id,sg->skill_lv,BF_MISC,tick);
break;
case UNT_LANDMINE:
case UNT_BLASTMINE:
case UNT_CLAYMORETRAP:
case UNT_FREEZINGTRAP: