- HW_GANBANTEIN now also removes traps.

- PF_DOUBLECASTING takes effect amotion time after the initial cast instead of amotion*div
- SG_KNOWLEDGE now lasts time1 after you quit a map before it clears out (defaults to 10 mins currently)
- Modified Intravision to modify the status-change packet to specify SI_INTRAVISION instead of cloaking/hiding/chasewalk.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5774 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
skotlex 2006-03-27 16:14:00 +00:00
parent 876cc3f814
commit 17c15fc2bc
7 changed files with 65 additions and 14 deletions

View File

@ -6,6 +6,14 @@ GOES INTO TRUNK AND WILL BE MERGED INTO STABLE BY VALARIS AND WIZPUTER. -- VALAR
2006/03/27 2006/03/27
* HW_GANBANTEIN now also removes traps. [Skotlex]
* PF_DOUBLECASTING takes effect amotion time after the initial cast instead
of amotion*div [Skotlex]
* SG_KNOWLEDGE now lasts time1 after you quit a map before it clears out
(defaults to 10 mins currently) [Skotlex]
* Modified Intravision to modify the status-change packet to specify
SI_INTRAVISION instead of cloaking/hiding/chasewalk. I believe this is how
intravision actually works. [Skotlex]
* Pet catching now uses the menuskill variables to prevent item usage from * Pet catching now uses the menuskill variables to prevent item usage from
disrupting the catch process. [Skotlex] disrupting the catch process. [Skotlex]
* Added Safetywall to the list not blocked by Dispell. [Skotlex] * Added Safetywall to the list not blocked by Dispell. [Skotlex]

View File

@ -752,6 +752,8 @@
434,1000,0,0,0,0 434,1000,0,0,0,0
//SG_FRIEND //SG_FRIEND
442,0,0,0,10000,0 442,0,0,0,10000,0
//SG_KNOWLEDGE
443,0,0,0,600000,0
//SG_FUSION //SG_FUSION
444,1000,1000,0,600000,0 444,1000,1000,0,600000,0

View File

