diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-03-20 14:45:17 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-03-20 14:45:17 +0000 |
commit | 4c83e7a2c27293b549b88e333550178fbbf04f2b (patch) | |
tree | e643da29f5cdfc65203dda48dc5688ad617723ec /src | |
parent | 335da0f744a55fdff1659848b264b5582a4f953d (diff) | |
download | hercules-4c83e7a2c27293b549b88e333550178fbbf04f2b.tar.gz hercules-4c83e7a2c27293b549b88e333550178fbbf04f2b.tar.bz2 hercules-4c83e7a2c27293b549b88e333550178fbbf04f2b.tar.xz hercules-4c83e7a2c27293b549b88e333550178fbbf04f2b.zip |
- Small fix to prevent killer/killable states from allowing you to target yourself.
- Added Explosion Spirits to list of effects that dispel on logout.
- Fixed handling of guild skills by pc_blockskill_start, renamed it to skill_blockpc_start as it needs some constants available only in skill.c
- Fixed autoguard icon showing with stun.
- Fixed splash area of Ganbantein
- Fixed acid demonstration breaking shield instead of armor.
- Fixed Slim Pitcher crashing server ocassionally.
- Hopefully fixed Ankle Snare lasting the whole trap's duration
- Added sc_start(SC_ENDURE) on infinite endure bonus.
- Fixed Berserk Pitcher consuming required items twice.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5681 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r-- | src/map/battle.c | 4 | ||||
-rw-r--r-- | src/map/guild.c | 2 | ||||
-rw-r--r-- | src/map/map.c | 2 | ||||
-rw-r--r-- | src/map/pc.c | 32 | ||||
-rw-r--r-- | src/map/pc.h | 2 | ||||
-rw-r--r-- | src/map/skill.c | 49 | ||||
-rw-r--r-- | src/map/skill.h | 2 | ||||
-rw-r--r-- | src/map/status.c | 2 |
8 files changed, 52 insertions, 43 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index ace030d10..22778f836 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -3489,7 +3489,7 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f return -1; //Cannot be targeted yet.
if (sd->state.monster_ignore && src->type == BL_MOB)
return 0; //option to have monsters ignore GMs [Valaris]
- if (sd->special_state.killable)
+ if (sd->special_state.killable && t_bl != s_bl)
{
state |= BCT_ENEMY; //Universal Victim
strip_enemy = 0;
@@ -3544,7 +3544,7 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f case BL_PC:
{
struct map_session_data *sd = (struct map_session_data *) s_bl;
- if (sd->special_state.killer)
+ if (sd->special_state.killer && s_bl != t_bl)
{
state |= BCT_ENEMY; //Is on a killing rampage :O
strip_enemy = 0;
diff --git a/src/map/guild.c b/src/map/guild.c index 364f676e7..792cb821b 100644 --- a/src/map/guild.c +++ b/src/map/guild.c @@ -1225,7 +1225,7 @@ void guild_block_skill(struct map_session_data *sd, int time) { int skill_num[] = { GD_BATTLEORDER, GD_REGENERATION, GD_RESTORE, GD_EMERGENCYCALL };
int i;
for (i = 0; i < 4; i++)
- pc_blockskill_start(sd, skill_num[i], time);
+ skill_blockpc_start(sd, skill_num[i], time);
}
// 同盟関係かどうかチェック
diff --git a/src/map/map.c b/src/map/map.c index 9c9e99d5f..f6820de9f 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -1586,6 +1586,8 @@ int map_quit(struct map_session_data *sd) { status_change_end(&sd->bl,SC_STRIPHELM,-1);
if(sd->sc.data[SC_EXTREMITYFIST].timer!=-1)
status_change_end(&sd->bl,SC_EXTREMITYFIST,-1);
+ if(sd->sc.data[SC_EXPLOSIONSPIRITS].timer!=-1)
+ status_change_end(&sd->bl,SC_EXPLOSIONSPIRITS,-1);
}
}
skill_clear_unitgroup(&sd->bl); // スキルユニットグル?プの削除
diff --git a/src/map/pc.c b/src/map/pc.c index 970f2b347..46357f59a 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -1519,8 +1519,10 @@ int pc_bonus(struct map_session_data *sd,int type,int val) sd->special_state.no_gemstone = 1;
break;
case SP_INFINITE_ENDURE:
- if(sd->state.lr_flag != 2)
+ if(sd->state.lr_flag != 2) {
sd->special_state.infinite_endure = 1;
+ sc_start(&sd->bl, SC_ENDURE,100,1,0);
+ }
break;
case SP_INTRAVISION: // Maya Purple Card effect allowing to see Hiding/Cloaking people [DracoRPG]
if(sd->state.lr_flag != 2)
@@ -2189,33 +2191,6 @@ int pc_skill(struct map_session_data *sd,int id,int level,int flag) return 0;
}
-
-/*==========================================
- *
- *------------------------------------------
- */
-int pc_blockskill_end(int tid,unsigned int tick,int id,int data)
-{
- struct map_session_data *sd = map_id2sd(id);
- if (data <= 0 || data >= MAX_SKILL)
- return 0;
- if (sd) sd->blockskill[data] = 0;
-
- return 1;
-}
-int pc_blockskill_start (struct map_session_data *sd, int skillid, int tick)
-{
- nullpo_retr (-1, sd);
-
- if (skillid >= 10000 && skillid < 10015)
- skillid -= 9500;
- else if (skillid < 1 || skillid > MAX_SKILL)
- return -1;
-
- sd->blockskill[skillid] = 1;
- return add_timer(gettick()+tick,pc_blockskill_end,sd->bl.id,skillid);
-}
-
/*==========================================
* カ?ド?入
*------------------------------------------
@@ -8276,7 +8251,6 @@ int do_init_pc(void) { add_timer_func_list(pc_calc_pvprank_timer, "pc_calc_pvprank_timer");
add_timer_func_list(pc_autosave, "pc_autosave");
add_timer_func_list(pc_spiritball_timer, "pc_spiritball_timer");
- add_timer_func_list(pc_blockskill_end, "pc_blockskill_end");
add_timer_func_list(pc_follow_timer, "pc_follow_timer");
natural_heal_prev_tick = gettick();
add_timer_interval(natural_heal_prev_tick + NATURAL_HEAL_INTERVAL, pc_natural_heal, 0, 0, NATURAL_HEAL_INTERVAL);
diff --git a/src/map/pc.h b/src/map/pc.h index a1b82dd15..66591adc8 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -94,8 +94,6 @@ int pc_bonus3(struct map_session_data *sd,int,int,int,int); int pc_bonus4(struct map_session_data *sd,int,int,int,int,int);
int pc_skill(struct map_session_data*,int,int,int);
-int pc_blockskill_start (struct map_session_data*,int,int); // [celest]
-
int pc_insert_card(struct map_session_data *sd,int idx_card,int idx_equip);
int pc_steal_item(struct map_session_data *sd,struct block_list *bl);
diff --git a/src/map/skill.c b/src/map/skill.c index 3edd9d474..44ac95464 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -1211,7 +1211,7 @@ int skill_additional_effect (struct block_list* src, struct block_list *bl, int break;
case CR_ACIDDEMONSTRATION:
- skill_break_equip(bl, EQP_WEAPON|EQP_SHIELD, 100*skilllv, BCT_ENEMY);
+ skill_break_equip(bl, EQP_WEAPON|EQP_ARMOR, 100*skilllv, BCT_ENEMY);
break;
case TK_DOWNKICK:
@@ -2816,7 +2816,7 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl,int s clif_skill_nodamage (src,bl,skillid,skilllv,
sc_start4(src,SC_WATK_ELEMENT,100,
3,20,0,0,skill_get_time2(skillid, skilllv)));
- if (sd) pc_blockskill_start (sd, skillid, skill_get_time(skillid, skilllv));
+ if (sd) skill_blockpc_start (sd, skillid, skill_get_time(skillid, skilllv));
}
break;
@@ -3057,7 +3057,7 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl,int s clif_updatestatus(sd,SP_SP);
}
}
- if (sd) pc_blockskill_start (sd, skillid, (skilllv < 5 ? 10000: 15000));
+ if (sd) skill_blockpc_start (sd, skillid, (skilllv < 5 ? 10000: 15000));
break;
/* HP吸?/HP吸?魔法 */
@@ -3711,7 +3711,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in //Initiate 10% of your damage becomes fire element.
clif_skill_nodamage (src,src,skillid,skilllv,
sc_start4(src,SC_WATK_ELEMENT,100,3,20,0,0,skill_get_time2(skillid, skilllv)));
- if (sd) pc_blockskill_start (sd, skillid, skill_get_time(skillid, skilllv));
+ if (sd) skill_blockpc_start (sd, skillid, skill_get_time(skillid, skilllv));
break;
case LK_BERSERK: /* バ?サ?ク */
case KN_AUTOCOUNTER: /* オ?トカウンタ? */
@@ -3784,7 +3784,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in clif_skill_nodamage(src,bl,skillid,skilllv,
sc_start(bl,type,100,skilllv,skill_get_time(skillid,skilllv)));
if (sd)
- pc_blockskill_start (sd, skillid, skill_get_time2(skillid,skilllv));
+ skill_blockpc_start (sd, skillid, skill_get_time2(skillid,skilllv));
break;
case AS_ENCHANTPOISON: // Prevent spamming [Valaris]
@@ -5282,6 +5282,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in hp = hp * (100 + pc_checkskill(dstsd,SM_RECOVERY)*10)/100;
}
tbl.id = 0;
+ tbl.type = BL_NUL;
tbl.m = src->m;
tbl.x = src->x;
tbl.y = src->y;
@@ -6062,7 +6063,7 @@ int skill_castend_pos2( struct block_list *src, int x,int y,int skillid,int skil case MO_BODYRELOCATION:
if (sd) {
pc_movepos(sd, x, y, 1);
- pc_blockskill_start (sd, MO_EXTREMITYFIST, 2000);
+ skill_blockpc_start (sd, MO_EXTREMITYFIST, 2000);
} else if (src->type == BL_MOB) {
struct mob_data *md = (struct mob_data *)src;
mob_warp(md, -1, x, y, 0);
@@ -6935,14 +6936,17 @@ int skill_unit_onplace_timer(struct skill_unit *src,struct block_list *bl,unsign case UNT_SPIDERWEB:
case UNT_ANKLESNARE:
- if(sg->val2==0 && (!tsc || tsc->data[type].timer==-1 )){
+ if(sg->val2==0 && tsc && tsc->data[type].timer==-1){
int sec = skill_get_time2(sg->skill_id,sg->skill_lv);
if (sc_start(bl,type,100,sg->skill_lv,sec))
{
+ struct TimerData* td = get_timer(tsc->data[type].timer);
+ if (td) sec = DIFF_TICK(td->tick, tick);
map_moveblock(bl, src->bl.x, src->bl.y, tick);
clif_fixpos(bl);
sg->val2=bl->id;
- }
+ } else
+ sec = 3000; //Couldn't trap it?
//clif_01ac(&src->bl); //Removed? Check the openkore description of this packet: [Skotlex]
// 01AC: long ID
// Indicates that an object is trapped, but ID is not a
@@ -8005,6 +8009,7 @@ int skill_check_condition(struct map_session_data *sd,int type) case HW_GANBANTEIN:
force_gem_flag = 1;
break;
+ case AM_BERSERKPITCHER:
case AM_POTIONPITCHER:
case CR_SLIMPITCHER:
case MG_STONECURSE:
@@ -10926,6 +10931,33 @@ int skill_arrow_create( struct map_session_data *sd,int nameid) return 0;
}
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int skill_blockpc_end(int tid,unsigned int tick,int id,int data)
+{
+ struct map_session_data *sd = map_id2sd(id);
+ if (data <= 0 || data >= MAX_SKILL)
+ return 0;
+ if (sd) sd->blockskill[data] = 0;
+
+ return 1;
+}
+int skill_blockpc_start(struct map_session_data *sd, int skillid, int tick)
+{
+ nullpo_retr (-1, sd);
+
+ if (skillid >= GD_SKILLBASE)
+ skillid = GD_SKILLRANGEMIN + skillid - GD_SKILLBASE;
+ if (skillid < 1 || skillid > MAX_SKILL)
+ return -1;
+
+ sd->blockskill[skillid] = 1;
+ return add_timer(gettick()+tick,skill_blockpc_end,sd->bl.id,skillid);
+}
+
+
/*----------------------------------------------------------------------------
* ?炎化系
*/
@@ -11661,6 +11693,7 @@ int do_init_skill(void) add_timer_func_list(skill_castend_id,"skill_castend_id");
add_timer_func_list(skill_castend_pos,"skill_castend_pos");
add_timer_func_list(skill_timerskill,"skill_timerskill");
+ add_timer_func_list(skill_blockpc_end, "skill_blockpc_end");
add_timer_interval(gettick()+SKILLUNITTIMER_INVERVAL,skill_unit_timer,0,0,SKILLUNITTIMER_INVERVAL);
diff --git a/src/map/skill.h b/src/map/skill.h index 0939d6f9e..bdb545d22 100644 --- a/src/map/skill.h +++ b/src/map/skill.h @@ -241,6 +241,8 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int int skill_castend_damage_id( struct block_list* src, struct block_list *bl,int skillid,int skilllv,unsigned int tick,int flag );
int skill_castend_pos2( struct block_list *src, int x,int y,int skillid,int skilllv,unsigned int tick,int flag);
+int skill_blockpc_start (struct map_session_data*,int,int); // [celest]
+
// スキル攻?一括?理
int skill_attack( int attack_type, struct block_list* src, struct block_list *dsrc,
struct block_list *bl,int skillid,int skilllv,unsigned int tick,int flag );
diff --git a/src/map/status.c b/src/map/status.c index 452f57ed5..c8c022c55 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -156,7 +156,7 @@ void initChangeTables(void) { set_sc(AM_CP_ARMOR, SC_CP_ARMOR, SI_CP_ARMOR);
set_sc(AM_CP_HELM, SC_CP_HELM, SI_CP_HELM);
set_sc(CR_AUTOGUARD, SC_AUTOGUARD, SI_AUTOGUARD);
- set_sc(CR_SHIELDCHARGE, SC_STUN, SI_AUTOGUARD);
+ set_sc(CR_SHIELDCHARGE, SC_STUN, SI_BLANK);
set_sc(CR_REFLECTSHIELD, SC_REFLECTSHIELD, SI_REFLECTSHIELD);
set_sc(CR_HOLYCROSS, SC_BLIND, SI_BLANK);
set_sc(CR_GRANDCROSS, SC_BLIND, SI_BLANK);
|