* Fixed bug http://rathena.org/board/tracker/issue-8330-secure-npctimeout-bug-for-those-npc-who-have-no-dialog-window/
Merged Hercules adc2e6e
This commit is contained in:
parent
4d8558489b
commit
54dfc67925
@ -1919,6 +1919,22 @@ void clif_scriptclose(struct map_session_data *sd, int npcid)
|
|||||||
WFIFOSET(fd,packet_len(0xb6));
|
WFIFOSET(fd,packet_len(0xb6));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// [Ind/Hercules]
|
||||||
|
/// Close script when player is idle
|
||||||
|
/// 08d6 <npc id>.L
|
||||||
|
void clif_scriptclear(struct map_session_data *sd, int npcid)
|
||||||
|
{
|
||||||
|
int fd;
|
||||||
|
|
||||||
|
nullpo_retv(sd);
|
||||||
|
|
||||||
|
fd=sd->fd;
|
||||||
|
WFIFOHEAD(fd, packet_len(0x8d6));
|
||||||
|
WFIFOW(fd,0)=0x8d6;
|
||||||
|
WFIFOL(fd,2)=npcid;
|
||||||
|
WFIFOSET(fd,packet_len(0x8d6));
|
||||||
|
}
|
||||||
|
|
||||||
/*==========================================
|
/*==========================================
|
||||||
*
|
*
|
||||||
*------------------------------------------*/
|
*------------------------------------------*/
|
||||||
@ -17541,7 +17557,7 @@ void packetdb_readdb(void)
|
|||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
//#0x08C0
|
//#0x08C0
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10,
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10,
|
||||||
9, 7, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
9, 7, 10, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
//#0x0900
|
//#0x0900
|
||||||
|
@ -392,6 +392,7 @@ void clif_selllist(struct map_session_data *sd); //self
|
|||||||
void clif_scriptmes(struct map_session_data *sd, int npcid, const char *mes); //self
|
void clif_scriptmes(struct map_session_data *sd, int npcid, const char *mes); //self
|
||||||
void clif_scriptnext(struct map_session_data *sd,int npcid); //self
|
void clif_scriptnext(struct map_session_data *sd,int npcid); //self
|
||||||
void clif_scriptclose(struct map_session_data *sd, int npcid); //self
|
void clif_scriptclose(struct map_session_data *sd, int npcid); //self
|
||||||
|
void clif_scriptclear(struct map_session_data *sd, int npcid); //self
|
||||||
void clif_scriptmenu(struct map_session_data* sd, int npcid, const char* mes); //self
|
void clif_scriptmenu(struct map_session_data* sd, int npcid, const char* mes); //self
|
||||||
void clif_scriptinput(struct map_session_data *sd, int npcid); //self
|
void clif_scriptinput(struct map_session_data *sd, int npcid); //self
|
||||||
void clif_scriptinputstr(struct map_session_data *sd, int npcid); // self
|
void clif_scriptinputstr(struct map_session_data *sd, int npcid); // self
|
||||||
|
@ -6750,6 +6750,7 @@ void pc_close_npc(struct map_session_data *sd,int flag)
|
|||||||
sd->npc_idle_timer = INVALID_TIMER;
|
sd->npc_idle_timer = INVALID_TIMER;
|
||||||
#endif
|
#endif
|
||||||
clif_scriptclose(sd,sd->npc_id);
|
clif_scriptclose(sd,sd->npc_id);
|
||||||
|
clif_scriptclear(sd,sd->npc_id); // [Ind/Hercules]
|
||||||
if(sd->st && sd->st->state == END ) {// free attached scripts that are waiting
|
if(sd->st && sd->st->state == END ) {// free attached scripts that are waiting
|
||||||
script_free_state(sd->st);
|
script_free_state(sd->st);
|
||||||
sd->st = NULL;
|
sd->st = NULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user