@ -320,7 +320,20 @@ int clif_send_sub(struct block_list *bl, va_list ap)
//Check if hidden, better to modify the char's buffer than the //Check if hidden, better to modify the char's buffer than the
//given buffer to prevent intravision affecting the packet as //given buffer to prevent intravision affecting the packet as
//it's being received by everyone. [Skotlex] //it's being received by everyone. [Skotlex]
if ((sd->special_state.intravision || sd->sc.data[SC_INTRAVISION].timer != -1 )
&& bl != src_bl && WFIFOW(sd->fd,0) == 0x0196)
{ //New intravision method, just modify the status change/start packet. [Skotlex]
switch (WFIFOW(sd->fd,2)) {
case SI_HIDING:
case SI_CLOAKING:
case SI_CHASEWALK:
WFIFOW(sd->fd,2) = SI_INTRAVISION;
}
}
/* Previous implementation.
if ((sd->special_state.intravision || sd->sc.data[SC_INTRAVISION].timer != -1 ) && bl != src_bl) { if ((sd->special_state.intravision || sd->sc.data[SC_INTRAVISION].timer != -1 ) && bl != src_bl) {
struct status_change *sc = status_get_sc(src_bl); struct status_change *sc = status_get_sc(src_bl);
if(sc && (sc->option&(OPTION_HIDE|OPTION_CLOAK))) if(sc && (sc->option&(OPTION_HIDE|OPTION_CLOAK)))
{ //optionÌ<E2809A>C<EFBFBD>³ { //optionÌ<E2809A>C<EFBFBD>³
@ -342,6 +355,7 @@ int clif_send_sub(struct block_list *bl, va_list ap)
} }
} }
} }
*/
WFIFOSET(sd->fd,len); WFIFOSET(sd->fd,len);
} }
} }
@ -8763,6 +8777,8 @@ void clif_parse_WantToConnection(int fd, struct map_session_data *sd)
*/ */
void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) void clif_parse_LoadEndAck(int fd,struct map_session_data *sd)
{ {
int i;
if(sd->bl.prev != NULL) if(sd->bl.prev != NULL)
return; return;
@ -8889,7 +8905,14 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd)
ShowStatus("%d '"CL_WHITE"%s"CL_RESET"' events executed.\n", ShowStatus("%d '"CL_WHITE"%s"CL_RESET"' events executed.\n",
npc_event_doall_id(script_config.loadmap_event_name, sd->bl.id), script_config.loadmap_event_name); npc_event_doall_id(script_config.loadmap_event_name, sd->bl.id), script_config.loadmap_event_name);
} }
if (pc_checkskill(sd,SG_KNOWLEDGE) || if ((i = pc_checkskill(sd,SG_KNOWLEDGE)) > 0) {
if(sd->bl.m == sd->feel_map[0].m
|| sd->bl.m == sd->feel_map[1].m
|| sd->bl.m == sd->feel_map[2].m)
sc_start(&sd->bl, SC_KNOWLEDGE, 100, i, skill_get_time(SG_KNOWLEDGE, i));
}
if (
pc_checkskill(sd,SG_SUN_COMFORT) || pc_checkskill(sd,SG_SUN_COMFORT) ||
pc_checkskill(sd,SG_MOON_COMFORT) || pc_checkskill(sd,SG_MOON_COMFORT) ||
pc_checkskill(sd,SG_STAR_COMFORT)) pc_checkskill(sd,SG_STAR_COMFORT))
@ -11758,7 +11781,11 @@ void clif_parse_FeelSaveOk(int fd,struct map_session_data *sd)
WFIFOL(fd,26)=sd->bl.id; WFIFOL(fd,26)=sd->bl.id;
WFIFOW(fd,30)=i; WFIFOW(fd,30)=i;
WFIFOSET(fd, packet_len_table[0x20e]); WFIFOSET(fd, packet_len_table[0x20e]);
if (pc_checkskill(sd,SG_KNOWLEDGE)) status_calc_pc(sd,0);
if (sd->bl.m == sd->feel_map[i].m &&
(i = pc_checkskill(sd,SG_KNOWLEDGE)) > 0)
sc_start(&sd->bl, SC_KNOWLEDGE, 100, i, skill_get_time(SG_KNOWLEDGE, i));
sd->menuskill_lv = sd->menuskill_id = 0; sd->menuskill_lv = sd->menuskill_id = 0;
} }

View File

@ -3020,6 +3020,10 @@ int pc_setpos(struct map_session_data *sd,unsigned short mapindex,int x,int y,in
status_change_end(&sd->bl,SC_MOON_COMFORT,-1); status_change_end(&sd->bl,SC_MOON_COMFORT,-1);
if (sd->sc.data[SC_STAR_COMFORT].timer != -1) if (sd->sc.data[SC_STAR_COMFORT].timer != -1)
status_change_end(&sd->bl,SC_STAR_COMFORT,-1); status_change_end(&sd->bl,SC_STAR_COMFORT,-1);
if (sd->sc.data[SC_KNOWLEDGE].timer != -1) {
delete_timer(sd->sc.data[SC_KNOWLEDGE].timer, status_change_timer);
sd->sc.data[SC_KNOWLEDGE].timer = add_timer(gettick() + skill_get_time(SG_KNOWLEDGE, sd->sc.data[SC_KNOWLEDGE].val1), status_change_timer, sd->bl.id, SC_KNOWLEDGE);
}
} }
} }

View File

