summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-04-27 11:09:57 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-04-27 11:09:57 +0000
commitbb0488451bdc08e6abe7622d10bbcb4135f2dc8f (patch)
tree9b981f46337325e893178f641dae39399fd6118d /src/map/battle.c
parentaf99be9bd11d716e0b8ef8eab4a36c9b9925e4c8 (diff)
downloadhercules-bb0488451bdc08e6abe7622d10bbcb4135f2dc8f.tar.gz
hercules-bb0488451bdc08e6abe7622d10bbcb4135f2dc8f.tar.bz2
hercules-bb0488451bdc08e6abe7622d10bbcb4135f2dc8f.tar.xz
hercules-bb0488451bdc08e6abe7622d10bbcb4135f2dc8f.zip
Corrected r12662 where a guild break would trigger the OnGuildBreak event for all castles (even of other guilds).
Corrected some x64 compilation warnings in ers/malloc files. cleaned up a case of bad variable reuse. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12666 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/battle.c')
-rw-r--r--src/map/battle.c14
1 files changed, 7 insertions, 7 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;
}