diff options
-rw-r--r-- | Changelog-Trunk.txt | 8 | ||||
-rw-r--r-- | db/Changelog.txt | 2 | ||||
-rw-r--r-- | db/item_db.txt | 2 | ||||
-rw-r--r-- | sql-files/item_db.sql | 2 | ||||
-rw-r--r-- | src/char_sql/char.c | 1 | ||||
-rw-r--r-- | src/map/battle.c | 2 | ||||
-rw-r--r-- | src/map/guild.c | 9 | ||||
-rw-r--r-- | src/map/pc.c | 38 | ||||
-rw-r--r-- | src/map/skill.c | 2 |
9 files changed, 50 insertions, 16 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index 1c6cfb32f..4359a4f30 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -3,6 +3,14 @@ Date Added AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK. IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. +2007/02/23 + * 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. [Skotlex] 2007/02/21 * Applied a consistent look to all header files (copyright, ifdefs) * Minor stuff (typos, socket.c, junk in login reply packet) [ultramage] diff --git a/db/Changelog.txt b/db/Changelog.txt index eee267e7d..5e5c9f791 100644 --- a/db/Changelog.txt +++ b/db/Changelog.txt @@ -20,6 +20,8 @@ ======================== 02/23 + * Updated Box of thunder to use "agi up" effect for 30 secs instead of NPC + Agi Up for 20. [Skotlex] * Added and fixed some etc items [Playtester] 02/13 * Fixed Bacsojin's mob id in mob_boss [Playtester] diff --git a/db/item_db.txt b/db/item_db.txt index e9313def7..fe38a58a4 100644 --- a/db/item_db.txt +++ b/db/item_db.txt @@ -2495,7 +2495,7 @@ 12026,Egg_Girl,Dano Festival Egg,2,,10,200,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} // Effect Boxes 12027,Giggling_Box,Giggling Box,2,,500,200,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 9,0; if(rand(100)<30) sc_start SC_Curse,30000,0; },{},{} -12028,Box_Of_Thunder,Box of Thunder,2,,500,200,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_SpeedUp1,20000,0; },{},{} +12028,Box_Of_Thunder,Box of Thunder,2,,500,200,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_SpeedUp0,30000,0; },{},{} 12029,Gloomy_Box,Box of Gloom,11,,500,200,,,,,0xFFFFFFFF,7,2,,,,,,{ itemskill 45,1,"Improve Concentration"; },{},{} 12030,Box_Of_Grudge,Box of Resentment,2,,500,200,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_ATKPOTION,60000,20; },{},{} 12031,Sleepy_Box,Box of Drowsiness,2,,500,200,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_MATKPOTION,60000,20; },{},{} diff --git a/sql-files/item_db.sql b/sql-files/item_db.sql index 6680323c3..0d46761d1 100644 --- a/sql-files/item_db.sql +++ b/sql-files/item_db.sql @@ -2510,7 +2510,7 @@ REPLACE INTO `item_db` VALUES (12025,'Egg_Boy','Dano Festival Egg',2,NULL,10,200 REPLACE INTO `item_db` VALUES (12026,'Egg_Girl','Dano Festival Egg',2,NULL,10,200,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); # // Effect Boxes REPLACE INTO `item_db` VALUES (12027,'Giggling_Box','Giggling Box',2,NULL,500,200,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,' percentheal 9,0; if(rand(100)<30) sc_start SC_Curse,30000,0; ',NULL,NULL); -REPLACE INTO `item_db` VALUES (12028,'Box_Of_Thunder','Box of Thunder',2,NULL,500,200,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,' sc_start SC_SpeedUp1,20000,0; ',NULL,NULL); +REPLACE INTO `item_db` VALUES (12028,'Box_Of_Thunder','Box of Thunder',2,NULL,500,200,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,' sc_start SC_SpeedUp0,30000,0; ',NULL,NULL); REPLACE INTO `item_db` VALUES (12029,'Gloomy_Box','Box of Gloom',11,NULL,500,200,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,' itemskill 45,1,"Improve Concentration"; ',NULL,NULL); REPLACE INTO `item_db` VALUES (12030,'Box_Of_Grudge','Box of Resentment',2,NULL,500,200,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,' sc_start SC_ATKPOTION,60000,20; ',NULL,NULL); REPLACE INTO `item_db` VALUES (12031,'Sleepy_Box','Box of Drowsiness',2,NULL,500,200,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,' sc_start SC_MATKPOTION,60000,20; ',NULL,NULL); 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; |