diff options
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/battle.c | 14 | ||||
-rw-r--r-- | src/map/guild.c | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index 51c8ca1d8..96ba93259 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -2785,17 +2785,17 @@ enum damage_lv battle_weapon_attack(struct block_list* src, struct block_list* t { sd->state.arrow_atk = (sd->status.weapon == W_BOW || (sd->status.weapon >= W_REVOLVER && sd->status.weapon <= W_GRENADE)); if (sd->state.arrow_atk) - { //Recycled damage variable to store index. - damage = sd->equip_index[EQI_AMMO]; - if (damage<0) { + { + int index = sd->equip_index[EQI_AMMO]; + if (index<0) { clif_arrow_fail(sd,0); return ATK_NONE; } //Ammo check by Ishizu-chan - if (sd->inventory_data[damage]) + if (sd->inventory_data[index]) switch (sd->status.weapon) { case W_BOW: - if (sd->inventory_data[damage]->look != A_ARROW) { + if (sd->inventory_data[index]->look != A_ARROW) { clif_arrow_fail(sd,0); return ATK_NONE; } @@ -2804,13 +2804,13 @@ enum damage_lv battle_weapon_attack(struct block_list* src, struct block_list* t case W_RIFLE: case W_GATLING: case W_SHOTGUN: - if (sd->inventory_data[damage]->look != A_BULLET) { + if (sd->inventory_data[index]->look != A_BULLET) { clif_arrow_fail(sd,0); return ATK_NONE; } break; case W_GRENADE: - if (sd->inventory_data[damage]->look != A_GRENADE) { + if (sd->inventory_data[index]->look != A_GRENADE) { clif_arrow_fail(sd,0); return ATK_NONE; } diff --git a/src/map/guild.c b/src/map/guild.c index b4104f4d0..0f4ec272b 100644 --- a/src/map/guild.c +++ b/src/map/guild.c @@ -1594,7 +1594,7 @@ int guild_broken(int guild_id,int flag) if( (gc=guild_castle_search(i)) != NULL ){ if(gc->guild_id == guild_id){ safestrncpy(name, gc->castle_event, 50); - npc_event_do("::OnGuildBreak"); + npc_event_do(strcat(name,"::OnGuildBreak")); } } } |