diff options
author | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-10-27 11:59:35 +0000 |
---|---|---|
committer | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-10-27 11:59:35 +0000 |
commit | 842984c9a12ca4d641314d3f1f5651c3a77d3f61 (patch) | |
tree | c174869a337e7ed47d09dd5bb8da508dc05484e1 /src/map | |
parent | c5887c263b96f9a3bf128b3b53e63d68ff6b9392 (diff) | |
download | hercules-842984c9a12ca4d641314d3f1f5651c3a77d3f61.tar.gz hercules-842984c9a12ca4d641314d3f1f5651c3a77d3f61.tar.bz2 hercules-842984c9a12ca4d641314d3f1f5651c3a77d3f61.tar.xz hercules-842984c9a12ca4d641314d3f1f5651c3a77d3f61.zip |
* Fixed TXT charserver doing periodic random-sized memory allocation (bugreport:312)
* Set 'Create Converter's produce success rate to 100% (bugreport:302)
* Added check that verifies weapon/ammo/state requirements also when casting finishes (might have unwanted side-effects tho'!) (bugreport:228)
* Fixed Firewall knocking back undead/fire element mobs (bug in r11578)
* Added dummy 'openmail' to txt server to fix a script error message
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11585 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/script.c | 9 | ||||
-rw-r--r-- | src/map/skill.c | 84 | ||||
-rw-r--r-- | src/map/unit.c | 2 |
3 files changed, 34 insertions, 61 deletions
diff --git a/src/map/script.c b/src/map/script.c index d00d5f700..8b2464be4 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -4052,10 +4052,7 @@ BUILDIN_FUNC(undisguise); BUILDIN_FUNC(getmonsterinfo); // [Lupus] BUILDIN_FUNC(checkvending); // check vending [Nab4] BUILDIN_FUNC(checkchatting); // check chatting [Marka] - -#ifndef TXT_ONLY BUILDIN_FUNC(openmail); // [Mail System] -#endif #ifdef PCRE_SUPPORT BUILDIN_FUNC(defpattern); // MouseJstr @@ -4395,9 +4392,7 @@ struct script_function buildin_func[] = { BUILDIN_DEF(roclass,"i*"), //[Skotlex] BUILDIN_DEF(checkvending,"*"), BUILDIN_DEF(checkchatting,"*"), -#ifndef TXT_ONLY BUILDIN_DEF(openmail,""), -#endif {NULL,NULL,NULL}, }; @@ -13455,10 +13450,10 @@ BUILDIN_FUNC(warpportal) return 0; } -#ifndef TXT_ONLY BUILDIN_FUNC(openmail) { +#ifndef TXT_ONLY mail_openmail(script_rid2sd(st)); +#endif return 0; } -#endif diff --git a/src/map/skill.c b/src/map/skill.c index a73a820e7..d9518d9bf 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -7328,16 +7328,19 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns { int count=0; const int x = bl->x, y = bl->y; - //Take into account these hit more times than the timer interval - //can handle. + const bool noknockback = ( tstatus->def_ele == ELE_FIRE || battle_check_undead(tstatus->race, tstatus->def_ele) ); + + //Take into account these hit more times than the timer interval can handle. do - skill_attack(BF_MAGIC,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick+count*sg->interval,0); + skill_attack(BF_MAGIC,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick+count*sg->interval,noknockback); while(--src->val2 && x == bl->x && y == bl->y && ++count < SKILLUNITTIMER_INTERVAL/sg->interval && !status_isdead(bl)); + if (src->val2<=0) skill_delunit(src); - break; } + break; + case UNT_SANCTUARY: if (battle_check_undead(tstatus->race, tstatus->def_ele) || tstatus->race==RC_DEMON) { //Only damage enemies with offensive Sanctuary. [Skotlex] @@ -7392,24 +7395,25 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns case SG_SUN_WARM: //SG skills [Komurka] case SG_MOON_WARM: case SG_STAR_WARM: + { + int count = 0; + const int x = bl->x, y = bl->y; + + //If target isn't knocked back it should hit every 20ms [Playtester] + do { - int count=0; - const int x = bl->x, y = bl->y; - //If target isn't knocked back it should hit every 20ms [Playtester] - do - { - if( bl->type == BL_PC ) - status_zap(bl, 0, 15); //Only damage SP [Skotlex] - else // mobs - if( status_charge(ss, 0, 2) ) // costs 2 SP per hit - skill_attack(BF_WEAPON,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick+count*sg->interval,0); - else { //should end when out of sp. - sg->limit = DIFF_TICK(tick,sg->tick); - break; - } - } while( x == bl->x && y == bl->y && - ++count < SKILLUNITTIMER_INTERVAL/sg->interval && !status_isdead(bl) ); - } + if( bl->type == BL_PC ) + status_zap(bl, 0, 15); // sp damage to players + else // mobs + if( status_charge(ss, 0, 2) ) // costs 2 SP per hit + skill_attack(BF_WEAPON,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick+count*sg->interval,0); + else { //should end when out of sp. + sg->limit = DIFF_TICK(tick,sg->tick); + break; + } + } while( x == bl->x && y == bl->y && + ++count < SKILLUNITTIMER_INTERVAL/sg->interval && !status_isdead(bl) ); + } break; case WZ_STORMGUST: if (tsc && tsc->data[SC_FREEZE].val4 != sg->group_id) @@ -8177,13 +8181,10 @@ int skill_check_condition(struct map_session_data* sd, short skill, short lv, in sp_rate = skill_db[j].sp_rate[lv-1]; zeny = skill_db[j].zeny[lv-1]; - if (!type) { //These should only be checked on begin casting. - weapon = skill_db[j].weapon; - ammo = skill_db[j].ammo; - ammo_qty = skill_db[j].ammo_qty[lv-1]; - state = skill_db[j].state; - } else - weapon = ammo = ammo_qty = state = 0; + weapon = skill_db[j].weapon; + ammo = skill_db[j].ammo; + ammo_qty = skill_db[j].ammo_qty[lv-1]; + state = skill_db[j].state; spiritball = skill_db[j].spiritball[lv-1]; mhp = skill_db[j].mhp[lv-1]; @@ -10783,31 +10784,8 @@ int skill_produce_mix (struct map_session_data *sd, int skill_id, int nameid, in if(battle_config.pp_rate != 100) make_per = make_per * battle_config.pp_rate / 100; break; - case SA_CREATECON: // Elemental Converter Creation - skill bonuses are from kRO [DracoRPG] - make_per = pc_checkskill(sd, SA_ADVANCEDBOOK)*100 + //TODO: Advanced Book bonus is custom! [Skotlex] - sd->status.job_level*20 + status->int_*10 + status->dex*10; - switch(nameid){ - case 12114: - flag = pc_checkskill(sd,SA_FLAMELAUNCHER); - if (flag > 0) - make_per += 1000*flag-500; - break; - case 12115: - flag = pc_checkskill(sd,SA_FROSTWEAPON); - if (flag > 0) - make_per += 1000*flag-500; - break; - case 12116: - flag = pc_checkskill(sd,SA_SEISMICWEAPON); - if (flag > 0) - make_per += 1000*flag-500; - break; - case 12117: - flag = pc_checkskill(sd,SA_LIGHTNINGLOADER); - if (flag > 0) - make_per += 1000*flag-500; - break; - } + case SA_CREATECON: // Elemental Converter Creation + make_per = 100000; // should be 100% success rate break; default: if (sd->menuskill_id == AM_PHARMACY && diff --git a/src/map/unit.c b/src/map/unit.c index 709886e76..c43d1374e 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -911,7 +911,7 @@ int unit_skilluse_id2(struct block_list *src, int target_id, short skill_num, sh break; } if (!skill_check_condition(sd, skill_num, skill_lv, 0)) - return 0; + return 0; } //TODO: Add type-independant skill_check_condition function. if (src->type == BL_MOB) { |