diff options
author | celest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2005-04-06 11:55:55 +0000 |
---|---|---|
committer | celest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2005-04-06 11:55:55 +0000 |
commit | 39d776311e6cda0692503f599ce997a77dbe700d (patch) | |
tree | 23a1f8e7a5687ddb87d397ddef68ad041bbc3831 | |
parent | b1a8b920af2b39f546cd3408af893741fc94e12b (diff) | |
download | hercules-39d776311e6cda0692503f599ce997a77dbe700d.tar.gz hercules-39d776311e6cda0692503f599ce997a77dbe700d.tar.bz2 hercules-39d776311e6cda0692503f599ce997a77dbe700d.tar.xz hercules-39d776311e6cda0692503f599ce997a77dbe700d.zip |
* Fixed a crash in clif_send when checking packet version
* Fixed a crash in Deluge, Volcano and Violent Gale
* Allow super novices to rent carts from the Kafra
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@1420 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r-- | Changelog-SVN.txt | 2 | ||||
-rw-r--r-- | npc/Changelog.txt | 1 | ||||
-rw-r--r-- | npc/kafras/functions_kafras.txt | 5 | ||||
-rw-r--r-- | npc/other/Global_Functions.txt | 5 | ||||
-rw-r--r-- | src/map/battle.c | 18 | ||||
-rw-r--r-- | src/map/clif.c | 2 | ||||
-rw-r--r-- | src/map/pc.c | 12 | ||||
-rw-r--r-- | src/map/skill.c | 3 | ||||
-rw-r--r-- | src/map/skill.h | 3 | ||||
-rw-r--r-- | src/map/status.c | 10 |
10 files changed, 38 insertions, 23 deletions
diff --git a/Changelog-SVN.txt b/Changelog-SVN.txt index 1af8402bf..d0c7228af 100644 --- a/Changelog-SVN.txt +++ b/Changelog-SVN.txt @@ -2,6 +2,8 @@ Date Added 04/06 + * Fixed a crash in clif_send when checking packet version, thanks to Alex14 + * Fixed a crash in Deluge, Volcano and Violent Gale, thanks to Alex14 * Skip partner checking when calculating status with Marionette Control on [celest] * Fixed plagiarised skills become unuseable after saving character [celest] * Fixed double skill fail messages for stone curse, thanks to wind diff --git a/npc/Changelog.txt b/npc/Changelog.txt index cfc08d961..bc5c00ecb 100644 --- a/npc/Changelog.txt +++ b/npc/Changelog.txt @@ -34,6 +34,7 @@ Date Added ====== 04/06 + * Allow super novices to rent carts from the Kafra, thanks to HawkMoon * Set PCLoginEvent.txt to disabled by default [celest] 04/04 * Changed "set @TEMP,rand(0);" to set "@TEMP,0;" in the Payon Fortune Teller script [DracoRPG] diff --git a/npc/kafras/functions_kafras.txt b/npc/kafras/functions_kafras.txt index 5e1c5b6bc..b27545388 100644 --- a/npc/kafras/functions_kafras.txt +++ b/npc/kafras/functions_kafras.txt @@ -9,7 +9,7 @@ //= Lupus //= kobra_k88 (2.0) //===== Current Version: ===================================== -//= 2.3 +//= 2.4 //===== Compatible With: ===================================== //= eAthena 1.0 //===== Description: =============================================== @@ -25,6 +25,7 @@ //= 2.2b This version uses arrays for the teleport option. //= Rearranged next statements to make menu transitions smoother. [kobra_k88] //= 2.3 Removed SAVE from Niflheim. [Lupus] +//= 2.4 Allow Super novices to rent carts, thanks to HawkMoon //============================================================ @@ -182,7 +183,7 @@ function script F_KafTele { // Cart Function ======================================================== function script F_KafCart { - if(callfunc("Is_Merc_Class") == 0) goto sL_CantRent; + if(callfunc("Is_Merc_Class") == 0 && callfunc("Is_Super_Class") == 0) goto sL_CantRent; if(getskilllv(39)==0) goto sL_NeedSkill; if(checkcart(0) == 1) goto sL_GotCart; if(getarg(0) == 2) goto L_Guild; diff --git a/npc/other/Global_Functions.txt b/npc/other/Global_Functions.txt index 8a0ccba2c..d9af3143d 100644 --- a/npc/other/Global_Functions.txt +++ b/npc/other/Global_Functions.txt @@ -85,3 +85,8 @@ function script Is_Thief_Class { function script Is_Sword_Class { return ( Class==Job_Swordman || Class==Job_Knight || Class==Job_Knight2 || Class==Job_Crusader || Class==Job_Crusader2 || Class==4002 || Class==4008 || Class==4014 || Class==4015 || Class==4022 ); } +//----------------------------------------------------- +// returns 1 if the player is either Super Novice or Super Baby, 0 otherwise +function script Is_Super_Class { + return ( Class==Job_Super_Baby || Class==Job_SuperNovice ) +}
\ No newline at end of file diff --git a/src/map/battle.c b/src/map/battle.c index b7e0320e8..077e5fc9b 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -289,23 +289,29 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,int damage,i //属性場のダメージ増加 if(sc_data[SC_VOLCANO].timer!=-1){ // ボルケーノ if(flag&BF_SKILL && skill_get_pl(skill_num)==3) - damage += damage*sc_data[SC_VOLCANO].val4/100; + //damage += damage*sc_data[SC_VOLCANO].val4/100; + damage += damage * enchant_eff[sc_data[SC_VOLCANO].val1-1] /100; else if(!flag&BF_SKILL && status_get_attack_element(bl)==3) - damage += damage*sc_data[SC_VOLCANO].val4/100; + //damage += damage*sc_data[SC_VOLCANO].val4/100; + damage += damage * enchant_eff[sc_data[SC_VOLCANO].val1-1] /100; } if(sc_data[SC_VIOLENTGALE].timer!=-1){ // バイオレントゲイル if(flag&BF_SKILL && skill_get_pl(skill_num)==4) - damage += damage*sc_data[SC_VIOLENTGALE].val4/100; + //damage += damage*sc_data[SC_VIOLENTGALE].val4/100; + damage += damage * enchant_eff[sc_data[SC_VIOLENTGALE].val1-1] /100; else if(!flag&BF_SKILL && status_get_attack_element(bl)==4) - damage += damage*sc_data[SC_VIOLENTGALE].val4/100; + //damage += damage*sc_data[SC_VIOLENTGALE].val4/100; + damage += damage * enchant_eff[sc_data[SC_VIOLENTGALE].val1-1] /100; } if(sc_data[SC_DELUGE].timer!=-1){ // デリュージ if(flag&BF_SKILL && skill_get_pl(skill_num)==1) - damage += damage*sc_data[SC_DELUGE].val4/100; + //damage += damage*sc_data[SC_DELUGE].val4/100; + damage += damage * enchant_eff[sc_data[SC_DELUGE].val1-1] /100; else if(!flag&BF_SKILL && status_get_attack_element(bl)==1) - damage += damage*sc_data[SC_DELUGE].val4/100; + //damage += damage*sc_data[SC_DELUGE].val4/100; + damage += damage * enchant_eff[sc_data[SC_DELUGE].val1-1] /100; } if(sc_data[SC_ENERGYCOAT].timer!=-1 && damage>0 && flag&BF_WEAPON){ // エナジーコート diff --git a/src/map/clif.c b/src/map/clif.c index d3536b1c6..50031a44f 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -442,6 +442,8 @@ int clif_send(unsigned char *buf, int len, struct block_list *bl, int type) { if ((sd = g->member[i].sd) != NULL) { if (type == GUILD_WOS && sd->bl.id == bl->id) continue; + if (sd->packet_ver > MAX_PACKET_VER) + continue; if (packet_db[sd->packet_ver][RBUFW(buf,0)].len) { // packet must exist for the client version memcpy(WFIFOP(sd->fd,0), buf, len); WFIFOSET(sd->fd,len); diff --git a/src/map/pc.c b/src/map/pc.c index 12441cff0..e0c13012d 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -673,7 +673,7 @@ int pc_authok(int id, int login_id2, time_t connect_until_time, struct mmo_chars sd->skillitem = -1; sd->skillitemlv = -1; sd->invincible_timer = -1; - + sd->deal_locked = 0; sd->trade_partner = 0; @@ -687,9 +687,8 @@ int pc_authok(int id, int login_id2, time_t connect_until_time, struct mmo_chars sd->canmove_tick = tick; sd->canregen_tick = tick; sd->attackabletime = tick; - + sd->reg_num = 0; sd->doridori_counter = 0; - sd->change_level = pc_readglobalreg(sd,"jobchange_level"); #ifndef TXT_ONLY // mail system [Valaris] @@ -5602,13 +5601,6 @@ int pc_setreg(struct map_session_data *sd,int reg,int val) } sd->reg_num++; sd->reg = (struct script_reg *) aRealloc(sd->reg, sizeof(*(sd->reg)) * sd->reg_num); - if (sd->reg == NULL){ - printf("out of memory : pc_setreg\n"); - exit(1); - } -/* memset(sd->reg + (sd->reg_num - 1) * sizeof(*(sd->reg)), 0, - sizeof(*(sd->reg))); -*/ sd->reg[i].index = reg; sd->reg[i].data = val; diff --git a/src/map/skill.c b/src/map/skill.c index 48f7a2595..1111ed293 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -586,6 +586,9 @@ struct skill_unit_group_tickset *skill_unitgrouptickset_search(struct block_list int skill_unit_onplace(struct skill_unit *src,struct block_list *bl,unsigned int tick); int skill_unit_effect(struct block_list *bl,va_list ap); +int enchant_eff[5] = { 10, 14, 17, 19, 20 }; +int deluge_eff[5] = { 5, 9, 12, 14, 15 }; + // [MouseJstr] - skill ok to cast? and when? int skillnotok(int skillid, struct map_session_data *sd) { diff --git a/src/map/skill.h b/src/map/skill.h index 736afa8f8..67d7a906c 100644 --- a/src/map/skill.h +++ b/src/map/skill.h @@ -82,6 +82,9 @@ struct skill_abra_db { }; extern struct skill_abra_db skill_abra_db[MAX_SKILL_ABRA_DB]; +extern int enchant_eff[5]; +extern int deluge_eff[5]; + struct block_list; struct map_session_data; struct skill_unit; diff --git a/src/map/status.c b/src/map/status.c index 3b910c004..c5100d8bb 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -1215,7 +1215,7 @@ int status_calc_pc(struct map_session_data* sd,int first) sd->status.max_hp = battle_config.max_hp; } if(sd->sc_data[SC_DELUGE].timer!=-1 && sd->def_ele==1){ // デリュ?ジ - sd->status.max_hp += sd->status.max_hp*sd->sc_data[SC_DELUGE].val3/100; + sd->status.max_hp += sd->status.max_hp * deluge_eff[sd->sc_data[SC_DELUGE].val1-1]/100; if(sd->status.max_hp < 0 || sd->status.max_hp > battle_config.max_hp) sd->status.max_hp = battle_config.max_hp; } @@ -3335,19 +3335,19 @@ int status_change_start(struct block_list *bl,int type,int val1,int val2,int val case SC_VOLCANO: calc_flag = 1; val3 = val1*10; - val4 = val1>=5?20: (val1==4?19: (val1==3?17: ( val1==2?14:10 ) ) ); + //val4 = val1>=5?20: (val1==4?19: (val1==3?17: ( val1==2?14:10 ) ) ); break; case SC_DELUGE: calc_flag = 1; - val3 = val1>=5?15: (val1==4?14: (val1==3?12: ( val1==2?9:5 ) ) ); - val4 = val1>=5?20: (val1==4?19: (val1==3?17: ( val1==2?14:10 ) ) ); + //val3 = val1>=5?15: (val1==4?14: (val1==3?12: ( val1==2?9:5 ) ) ); + //val4 = val1>=5?20: (val1==4?19: (val1==3?17: ( val1==2?14:10 ) ) ); if (sc_data[SC_FOGWALL].timer != -1 && sc_data[SC_BLIND].timer != -1) status_change_end(bl,SC_BLIND,-1); break; case SC_VIOLENTGALE: calc_flag = 1; val3 = val1*3; - val4 = val1>=5?20: (val1==4?19: (val1==3?17: ( val1==2?14:10 ) ) ); + //val4 = val1>=5?20: (val1==4?19: (val1==3?17: ( val1==2?14:10 ) ) ); break; case SC_SPEARSQUICKEN: /* スピアクイッケン */ |