@ -2024,7 +2024,8 @@ int skill_attack( int attack_type, struct block_list* src, struct block_list *ds
sc->count && sc->data[SC_DOUBLECAST].timer != -1 && sc->count && sc->data[SC_DOUBLECAST].timer != -1 &&
rand() % 100 < 40+10*sc->data[SC_DOUBLECAST].val1) rand() % 100 < 40+10*sc->data[SC_DOUBLECAST].val1)
{ {
skill_addtimerskill(src, tick + dmg.div_*dmg.amotion, bl->id, 0, 0, skillid, skilllv, BF_MAGIC, flag|1); // skill_addtimerskill(src, tick + dmg.div_*dmg.amotion, bl->id, 0, 0, skillid, skilllv, BF_MAGIC, flag|1);
skill_addtimerskill(src, tick + dmg.amotion, bl->id, 0, 0, skillid, skilllv, BF_MAGIC, flag|1);
} }
map_freeblock_unlock(); map_freeblock_unlock();
@ -9005,8 +9006,9 @@ int skill_ganbatein(struct block_list *bl, va_list ap )
if ((unit = (struct skill_unit *)bl) == NULL || unit->group == NULL) if ((unit = (struct skill_unit *)bl) == NULL || unit->group == NULL)
return 0; return 0;
if (skill_get_inf2(unit->group->skill_id)&INF2_TRAP) // Apparently, it REMOVES traps.
return 0; //Do not remove traps. // if (skill_get_inf2(unit->group->skill_id)&INF2_TRAP)
// return 0; //Do not remove traps.
if (unit->group->skill_id == SA_LANDPROTECTOR) if (unit->group->skill_id == SA_LANDPROTECTOR)
skill_delunit(unit); skill_delunit(unit);

View File

