* 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://svn.code.sf.net/p/rathena/svn/branches/stable@1420 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
celest 2005-04-06 11:55:55 +00:00
parent eba2fb10e6
commit 67a9cafa79
10 changed files with 38 additions and 23 deletions

View File

@ -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

View File

@ -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]

View File

@ -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;

View File

@ -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 )
}

View File

@ -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){ // エナジーコート

View File

@ -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);

View File

@ -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;

View File

@ -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)
{

View File

@ -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;

View File

@ -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: /* スピアクイッケン */