diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-05-08 15:11:25 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-05-08 15:11:25 +0000 |
commit | 0cd2095db1f8373b8b1b253ef850c2a4059316d0 (patch) | |
tree | 9ff401051665a8856cae8e128bde902db728d625 /src/map | |
parent | 210788081168459afc15b7f970d6ff6d60611a4e (diff) | |
download | hercules-0cd2095db1f8373b8b1b253ef850c2a4059316d0.tar.gz hercules-0cd2095db1f8373b8b1b253ef850c2a4059316d0.tar.bz2 hercules-0cd2095db1f8373b8b1b253ef850c2a4059316d0.tar.xz hercules-0cd2095db1f8373b8b1b253ef850c2a4059316d0.zip |
- Removed SP_DISGUISE from the bonus list.
- Moved Sharp Shooting display to the block with Auto-Counter (since that's the other skill that can show critical as well)
- Corrected some fields in the still packet (guild emblem being stored as a Long when it should be Short)
- Modified most fields of view_data to be unsigned shorts rather than signed ones.
- On-Touch NPCs will now make you stop walking when you trigger them.
- Reduced stun duration of most skills to 3 secs.
- ShadowJump/JumpKick will make you land on the target's cell now.
- Fixed Kaahi triggering only once per skill duration.
- Added the kaahi_heal_timer to the list of status change functions.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6516 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/clif.c | 10 | ||||
-rw-r--r-- | src/map/clif.h | 2 | ||||
-rw-r--r-- | src/map/map.h | 24 | ||||
-rw-r--r-- | src/map/npc.c | 5 | ||||
-rw-r--r-- | src/map/pc.c | 4 | ||||
-rw-r--r-- | src/map/skill.c | 15 | ||||
-rw-r--r-- | src/map/status.c | 21 |
7 files changed, 39 insertions, 42 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index 0d0f0d017..9cecbf858 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -775,7 +775,7 @@ int clif_clearchar_id(int id, int type, int fd) { return 0;
}
-void clif_get_weapon_view(TBL_PC* sd, short *rhand, short *lhand)
+void clif_get_weapon_view(TBL_PC* sd, unsigned short *rhand, unsigned short *lhand)
{
#if PACKETVER > 3
struct item_data *id;
@@ -884,7 +884,7 @@ static int clif_set0078(struct block_list *bl, struct view_data *vd, unsigned ch WBUFW(buf,30)=vd->cloth_color;
WBUFW(buf,32)=sd?sd->head_dir:dir;
WBUFL(buf,34)=guild_id;
- WBUFL(buf,38)=emblem_id;
+ WBUFW(buf,38)=emblem_id;
if (sd) {
WBUFW(buf,40)=sd->status.manner;
WBUFB(buf,44)=sd->status.karma;
@@ -907,6 +907,7 @@ static int clif_set0078(struct block_list *bl, struct view_data *vd, unsigned ch WBUFW(buf,8)=sc->opt1;
WBUFW(buf,10)=sc->opt2;
WBUFW(buf,12)=sc->option;
+ WBUFW(buf,42)=sc->opt3;
}
WBUFW(buf,14)=vd->class_;
WBUFW(buf,16)=vd->hair_style;
@@ -920,10 +921,8 @@ static int clif_set0078(struct block_list *bl, struct view_data *vd, unsigned ch WBUFW(buf,32)=sd?sd->head_dir:dir;
WBUFL(buf,34)=guild_id;
WBUFL(buf,38)=emblem_id;
- if (sd) {
- WBUFW(buf,42)=sd->status.manner;
+ if (sd)
WBUFB(buf,44)=sd->status.karma;
- }
WBUFB(buf,45)=vd->sex;
WBUFPOS(buf,46,bl->x,bl->y);
WBUFB(buf,48)|=dir&0x0f;
@@ -944,6 +943,7 @@ static int clif_set0078(struct block_list *bl, struct view_data *vd, unsigned ch WBUFW(buf,8)=sc->opt1;
WBUFW(buf,10)=sc->opt2;
WBUFW(buf,12)=sc->option;
+ WBUFW(buf,42)=sc->opt3;
}
WBUFW(buf,14)=vd->class_;
WBUFW(buf,16)=vd->hair_style; //Required for pets.
diff --git a/src/map/clif.h b/src/map/clif.h index 759b5dad3..d96714b57 100644 --- a/src/map/clif.h +++ b/src/map/clif.h @@ -323,7 +323,7 @@ int clif_disp_overhead(struct map_session_data *sd, char* mes); int do_final_clif(void);
int do_init_clif(void);
-void clif_get_weapon_view(TBL_PC* sd, short *rhand, short *lhand);
+void clif_get_weapon_view(TBL_PC* sd, unsigned short *rhand, unsigned short *lhand);
int clif_party_xy_remove(struct map_session_data *sd); //Fix for minimap [Kevin]
void clif_parse_ReqFeel(int fd, struct map_session_data *sd, int skilllv);
diff --git a/src/map/map.h b/src/map/map.h index 1160d2862..d606d54af 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -457,15 +457,16 @@ struct weapon_data { };
struct view_data {
- short class_;
- short weapon;
- short shield; //Or left-hand weapon.
- short head_top;
- short head_mid;
- short head_bottom;
- short hair_style;
- short hair_color;
- short cloth_color;
+ unsigned short
+ class_,
+ weapon,
+ shield, //Or left-hand weapon.
+ head_top,
+ head_mid,
+ head_bottom,
+ hair_style,
+ hair_color,
+ cloth_color;
char sex;
unsigned dead_sit : 2;
};
@@ -1124,7 +1125,7 @@ enum { SP_SHORT_WEAPON_DAMAGE_RETURN,SP_LONG_WEAPON_DAMAGE_RETURN,SP_WEAPON_COMA_ELE,SP_WEAPON_COMA_RACE, // 1063-1066
SP_ADDEFF2,SP_BREAK_WEAPON_RATE,SP_BREAK_ARMOR_RATE,SP_ADD_STEAL_RATE, // 1067-1070
SP_MAGIC_DAMAGE_RETURN,SP_RANDOM_ATTACK_INCREASE,SP_ALL_STATS,SP_AGI_VIT,SP_AGI_DEX_STR,SP_PERFECT_HIDE, // 1071-1076
- SP_DISGUISE,SP_CLASSCHANGE, // 1077-1078
+ SP_FREE,SP_CLASSCHANGE, // 1077-1078
SP_HP_DRAIN_VALUE,SP_SP_DRAIN_VALUE, // 1079-1080
SP_WEAPON_ATK,SP_WEAPON_ATK_RATE, // 1081-1082
SP_DELAYRATE,SP_HP_DRAIN_RATE_RACE,SP_SP_DRAIN_RATE_RACE, // 1083-1085
@@ -1141,7 +1142,8 @@ enum { SP_UNSTRIPABLE_WEAPON,SP_UNSTRIPABLE_ARMOR,SP_UNSTRIPABLE_HELM,SP_UNSTRIPABLE_SHIELD, // 2034-2037
SP_INTRAVISION, SP_ADD_MONSTER_DROP_ITEMGROUP, SP_SP_LOSS_RATE, // 2038-2040
SP_ADD_SKILL_BLOW, SP_SP_VANISH_RATE //2041
- //Before adding another, note that 2007 (SP_FREE, previously Infinite Endure) is available!
+ //Before adding another, note that 1077 (SP_FREE, previously disguise) and
+ //2007 (SP_FREE, previously Infinite Endure) are available!
};
enum {
diff --git a/src/map/npc.c b/src/map/npc.c index 7c89545cb..7d9db7358 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -947,7 +947,6 @@ int npc_touch_areanpc(struct map_session_data *sd,int m,int x,int y) if (sd->sc.option&6 ||
(!battle_config.duel_allow_teleport && sd->duel_group)) // duel rstrct [LuzZza]
break;
- skill_stop_dancing(&sd->bl);
pc_setpos(sd,map[m].npc[i]->u.warp.mapindex,map[m].npc[i]->u.warp.x,map[m].npc[i]->u.warp.y,0);
break;
case SCRIPT:
@@ -961,8 +960,10 @@ int npc_touch_areanpc(struct map_session_data *sd,int m,int x,int y) sprintf(name,"%s::OnTouch", map[m].npc[i]->exname); // It goes here too. exname being the unique identifier. [Lance]
- if( npc_event(sd,name,0)>0 )
+ if( npc_event(sd,name,0)>0 ) {
+ pc_stop_walking(sd,1); //Make it stop walking!
npc_click(sd,map[m].npc[i]->bl.id);
+ }
//aFree(name);
break;
}
diff --git a/src/map/pc.c b/src/map/pc.c index 89d103247..4657d3bcf 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -1521,10 +1521,6 @@ int pc_bonus(struct map_session_data *sd,int type,int val) sd->state.perfect_hiding=1;
}
break;
- case SP_DISGUISE: // Disguise script for items [Valaris]
- if(sd->state.lr_flag!=2)
- pc_disguise(sd, val);
- break;
case SP_UNBREAKABLE:
if(sd->state.lr_flag!=2) {
sd->unbreakable += val;
diff --git a/src/map/skill.c b/src/map/skill.c index 1d7b78c30..9a49196ec 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -1924,7 +1924,6 @@ int skill_attack( int attack_type, struct block_list* src, struct block_list *ds dmg.dmotion = clif_skill_damage(dsrc,bl,tick,dmg.amotion,dmg.dmotion, damage, dmg.div_, skillid, -1, 5);
break;
case KN_BRANDISHSPEAR:
- case SN_SHARPSHOOTING:
{ //Only display skill animation for skill's target.
struct unit_data *ud = unit_bl2ud(src);
if (ud && ud->skilltarget == bl->id)
@@ -1955,6 +1954,7 @@ int skill_attack( int attack_type, struct block_list* src, struct block_list *ds case KN_AUTOCOUNTER: //Skills that need be passed as a normal attack for the client to display correctly.
case TF_DOUBLE:
case GS_CHAINACTION:
+ case SN_SHARPSHOOTING:
dmg.dmotion = clif_damage(src,bl,tick,dmg.amotion,dmg.dmotion,damage,dmg.div_,dmg.type,dmg.damage2);
break;
case CR_GRANDCROSS:
@@ -2574,22 +2574,11 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl,int s case NJ_SHADOWJUMP: //[blackhole89]
case TK_JUMPKICK:
- {
- short x, y;
- x = bl->x;
- y = bl->y;
- if (src->x < bl->x) x--;
- else if (src->x > bl->x) x++;
- if (src->y < bl->y) y--;
- else if (src->y > bl->y) y++;
- if (map_getcell(bl->m, x, y, CELL_CHKNOPASS))
- { x = bl->x; y = bl->y; }
if (skillid == TK_JUMPKICK)
skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag);
- if (unit_movepos(src, x, y, 0, 0))
+ if (unit_movepos(src, bl->x, bl->y, 0, 0))
clif_slide(src,src->x,src->y);
break;
- }
case ASC_BREAKER: /* ソウルブレ?カ? */ // [DracoRPG]
// Separate weapon and magic attacks
skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag);
diff --git a/src/map/status.c b/src/map/status.c index 87142832a..18d10bd0a 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -1465,8 +1465,7 @@ int status_calc_pc(struct map_session_data* sd,int first) // Skill-related HP recovery (only when sit)
if((skill=pc_checkskill(sd,MO_SPIRITSRECOVERY)) > 0)
sd->nsshealhp = skill*4 + (sd->status.max_hp*skill/500);
- if((skill=pc_checkskill(sd,TK_HPTIME)) > 0 &&
- (sd->state.rest || sd->sc.data[SC_TKREST].timer!=-1))
+ if((skill=pc_checkskill(sd,TK_HPTIME)) > 0 && sd->state.rest)
sd->nsshealhp = skill*30 + (sd->status.max_hp*skill/500);
if(sd->nshealhp > SHRT_MAX) sd->nshealhp = SHRT_MAX;
@@ -1535,8 +1534,7 @@ int status_calc_pc(struct map_session_data* sd,int first) // Skill-related SP recovery (only when sit)
if((skill = pc_checkskill(sd,MO_SPIRITSRECOVERY)) > 0)
sd->nsshealsp = skill*2 + (sd->status.max_sp*skill/500);
- if((skill=pc_checkskill(sd,TK_SPTIME)) > 0 &&
- (sd->state.rest || sd->sc.data[SC_TKREST].timer!=-1))
+ if((skill=pc_checkskill(sd,TK_SPTIME)) > 0 && sd->state.rest)
{
sd->nsshealsp = skill*3 + (sd->status.max_sp*skill/500);
if ((skill=pc_checkskill(sd,SL_KAINA)) > 0) //Power up Enjoyable Rest
@@ -3894,6 +3892,7 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val status_change_end(bl,SC_DECREASEAGI,-1);
return 0;
}
+ break;
case SC_FUSION:
if(sc->data[SC_SPIRIT].timer!=-1 )
status_change_end(bl,SC_SPIRIT,-1);
@@ -5394,9 +5393,17 @@ int kaahi_heal_timer(int tid, unsigned int tick, int id, int data) sc=status_get_sc(bl);
if (!sc || data != SC_KAAHI || sc->data[data].timer==-1)
return 0;
-
- if (bl->type == BL_PC && ((TBL_PC*)bl)->status.sp < sc->data[data].val3)
+ if(sc->data[data].val4 != tid) {
+ if (battle_config.error_log)
+ ShowError("kaahi_heal_timer: Timer mismatch: %d != %d\n", tid, sc->data[data].val4);
+ sc->data[data].val4=-1;
+ return 0;
+ }
+
+ if (bl->type == BL_PC && ((TBL_PC*)bl)->status.sp < sc->data[data].val3) {
+ sc->data[data].val4=-1;
return 0;
+ }
hp = status_get_max_hp(bl) - status_get_hp(bl);
if (hp > sc->data[data].val2)
@@ -5405,6 +5412,7 @@ int kaahi_heal_timer(int tid, unsigned int tick, int id, int data) battle_heal(bl, bl, hp, -sc->data[data].val3, 1);
clif_skill_nodamage(NULL,bl,AL_HEAL,hp,1);
}
+ sc->data[data].val4=-1;
return 1;
}
@@ -6097,6 +6105,7 @@ int do_init_status(void) exit(1);
}
add_timer_func_list(status_change_timer,"status_change_timer");
+ add_timer_func_list(kaahi_heal_timer,"kaahi_heal_timer");
initChangeTables();
status_readdb();
status_calc_sigma();
|