@ -254,6 +254,7 @@ void initChangeTables(void) {
set_sc(SG_SUN_COMFORT, SC_SUN_COMFORT, SI_SUN_COMFORT); set_sc(SG_SUN_COMFORT, SC_SUN_COMFORT, SI_SUN_COMFORT);
set_sc(SG_MOON_COMFORT, SC_MOON_COMFORT, SI_MOON_COMFORT); set_sc(SG_MOON_COMFORT, SC_MOON_COMFORT, SI_MOON_COMFORT);
set_sc(SG_STAR_COMFORT, SC_STAR_COMFORT, SI_STAR_COMFORT); set_sc(SG_STAR_COMFORT, SC_STAR_COMFORT, SI_STAR_COMFORT);
set_sc(SG_KNOWLEDGE, SC_KNOWLEDGE, SI_BLANK);
set_sc(SG_FUSION, SC_FUSION, SI_BLANK); set_sc(SG_FUSION, SC_FUSION, SI_BLANK);
set_sc(BS_ADRENALINE2, SC_ADRENALINE2, SI_ADRENALINE2); set_sc(BS_ADRENALINE2, SC_ADRENALINE2, SI_ADRENALINE2);
set_sc(SL_KAIZEL, SC_KAIZEL, SI_KAIZEL); set_sc(SL_KAIZEL, SC_KAIZEL, SI_KAIZEL);
@ -1531,9 +1532,8 @@ int status_calc_pc(struct map_session_data* sd,int first)
sd->max_weight += 2000*skill; sd->max_weight += 2000*skill;
if(pc_isriding(sd) && pc_checkskill(sd,KN_RIDING)>0) if(pc_isriding(sd) && pc_checkskill(sd,KN_RIDING)>0)
sd->max_weight += 10000; sd->max_weight += 10000;
if( (skill=pc_checkskill(sd,SG_KNOWLEDGE))>0) //SG skill [Komurka] if(sd->sc.data[SC_KNOWLEDGE].timer != -1)
if(sd->bl.m == sd->feel_map[0].m || sd->bl.m == sd->feel_map[1].m || sd->bl.m == sd->feel_map[2].m) sd->max_weight += sd->max_weight*sd->sc.data[SC_KNOWLEDGE].val1/10;
sd->max_weight += sd->max_weight*skill/10;
// Skill SP cost // Skill SP cost
if((skill=pc_checkskill(sd,HP_MANARECHARGE))>0 ) if((skill=pc_checkskill(sd,HP_MANARECHARGE))>0 )
@ -4297,6 +4297,7 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val
break; break;
} }
break; break;
case SC_COMBO: case SC_COMBO:
{ {
struct unit_data *ud = unit_bl2ud(bl); struct unit_data *ud = unit_bl2ud(bl);
@ -4404,6 +4405,7 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val
case SC_DELUGE: case SC_DELUGE:
case SC_CARTBOOST: /* カ?トブ?スト */ case SC_CARTBOOST: /* カ?トブ?スト */
case SC_QUAGMIRE: /* クァグマイア */ case SC_QUAGMIRE: /* クァグマイア */
case SC_KNOWLEDGE:
calc_flag = 1; calc_flag = 1;
break; break;
@ -4829,6 +4831,7 @@ int status_change_end( struct block_list* bl , int type,int tid )
case SC_SKE: case SC_SKE:
case SC_SWOO: // [marquis007] case SC_SWOO: // [marquis007]
case SC_SKA: // [marquis007] case SC_SKA: // [marquis007]
case SC_KNOWLEDGE:
calc_flag = 1; calc_flag = 1;
break; break;
@ -5370,6 +5373,13 @@ int status_change_timer(int tid, unsigned int tick, int id, int data)
} }
break; break;
case SC_KNOWLEDGE:
if (sd) {
if(bl->m != sd->feel_map[0].m
&& bl->m != sd->feel_map[1].m
&& bl->m != sd->feel_map[2].m)
break; //End it
} //Otherwise continue.
// Status changes that don't have a time limit // Status changes that don't have a time limit
case SC_AETERNA: case SC_AETERNA:
case SC_TRICKDEAD: case SC_TRICKDEAD:
@ -5388,6 +5398,7 @@ int status_change_timer(int tid, unsigned int tick, int id, int data)
case SC_RUN: case SC_RUN:
case SC_DODGE: case SC_DODGE:
case SC_AUTOBERSERK: //continues until triggered off manually. [Skotlex] case SC_AUTOBERSERK: //continues until triggered off manually. [Skotlex]
case SC_NEN:
sc->data[type].timer=add_timer( 1000*600+tick,status_change_timer, bl->id, data ); sc->data[type].timer=add_timer( 1000*600+tick,status_change_timer, bl->id, data );
return 0; return 0;
@ -5548,10 +5559,6 @@ int status_change_timer(int tid, unsigned int tick, int id, int data)
} }
} }
break; break;
// gs_status_change_timer [Vicious]
case SC_NEN:
sc->data[type].timer=add_timer( 1000*600+tick,status_change_timer, bl->id, data );
return 0;
} }
// default for all non-handled control paths // default for all non-handled control paths

View File

@ -240,6 +240,7 @@ enum {
SC_KAENSIN, SC_KAENSIN,
SC_SUITON, SC_SUITON,
SC_NEN, SC_NEN,
SC_KNOWLEDGE,
SC_MAX, //Automatically updated max, used in for's and at startup to check we are within bounds. [Skotlex] SC_MAX, //Automatically updated max, used in for's and at startup to check we are within bounds. [Skotlex]
}; };
@ -362,7 +363,7 @@ enum {
SI_STAR_COMFORT = 171, SI_STAR_COMFORT = 171,
SI_PRESERVE = 181, SI_PRESERVE = 181,
SI_BATTLEORDERS = 182, SI_BATTLEORDERS = 182,
// 184 = WTF?? creates the black shape of 4_m_02 NPC, with NPC talk cursor SI_INTRAVISION = 184, //WTF?? creates the black shape of 4_m_02 NPC, with NPC talk cursor. Supposedly intravision shows this.
SI_DOUBLECAST = 186, SI_DOUBLECAST = 186,
SI_MAXOVERTHRUST = 188, SI_MAXOVERTHRUST = 188,
SI_TAROT = 191, // the icon allows no doubt... but what is it really used for ?? [DracoRPG] SI_TAROT = 191, // the icon allows no doubt... but what is it really used for ?? [DracoRPG]