- Changed define EQP_WEAPON to specify only the right-hand weapon, added define EQP_ARMS to specify both arm-slots.
- Some minor code cleanups to take account for the above, fixed Strip shield/weapon removing both. git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8177 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
e9bee91ea7
commit
b372f8dfce
@ -4,6 +4,8 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO
|
|||||||
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
|
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
|
||||||
|
|
||||||
2006/08/07
|
2006/08/07
|
||||||
|
* Fixed EQP_WEAPON related code messing up with both weapon AND shield.
|
||||||
|
[Skotlex]
|
||||||
* Cleaned up the Asura code so that when the skill fails your
|
* Cleaned up the Asura code so that when the skill fails your
|
||||||
SP/Spheres/Fury are all taken away always, as well as moving you next to
|
SP/Spheres/Fury are all taken away always, as well as moving you next to
|
||||||
the target (as long as the target still exists within a reachable path from
|
the target (as long as the target still exists within a reachable path from
|
||||||
|
@ -783,11 +783,11 @@ charcommand_itemlist(
|
|||||||
strcat(equipstr, "left accessory, ");
|
strcat(equipstr, "left accessory, ");
|
||||||
if (equip & EQP_ARMOR)
|
if (equip & EQP_ARMOR)
|
||||||
strcat(equipstr, "body/armor, ");
|
strcat(equipstr, "body/armor, ");
|
||||||
if ((equip & EQP_WEAPON) == EQP_HAND_R)
|
if ((equip & EQP_ARMS) == EQP_HAND_R)
|
||||||
strcat(equipstr, "right hand, ");
|
strcat(equipstr, "right hand, ");
|
||||||
if ((equip & EQP_WEAPON) == EQP_HAND_L)
|
if ((equip & EQP_ARMS) == EQP_HAND_L)
|
||||||
strcat(equipstr, "left hand, ");
|
strcat(equipstr, "left hand, ");
|
||||||
if ((equip & EQP_WEAPON) == EQP_WEAPON)
|
if ((equip & EQP_ARMS) == EQP_ARMS)
|
||||||
strcat(equipstr, "both hands, ");
|
strcat(equipstr, "both hands, ");
|
||||||
if (equip & EQP_SHOES)
|
if (equip & EQP_SHOES)
|
||||||
strcat(equipstr, "feet, ");
|
strcat(equipstr, "feet, ");
|
||||||
|
@ -1801,8 +1801,6 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
|
|||||||
if(battle_config.mobs_level_up && md->level > md->db->lv) // [Valaris]
|
if(battle_config.mobs_level_up && md->level > md->db->lv) // [Valaris]
|
||||||
bonus += (md->level-md->db->lv)*battle_config.mobs_level_up_exp_rate;
|
bonus += (md->level-md->db->lv)*battle_config.mobs_level_up_exp_rate;
|
||||||
|
|
||||||
if (bonus > 400) bonus = 400; //Limit gained exp to quadro the mob's exp. [3->4 Komurka]
|
|
||||||
|
|
||||||
if(battle_config.zeny_from_mobs && md->level) {
|
if(battle_config.zeny_from_mobs && md->level) {
|
||||||
// zeny calculation moblv + random moblv [Valaris]
|
// zeny calculation moblv + random moblv [Valaris]
|
||||||
zeny=(int) ((md->level+rand()%md->level)*per*bonus/100.);
|
zeny=(int) ((md->level+rand()%md->level)*per*bonus/100.);
|
||||||
|
16
src/map/pc.c
16
src/map/pc.c
@ -390,7 +390,7 @@ int pc_equippoint(struct map_session_data *sd,int n)
|
|||||||
sd->inventory_data[n]->look == W_1HSWORD ||
|
sd->inventory_data[n]->look == W_1HSWORD ||
|
||||||
sd->inventory_data[n]->look == W_1HAXE) {
|
sd->inventory_data[n]->look == W_1HAXE) {
|
||||||
if(ep == EQP_HAND_R && (pc_checkskill(sd,AS_LEFT) > 0 || (sd->class_&MAPID_UPPERMASK) == MAPID_ASSASSIN))
|
if(ep == EQP_HAND_R && (pc_checkskill(sd,AS_LEFT) > 0 || (sd->class_&MAPID_UPPERMASK) == MAPID_ASSASSIN))
|
||||||
return EQP_WEAPON;
|
return EQP_ARMS;
|
||||||
}
|
}
|
||||||
return ep;
|
return ep;
|
||||||
}
|
}
|
||||||
@ -524,9 +524,9 @@ int pc_isequip(struct map_session_data *sd,int n)
|
|||||||
return 0;
|
return 0;
|
||||||
if (sd->sc.count) {
|
if (sd->sc.count) {
|
||||||
|
|
||||||
if(item->equip & EQP_WEAPON && item->type == 4 && sd->sc.data[SC_STRIPWEAPON].timer != -1) // Also works with left-hand weapons [DracoRPG]
|
if(item->equip & EQP_ARMS && item->type == IT_WEAPON && sd->sc.data[SC_STRIPWEAPON].timer != -1) // Also works with left-hand weapons [DracoRPG]
|
||||||
return 0;
|
return 0;
|
||||||
if(item->equip & EQP_SHIELD && item->type == 5 && sd->sc.data[SC_STRIPSHIELD].timer != -1)
|
if(item->equip & EQP_SHIELD && item->type == IT_ARMOR && sd->sc.data[SC_STRIPSHIELD].timer != -1)
|
||||||
return 0;
|
return 0;
|
||||||
if(item->equip & EQP_ARMOR && sd->sc.data[SC_STRIPARMOR].timer != -1)
|
if(item->equip & EQP_ARMOR && sd->sc.data[SC_STRIPARMOR].timer != -1)
|
||||||
return 0;
|
return 0;
|
||||||
@ -538,7 +538,7 @@ int pc_isequip(struct map_session_data *sd,int n)
|
|||||||
if (sd->status.base_level > 90 && item->equip & EQP_HELM)
|
if (sd->status.base_level > 90 && item->equip & EQP_HELM)
|
||||||
return 1; //Can equip all helms
|
return 1; //Can equip all helms
|
||||||
|
|
||||||
if (sd->status.base_level > 96 && item->equip & EQP_WEAPON && item->type == IT_WEAPON)
|
if (sd->status.base_level > 96 && item->equip & EQP_ARMS && item->type == IT_WEAPON)
|
||||||
switch(item->look) { //In weapons, the look determines type of weapon.
|
switch(item->look) { //In weapons, the look determines type of weapon.
|
||||||
case W_DAGGER: //Level 4 Knives are equippable.. this means all knives, I'd guess?
|
case W_DAGGER: //Level 4 Knives are equippable.. this means all knives, I'd guess?
|
||||||
case W_1HSWORD: //All 1H swords
|
case W_1HSWORD: //All 1H swords
|
||||||
@ -6215,12 +6215,12 @@ int pc_equipitem(struct map_session_data *sd,int n,int req_pos)
|
|||||||
pos = sd->equip_index[EQI_ACC_L] >= 0 ? EQP_ACC_R : EQP_ACC_L;
|
pos = sd->equip_index[EQI_ACC_L] >= 0 ? EQP_ACC_R : EQP_ACC_L;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(pos == EQP_WEAPON && id->equip == EQP_HAND_R &&
|
if(pos == EQP_ARMS && id->equip == EQP_HAND_R &&
|
||||||
(pc_checkskill(sd, AS_LEFT) > 0 ||
|
(pc_checkskill(sd, AS_LEFT) > 0 ||
|
||||||
(sd->class_&MAPID_UPPERMASK) == MAPID_ASSASSIN)
|
(sd->class_&MAPID_UPPERMASK) == MAPID_ASSASSIN)
|
||||||
) { //Dual wield capable weapon.
|
) { //Dual wield capable weapon.
|
||||||
pos = (req_pos&EQP_WEAPON);
|
pos = (req_pos&EQP_ARMS);
|
||||||
if (pos == EQP_WEAPON) //User specified both slots, pick one for them.
|
if (pos == EQP_ARMS) //User specified both slots, pick one for them.
|
||||||
pos = sd->equip_index[EQI_HAND_R] >= 0 ? EQP_HAND_L : EQP_HAND_R;
|
pos = sd->equip_index[EQI_HAND_R] >= 0 ? EQP_HAND_L : EQP_HAND_R;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -6404,7 +6404,7 @@ int pc_unequipitem(struct map_session_data *sd,int n,int flag)
|
|||||||
|
|
||||||
clif_unequipitemack(sd,n,sd->status.inventory[n].equip,1);
|
clif_unequipitemack(sd,n,sd->status.inventory[n].equip,1);
|
||||||
|
|
||||||
if((sd->status.inventory[n].equip & EQP_WEAPON) &&
|
if((sd->status.inventory[n].equip & EQP_ARMS) &&
|
||||||
sd->weapontype1 == 0 && sd->weapontype2 == 0)
|
sd->weapontype1 == 0 && sd->weapontype2 == 0)
|
||||||
skill_enchant_elemental_end(&sd->bl,-1);
|
skill_enchant_elemental_end(&sd->bl,-1);
|
||||||
|
|
||||||
|
@ -64,8 +64,9 @@ enum {
|
|||||||
EQP_AMMO = 0x8000, //32768
|
EQP_AMMO = 0x8000, //32768
|
||||||
} equip_pos_enum;
|
} equip_pos_enum;
|
||||||
|
|
||||||
#define EQP_WEAPON (EQP_HAND_R|EQP_HAND_L)
|
#define EQP_WEAPON EQP_HAND_R
|
||||||
#define EQP_SHIELD EQP_HAND_L
|
#define EQP_SHIELD EQP_HAND_L
|
||||||
|
#define EQP_ARMS (EQP_HAND_R|EQP_HAND_L)
|
||||||
#define EQP_HELM (EQP_HEAD_LOW|EQP_HEAD_MID|EQP_HEAD_TOP)
|
#define EQP_HELM (EQP_HEAD_LOW|EQP_HEAD_MID|EQP_HEAD_TOP)
|
||||||
#define EQP_ACC (EQP_ACC_L|EQP_ACC_R)
|
#define EQP_ACC (EQP_ACC_L|EQP_ACC_R)
|
||||||
|
|
||||||
|
@ -1664,8 +1664,8 @@ int skill_break_equip (struct block_list *bl, unsigned short where, int rate, in
|
|||||||
case EQI_HAND_R: //Left/Right hands
|
case EQI_HAND_R: //Left/Right hands
|
||||||
case EQI_HAND_L:
|
case EQI_HAND_L:
|
||||||
flag = (
|
flag = (
|
||||||
(where&EQP_WEAPON && sd->inventory_data[j]->type == 4) ||
|
(where&EQP_WEAPON && sd->inventory_data[j]->type == IT_WEAPON) ||
|
||||||
(where&EQP_SHIELD && sd->inventory_data[j]->type == 5));
|
(where&EQP_SHIELD && sd->inventory_data[j]->type == IT_ARMOR));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user