- Some cleaning of the castend_map code to prevent the menuskill variable from not being cleared if you made a choice but the skill was not triggered (due to silence, stun or whatever).
- Cleaned up a bit the Charge Attack casttime equation, should prevent infinite casttime when the distance is 0. git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10213 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
2de330fddc
commit
ced5130a7b
@ -3,6 +3,12 @@ Date Added
|
||||
AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
|
||||
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
|
||||
|
||||
2007/04/12
|
||||
* Some cleaning of the castend_map code to prevent the menuskill variable
|
||||
from not being cleared if you made a choice but the skill was not triggered
|
||||
(due to silence, stun or whatever)
|
||||
* Cleaned up a bit the Charge Attack casttime equation, should prevent
|
||||
infinite casttime when the distance is 0.
|
||||
2007/04/11
|
||||
* Now when an object changes speed, the old move-packet will be used on the
|
||||
next movement, which should update the object's speed from that point and
|
||||
|
@ -9889,22 +9889,21 @@ void clif_parse_UseSkillToPosMoreInfo(int fd, struct map_session_data *sd) {
|
||||
*/
|
||||
void clif_parse_UseSkillMap(int fd,struct map_session_data *sd)
|
||||
{
|
||||
int skill_num;
|
||||
RFIFOHEAD(fd);
|
||||
skill_num = RFIFOW(fd,2);
|
||||
|
||||
if(skill_num != sd->menuskill_id)
|
||||
return;
|
||||
|
||||
if (clif_cant_act(sd))
|
||||
{
|
||||
sd->menuskill_id = sd->menuskill_lv = 0;
|
||||
return;
|
||||
|
||||
if(sd->sc.option&(OPTION_WEDDING|OPTION_XMAS))
|
||||
return;
|
||||
|
||||
if(sd->menuskill_id &&
|
||||
sd->menuskill_id != RFIFOW(fd,2) &&
|
||||
sd->menuskill_id != SA_AUTOSPELL)
|
||||
return; //Can't use skills while a menu is open.
|
||||
}
|
||||
|
||||
pc_delinvincibletimer(sd);
|
||||
|
||||
skill_castend_map(sd,RFIFOW(fd,2),(char*)RFIFOP(fd,4));
|
||||
skill_castend_map(sd,skill_num,(char*)RFIFOP(fd,4));
|
||||
}
|
||||
/*==========================================
|
||||
* ƒ<EFBFBD>ƒ‚—v‹<EFBFBD>
|
||||
|
@ -6327,10 +6327,14 @@ int skill_castend_map (struct map_session_data *sd, int skill_num, const char *m
|
||||
|
||||
//Simplify skill_failed code.
|
||||
#define skill_failed(sd) { sd->menuskill_id = sd->menuskill_lv = 0; }
|
||||
|
||||
if( sd->bl.prev == NULL || pc_isdead(sd) )
|
||||
if(skill_num != sd->menuskill_id)
|
||||
return 0;
|
||||
|
||||
if( sd->bl.prev == NULL || pc_isdead(sd) ) {
|
||||
skill_failed(sd);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if(sd->sc.opt1 || sd->sc.option&OPTION_HIDE ) {
|
||||
skill_failed(sd);
|
||||
return 0;
|
||||
@ -6343,11 +6347,10 @@ int skill_castend_map (struct map_session_data *sd, int skill_num, const char *m
|
||||
sd->sc.data[SC_DANCING].timer!=-1 ||
|
||||
sd->sc.data[SC_BERSERK].timer != -1 ||
|
||||
sd->sc.data[SC_MARIONETTE].timer != -1
|
||||
))
|
||||
return 0;
|
||||
|
||||
if( skill_num != sd->menuskill_id)
|
||||
)) {
|
||||
skill_failed(sd);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (strlen(map) > MAP_NAME_LENGTH_EXT-1)
|
||||
{ //Map_length check, as it is sent by the client and we shouldn't trust it [Skotlex]
|
||||
|
@ -971,7 +971,7 @@ int unit_skilluse_id2(struct block_list *src, int target_id, int skill_num, int
|
||||
break;
|
||||
case KN_CHARGEATK:
|
||||
//Taken from jA: Casttime is increased by dist/3*100%
|
||||
casttime = casttime * ((distance_bl(src,target)-1)/3+1);
|
||||
casttime+= casttime * (distance_bl(src,target)-1)/3;
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user