- Added pc_check_weapontype to do a proper skill weapon check that takes into account dual-wielding. That is, if a skill can be used with daggers/axes, you'll be able to use the skill when dual-wielding them.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7779 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
de6883c0bb
commit
703c4b2af8
@ -4,6 +4,10 @@ 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/07/20
|
2006/07/20
|
||||||
|
* Added pc_check_weapontype to do a proper skill weapon check that takes
|
||||||
|
into account dual-wielding. That is, if a skill can be used with
|
||||||
|
daggers/axes, you'll be able to use the skill when dual-wielding them.
|
||||||
|
[Skotlex]
|
||||||
* Corrected Cloaking level 1-2 not letting you move across walls. [Skotlex]
|
* Corrected Cloaking level 1-2 not letting you move across walls. [Skotlex]
|
||||||
* updated cloaking code so that when you set "enable cloaking without
|
* updated cloaking code so that when you set "enable cloaking without
|
||||||
walls", the code will consider you as "always next to a wall", thus you get
|
walls", the code will consider you as "always next to a wall", thus you get
|
||||||
|
@ -3474,7 +3474,9 @@ int pc_checkallowskill(struct map_session_data *sd)
|
|||||||
|
|
||||||
for (i = 0; i < sizeof(scw_list)/sizeof(scw_list[0]); i++)
|
for (i = 0; i < sizeof(scw_list)/sizeof(scw_list[0]); i++)
|
||||||
{ // Skills requiring specific weapon types
|
{ // Skills requiring specific weapon types
|
||||||
if(sd->sc.data[scw_list[i]].timer!=-1 && !(skill_get_weapontype(StatusSkillChangeTable[scw_list[i]])&(1<<sd->status.weapon)))
|
if(sd->sc.data[scw_list[i]].timer!=-1 &&
|
||||||
|
!pc_check_weapontype(sd,
|
||||||
|
skill_get_weapontype(StatusSkillChangeTable[scw_list[i]])))
|
||||||
status_change_end(&sd->bl,scw_list[i],-1);
|
status_change_end(&sd->bl,scw_list[i],-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -97,6 +97,9 @@ enum {
|
|||||||
#define pc_stop_attack(sd) { if (sd->ud.attacktimer!=-1) { unit_stop_attack(&sd->bl); sd->ud.target = 0; } }
|
#define pc_stop_attack(sd) { if (sd->ud.attacktimer!=-1) { unit_stop_attack(&sd->bl); sd->ud.target = 0; } }
|
||||||
#define pc_stop_walking(sd, type) { if (sd->ud.walktimer!=-1) unit_stop_walking(&sd->bl, type); }
|
#define pc_stop_walking(sd, type) { if (sd->ud.walktimer!=-1) unit_stop_walking(&sd->bl, type); }
|
||||||
|
|
||||||
|
//Weapon check considering dual wielding.
|
||||||
|
#define pc_check_weapontype(sd, type) ((type)&((sd)->status.weapon < MAX_WEAPON_TYPE? \
|
||||||
|
1<<(sd)->status.weapon:(1<<(sd)->weapontype1)|(1<<(sd)->weapontype2)))
|
||||||
//Checks if the given class value corresponds to a player class. [Skotlex]
|
//Checks if the given class value corresponds to a player class. [Skotlex]
|
||||||
#define pcdb_checkid(class_) (class_ <= JOB_XMAS || (class_ >= JOB_NOVICE_HIGH && class_ <= JOB_SOUL_LINKER))
|
#define pcdb_checkid(class_) (class_ <= JOB_XMAS || (class_ >= JOB_NOVICE_HIGH && class_ <= JOB_SOUL_LINKER))
|
||||||
|
|
||||||
|
@ -8362,7 +8362,8 @@ int skill_check_condition (struct map_session_data *sd, int skill, int lv, int t
|
|||||||
clif_skill_fail(sd,skill,5,0);
|
clif_skill_fail(sd,skill,5,0);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if(!(weapon & (1<<sd->status.weapon) ) ) {
|
|
||||||
|
if(!pc_check_weapontype(sd,weapon)) {
|
||||||
clif_skill_fail(sd,skill,6,0);
|
clif_skill_fail(sd,skill,6,0);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -4397,7 +4397,7 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val
|
|||||||
return 0; //Overthrust can't take effect if under Max Overthrust. [Skotlex]
|
return 0; //Overthrust can't take effect if under Max Overthrust. [Skotlex]
|
||||||
break;
|
break;
|
||||||
case SC_ADRENALINE:
|
case SC_ADRENALINE:
|
||||||
if (sd && !(skill_get_weapontype(BS_ADRENALINE)&(1<<sd->status.weapon)))
|
if(sd && !pc_check_weapontype(sd,skill_get_weapontype(BS_ADRENALINE)))
|
||||||
return 0;
|
return 0;
|
||||||
if (sc->data[SC_QUAGMIRE].timer!=-1 ||
|
if (sc->data[SC_QUAGMIRE].timer!=-1 ||
|
||||||
sc->data[SC_DONTFORGETME].timer!=-1 ||
|
sc->data[SC_DONTFORGETME].timer!=-1 ||
|
||||||
@ -4406,7 +4406,7 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val
|
|||||||
return 0;
|
return 0;
|
||||||
break;
|
break;
|
||||||
case SC_ADRENALINE2:
|
case SC_ADRENALINE2:
|
||||||
if (sd && !(skill_get_weapontype(BS_ADRENALINE2)&(1<<sd->status.weapon)))
|
if(sd && !pc_check_weapontype(sd,skill_get_weapontype(BS_ADRENALINE2)))
|
||||||
return 0;
|
return 0;
|
||||||
if (sc->data[SC_QUAGMIRE].timer!=-1 ||
|
if (sc->data[SC_QUAGMIRE].timer!=-1 ||
|
||||||
sc->data[SC_DONTFORGETME].timer!=-1 ||
|
sc->data[SC_DONTFORGETME].timer!=-1 ||
|
||||||
|
Loading…
x
Reference in New Issue
Block a user