diff options
author | amber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2004-12-01 21:40:11 +0000 |
---|---|---|
committer | amber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2004-12-01 21:40:11 +0000 |
commit | 0073a0c0267b57250645bf3e0ed5a7ac4aa7463b (patch) | |
tree | 7ab0376dcff8b7fe62eb60d52aa4ac89fb29f35e /src/map | |
parent | 207277be0ac9c73626adc9cf8a6841a3dffe67ef (diff) | |
download | hercules-0073a0c0267b57250645bf3e0ed5a7ac4aa7463b.tar.gz hercules-0073a0c0267b57250645bf3e0ed5a7ac4aa7463b.tar.bz2 hercules-0073a0c0267b57250645bf3e0ed5a7ac4aa7463b.tar.xz hercules-0073a0c0267b57250645bf3e0ed5a7ac4aa7463b.zip |
Fix some build issues
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@432 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/atcommand.c | 18 | ||||
-rw-r--r-- | src/map/guild.c | 3 | ||||
-rw-r--r-- | src/map/party.c | 4 | ||||
-rw-r--r-- | src/map/pc.c | 7 |
4 files changed, 22 insertions, 10 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 34bf0150d..dfedea102 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -2762,12 +2762,8 @@ int atcommand_go( char output[200]; int m; - if(map[sd->bl.m].flag.nogo) { - clif_displaymessage(sd->fd,"You can not use @go on this map."); - return 0; - } - struct { char map[16]; int x, y; } data[] = { + const struct { char map[16]; int x, y; } data[] = { { "prontera.gat", 156, 191 }, // 0=Prontera { "morocc.gat", 156, 93 }, // 1=Morroc { "geffen.gat", 119, 59 }, // 2=Geffen @@ -2787,6 +2783,11 @@ int atcommand_go( { "sec_pri.gat", 23, 61 }, // 16=Prison }; + if(map[sd->bl.m].flag.nogo) { + clif_displaymessage(sd->fd,"You can not use @go on this map."); + return 0; + } + memset(map_name, '\0', sizeof(map_name)); memset(output, '\0', sizeof(output)); @@ -7198,6 +7199,7 @@ atcommand_skilltree(const int fd, struct map_session_data* sd, struct pc_base_job s_class; char target[255], *tbl; char output[255]; + struct skill_tree_entry *ent; if (!message || !*message) return -1; @@ -7235,7 +7237,7 @@ atcommand_skilltree(const int fd, struct map_session_data* sd, return 0; } - struct skill_tree_entry *ent = &skill_tree[s][c][skillidx]; + ent = &skill_tree[s][c][skillidx]; for(j=0;j<5;j++) if( ent->need[j].id && @@ -7690,8 +7692,10 @@ atcommand_identify( const int fd, struct map_session_data* sd, const char* command, const char* message) { - nullpo_retr(-1, sd); int i,num; + + nullpo_retr(-1, sd); + for(i=num=0;i<MAX_INVENTORY;i++){ if(sd->status.inventory[i].nameid > 0 && sd->status.inventory[i].identify!=1){ num++; diff --git a/src/map/guild.c b/src/map/guild.c index a48bb3020..0943b4b6d 100644 --- a/src/map/guild.c +++ b/src/map/guild.c @@ -870,9 +870,10 @@ int guild_notice_changed(int guild_id,const char *mes1,const char *mes2) // ギルドエンブレム変更 int guild_change_emblem(struct map_session_data *sd,int len,const char *data) { - nullpo_retr(0, sd); struct guild *g = NULL; + nullpo_retr(0, sd); + if ((g = guild_search(sd->status.guild_id)) && guild_checkskill(g, GD_GLORYGUILD)>0) return intif_guild_emblem(sd->status.guild_id,len,data); diff --git a/src/map/party.c b/src/map/party.c index 82b77cf6b..d2f169565 100644 --- a/src/map/party.c +++ b/src/map/party.c @@ -590,7 +590,11 @@ int party_exp_share(struct party *p,int map,int base_exp,int job_exp,int zeny) return 0; for(i=0;i<MAX_PARTY;i++) if((sd=p->member[i].sd)!=NULL && sd->bl.m==map) { +#ifdef TWILIGHT + pc_gainexp(sd,base_exp,job_exp); +#else pc_gainexp(sd,base_exp/c+1,job_exp/c+1); +#endif if(battle_config.zeny_from_mobs) // zeny from mobs [Valaris] pc_getzeny(sd,zeny/c+1); } diff --git a/src/map/pc.c b/src/map/pc.c index 13d1914c8..118104b9d 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -3464,9 +3464,11 @@ int pc_item_repair(struct map_session_data *sd,int idx) { int flag=1, material; int materials[5] = { 0, 1002, 998, 999, 756 }; + struct item *item; nullpo_retr(0, sd); - struct item *item = &sd->status.inventory[idx]; + + item = &sd->status.inventory[idx]; if(idx >= 0 && idx < MAX_INVENTORY) { if(item->nameid > 0 && item->attribute == 1 ) { @@ -3501,9 +3503,10 @@ int pc_item_refine(struct map_session_data *sd,int idx) { int flag = 1, i = 0, count = 0, ep = 0, per, refine; int material[5] = { 0, 1010, 1011, 984, 984 }; + struct item *item; nullpo_retr(0, sd); - struct item *item = &sd->status.inventory[idx]; + item = &sd->status.inventory[idx]; if(idx >= 0 && idx < MAX_INVENTORY) { if(item->nameid > 0 && itemdb_type(item->nameid)==4) { |