diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/map/guild.c | 24 | ||||
-rw-r--r-- | src/map/guild.h | 1 | ||||
-rw-r--r-- | src/map/map.h | 3 | ||||
-rw-r--r-- | src/map/pc.c | 4 | ||||
-rw-r--r-- | src/map/script.c | 22 | ||||
-rw-r--r-- | src/map/skill.c | 17 |
6 files changed, 69 insertions, 2 deletions
diff --git a/src/map/guild.c b/src/map/guild.c index f4ab77dfd..8d84705fd 100644 --- a/src/map/guild.c +++ b/src/map/guild.c @@ -952,6 +952,30 @@ int guild_payexp(struct map_session_data *sd,int exp) return exp2; } +// Celest +int guild_getexp(struct map_session_data *sd,int exp) +{ + struct guild *g; + struct guild_expcache *c; + + nullpo_retr(0, sd); + + if(sd->status.guild_id==0 || (g=guild_search(sd->status.guild_id))==NULL ) + return 0; + + if( (c=numdb_search(guild_expcache_db,sd->status.char_id))==NULL ){ + c=(struct guild_expcache *)aCalloc(1,sizeof(struct guild_expcache)); + c->guild_id=sd->status.guild_id; + c->account_id=sd->status.account_id; + c->char_id=sd->status.char_id; + c->exp=exp; + numdb_insert(guild_expcache_db,c->char_id,c); + }else{ + c->exp+=exp; + } + return exp; +} + // スキルポイント割り振り int guild_skillup(struct map_session_data *sd,int skill_num,int flag) { diff --git a/src/map/guild.h b/src/map/guild.h index 528605f7f..eefdcb04e 100644 --- a/src/map/guild.h +++ b/src/map/guild.h @@ -29,6 +29,7 @@ struct map_session_data *guild_getavailablesd(struct guild *g); int guild_getindex(struct guild *g,int account_id,int char_id); int guild_getposition(struct map_session_data *sd,struct guild *g); int guild_payexp(struct map_session_data *sd,int exp); +int guild_getexp(struct map_session_data *sd,int exp); // [Celest] int guild_create(struct map_session_data *sd,char *name); int guild_created(int account_id,int guild_id); diff --git a/src/map/map.h b/src/map/map.h index 6684250e5..0c456c51a 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -587,7 +587,8 @@ enum { SP_HP_DRAIN_VALUE,SP_SP_DRAIN_VALUE, // 1079-1080 SP_RESTART_FULL_RECORVER=2000,SP_NO_CASTCANCEL,SP_NO_SIZEFIX,SP_NO_MAGIC_DAMAGE,SP_NO_WEAPON_DAMAGE,SP_NO_GEMSTONE, // 2000-2005 - SP_NO_CASTCANCEL2,SP_INFINITE_ENDURE,SP_UNBREAKABLE_WEAPON,SP_UNBREAKABLE_ARMOR // 2006-2009 + SP_NO_CASTCANCEL2,SP_INFINITE_ENDURE,SP_UNBREAKABLE_WEAPON,SP_UNBREAKABLE_ARMOR, SP_UNBREAKABLE_HELM, // 2006-2010 + SP_LONG_ATK_RATE // 2011 - celest }; enum { diff --git a/src/map/pc.c b/src/map/pc.c index 3988b950d..b6e4cbbf0 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -2587,6 +2587,10 @@ int pc_bonus(struct map_session_data *sd,int type,int val) sd->classchange=val; } break; + case SP_LONG_ATK_RATE: + if(sd->status.weapon == 11 && sd->state.lr_flag != 2) + sd->atk_rate += val; + break; default: if(battle_config.error_log) printf("pc_bonus: unknown type %d %d !\n",type,val); diff --git a/src/map/script.c b/src/map/script.c index 7e8fe020a..750ef4d0c 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -291,6 +291,7 @@ int buildin_npcstop(struct script_state *st); // [Valaris] int buildin_getmapxy(struct script_state *st); //get map position for player/npc/pet/mob by Lorky [Lupus] int buildin_checkoption1(struct script_state *st); // [celest] int buildin_checkoption2(struct script_state *st); // [celest] +int buildin_guildgetexp(struct script_state *st); // [celest] void push_val(struct script_stack *stack,int type,int val); int run_func(struct script_state *st); @@ -501,7 +502,8 @@ struct { {buildin_npcstop,"npcstop",""}, // [Valaris] {buildin_getmapxy,"getmapxy","siii*"}, //by Lorky [Lupus] {buildin_checkoption1,"checkoption1","i"}, - {buildin_checkoption2,"checkoption2","i"}, + {buildin_checkoption2,"checkoption2","i"}, + {buildin_guildgetexp,"guildgetexp","i"}, {NULL,NULL,NULL}, }; int buildin_message(struct script_state *st); // [MouseJstr] @@ -3681,6 +3683,24 @@ int buildin_getexp(struct script_state *st) } /*========================================== + * Gain guild exp [Celest] + *------------------------------------------ + */ +int buildin_guildgetexp(struct script_state *st) +{ + struct map_session_data *sd = script_rid2sd(st); + int exp; + + exp = conv_num(st,& (st->stack->stack_data[st->start+2])); + if(exp < 0) + return 0; + if(sd && sd->status.guild_id > 0) + guild_getexp (sd, exp); + + return 0; +} + +/*========================================== * モンスター発生 *------------------------------------------ */ diff --git a/src/map/skill.c b/src/map/skill.c index ba8991e52..77b5b7516 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -6843,6 +6843,7 @@ int skill_check_condition(struct map_session_data *sd,int type) { int i,hp,sp,hp_rate,sp_rate,zeny,weapon,state,spiritball,skill,lv,mhp; int index[10],itemid[10],amount[10]; + int arrow_flag = 0; nullpo_retr(0, sd); @@ -7059,6 +7060,20 @@ int skill_check_condition(struct map_session_data *sd,int type) } } break; + // skills require arrows as of 12/07 [celest] + case AC_DOUBLE: + case AC_SHOWER: + case AC_CHARGEARROW: + case BA_MUSICALSTRIKE: + case DC_THROWARROW: + case SN_SHARPSHOOTING: + case CG_ARROWVULCAN: + if(sd->equip_index[10] <= 0) { + clif_arrow_fail(sd,0); + return 0; + } + arrow_flag = 1; + break; } if(!(type&2)){ @@ -7196,6 +7211,8 @@ int skill_check_condition(struct map_session_data *sd,int type) if(index[i] >= 0) pc_delitem(sd,index[i],amount[i],0); // アイテム消費 } + if (arrow_flag && battle_config.arrow_decrement) + pc_delitem(sd,sd->equip_index[10],1,0); } if(type&2) |