From b7470529eab877bbc581e821c6673e98dec696b8 Mon Sep 17 00:00:00 2001 From: Jared Adams Date: Sat, 18 Apr 2009 20:42:53 -0600 Subject: Fix getting item shop prices from the DB --- src/map/npc.c | 167 +++++++++++++++++++++++++++++----------------------------- 1 file changed, 83 insertions(+), 84 deletions(-) (limited to 'src') diff --git a/src/map/npc.c b/src/map/npc.c index 1d9204d..fa01d56 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -47,13 +47,13 @@ struct event_data { struct npc_data *nd; int pos; }; -static struct tm ev_tm_b; // 時計イベント用 +static struct tm ev_tm_b; // ソスソスソスvソスCソスxソスソスソスgソスp /*========================================== - * NPCの無効化/有効化 + * NPCソスフ厄ソスソスソスソスソス/ソスLソスソスソスソス * npc_enable - * npc_enable_sub 有効時にOnTouchイベントを実行 + * npc_enable_sub ソスLソスソスソスソスソスソスOnTouchソスCソスxソスソスソスgソスソスソスソスs *------------------------------------------ */ int npc_enable_sub( struct block_list *bl, va_list ap ) @@ -67,7 +67,7 @@ int npc_enable_sub( struct block_list *bl, va_list ap ) nullpo_retr(0, nd=va_arg(ap,struct npc_data *)); if(bl->type == BL_PC && (sd=(struct map_session_data *)bl)){ - if (nd->flag&1) // 無効化されている + if (nd->flag&1) // ソスソスソスソスソスソスソスソスソスソスソストゑソスソスソス return 1; memcpy(name,nd->name,50); @@ -85,7 +85,7 @@ int npc_enable(const char *name,int flag) if (nd==NULL) return 0; - if (flag&1) { // 有効化 + if (flag&1) { // ソスLソスソスソスソス nd->flag&=~1; clif_spawnnpc(nd); }else if (flag&2){ @@ -96,7 +96,7 @@ int npc_enable(const char *name,int flag) nd->flag|=1; nd->option = 0x0002; clif_changeoption(&nd->bl); - }else{ // 無効化 + }else{ // ソスソスソスソスソスソス nd->flag|=1; clif_clearchar(&nd->bl,0); } @@ -107,7 +107,7 @@ int npc_enable(const char *name,int flag) } /*========================================== - * NPCを名前で探す + * NPCソス名前ソスナ探ソスソス *------------------------------------------ */ struct npc_data* npc_name2id(const char *name) @@ -115,7 +115,7 @@ struct npc_data* npc_name2id(const char *name) return strdb_search(npcname_db,name); } /*========================================== - * イベントキューのイベント処理 + * ソスCソスxソスソスソスgソスLソスソスソス[ソスフイソスxソスソスソスgソスソスソスソス *------------------------------------------ */ int npc_event_dequeue(struct map_session_data *sd) @@ -123,7 +123,7 @@ int npc_event_dequeue(struct map_session_data *sd) nullpo_retr(0, sd); sd->npc_id=0; - if (sd->eventqueue[0][0]) { // キューのイベント処理 + if (sd->eventqueue[0][0]) { // ソスLソスソスソス[ソスフイソスxソスソスソスgソスソスソスソス char *name=(char *)aCalloc(50,sizeof(char)); int i; @@ -148,7 +148,7 @@ int npc_delete(struct npc_data *nd) } /*========================================== - * イベントの遅延実行 + * ソスCソスxソスソスソスgソスフ遅ソスソスソスソスs *------------------------------------------ */ int npc_event_timer(int tid,unsigned int tick,int id,int data) @@ -222,8 +222,8 @@ int npc_timer(int tid,unsigned int tick,int id,int data) // Added by RoVeRT return 0; }*/ /*========================================== - * イベント用ラベルのエクスポート - * npc_parse_script->strdb_foreachから呼ばれる + * ソスCソスxソスソスソスgソスpソスソスソスxソスソスソスフエソスNソスXソス|ソス[ソスg + * npc_parse_script->strdb_foreachソスソスソスソスソストばゑソスソスソス *------------------------------------------ */ int npc_event_export(void *key,void *data,va_list ap) @@ -236,7 +236,7 @@ int npc_event_export(void *key,void *data,va_list ap) struct event_data *ev; char *buf; char *p=strchr(lname,':'); - // エクスポートされる + // ソスGソスNソスXソス|ソス[ソスgソスソスソスソスソスソス ev=calloc(sizeof(struct event_data), 1); buf=calloc(50, 1); if (ev==NULL || buf==NULL) { @@ -260,7 +260,7 @@ int npc_event_export(void *key,void *data,va_list ap) } /*========================================== - * 全てのNPCのOn*イベント実行 + * ソスSソストゑソスNPCソスソスOn*ソスCソスxソスソスソスgソスソスs *------------------------------------------ */ int npc_event_doall_sub(void *key,void *data,va_list ap) @@ -338,7 +338,7 @@ int npc_event_do_l(const char *name, int rid, int argc, argrec_t *args) } /*========================================== - * 時計イベント実行 + * ソスソスソスvソスCソスxソスソスソスgソスソスs *------------------------------------------ */ int npc_event_do_clock(int tid,unsigned int tick,int id,int data) @@ -369,7 +369,7 @@ int npc_event_do_clock(int tid,unsigned int tick,int id,int data) return c; } /*========================================== - * OnInitイベント実行(&時計イベント開始) + * OnInitソスCソスxソスソスソスgソスソスs(&ソスソスソスvソスCソスxソスソスソスgソスJソスn) *------------------------------------------ */ int npc_event_do_oninit(void) @@ -464,8 +464,8 @@ int npc_do_ontimer(int npc_id, struct map_session_data *sd, int option) return 0; } /*========================================== - * タイマーイベント用ラベルの取り込み - * npc_parse_script->strdb_foreachから呼ばれる + * ソス^ソスCソス}ソス[ソスCソスxソスソスソスgソスpソスソスソスxソスソスソスフ趣ソスソス闕橸ソスソス + * npc_parse_script->strdb_foreachソスソスソスソスソストばゑソスソスソス *------------------------------------------ */ int npc_timerevent_import(void *key,void *data,va_list ap) @@ -476,7 +476,7 @@ int npc_timerevent_import(void *key,void *data,va_list ap) int t=0,i=0; if(sscanf(lname,"OnTimer%d%n",&t,&i)==1 && lname[i]==':') { - // タイマーイベント + // ソス^ソスCソス}ソス[ソスCソスxソスソスソスg struct npc_timerevent_list *te=nd->u.scr.timer_event; int j,i=nd->u.scr.timeramount; if(te==NULL) te=malloc(sizeof(struct npc_timerevent_list)); @@ -499,7 +499,7 @@ int npc_timerevent_import(void *key,void *data,va_list ap) return 0; } /*========================================== - * タイマーイベント実行 + * ソス^ソスCソス}ソス[ソスCソスxソスソスソスgソスソスs *------------------------------------------ */ int npc_timerevent(int tid,unsigned int tick,int id,int data) @@ -526,7 +526,7 @@ int npc_timerevent(int tid,unsigned int tick,int id,int data) return 0; } /*========================================== - * タイマーイベント開始 + * ソス^ソスCソス}ソス[ソスCソスxソスソスソスgソスJソスn *------------------------------------------ */ int npc_timerevent_start(struct npc_data *nd) @@ -554,7 +554,7 @@ int npc_timerevent_start(struct npc_data *nd) return 0; } /*========================================== - * タイマーイベント終了 + * ソス^ソスCソス}ソス[ソスCソスxソスソスソスgソスIソスソス *------------------------------------------ */ int npc_timerevent_stop(struct npc_data *nd) @@ -571,7 +571,7 @@ int npc_timerevent_stop(struct npc_data *nd) return 0; } /*========================================== - * タイマー値の所得 + * ソス^ソスCソス}ソス[ソスlソスフ擾ソスソスソス *------------------------------------------ */ int npc_gettimerevent_tick(struct npc_data *nd) @@ -587,7 +587,7 @@ int npc_gettimerevent_tick(struct npc_data *nd) return tick; } /*========================================== - * タイマー値の設定 + * ソス^ソスCソス}ソス[ソスlソスフ設抵ソス *------------------------------------------ */ int npc_settimerevent_tick(struct npc_data *nd,int newtimer) @@ -606,7 +606,7 @@ int npc_settimerevent_tick(struct npc_data *nd,int newtimer) } /*========================================== - * イベント型のNPC処理 + * ソスCソスxソスソスソスgソス^ソスソスNPCソスソスソスソス *------------------------------------------ */ int npc_event(struct map_session_data *sd,const char *eventname,int mob_kill) @@ -669,7 +669,7 @@ int npc_event(struct map_session_data *sd,const char *eventname,int mob_kill) } return 1; } - if (nd->flag&1) { // 無効化されている + if (nd->flag&1) { // ソスソスソスソスソスソスソスソスソスソスソストゑソスソスソス npc_event_dequeue(sd); return 0; } @@ -705,7 +705,7 @@ int npc_command(struct map_session_data *sd,char *npcname,char *command) return 0; } /*========================================== - * 接触型のNPC処理 + * ソスレ触ソス^ソスソスNPCソスソスソスソス *------------------------------------------ */ int npc_touch_areanpc(struct map_session_data *sd,int m,int x,int y) @@ -719,7 +719,7 @@ int npc_touch_areanpc(struct map_session_data *sd,int m,int x,int y) return 1; for(i=0;iflag&1) { // 無効化されている + if (map[m].npc[i]->flag&1) { // ソスソスソスソスソスソスソスソスソスソスソストゑソスソスソス f=0; continue; } @@ -772,7 +772,7 @@ int npc_touch_areanpc(struct map_session_data *sd,int m,int x,int y) } /*========================================== - * 近くかどうかの判定 + * ソス゚ゑソスソスソスソスヌゑソスソスソスソスフ費ソスソスソス *------------------------------------------ */ int npc_checknear(struct map_session_data *sd,int id) @@ -788,10 +788,10 @@ int npc_checknear(struct map_session_data *sd,int id) return 1; } - if (nd->class<0) // イベント系は常にOK + if (nd->class<0) // ソスCソスxソスソスソスgソスnソスヘ擾ソスソスソスOK return 0; - // エリア判定 + // ソスGソスソスソスAソスソスソスソス if (nd->bl.m!=sd->bl.m || nd->bl.xbl.x-AREA_SIZE-1 || nd->bl.x>sd->bl.x+AREA_SIZE+1 || nd->bl.ybl.y-AREA_SIZE-1 || nd->bl.y>sd->bl.y+AREA_SIZE+1) @@ -801,7 +801,7 @@ int npc_checknear(struct map_session_data *sd,int id) } /*========================================== - * クリック時のNPC処理 + * ソスNソスソスソスbソスNソスソスソスソスNPCソスソスソスソス *------------------------------------------ */ int npc_click(struct map_session_data *sd,int id) @@ -821,7 +821,7 @@ int npc_click(struct map_session_data *sd,int id) nd=(struct npc_data *)map_id2bl(id); - if (nd->flag&1) // 無効化されている + if (nd->flag&1) // ソスソスソスソスソスソスソスソスソスソスソストゑソスソスソス return 1; sd->npc_id=id; @@ -890,7 +890,7 @@ int npc_buysellsel(struct map_session_data *sd,int id,int type) sd->npc_id=0; return 1; } - if (nd->flag&1) // 無効化されている + if (nd->flag&1) // ソスソスソスソスソスソスソスソスソスソスソストゑソスソスソス return 1; sd->npc_shopid=id; @@ -949,11 +949,11 @@ int npc_buylist(struct map_session_data *sd,int n,unsigned short *item_list) w+=itemdb_weight(item_list[i*2+1]) * item_list[i*2]; } if (z > (double)sd->status.zeny) - return 1; // zeny不足 + return 1; // zenyソスsソスソス if (w+sd->weight > sd->max_weight) - return 2; // 重量超過 + return 2; // ソスdソスハ抵ソスソスソス if (pc_inventoryblank(sd)trade_partner != 0) return 4; // cant buy while trading @@ -968,7 +968,7 @@ int npc_buylist(struct map_session_data *sd,int n,unsigned short *item_list) memset(&item_tmp,0,sizeof(item_tmp)); item_tmp.nameid = item_data->nameid; - item_tmp.identify = 1; // npc販売アイテムは鑑定済み + item_tmp.identify = 1; // npcソスフ費ソスソスAソスCソスeソスソスソスヘ鑑抵ソスソスマゑソス if (amount > 1 && (item_data->type == 4 || item_data->type == 5 || item_data->type == 7 || item_data->type == 8)) { @@ -982,7 +982,7 @@ int npc_buylist(struct map_session_data *sd,int n,unsigned short *item_list) } } - //商人経験値 + //ソスソスソスlソスoソスソスソスl /* if ((sd->status.class == 5) || (sd->status.class == 10) || (sd->status.class == 18)) { z = z * pc_checkskill(sd,MC_DISCOUNT) / ((1 + 300 / itemamount) * 4000) * battle_config.shop_exp; pc_gainexp(sd,0,z); @@ -1039,7 +1039,7 @@ int npc_selllist(struct map_session_data *sd,int n,unsigned short *item_list) pc_delitem(sd,item_id,item_list[i*2+1],0); } - //商人経験値 + //ソスソスソスlソスoソスソスソスl /* if ((sd->status.class == 5) || (sd->status.class == 10) || (sd->status.class == 18)) { z = z * pc_checkskill(sd,MC_OVERCHARGE) / ((1 + 500 / itemamount) * 4000) * battle_config.shop_exp ; pc_gainexp(sd,0,z); @@ -1060,11 +1060,11 @@ int npc_selllist(struct map_session_data *sd,int n,unsigned short *item_list) } // -// 初期化関係 +// ソスソスソスソスソスソスソスヨ係 // /*========================================== - * 読み込むnpcファイルのクリア + * ソスヌみ搾ソスソスソスnpcソスtソス@ソスCソスソスソスフクソスソスソスA *------------------------------------------ */ void npc_clearsrcfile() @@ -1080,7 +1080,7 @@ void npc_clearsrcfile() npc_src_last=NULL; } /*========================================== - * 読み込むnpcファイルの追加 + * ソスヌみ搾ソスソスソスnpcソスtソス@ソスCソスソスソスフ追会ソス *------------------------------------------ */ void npc_addsrcfile(char *name) @@ -1105,7 +1105,7 @@ void npc_addsrcfile(char *name) npc_src_last=new; } /*========================================== - * 読み込むnpcファイルの削除 + * ソスヌみ搾ソスソスソスnpcソスtソス@ソスCソスソスソスフ削除 *------------------------------------------ */ void npc_delsrcfile(char *name) @@ -1129,7 +1129,7 @@ void npc_delsrcfile(char *name) } /*========================================== - * warp行解析 + * warpソスsソスソスソスソス *------------------------------------------ */ int npc_parse_warp(char *w1,char *w2,char *w3,char *w4) @@ -1139,7 +1139,7 @@ int npc_parse_warp(char *w1,char *w2,char *w3,char *w4) char mapname[24],to_mapname[24]; struct npc_data *nd; - // 引数の個数チェック + // ソスソスソスソスソスフ個撰ソスソス`ソスFソスbソスN if (sscanf(w1,"%[^,],%d,%d",mapname,&x,&y) != 3 || sscanf(w4,"%d,%d,%[^,],%d,%d",&xs,&ys,to_mapname,&to_x,&to_y) != 5) { printf("bad warp line : %s\n",w3); @@ -1200,7 +1200,7 @@ int npc_parse_warp(char *w1,char *w2,char *w3,char *w4) } /*========================================== - * shop行解析 + * shopソスsソスソスソスソス *------------------------------------------ */ static int npc_parse_shop(char *w1,char *w2,char *w3,char *w4) @@ -1211,7 +1211,7 @@ static int npc_parse_shop(char *w1,char *w2,char *w3,char *w4) char mapname[24]; struct npc_data *nd; - // 引数の個数チェック + // ソスソスソスソスソスフ個撰ソスソス`ソスFソスbソスN if (sscanf(w1, "%[^,],%d,%d,%d", mapname, &x, &y, &dir) != 4 || strchr(w4, ',') == NULL) { printf("bad shop line : %s\n", w3); @@ -1226,7 +1226,7 @@ static int npc_parse_shop(char *w1,char *w2,char *w3,char *w4) while (p && pos < max) { int nameid,value; char name[24]; - struct item_data *id; + struct item_data *id = NULL; p++; if (sscanf(p, "%d:%d", &nameid, &value) == 2) { } else if (sscanf(p, "%s :%d", name, &value) == 2) { @@ -1238,9 +1238,8 @@ static int npc_parse_shop(char *w1,char *w2,char *w3,char *w4) if (nameid > 0) { nd->u.shop_item[pos].nameid = nameid; if (value < 0) { - int temp = abs(value); if (id == NULL) id = itemdb_search(nameid); - value = id->value_buy * temp; + value = id->value_buy * abs(value); } nd->u.shop_item[pos].value = value; @@ -1285,7 +1284,7 @@ static int npc_parse_shop(char *w1,char *w2,char *w3,char *w4) return 0; } /*========================================== - * NPCのラベルデータコンバート + * NPCソスフソスソスxソスソスソスfソス[ソス^ソスRソスソスソスoソス[ソスg *------------------------------------------ */ int npc_convertlabel_db(void *key,void *data,va_list ap) @@ -1317,7 +1316,7 @@ int npc_convertlabel_db(void *key,void *data,va_list ap) return 0; } /*========================================== - * script行解析 + * scriptソスsソスソスソスソス *------------------------------------------ */ static int npc_parse_script(char *w1,char *w2,char *w3,char *w4,char *first_line,FILE *fp,int *lines) @@ -1340,7 +1339,7 @@ static int npc_parse_script(char *w1,char *w2,char *w3,char *w4,char *first_line if(strcmp(w1,"-")==0){ x=0;y=0;m=-1; }else{ - // 引数の個数チェック + // ソスソスソスソスソスフ個撰ソスソス`ソスFソスbソスN if (sscanf(w1,"%[^,],%d,%d,%d",mapname,&x,&y,&dir) != 4 || ( strcmp(w2,"script")==0 && strchr(w4,',')==NULL) ) { printf("bad script line : %s\n",w3); @@ -1350,7 +1349,7 @@ static int npc_parse_script(char *w1,char *w2,char *w3,char *w4,char *first_line } if(strcmp(w2,"script")==0){ - // スクリプトの解析 + // ソスXソスNソスソスソスvソスgソスフ会ソスソスソス srcbuf=(char *)aCalloc(srcsize,sizeof(char)); if (strchr(first_line,'{')) { strcpy(srcbuf,strchr(first_line,'{')); @@ -1386,7 +1385,7 @@ static int npc_parse_script(char *w1,char *w2,char *w3,char *w4,char *first_line } }else{ - // duplicateする + // duplicateソスソスソスソス char srcname[128]; struct npc_data *nd2; @@ -1403,15 +1402,15 @@ static int npc_parse_script(char *w1,char *w2,char *w3,char *w4,char *first_line label_dupnum=nd2->u.scr.label_list_num; src_id=nd2->bl.id; - }// end of スクリプト解析 + }// end of ソスXソスNソスソスソスvソスgソスソスソスソス nd=(struct npc_data *)aCalloc(1,sizeof(struct npc_data)); if(m==-1){ - // スクリプトコピー用のダミーNPC + // ソスXソスNソスソスソスvソスgソスRソスsソス[ソスpソスフダソス~ソス[NPC }else if( sscanf(w4,"%d,%d,%d",&class,&xs,&ys)==3) { - // 接触型NPC + // ソスレ触ソス^NPC int i,j; if (xs>=0)xs=xs*2+1; @@ -1432,13 +1431,13 @@ static int npc_parse_script(char *w1,char *w2,char *w3,char *w4,char *first_line nd->u.scr.xs=xs; nd->u.scr.ys=ys; - } else { // クリック型NPC + } else { // ソスNソスソスソスbソスNソス^NPC class=atoi(w4); nd->u.scr.xs=0; nd->u.scr.ys=0; } - if (class<0 && m>=0) { // イベント型NPC + if (class<0 && m>=0) { // ソスCソスxソスソスソスgソス^NPC evflag=1; } @@ -1479,7 +1478,7 @@ static int npc_parse_script(char *w1,char *w2,char *w3,char *w4,char *first_line nd->n=map_addnpc(m,nd); map_addblock(&nd->bl); - if (evflag) { // イベント型 + if (evflag) { // ソスCソスxソスソスソスgソス^ struct event_data *ev=(struct event_data *)aCalloc(1,sizeof(struct event_data)); ev->nd=nd; ev->pos=0; @@ -1491,15 +1490,15 @@ static int npc_parse_script(char *w1,char *w2,char *w3,char *w4,char *first_line //----------------------------------------- - // ラベルデータの準備 + // ソスソスソスxソスソスソスfソス[ソス^ソスフ擾ソスソスソス if(srcbuf){ - // script本体がある場合の処理 + // scriptソス{ソスフゑソスソスソスソスソスソス鼾ソスフ擾ソスソスソス - // ラベルデータのコンバート + // ソスソスソスxソスソスソスfソス[ソス^ソスフコソスソスソスoソス[ソスg label_db=script_get_label_db(); strdb_foreach(label_db,npc_convertlabel_db,nd); - // もう使わないのでバッファ解放 + // ソスソスソスgソスソスソスネゑソスソスフでバソスbソスtソス@ソスソスソスソス free(srcbuf); }else{ @@ -1508,12 +1507,12 @@ static int npc_parse_script(char *w1,char *w2,char *w3,char *w4,char *first_line // nd->u.scr.label_list=malloc(sizeof(struct npc_label_list)*label_dupnum); // memcpy(nd->u.scr.label_list,label_dup,sizeof(struct npc_label_list)*label_dupnum); - nd->u.scr.label_list=label_dup; // ラベルデータ共有 + nd->u.scr.label_list=label_dup; // ソスソスソスxソスソスソスfソス[ソス^ソスソスソスL nd->u.scr.label_list_num=label_dupnum; } //----------------------------------------- - // イベント用ラベルデータのエクスポート + // ソスCソスxソスソスソスgソスpソスソスソスxソスソスソスfソス[ソス^ソスフエソスNソスXソス|ソス[ソスg for(i=0;iu.scr.label_list_num;i++){ char *lname=nd->u.scr.label_list[i].name; int pos=nd->u.scr.label_list[i].pos; @@ -1521,7 +1520,7 @@ static int npc_parse_script(char *w1,char *w2,char *w3,char *w4,char *first_line if ((lname[0]=='O' || lname[0]=='o')&&(lname[1]=='N' || lname[1]=='n')) { struct event_data *ev; char *buf; - // エクスポートされる + // ソスGソスNソスXソス|ソス[ソスgソスソスソスソスソスソス ev=(struct event_data *)aCalloc(1,sizeof(struct event_data)); buf=(char *)aCalloc(50,sizeof(char)); if (strlen(lname)>24) { @@ -1537,13 +1536,13 @@ static int npc_parse_script(char *w1,char *w2,char *w3,char *w4,char *first_line } //----------------------------------------- - // ラベルデータからタイマーイベント取り込み + // ソスソスソスxソスソスソスfソス[ソス^ソスソスソスソスソス^ソスCソス}ソス[ソスCソスxソスソスソスgソスソスソス闕橸ソスソス for(i=0;iu.scr.label_list_num;i++){ int t=0,k=0; char *lname=nd->u.scr.label_list[i].name; int pos=nd->u.scr.label_list[i].pos; if(sscanf(lname,"OnTimer%d%n",&t,&k)==1 && lname[k]=='\0') { - // タイマーイベント + // ソス^ソスCソス}ソス[ソスCソスxソスソスソスg struct npc_timerevent_list *te=nd->u.scr.timer_event; int j,k=nd->u.scr.timeramount; if(te==NULL) @@ -1569,7 +1568,7 @@ static int npc_parse_script(char *w1,char *w2,char *w3,char *w4,char *first_line } /*========================================== - * function行解析 + * functionソスsソスソスソスソス *------------------------------------------ */ static int npc_parse_function(char *w1,char *w2,char *w3,char *w4,char *first_line,FILE *fp,int *lines) @@ -1582,7 +1581,7 @@ static int npc_parse_function(char *w1,char *w2,char *w3,char *w4,char *first_li // struct dbt *label_db; char *p; - // スクリプトの解析 + // ソスXソスNソスソスソスvソスgソスフ会ソスソスソス srcbuf=(char *)aCalloc(srcsize,sizeof(char)); if (strchr(first_line,'{')) { strcpy(srcbuf,strchr(first_line,'{')); @@ -1624,7 +1623,7 @@ static int npc_parse_function(char *w1,char *w2,char *w3,char *w4,char *first_li // label_db=script_get_label_db(); - // もう使わないのでバッファ解放 + // ソスソスソスgソスソスソスネゑソスソスフでバソスbソスtソス@ソスソスソスソス free(srcbuf); // printf("function %s => %p\n",p,script); @@ -1634,7 +1633,7 @@ static int npc_parse_function(char *w1,char *w2,char *w3,char *w4,char *first_li /*========================================== - * mob行解析 + * mobソスsソスソスソスソス *------------------------------------------ */ int npc_parse_mob(char *w1,char *w2,char *w3,char *w4) @@ -1647,7 +1646,7 @@ int npc_parse_mob(char *w1,char *w2,char *w3,char *w4) xs=ys=0; delay1=delay2=0; - // 引数の個数チェック + // ソスソスソスソスソスフ個撰ソスソス`ソスFソスbソスN if (sscanf(w1,"%[^,],%d,%d,%d,%d",mapname,&x,&y,&xs,&ys) < 3 || sscanf(w4,"%d,%d,%d,%d,%s",&class,&num,&delay1,&delay2,eventname) < 2 ) { printf("bad monster line : %s\n",w3); @@ -1714,7 +1713,7 @@ int npc_parse_mob(char *w1,char *w2,char *w3,char *w4) } /*========================================== - * マップフラグ行の解析 + * ソス}ソスbソスvソスtソスソスソスOソスsソスフ会ソスソスソス *------------------------------------------ */ static int npc_parse_mapflag(char *w1,char *w2,char *w3,char *w4) @@ -1725,7 +1724,7 @@ static int npc_parse_mapflag(char *w1,char *w2,char *w3,char *w4) char drop_arg1[16],drop_arg2[16]; int drop_id=0,drop_type=0,drop_per=0; - // 引数の個数チェック + // ソスソスソスソスソスフ個撰ソスソス`ソスFソスbソスN // if ( sscanf(w1,"%[^,],%d,%d,%d",mapname,&x,&y,&dir) != 4 ) if ( sscanf(w1,"%[^,]",mapname) != 1 ) return 1; @@ -1734,7 +1733,7 @@ static int npc_parse_mapflag(char *w1,char *w2,char *w3,char *w4) if (m<0) return 1; -//マップフラグ +//ソス}ソスbソスvソスtソスソスソスO if ( strcmpi(w3,"nosave")==0) { if (strcmp(w4,"SavePoint")==0) { memcpy(map[m].save.map,"SavePoint",16); @@ -1944,7 +1943,7 @@ npc_free(struct npc_data *nd) } /*========================================== - * 終了 + * ソスIソスソス *------------------------------------------ */ int do_final_npc(void) @@ -1987,7 +1986,7 @@ void ev_release(struct dbn *db, int which) } /*========================================== - * npc初期化 + * npcソスソスソスソスソスソス *------------------------------------------ */ int do_init_npc(void) @@ -2022,7 +2021,7 @@ int do_init_npc(void) if (line[0] == '/' && line[1] == '/') continue; - // 不要なスペースやタブの連続は詰める + // ソスsソスvソスネスソスyソス[ソスXソスソスソス^ソスuソスフ連ソスソスソスヘ詰ソス゚ゑソス for(i=j=0;line[i];i++) { if (line[i]==' ') { if (!((line[i+1] && (isspace(line[i+1]) || line[i+1]==',')) || @@ -2034,12 +2033,12 @@ int do_init_npc(void) } else line[j++]=line[i]; } - // 最初はタブ区切りでチェックしてみて、ダメならスペース区切りで確認 + // ソスナ擾ソスソスヘタソスuソスソスソスリゑソスソスナチソスFソスbソスNソスソスソストみて、ソス_ソスソスソスネゑソスソスXソスyソス[ソスXソスソスソスリゑソスソスナ確ソスF if ((count=sscanf(line,"%[^\t]\t%[^\t]\t%[^\t\r\n]\t%n%[^\t\r\n]",w1,w2,w3,&w4pos,w4)) < 3 && (count=sscanf(line,"%s%s%s%n%s",w1,w2,w3,&w4pos,w4)) < 3) { continue; } - // マップの存在確認 + // ソス}ソスbソスvソスフ托ソスソスン確ソスF if( strcmp(w1,"-")!=0 && strcmpi(w1,"function")!=0 ){ sscanf(w1,"%[^,]",mapname); m = map_mapname2mapid(mapname); -- cgit v1.2.3-70-g09d2