- Updated npc_event_dequeue to free up your current npc information, and not just the npc_id

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9472 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
skotlex 2006-12-12 15:05:17 +00:00
parent 84f8ec45d5
commit e3d9258754
2 changed files with 17 additions and 2 deletions

View File

@ -4,6 +4,8 @@ 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.
2006/12/12 2006/12/12
* Updated npc_event_dequeue to free up your current npc information, and
not just the npc_id.
* Modified the skill damage packet and the knockback packets to mimic aegis * Modified the skill damage packet and the knockback packets to mimic aegis
sent packets for such skills. sent packets for such skills.
* Removed CART_MASK as OPTION_CART can take care of that. * Removed CART_MASK as OPTION_CART can take care of that.

View File

@ -162,7 +162,21 @@ int npc_event_dequeue(struct map_session_data *sd)
{ {
nullpo_retr(0, sd); nullpo_retr(0, sd);
sd->npc_id=0; if(sd->npc_id)
{ //Current script is aborted.
if(sd->state.using_fake_npc){
clif_clearchar_id(sd->npc_id, 0, sd->fd);
sd->state.using_fake_npc = 0;
}
if (sd->st) {
sd->st->pos = -1;
script_free_stack(sd->st->stack);
aFree(sd->st);
sd->st = NULL;
}
sd->npc_id = 0;
}
if (!sd->eventqueue[0][0]) if (!sd->eventqueue[0][0])
return 0; //Nothing to dequeue return 0; //Nothing to dequeue
@ -1079,7 +1093,6 @@ int npc_click(struct map_session_data *sd,struct npc_data *nd)
switch(nd->bl.subtype) { switch(nd->bl.subtype) {
case SHOP: case SHOP:
clif_npcbuysell(sd,nd->bl.id); clif_npcbuysell(sd,nd->bl.id);
npc_event_dequeue(sd);
break; break;
case SCRIPT: case SCRIPT:
run_script(nd->u.scr.script,0,sd->bl.id,nd->bl.id); run_script(nd->u.scr.script,0,sd->bl.id,nd->bl.id);