summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-02-23 03:26:49 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-02-23 03:26:49 +0000
commitb77c66e953ed744e59e77a750ea8e725bb36d55e (patch)
treec9968e6ed89d467f3d6556b043cb6a259979c4f5 /src
parentbeffc4eecbce7d0d869aef0d3cc49d732f87e514 (diff)
downloadhercules-b77c66e953ed744e59e77a750ea8e725bb36d55e.tar.gz
hercules-b77c66e953ed744e59e77a750ea8e725bb36d55e.tar.bz2
hercules-b77c66e953ed744e59e77a750ea8e725bb36d55e.tar.xz
hercules-b77c66e953ed744e59e77a750ea8e725bb36d55e.zip
- Updated Box of thunder to use "agi up" effect for 30 secs instead of NPC Agi Up for 20.
- Guild expulsion now will fail when the character to be kicked is in a guild castle (rather than checking for the character doing the expulsion) - pk damage reduction settings now will take effect only on Player VS player damage. - Fixed produce_db2.txt entries overwriting produce_db.txt ones. - Fixed item-granted/plagiarized skills unlocking skill trees when only your real learned level should. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9899 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/char_sql/char.c1
-rw-r--r--src/map/battle.c2
-rw-r--r--src/map/guild.c9
-rw-r--r--src/map/pc.c38
-rw-r--r--src/map/skill.c2
5 files changed, 38 insertions, 14 deletions
diff --git a/src/char_sql/char.c b/src/char_sql/char.c
index 4361db586..baaf47b66 100644
--- a/src/char_sql/char.c
+++ b/src/char_sql/char.c
@@ -1742,7 +1742,6 @@ int mmo_char_tobuf(uint8* buf, struct mmo_charstatus *p, int new_charscreen)
int mmo_char_send006b(int fd, struct char_session_data *sd) {
int i, j, found_num = 0;
- struct mmo_charstatus *p = NULL;
set_char_online(-1, 99,sd->account_id);
diff --git a/src/map/battle.c b/src/map/battle.c
index e1db71d4f..1cce2fcba 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -486,7 +486,7 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,int damage,i
if (sc && sc->count) {
}
*/
- if (battle_config.pk_mode && sd && damage)
+ if (battle_config.pk_mode && sd && bl->type == BL_PC && damage)
{
if (flag & BF_SKILL) { //Skills get a different reduction than non-skills. [Skotlex]
if (flag&BF_WEAPON)
diff --git a/src/map/guild.c b/src/map/guild.c
index b75af5bea..a06b29f8d 100644
--- a/src/map/guild.c
+++ b/src/map/guild.c
@@ -789,6 +789,7 @@ int guild_leave(struct map_session_data *sd,int guild_id,
int guild_expulsion(struct map_session_data *sd,int guild_id,
int account_id,int char_id,const char *mes)
{
+ struct map_session_data *tsd;
struct guild *g;
int i,ps;
@@ -799,12 +800,18 @@ int guild_expulsion(struct map_session_data *sd,int guild_id,
if(g==NULL)
return 0;
- if(sd->status.guild_id!=guild_id || map[sd->bl.m].flag.gvg_castle) //Can't leave inside guild castles.
+ if(sd->status.guild_id!=guild_id)
return 0;
if( (ps=guild_getposition(sd,g))<0 || !(g->position[ps].mode&0x0010) )
return 0; //Expulsion permission
+ //Can't leave inside guild castles.
+ if ((tsd = map_id2sd(account_id)) == NULL ||
+ tsd->status.char_id != char_id ||
+ map[tsd->bl.m].flag.gvg_castle)
+ return 0;
+
for(i=0;i<g->max_member;i++){ // 所属しているか
if(g->member[i].account_id==account_id &&
g->member[i].char_id==char_id ){
diff --git a/src/map/pc.c b/src/map/pc.c
index ee30f5bc8..88b7fde40 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -946,7 +946,7 @@ int pc_calc_skilltree(struct map_session_data *sd)
do {
flag = 0;
for(i = 0; i < MAX_SKILL_TREE && (id = skill_tree[c][i].id) > 0; i++) {
- int j, f, inf2;
+ int j, f, k, inf2;
if(sd->status.skill[id].id)
continue; //Skill already known.
@@ -954,9 +954,19 @@ int pc_calc_skilltree(struct map_session_data *sd)
f = 1;
if(!battle_config.skillfree) {
for(j = 0; j < 5; j++) {
- if( skill_tree[c][i].need[j].id && pc_checkskill(sd,skill_tree[c][i].need[j].id) < skill_tree[c][i].need[j].lv) {
- f = 0; // one or more prerequisites wasn't satisfied
- break;
+ if((k=skill_tree[c][i].need[j].id))
+ {
+ if (!sd->status.skill[k].id || sd->status.skill[k].flag == 13)
+ k = 0; //Not learned.
+ else if (sd->status.skill[k].flag) //Real lerned level
+ k = sd->status.skill[skill_tree[c][i].need[j].id].flag-2;
+ else
+ k = pc_checkskill(sd,k);
+ if (k < skill_tree[c][i].need[j].lv)
+ {
+ f=0;
+ break;
+ }
}
}
if (sd->status.job_level < skill_tree[c][i].joblv)
@@ -1021,17 +1031,25 @@ static void pc_check_skilltree(struct map_session_data *sd, int skill) {
do {
flag=0;
for(i=0;i < MAX_SKILL_TREE && (id=skill_tree[c][i].id)>0;i++){
- int j,f=1;
+ int j,f=1, k;
if(sd->status.skill[id].id) //Already learned
continue;
for(j=0;j<5;j++) {
- if( skill_tree[c][i].need[j].id &&
- pc_checkskill(sd,skill_tree[c][i].need[j].id) <
- skill_tree[c][i].need[j].lv) {
- f=0;
- break;
+ if((k=skill_tree[c][i].need[j].id))
+ {
+ if (!sd->status.skill[k].id || sd->status.skill[k].flag == 13)
+ k = 0; //Not learned.
+ else if (sd->status.skill[k].flag) //Real lerned level
+ k = sd->status.skill[skill_tree[c][i].need[j].id].flag-2;
+ else
+ k = pc_checkskill(sd,k);
+ if (k < skill_tree[c][i].need[j].lv)
+ {
+ f=0;
+ break;
+ }
}
}
if (!f)
diff --git a/src/map/skill.c b/src/map/skill.c
index 2a55a5280..e70aa222e 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -11412,6 +11412,7 @@ int skill_readdb (void)
skill_init_unit_layout();
memset(skill_produce_db,0,sizeof(skill_produce_db));
+ k=0;
for(m=0;m<2;m++){
sprintf(path, "%s/%s", db_path, filename[m]);
fp=fopen(path,"r");
@@ -11421,7 +11422,6 @@ int skill_readdb (void)
ShowError("can't read %s\n",path);
return 1;
}
- k=0;
while(fgets(line,1020,fp)){
char *split[7 + MAX_PRODUCE_RESOURCE * 2];
int x,y;