- Spider web can again be recasted on target.
- Modified Spider Web so it can instantly retrap a target, rather than idling on the ground waiting for a new target. - Cleaned up some the rude-attacked code, being attacked while under spider web now triggers rude-attacked. - Sped up the FrostJoke/Scream message length chat check. git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9828 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
81c50c19b7
commit
eabdf9af64
@ -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.
|
||||||
|
|
||||||
2007/02/08
|
2007/02/08
|
||||||
|
* Modified Spider Web so it can instantly retrap a target, rather than
|
||||||
|
idling on the ground waiting for a new target.
|
||||||
|
* Cleaned up some the rude-attacked code, being attacked while under spider
|
||||||
|
web now triggers rude-attacked. [Skotlex]
|
||||||
* Added a missing null pointer check in clif_parse_globalmessage
|
* Added a missing null pointer check in clif_parse_globalmessage
|
||||||
* Fixed the new socket code, which was triggering the inactivity timeout
|
* Fixed the new socket code, which was triggering the inactivity timeout
|
||||||
on the servers' listening sockets
|
on the servers' listening sockets
|
||||||
|
@ -20,6 +20,8 @@
|
|||||||
|
|
||||||
========================
|
========================
|
||||||
|
|
||||||
|
02/09
|
||||||
|
* Spider web can again be recasted on target. [Skotlex]
|
||||||
02/08
|
02/08
|
||||||
* Fixed a skill_db.txt typo for AS_ENCHANTPOISON introduced in r9794 [ultramage]
|
* Fixed a skill_db.txt typo for AS_ENCHANTPOISON introduced in r9794 [ultramage]
|
||||||
02/07
|
02/07
|
||||||
|
@ -80,7 +80,7 @@
|
|||||||
369,0xb3, , -1, 0,10000,all, 0x008 //PA_GOSPEL
|
369,0xb3, , -1, 0,10000,all, 0x008 //PA_GOSPEL
|
||||||
395,0xb5, , 4, 0, -1,all, 0x200 //CG_MOONLIT
|
395,0xb5, , 4, 0, -1,all, 0x200 //CG_MOONLIT
|
||||||
404,0xb6, , -1, 0, -1,all, 0x000 //PF_FOGWALL
|
404,0xb6, , -1, 0, -1,all, 0x000 //PF_FOGWALL
|
||||||
405,0xb7, , 0, 1,1000,enemy, 0x002 //PF_SPIDERWEB
|
405,0xb7, , 0, 1,1000,enemy, 0x000 //PF_SPIDERWEB
|
||||||
409,0xb2, , 0,-1, -1,noone, 0x000 //WE_CALLBABY
|
409,0xb2, , 0,-1, -1,noone, 0x000 //WE_CALLBABY
|
||||||
410,0xb2, , 0,-1, -1,noone, 0x000 //WE_CALLPARENT
|
410,0xb2, , 0,-1, -1,noone, 0x000 //WE_CALLPARENT
|
||||||
428,0x86, , 0, 1, 200,enemy, 0x000 //SG_SUN_WARM
|
428,0x86, , 0, 1, 200,enemy, 0x000 //SG_SUN_WARM
|
||||||
|
@ -8548,11 +8548,12 @@ void clif_parse_GlobalMessage(int fd, struct map_session_data* sd)
|
|||||||
if (messagelen > CHAT_SIZE) { // messages mustn't be too long
|
if (messagelen > CHAT_SIZE) { // messages mustn't be too long
|
||||||
int i;
|
int i;
|
||||||
// special case here - allow some more freedom for frost joke & dazzler
|
// special case here - allow some more freedom for frost joke & dazzler
|
||||||
for(i = 0; i < MAX_SKILLTIMERSKILL; i++) // the only way to check ~.~
|
// TODO:? You could use a state flag when FrostJoke/Scream is used, and unset it once the skill triggers. [Skotlex]
|
||||||
if (sd->ud.skilltimerskill[i] && sd->ud.skilltimerskill[i]->timer != -1 &&
|
for(i = 0; i < MAX_SKILLTIMERSKILL && sd->ud.skilltimerskill[i] &&
|
||||||
(sd->ud.skilltimerskill[i]->skill_id == BA_FROSTJOKE || sd->ud.skilltimerskill[i]->skill_id == DC_SCREAM))
|
sd->ud.skilltimerskill[i]->skill_id != BA_FROSTJOKE &&
|
||||||
break;
|
sd->ud.skilltimerskill[i]->skill_id != DC_SCREAM; i++);
|
||||||
if (i == MAX_SKILLTIMERSKILL) { // normal message, too long
|
|
||||||
|
if (i == MAX_SKILLTIMERSKILL || !sd->ud.skilltimerskill[i]) { // normal message, too long
|
||||||
ShowWarning("clif_parse_GlobalMessage: Player '%s' sent a message too long ('%.*s')!", sd->status.name, CHAT_SIZE, message);
|
ShowWarning("clif_parse_GlobalMessage: Player '%s' sent a message too long ('%.*s')!", sd->status.name, CHAT_SIZE, message);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1122,37 +1122,44 @@ static int mob_ai_sub_hard(struct block_list *bl,va_list ap)
|
|||||||
if (md->attacked_id && mode&MD_CANATTACK)
|
if (md->attacked_id && mode&MD_CANATTACK)
|
||||||
{
|
{
|
||||||
if (md->attacked_id == md->target_id)
|
if (md->attacked_id == md->target_id)
|
||||||
{
|
{ //Rude attacked check.
|
||||||
if (!battle_check_range(&md->bl, tbl, md->status.rhw.range) &&
|
if (!battle_check_range(&md->bl, tbl, md->status.rhw.range) &&
|
||||||
(
|
( //Can't attack back and can't reach back.
|
||||||
(!can_move && battle_config.mob_ai&0x2) ||
|
(!can_move && DIFF_TICK(tick, md->ud.canmove_tick) > 0 &&
|
||||||
|
(battle_config.mob_ai&0x2 || md->sc.data[SC_SPIDERWEB].timer != -1)) ||
|
||||||
(!mob_can_reach(md, tbl, md->min_chase, MSS_RUSH))
|
(!mob_can_reach(md, tbl, md->min_chase, MSS_RUSH))
|
||||||
) &&
|
) &&
|
||||||
DIFF_TICK(tick, md->ud.canmove_tick) > 0 &&
|
md->state.attacked_count++ >= RUDE_ATTACKED_COUNT &&
|
||||||
md->state.attacked_count++ >= RUDE_ATTACKED_COUNT
|
!mobskill_use(md, tick, MSC_RUDEATTACKED) && //If can't rude Attack
|
||||||
)
|
can_move && unit_escape(bl, tbl, rand()%10 +1)) //Attempt escape
|
||||||
{ //Rude-attacked (avoid triggering due to can-walk delay).
|
{ //Escaped
|
||||||
if (!mobskill_use(md, tick, MSC_RUDEATTACKED) && can_move)
|
md->attacked_id = 0;
|
||||||
unit_escape(bl, tbl, rand()%10 +1);
|
return 0;
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
if ((abl= map_id2bl(md->attacked_id)) && (!tbl || mob_can_changetarget(md, abl, mode))) {
|
if ((abl= map_id2bl(md->attacked_id)) && (!tbl || mob_can_changetarget(md, abl, mode))) {
|
||||||
if (md->bl.m != abl->m || abl->prev == NULL ||
|
if (md->bl.m != abl->m || abl->prev == NULL ||
|
||||||
(dist = distance_bl(&md->bl, abl)) >= MAX_MINCHASE ||
|
(dist = distance_bl(&md->bl, abl)) >= MAX_MINCHASE ||
|
||||||
battle_check_target(bl, abl, BCT_ENEMY) <= 0 ||
|
battle_check_target(bl, abl, BCT_ENEMY) <= 0 ||
|
||||||
(battle_config.mob_ai&0x2 && !status_check_skilluse(bl, abl, 0, 0)) ||
|
(battle_config.mob_ai&0x2 && !status_check_skilluse(bl, abl, 0, 0)) || //Retaliate check
|
||||||
!mob_can_reach(md, abl, dist+md->db->range3, MSS_RUSH) ||
|
(!battle_check_range(&md->bl, abl, md->status.rhw.range) &&
|
||||||
( //Gangster Paradise check
|
( //Reach check
|
||||||
abl->type == BL_PC && !(mode&MD_BOSS) &&
|
(!can_move && DIFF_TICK(tick, md->ud.canmove_tick) > 0 &&
|
||||||
((TBL_PC*)abl)->state.gangsterparadise
|
(battle_config.mob_ai&0x2 || md->sc.data[SC_SPIDERWEB].timer != -1)) ||
|
||||||
|
!mob_can_reach(md, abl, dist+md->db->range3, MSS_RUSH)
|
||||||
)
|
)
|
||||||
) { //Can't attack back
|
)
|
||||||
|
) { //Rude attacked
|
||||||
if (md->state.attacked_count++ >= RUDE_ATTACKED_COUNT &&
|
if (md->state.attacked_count++ >= RUDE_ATTACKED_COUNT &&
|
||||||
!mobskill_use(md, tick, MSC_RUDEATTACKED) && can_move)
|
!mobskill_use(md, tick, MSC_RUDEATTACKED) && can_move &&
|
||||||
unit_escape(bl, abl, rand()%10 +1);
|
unit_escape(bl, abl, rand()%10 +1))
|
||||||
|
{ //Escaped.
|
||||||
|
//TODO: Maybe it shouldn't attempt to run if it has another, valid target?
|
||||||
|
md->attacked_id = 0;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
} else if (!(battle_config.mob_ai&0x2) && !status_check_skilluse(bl, abl, 0, 0)) {
|
} else if (!(battle_config.mob_ai&0x2) && !status_check_skilluse(bl, abl, 0, 0)) {
|
||||||
//Can't attack back, but didn't invoke a rude attacked skill...
|
//Can't attack back, but didn't invoke a rude attacked skill...
|
||||||
md->attacked_id = 0; //Simply unlock, shouldn't attempt to run away when in dumb_ai mode.
|
|
||||||
} else { //Attackable
|
} else { //Attackable
|
||||||
if (!tbl || dist < md->status.rhw.range || !check_distance_bl(&md->bl, tbl, dist)
|
if (!tbl || dist < md->status.rhw.range || !check_distance_bl(&md->bl, tbl, dist)
|
||||||
|| battle_gettarget(tbl) != md->bl.id)
|
|| battle_gettarget(tbl) != md->bl.id)
|
||||||
|
@ -7173,9 +7173,9 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns
|
|||||||
|
|
||||||
case UNT_SPIDERWEB:
|
case UNT_SPIDERWEB:
|
||||||
case UNT_ANKLESNARE:
|
case UNT_ANKLESNARE:
|
||||||
if(sg->val2==0 && tsc && tsc->data[type].timer==-1){
|
if(sg->val2==0 && tsc){
|
||||||
int sec = skill_get_time2(sg->skill_id,sg->skill_lv);
|
int sec = skill_get_time2(sg->skill_id,sg->skill_lv);
|
||||||
if (sc_start(bl,type,100,sg->skill_lv,sec))
|
if (sc_start2(bl,type,100,sg->skill_lv,sg->group_id,sec))
|
||||||
{
|
{
|
||||||
struct TimerData* td = get_timer(tsc->data[type].timer);
|
struct TimerData* td = get_timer(tsc->data[type].timer);
|
||||||
if (td) sec = DIFF_TICK(td->tick, tick);
|
if (td) sec = DIFF_TICK(td->tick, tick);
|
||||||
@ -7447,7 +7447,8 @@ int skill_unit_onout (struct skill_unit *src, struct block_list *bl, unsigned in
|
|||||||
struct block_list *target = map_id2bl(sg->val2);
|
struct block_list *target = map_id2bl(sg->val2);
|
||||||
if (target && target==bl)
|
if (target && target==bl)
|
||||||
{
|
{
|
||||||
status_change_end(bl,SC_SPIDERWEB,-1);
|
if (sc && sc->data[type].timer!=-1 && sc->data[type].val2 == sg->group_id)
|
||||||
|
status_change_end(bl,type,-1);
|
||||||
sg->limit = DIFF_TICK(tick,sg->tick)+1000;
|
sg->limit = DIFF_TICK(tick,sg->tick)+1000;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user