Index: src/map/atcommand.c
===================================================================
--- src/map/atcommand.c (revision 17296)
+++ src/map/atcommand.c (working copy)
@@ -8904,6 +8904,8 @@
return channel_pcban(sd,sub1,map_nick2sd(sub2),1);
} else if ( strcmpi(key,"unbanall") == 0 ) {
return channel_pcban(sd,sub1,NULL,2);
+ } else if ( strcmpi(key,"banlist") == 0 ) {
+ return channel_pcban(sd,sub1,NULL,3);
} else if ( strcmpi(key,"setopt") == 0 ) {
return channel_pcsetopt(sd,sub1,sub2,sub3);
} else {
Index: src/map/skill.c
===================================================================
--- src/map/skill.c (revision 17296)
+++ src/map/skill.c (working copy)
@@ -13136,7 +13136,7 @@
* Warlock
**/
case WL_COMET:
- if( skill_check_pc_partner(sd,skill_id,&skill_lv,1,0) <= 0
+ if( skill_check_pc_partner(sd,skill_id,&skill_lv,1,0) <= 0
&& ((i = pc_search_inventory(sd,require.itemid[0])) < 0 || sd->status.inventory[i].amount < require.amount[0]) ) {
//clif_skill_fail(sd,skill_id,USESKILL_FAIL_NEED_ITEM,require.amount[0],require.itemid[0]);
clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
Index: src/map/pc.c
===================================================================
--- src/map/pc.c (revision 17296)
+++ src/map/pc.c (working copy)
@@ -6644,7 +6644,7 @@
sd->st->state = END;
}
- npc_script_event(sd,NPCE_DIE);
+ add_timer(gettick()+100,npc_delayed_script_event,sd->bl.id,NPCE_DIE);
/* e.g. not killed thru pc_damage */
if( pc_issit(sd) ) {
@@ -6691,14 +6691,10 @@
}
break;
case BL_PET: //Pass on to master...
- src = &((TBL_PET*)src)->msd->bl;
- break;
case BL_HOM:
- src = &((TBL_HOM*)src)->master->bl;
- break;
case BL_MER:
- src = &((TBL_MER*)src)->master->bl;
- break;
+ src = battle_get_master(src);
+ break;
}
if (src && src->type == BL_PC)
Index: src/map/npc.c
===================================================================
--- src/map/npc.c (revision 17296)
+++ src/map/npc.c (working copy)
@@ -281,6 +281,16 @@
}
#endif
+int npc_delayed_script_event(int tid, unsigned int tick, int id, intptr_t data) {
+ struct map_session_data* sd = NULL;
+ if( (sd = map_id2sd(id)) == NULL || !sd->npc_id ) {
+ return 0;//Not logged in anymore OR no longer attached to a npc
+ }
+ npc_script_event(sd,data);
+ return 0;
+}
+
+
/*==========================================
* Dequeue event and add timer for execution (100ms)
*------------------------------------------*/
Index: src/map/npc.h
===================================================================
--- src/map/npc.h (revision 17296)
+++ src/map/npc.h (working copy)
@@ -167,6 +167,7 @@
int npc_reload(void);
void npc_read_event_script(void);
int npc_script_event(struct map_session_data* sd, enum npce_event type);
+int npc_delayed_script_event(int tid, unsigned int tick, int id, intptr_t data);
int npc_duplicate4instance(struct npc_data *snd, int16 m);
int npc_cashshop_buy(struct map_session_data *sd, int nameid, int amount, int points);