diff options
-rw-r--r-- | conf/inter-server.conf | 2 | ||||
-rw-r--r-- | db/pre-re/size_fix.txt (renamed from db/size_fix.txt) | 0 | ||||
-rw-r--r-- | db/pre-re/skill_cast_db.txt | 2 | ||||
-rw-r--r-- | db/pre-re/skill_db.txt | 2 | ||||
-rw-r--r-- | db/pre-re/skill_unit_db.txt | 2 | ||||
-rw-r--r-- | db/re/size_fix.txt | 7 | ||||
-rw-r--r-- | db/re/skill_cast_db.txt | 2 | ||||
-rw-r--r-- | db/re/skill_db.txt | 4 | ||||
-rw-r--r-- | db/re/skill_unit_db.txt | 2 | ||||
-rw-r--r-- | sql-files/mob_db_re.sql | 6 | ||||
-rw-r--r-- | sql-files/mob_skill_db_re.sql | 6 | ||||
-rw-r--r-- | src/config/const.h | 7 | ||||
-rw-r--r-- | src/map/battle.c | 50 | ||||
-rw-r--r-- | src/map/map.c | 14 | ||||
-rw-r--r-- | src/map/map.h | 2 | ||||
-rw-r--r-- | src/map/mob.c | 16 | ||||
-rw-r--r-- | src/map/skill.c | 37 | ||||
-rw-r--r-- | src/map/status.c | 9 |
18 files changed, 100 insertions, 70 deletions
diff --git a/conf/inter-server.conf b/conf/inter-server.conf index 184285cfd..d6b833289 100644 --- a/conf/inter-server.conf +++ b/conf/inter-server.conf @@ -121,8 +121,10 @@ item_db_db: item_db item_db_re_db: item_db_re item_db2_db: item_db2 mob_db_db: mob_db +mob_db_re_db: mob_db_re mob_db2_db: mob_db2 mob_skill_db_db: mob_skill_db +mob_skill_db_re_db: mob_skill_db_re mob_skill_db2_db: mob_skill_db2 mapreg_db: mapreg autotrade_merchants_db: autotrade_merchants diff --git a/db/size_fix.txt b/db/pre-re/size_fix.txt index 81bba5044..81bba5044 100644 --- a/db/size_fix.txt +++ b/db/pre-re/size_fix.txt diff --git a/db/pre-re/skill_cast_db.txt b/db/pre-re/skill_cast_db.txt index 8b901e602..5021ad6e9 100644 --- a/db/pre-re/skill_cast_db.txt +++ b/db/pre-re/skill_cast_db.txt @@ -1679,7 +1679,7 @@ //-- KO_MUCHANAGE 3008,1000,0,0,100,0,10000 //-- KO_HUUMARANKA -3009,1000:1200:1400:1600:1800,1000,0,500,0,3000 +3009,1000:1200:1400:1600:1800,1000,0,100,0,3000 //-- KO_MAKIBISHI 3010,0,0,0,12000:14000:16000:18000:20000,10000,10000 //-- KO_MEIKYOUSISUI diff --git a/db/pre-re/skill_db.txt b/db/pre-re/skill_db.txt index 371833d98..739a453ae 100644 --- a/db/pre-re/skill_db.txt +++ b/db/pre-re/skill_db.txt @@ -1064,7 +1064,7 @@ 3006,7:8:9:10:11,6,2,0,0x2,2,5,0,no,0,0,0,weapon,0, KO_BAKURETSU,Bakuretsu Kunai 3007,0,6,4,-1,0x42,4:4:4:4:5,5,0,no,0,0,0,misc,0, KO_HAPPOKUNAI,Happo Kunai 3008,9,8,2,0,0x12,2,10,-10,no,0,0,0,misc,0, KO_MUCHANAGE,Mucha Nage -3009,9:10:11:12:13,8,2,-1,0x2,3,5,2,no,0,0,0,weapon,0, KO_HUUMARANKA,Huuma Shuriken Ranka +3009,9:10:11:12:13,8,2,-1,0x2,3,5,-5,no,0,0,0,weapon,0, KO_HUUMARANKA,Huuma Shuriken Ranka 3010,3,6,4,0,0x42,0,5,1,no,0,0x80,0,weapon,0, KO_MAKIBISHI,Makibishi 3011,0,6,4,0,0x1,0,5,0,yes,0,0,0,none,0, KO_MEIKYOUSISUI,Meikyo Shisui 3012,0,6,4,0,0x1,0,5,0,no,0,0,1,none,3:4:5:6:7, KO_ZANZOU,Zanzou diff --git a/db/pre-re/skill_unit_db.txt b/db/pre-re/skill_unit_db.txt index b37ab23f5..2bdb0a7f3 100644 --- a/db/pre-re/skill_unit_db.txt +++ b/db/pre-re/skill_unit_db.txt @@ -155,7 +155,7 @@ 3006,0x86, , 0, 2, 100,enemy, 0x018 //KO_BAKURETSU 3008,0x86, , 0, 2, 100,enemy, 0x018 //KO_MUCHANAGE -3009,0x86, , 0, 3, 500,enemy, 0x018 //KO_HUUMARANKA +3009,0x86, , 0, 3, 100,enemy, 0x018 //KO_HUUMARANKA 3020,0xf8, , 0, 3, 100,all, 0x018 //KO_ZENKAI 3010,0xfc, , 0, 0,5000,enemy, 0x018 //KO_MAKIBISHI diff --git a/db/re/size_fix.txt b/db/re/size_fix.txt new file mode 100644 index 000000000..f83560a87 --- /dev/null +++ b/db/re/size_fix.txt @@ -0,0 +1,7 @@ +// Database for size fix for weapon damage. + +//Columns: Weapon type, Rows: Target size. +//Unarmed, Knife, 1H Sword, 2H Sword, 1H Spear, 2H Spears, 1H Axe, 2H Axe, Mace, 2H Mace, Staff, Bow, Knuckle, Musical Instrument, Whip, Book, Katar, Revolver, Rifle, Shotgun, Gatling Gun, Grenade Launcher, Fuuma Shuriken, 2H Staff +100,100, 75, 75, 75, 75, 50, 50, 75, 75,100,100,100, 75, 75,100, 75,100,100,100,100,100, 75,100 // Size: Small +100, 75,100, 75, 75, 75, 75, 75,100,100,100,100, 75,100,100,100,100,100,100,100,100,100, 75,100 // Size: Medium +100, 50, 75,100,100,100,100,100,100,100,100, 75, 50, 75, 50, 50, 75,100,100,100,100,100,100,100 // Size: Large diff --git a/db/re/skill_cast_db.txt b/db/re/skill_cast_db.txt index 37b004bfa..91bd7bac4 100644 --- a/db/re/skill_cast_db.txt +++ b/db/re/skill_cast_db.txt @@ -1682,7 +1682,7 @@ //-- KO_MUCHANAGE 3008,1000,0,0,100,0,10000,0 //-- KO_HUUMARANKA -3009,1000:1200:1400:1600:1800,1000,0,500,0,3000,-1 +3009,1000:1200:1400:1600:1800,1000,0,100,0,3000,-1 //-- KO_MAKIBISHI 3010,0,0,0,12000:14000:16000:18000:20000,10000,10000,-1 //-- KO_MEIKYOUSISUI diff --git a/db/re/skill_db.txt b/db/re/skill_db.txt index df1cf5c52..e4712aad4 100644 --- a/db/re/skill_db.txt +++ b/db/re/skill_db.txt @@ -567,7 +567,7 @@ 521,-9,6,2,-1,0x40,1,10,1,no,0,0,0,weapon,3, GS_GROUNDDRIFT,Ground Drift 522,0,0,0,0,0,0,10,1,no,0,0,0,weapon,0, NJ_TOBIDOUGU,Shuriken Training 523,9,6,1,-1,0x40,0,10,1,no,0,0,0,weapon,0, NJ_SYURIKEN,Throw Shuriken -524,9,8,1,-1,0x40,0,5,-3,no,0,0,0,weapon,0, NJ_KUNAI,Throw Kunai +524,9,8,1,-1,0x40,0,5,3,no,0,0,0,weapon,0, NJ_KUNAI,Throw Kunai 525,9,8,2,-1,0x2,0,5,-3:-3:-4:-4:-5,no,0,0,0,weapon,0, NJ_HUUMA,Throw Huuma Shuriken 526,9,6,1,0,0x50,0,10,1,no,0,0,0,misc,0, NJ_ZENYNAGE,Throw Zeny 527,0,6,4,-1,0,0,5,1,no,0,0,0,weapon,4, NJ_TATAMIGAESHI,Improvised Defense @@ -1076,7 +1076,7 @@ 3006,7:8:9:10:11,6,2,0,0x2,2,5,0,no,0,0,0,weapon,0, KO_BAKURETSU,Bakuretsu Kunai 3007,0,6,4,-1,0x42,4:4:4:4:5,5,0,no,0,0,0,misc,0, KO_HAPPOKUNAI,Happo Kunai 3008,9,8,2,0,0x12,2,10,-10,no,0,0,0,misc,0, KO_MUCHANAGE,Mucha Nage -3009,9:10:11:12:13,8,2,-1,0x2,3,5,2,no,0,0,0,weapon,0, KO_HUUMARANKA,Huuma Shuriken Ranka +3009,9:10:11:12:13,8,2,-1,0x2,3,5,-5,no,0,0,0,weapon,0, KO_HUUMARANKA,Huuma Shuriken Ranka 3010,3,6,4,0,0x42,0,5,1,no,0,0x80,0,weapon,0, KO_MAKIBISHI,Makibishi 3011,0,6,4,0,0x1,0,5,0,yes,0,0,0,none,0, KO_MEIKYOUSISUI,Meikyo Shisui 3012,0,6,4,0,0x1,0,5,0,no,0,0,1,none,3:4:5:6:7, KO_ZANZOU,Zanzou diff --git a/db/re/skill_unit_db.txt b/db/re/skill_unit_db.txt index 1d0395bfc..c75683333 100644 --- a/db/re/skill_unit_db.txt +++ b/db/re/skill_unit_db.txt @@ -158,7 +158,7 @@ 3006,0x86, , 0, 2, 100,enemy, 0x018 //KO_BAKURETSU 3008,0x86, , 0, 2, 100,enemy, 0x018 //KO_MUCHANAGE -3009,0x86, , 0, 3, 500,enemy, 0x018 //KO_HUUMARANKA +3009,0x86, , 0, 3, 100,enemy, 0x018 //KO_HUUMARANKA 3020,0xf8, , 0, 3, 100,all, 0x018 //KO_ZENKAI 3010,0xfc, , 0, 0,5000,enemy, 0x018 //KO_MAKIBISHI diff --git a/sql-files/mob_db_re.sql b/sql-files/mob_db_re.sql index b4305de08..66f842a08 100644 --- a/sql-files/mob_db_re.sql +++ b/sql-files/mob_db_re.sql @@ -1,9 +1,9 @@ -- --- Table structure for table `mob_db` +-- Table structure for table `mob_db_re` -- -DROP TABLE IF EXISTS `mob_db`; -CREATE TABLE `mob_db` ( +DROP TABLE IF EXISTS `mob_db_re`; +CREATE TABLE `mob_db_re` ( `ID` MEDIUMINT(9) UNSIGNED NOT NULL DEFAULT '0', `Sprite` TEXT NOT NULL, `kName` TEXT NOT NULL, diff --git a/sql-files/mob_skill_db_re.sql b/sql-files/mob_skill_db_re.sql index e51925f80..8427ff2bd 100644 --- a/sql-files/mob_skill_db_re.sql +++ b/sql-files/mob_skill_db_re.sql @@ -1,9 +1,9 @@ -- --- Table structure for table `mob_skill_db` +-- Table structure for table `mob_skill_db_re` -- -DROP TABLE IF EXISTS `mob_skill_db`; -CREATE TABLE `mob_skill_db` ( +DROP TABLE IF EXISTS `mob_skill_db_re`; +CREATE TABLE `mob_skill_db_re` ( `MOB_ID` SMALLINT(6) NOT NULL, `INFO` TEXT NOT NULL, `STATE` TEXT NOT NULL, diff --git a/src/config/const.h b/src/config/const.h index 7b5ed5506..e10d2ad2a 100644 --- a/src/config/const.h +++ b/src/config/const.h @@ -73,17 +73,16 @@ /* Renewal's dmg level modifier, used as a macro for a easy way to turn off. */ #ifdef RENEWAL_LVDMG #define RE_LVL_DMOD(val) do { \ - if( status->get_lv(src) > 100 && (val) > 0 ) \ + if( (val) > 0 ) \ skillratio = skillratio * status->get_lv(src) / (val); \ } while(0) #define RE_LVL_MDMOD(val) do { \ - if( status->get_lv(src) > 100 && (val) > 0) \ + if ( (val) > 0 ) \ md.damage = md.damage * status->get_lv(src) / (val); \ } while(0) /* ranger traps special */ #define RE_LVL_TMDMOD() do { \ - if( status->get_lv(src) > 100 ) \ - md.damage = md.damage * 150 / 100 + md.damage * status->get_lv(src) / 100; \ + md.damage = md.damage * 150 / 100 + md.damage * status->get_lv(src) / 100; \ } while(0) #else #define RE_LVL_DMOD(val) diff --git a/src/map/battle.c b/src/map/battle.c index f740d6518..ddad2c705 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -440,12 +440,12 @@ int64 battle_calc_weapon_damage(struct block_list *src, struct block_list *bl, u if( sc && sc->count ){ if( sc->data[SC_ZENKAI] && watk->ele == sc->data[SC_ZENKAI]->val2 ) eatk += 200; - #ifdef RENEWAL_EDP +#ifdef RENEWAL_EDP if( sc->data[SC_EDP] && skill_id != AS_GRIMTOOTH && skill_id != AS_VENOMKNIFE && skill_id != ASC_BREAKER ){ eatk = eatk * (sc->data[SC_EDP]->val4 / 100 - 1); damage = damage * (sc->data[SC_EDP]->val4 / 100); } - #endif +#endif } if( skill_id != ASC_METEORASSAULT ){ @@ -2078,11 +2078,6 @@ int battle_calc_skillratio(int attack_type, struct block_list *src, struct block case NJ_KIRIKAGE: skillratio += 100 * (skill_lv-1); break; -#ifdef RENEWAL - case NJ_KUNAI: - skillratio += 50 + 150 * skill_lv; - break; -#endif case KN_CHARGEATK: { int k = (flag-1)/3; //+100% every 3 cells of distance @@ -2521,6 +2516,7 @@ int battle_calc_skillratio(int attack_type, struct block_list *src, struct block RE_LVL_DMOD(120); if( tsc && tsc->data[SC_KO_JYUMONJIKIRI] ) skillratio += status->get_lv(src) * skill_lv; + break; case KO_HUUMARANKA: skillratio += -100 + 150 * skill_lv + status_get_agi(src) + status_get_dex(src) + 100 * (sd ? pc->checkskill(sd, NJ_HUUMA) : 0); break; @@ -2528,11 +2524,6 @@ int battle_calc_skillratio(int attack_type, struct block_list *src, struct block skillratio += -100 + 100 * skill_lv; RE_LVL_DMOD(100); break; - case KO_BAKURETSU: - skillratio += -100 + (50 + status_get_dex(src) / 4) * skill_lv * (sd?pc->checkskill(sd,NJ_TOBIDOUGU):10) * 4 / 100; - RE_LVL_DMOD(120); - skillratio += 10 * (sd ? sd->status.job_level : 0); - break; case MH_NEEDLE_OF_PARALYZE: skillratio += 600 + 100 * skill_lv; break; @@ -3933,14 +3924,16 @@ struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list * break; case KO_HAPPOKUNAI: { - struct Damage wd = battle->calc_weapon_attack(src,target,skill_id,skill_lv,mflag); + struct Damage wd = battle->calc_weapon_attack(src, target, 0, 1, mflag); #ifdef RENEWAL short totaldef = status->get_total_def(target); #else short totaldef = tstatus->def2 + (short)status->get_def(target); #endif - md.damage = 3 * wd.damage * (5 + skill_lv) / 5; + if ( sd ) wd.damage += sd->bonus.arrow_atk; + md.damage = (int)(3 * (1 + wd.damage) * (5 + skill_lv) / 5.0f); md.damage -= totaldef; + } break; } @@ -4242,7 +4235,11 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list wd.div_ = tstatus->size + 2 + ( (rnd()%100 < 50-tstatus->size*10) ? 1 : 0 ); break; #ifdef RENEWAL + case NJ_KUNAI: case HW_MAGICCRASHER: + case NJ_SYURIKEN: + case GS_MAGICALBULLET: + case KO_BAKURETSU: flag.tdef = 1; break; #endif @@ -4597,7 +4594,7 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list break; case NJ_SYURIKEN: // [malufett] GET_NORMAL_ATTACK( (sc && sc->data[SC_MAXIMIZEPOWER]?1:0)|(sc && sc->data[SC_WEAPONPERFECT]?8:0) ); - wd.damage += battle->calc_masteryfix(src, target, skill_id, skill_lv, 4 * skill_lv + (sd ? sd->bonus.arrow_atk : 0), wd.div_, 0, flag.weapon) - status->get_total_def(target); + wd.damage += battle->calc_masteryfix(src, target, skill_id, skill_lv, 4 * skill_lv + (sd ? sd->bonus.arrow_atk : 0), wd.div_, 0, flag.weapon); break; case MO_EXTREMITYFIST: // [malufett] { @@ -4736,13 +4733,6 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list status_change_end(src, SC_EXEEDBREAK, INVALID_TIMER); } - - #ifdef RENEWAL - if( sd && skill_id == NJ_KUNAI ){ - flag.tdef = 1; - ATK_ADD( sd->bonus.arrow_atk ); - } - #endif switch(skill_id){ case SR_GATEOFHELL: if (wd.dmg_lv != ATK_FLEE) @@ -4776,6 +4766,17 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list wd.damage = battle->calc_masteryfix(src, target, skill_id, skill_lv, wd.damage, wd.div_, 0, flag.weapon); } #endif + + case KO_BAKURETSU: + { +#ifdef RENEWAL + GET_NORMAL_ATTACK((sc && sc->data[SC_MAXIMIZEPOWER] ? 1 : 0) | (sc && sc->data[SC_WEAPONPERFECT] ? 8 : 0)); +#endif + skillratio = skill_lv * (50 + status_get_dex(src) / 4); + skillratio = (int)(skillratio * (sd ? pc->checkskill(sd, NJ_TOBIDOUGU) : 10) * 40.f / 100.0f * status->get_lv(src) / 120); + ATK_RATE(skillratio + 10 * (sd ? sd->status.job_level : 0)); + } + break; default: ATK_RATE(battle->calc_skillratio(BF_WEAPON, src, target, skill_id, skill_lv, skillratio, wflag)); } @@ -4805,7 +4806,6 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list ATK_ADD( status->get_matk(src, 2) ); #else ATK_ADD( battle->calc_magic_attack(src, target, skill_id, skill_lv, wflag).damage ); - flag.tdef = 1; #endif #ifndef RENEWAL case NJ_SYURIKEN: @@ -4880,10 +4880,8 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list #ifndef RENEWAL_EDP if( sc->data[SC_EDP] ){ switch(skill_id){ - case AS_SPLASHER: - case AS_GRIMTOOTH: + case AS_SPLASHER: // Needs more info case ASC_BREAKER: - case AS_VENOMKNIFE: case ASC_METEORASSAULT: break; default: ATK_ADDRATE(sc->data[SC_EDP]->val3); diff --git a/src/map/map.c b/src/map/map.c index e5574eaf7..25d7ce692 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -3722,15 +3722,19 @@ int inter_config_read(char *cfgName) { if(strcmpi(w1,"item_db_db")==0) strcpy(map->item_db_db,w2); else if(strcmpi(w1,"mob_db_db")==0) - strcpy(map->mob_db_db,w2); + strcpy(map->mob_db_db, w2); + else if (strcmpi(w1, "mob_db_re_db") == 0) + strcpy(map->mob_db_re_db, w2); else if(strcmpi(w1,"item_db2_db")==0) strcpy(map->item_db2_db,w2); else if(strcmpi(w1,"item_db_re_db")==0) strcpy(map->item_db_re_db,w2); else if(strcmpi(w1,"mob_db2_db")==0) - strcpy(map->mob_db2_db,w2); - else if(strcmpi(w1,"mob_skill_db_db")==0) - strcpy(map->mob_skill_db_db,w2); + strcpy(map->mob_db2_db, w2); + else if(strcmpi(w1, "mob_skill_db_db") == 0) + strcpy(map->mob_skill_db_db, w2); + else if(strcmpi(w1, "mob_skill_db_re_db") == 0) + strcpy(map->mob_skill_db_re_db, w2); else if(strcmpi(w1,"mob_skill_db2_db")==0) strcpy(map->mob_skill_db2_db,w2); else if(strcmpi(w1,"interreg_db")==0) @@ -6005,8 +6009,10 @@ void map_defaults(void) { sprintf(map->item_db2_db, "item_db2"); sprintf(map->item_db_re_db, "item_db_re"); sprintf(map->mob_db_db, "mob_db"); + sprintf(map->mob_db_re_db, "mob_db_re"); sprintf(map->mob_db2_db, "mob_db2"); sprintf(map->mob_skill_db_db, "mob_skill_db"); + sprintf(map->mob_skill_db_re_db, "mob_skill_db_re"); sprintf(map->mob_skill_db2_db, "mob_skill_db2"); sprintf(map->interreg_db, "interreg"); diff --git a/src/map/map.h b/src/map/map.h index 9a5fa8ba3..447437cf4 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -846,8 +846,10 @@ struct map_interface { char item_db2_db[32]; char item_db_re_db[32]; char mob_db_db[32]; + char mob_db_re_db[32]; char mob_db2_db[32]; char mob_skill_db_db[32]; + char mob_skill_db_re_db[32]; char mob_skill_db2_db[32]; char interreg_db[32]; char autotrade_merchants_db[32]; diff --git a/src/map/mob.c b/src/map/mob.c index 8fe3e3cef..4db8cb2f6 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -3942,7 +3942,13 @@ void mob_readdb(void) { * mob_db table reading *------------------------------------------*/ int mob_read_sqldb(void) { - const char* mob_db_name[] = { map->mob_db_db, map->mob_db2_db }; + const char* mob_db_name[] = { +#ifdef RENEWAL + map->mob_db_re_db +#else + map->mob_db_db +#endif + , map->mob_db2_db }; int fi; for( fi = 0; fi < ARRAYLENGTH(mob_db_name); ++fi ) { @@ -4515,7 +4521,13 @@ void mob_readskilldb(void) { * seems to work though... */ int mob_read_sqlskilldb(void) { - const char* mob_skill_db_name[] = { map->mob_skill_db_db, map->mob_skill_db2_db }; + const char* mob_skill_db_name[] = { +#ifdef RENEWAL + map->mob_skill_db_re_db +#else + map->mob_skill_db_db +#endif + , map->mob_skill_db2_db }; int fi; if( battle_config.mob_skill_rate == 0 ) { diff --git a/src/map/skill.c b/src/map/skill.c index 6bfecf46f..5eb319c02 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -3574,7 +3574,6 @@ int skill_castend_damage_id(struct block_list* src, struct block_list *bl, uint1 case WM_SEVERE_RAINSTORM_MELEE: case WM_GREAT_ECHO: case GN_SLINGITEM_RANGEMELEEATK: - case KO_JYUMONJIKIRI: case KO_SETSUDAN: case GC_DARKCROW: case LG_OVERBRAND_BRANDISH: @@ -4216,27 +4215,27 @@ int skill_castend_damage_id(struct block_list* src, struct block_list *bl, uint1 } break; + case KO_JYUMONJIKIRI: case GC_DARKILLUSION: { short x, y; - short dir = map->calc_dir(src,bl->x,bl->y); + short dir = map->calc_dir(bl, src->x, src->y); - if( dir > 0 && dir < 4) x = 2; - else if( dir > 4 ) x = -2; - else x = 0; - if( dir > 2 && dir < 6 ) y = 2; - else if( dir == 7 || dir < 2 ) y = -2; - else y = 0; + if ( dir < 4 ) { + x = bl->x + 2 * (dir > 0) - 3 * (dir > 0); + y = bl->y + 1 - (dir / 2) - (dir > 2); + } else { + x = bl->x + 2 * (dir > 4) - 1 * (dir > 4); + y = bl->y + (dir / 6) - 1 + (dir > 6); + } - if( unit->movepos(src, bl->x+x, bl->y+y, 1, 1) ) - { - clif->slide(src,bl->x+x,bl->y+y); + if ( unit->movepos(src, x, y, 1, 1) ) { + clif->slide(src, x, y); clif->fixpos(src); // the official server send these two packets. - skill->attack(BF_WEAPON,src,src,bl,skill_id,skill_lv,tick,flag); - if( rnd()%100 < 4 * skill_lv ) - skill->castend_damage_id(src,bl,GC_CROSSIMPACT,skill_lv,tick,flag); + skill->attack(BF_WEAPON, src, src, bl, skill_id, skill_lv, tick, flag); + if ( rnd() % 100 < 4 * skill_lv && skill_id == GC_DARKILLUSION ) + skill->castend_damage_id(src, bl, GC_CROSSIMPACT, skill_lv, tick, flag); } - } break; case GC_WEAPONCRUSH: @@ -5655,8 +5654,8 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin case PR_KYRIE: case MER_KYRIE: - clif->skill_nodamage(bl,bl,skill_id,skill_lv, - sc_start(src,bl,type,100,skill_lv,skill->get_time(skill_id,skill_lv))); + clif->skill_nodamage(bl, bl, skill_id, -1, + sc_start(src, bl, type, 100, skill_lv, skill->get_time(skill_id, skill_lv))); break; //Passive Magnum, should had been casted on yourself. case SM_MAGNUM: @@ -6041,7 +6040,6 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin case MO_ABSORBSPIRITS: { int sp = 0; - int i; if ( dstsd && dstsd->spiritball && (sd == dstsd || map_flag_vs(src->m) || (sd->duel_group && sd->duel_group == dstsd->duel_group)) && ((dstsd->class_&MAPID_BASEMASK) != MAPID_GUNSLINGER || (dstsd->class_&MAPID_UPPERMASK) != MAPID_REBELLION) @@ -6055,7 +6053,8 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin mob->target(dstmd,src,0); } if ( dstsd ) { - for (i = SPIRITS_TYPE_CHARM_WATER; i < SPIRITS_TYPE_SPHERE; i++) + int i; + for ( i = SPIRITS_TYPE_CHARM_WATER; i < SPIRITS_TYPE_SPHERE; i++ ) pc->del_charm(dstsd, dstsd->spiritcharm[i], i); } if (sp) status->heal(src, 0, sp, 3); diff --git a/src/map/status.c b/src/map/status.c index 31afcdbc8..9cd01f7b3 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -10441,6 +10441,7 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const #ifdef ANTI_MAYAP_CHEAT if (invisible && !(sc->option&(OPTION_HIDE|OPTION_CLOAK|OPTION_INVISIBLE))) { + clif->slide(bl, bl->x, bl->y); clif->fixpos(bl); } #endif @@ -11577,10 +11578,14 @@ void status_get_matk_sub(struct block_list *bl, int flag, unsigned short *matk_m && (refine = sd->status.inventory[index].refine) < 16 && refine ) { int r = status->refine_info[sd->inventory_data[index]->wlv].randombonus_max[refine + (4 - sd->inventory_data[index]->wlv)] / 100; if ( r ) - st->matk_max += (rnd() % 100) % r + 1; + *matk_max += (rnd() % 100) % r + 1; } } #endif + + *matk_min = status->calc_matk(bl, sc, *matk_min, false); + *matk_max = status->calc_matk(bl, sc, *matk_max, false); + return; } @@ -12181,7 +12186,7 @@ int status_readdb(void) sv->readdb(map->db_path, "pre-re/job_db1.txt", ',', 5+MAX_WEAPON_TYPE, 5+MAX_WEAPON_TYPE, -1, status->readdb_job1); #endif sv->readdb(map->db_path, "job_db2.txt", ',', 1, 1+MAX_LEVEL, -1, status->readdb_job2); - sv->readdb(map->db_path, "size_fix.txt", ',', MAX_WEAPON_TYPE, MAX_WEAPON_TYPE, ARRAYLENGTH(status->atkmods), status->readdb_sizefix); + sv->readdb(map->db_path, DBPATH"size_fix.txt", ',', MAX_WEAPON_TYPE, MAX_WEAPON_TYPE, ARRAYLENGTH(status->atkmods), status->readdb_sizefix); sv->readdb(map->db_path, DBPATH"refine_db.txt", ',', 4+MAX_REFINE, 4+MAX_REFINE, ARRAYLENGTH(status->refine_info), status->readdb_refine); sv->readdb(map->db_path, "sc_config.txt", ',', 2, 2, SC_MAX, status->readdb_scconfig); |