diff options
-rw-r--r-- | Changelog-SVN.txt | 4 | ||||
-rw-r--r-- | db/const.txt | 1 | ||||
-rw-r--r-- | db/skill_unit_db.txt | 24 | ||||
-rw-r--r-- | doc/item_bonus.txt | 8 | ||||
-rw-r--r-- | src/map/map.h | 4 | ||||
-rw-r--r-- | src/map/party.c | 12 | ||||
-rw-r--r-- | src/map/pc.c | 46 | ||||
-rw-r--r-- | src/map/skill.c | 20 |
8 files changed, 79 insertions, 40 deletions
diff --git a/Changelog-SVN.txt b/Changelog-SVN.txt index 7e191639e..f6c0c52b6 100644 --- a/Changelog-SVN.txt +++ b/Changelog-SVN.txt @@ -1,6 +1,10 @@ Date Added 02/23 + * Added bAddItemHealRate [celest] + * Fixed a crash if adding an offline player to a party, thanks to Alex14 + [celest] + * Fixed a crash with Warp [celest] * New Cards: Some fixes, revisions, additions [Lupus] * Fixed char server crash when sending wisp with a "'" in the names [celest] * Fixed Backstab not checking for and consuming arrows [celest] diff --git a/db/const.txt b/db/const.txt index 768392519..6c3ec6b8b 100644 --- a/db/const.txt +++ b/db/const.txt @@ -249,6 +249,7 @@ bAddRace2 2024 bHPGainValue 2025 bSubSize 2026 bDamageWhenUnequip 2027 +bAddItemHealRate 2028 Eff_Stone 0 diff --git a/db/skill_unit_db.txt b/db/skill_unit_db.txt index 9c0616e30..70ea32109 100644 --- a/db/skill_unit_db.txt +++ b/db/skill_unit_db.txt @@ -19,26 +19,26 @@ 18,0x7f, , -1, 0, 1,enemy, 0x000 //MG_FIREWALL#�t�@�C�A�[�E�H�[�� 21,0x86, , 0, 1,1000,enemy, 0x008 //MG_THUNDERSTORM#�T���_�[�X�g�[�� 25,0x85, , 1, 0, -1,all, 0x003 //AL_PNEUMA#�j���[�} - 27,0x81,0x80, 0, 0, -1,all, 0x002 //AL_WARP#���[�v�|�[�^�� + 27,0x81,0x80, 0, 0, -1,all, 0x006 //AL_WARP#���[�v�|�[�^�� 70,0x83, , -1, 1,1000,all, 0x000 //PR_SANCTUARY#�T���N�`���A�� 79,0x84, , -1, 1,3000,enemy, 0x000 //PR_MAGNUS#�}�O�k�X�G�N�\�V�Y�� 80,0x87,0x88, 0, 1,2000,enemy, 0x002 //WZ_FIREPILLAR#�t�@�C�A�[�s���[ 83,0x86, , 0, 3,1000,enemy, 0x000 //WZ_METEOR#���e�I�X�g�[�� 85,0x86, , 0, 6,1000,enemy, 0x008 //WZ_VERMILION#���[�h�I�u���@�[�~���I�� - 87,0x8d, , -1, 0, -1,all, 0x000 //WZ_ICEWALL#�A�C�X�E�H�[�� + 87,0x8d, , -1, 0, -1,all, 0x004 //WZ_ICEWALL#�A�C�X�E�H�[�� 88,0x86, , 0, 2,1000,enemy, 0x000 //WZ_FROSTNOVA#�t���X�g�m���@ 89,0x86, , 0, 5, 450,enemy, 0x000 //WZ_STORMGUST#�X�g�[���K�X�g 91,0x86, , 0, 2,1000,enemy, 0x000 //WZ_HEAVENDRIVE#�w�����Y�h���C�u 92,0x8e, , 2, 0, -1,enemy, 0x000 //WZ_QUAGMIRE#�N�@�O�}�C�A -115,0x90, , 0, 1,1000,enemy, 0x002 //HT_SKIDTRAP#�X�L�b�h�g���b�v -116,0x93, , 0, 1,1000,enemy, 0x002 //HT_LANDMINE#�����h�}�C�� -117,0x91, , 0, 1,1000,enemy, 0x002 //HT_ANKLESNARE#�A���N���X�l�A -118,0x94, , 0, 1,1000,enemy, 0x002 //HT_SHOCKWAVE#�V���b�N�E�F�[�u�g���b�v -119,0x95, , 0, 2,1000,enemy, 0x002 //HT_SANDMAN#�T���h�}�� -120,0x96, , 0, 1,1000,enemy, 0x002 //HT_FLASHER#�t���b�V���[ -121,0x97, , 0, 1,1000,enemy, 0x002 //HT_FREEZINGTRAP#�t���[�W���O�g���b�v -122,0x8f, , 0, 1,1000,enemy, 0x002 //HT_BLASTMINE#�u���X�g�}�C�� -123,0x98, , 0, 2,1000,enemy, 0x002 //HT_CLAYMORETRAP#�N���C���A�g���b�v +115,0x90, , 0, 1,1000,enemy, 0x006 //HT_SKIDTRAP#�X�L�b�h�g���b�v +116,0x93, , 0, 1,1000,enemy, 0x006 //HT_LANDMINE#�����h�}�C�� +117,0x91, , 0, 1,1000,enemy, 0x006 //HT_ANKLESNARE#�A���N���X�l�A +118,0x94, , 0, 1,1000,enemy, 0x006 //HT_SHOCKWAVE#�V���b�N�E�F�[�u�g���b�v +119,0x95, , 0, 2,1000,enemy, 0x006 //HT_SANDMAN#�T���h�}�� +120,0x96, , 0, 1,1000,enemy, 0x006 //HT_FLASHER#�t���b�V���[ +121,0x97, , 0, 1,1000,enemy, 0x006 //HT_FREEZINGTRAP#�t���[�W���O�g���b�v +122,0x8f, , 0, 1,1000,enemy, 0x006 //HT_BLASTMINE#�u���X�g�}�C�� +123,0x98, , 0, 2,1000,enemy, 0x006 //HT_CLAYMORETRAP#�N���C���A�g���b�v 125,0x99, , 0, 1,1000,all, 0x002 //HT_TALKIEBOX#�g�[�L�[�{�b�N�X 140,0x92, , -1, 0,1000,enemy, 0x000 //AS_VENOMDUST#�x�i���_�X�g 220,0xb0, , 0, 0, -1,all, 0x002 //RG_GRAFFITI#�O���t�B�e�B @@ -71,7 +71,7 @@ 362,0xb4, , 0, 3, 300,all, 0x000,0 //HP_BASILICA#�o�W���J 369,0xb3, , 3, 0, -1,all, 0x000,0 //PA_GOSPEL#�S�X�y�� 404,0xb6, , -1, 0, -1,all, 0x000,0 //PF_FOGWALL#�t�H�O�E�H�[�� -405,0xb7, , 0, 1,1000,enemy, 0x002,0 //PF_SPIDERWEB#�X�p�C�_�[�E�F�b�u +405,0xb7, , 0, 1,1000,enemy, 0x006,0 //PF_SPIDERWEB#�X�p�C�_�[�E�F�b�u 10006,0xc1, , 0, 2, -1,all, 0x000,0 //GD_LEADERSHIP 10007,0xc2, , 0, 2, -1,all, 0x000,0 //GD_GLORYWOUNDS 10008,0xc3, , 0, 2, -1,all, 0x000,0 //GD_SOULCOLD diff --git a/doc/item_bonus.txt b/doc/item_bonus.txt index 96a2ebe5f..039a84bd7 100644 --- a/doc/item_bonus.txt +++ b/doc/item_bonus.txt @@ -185,4 +185,10 @@ bonus3 bSPDrainValue,n,x,y; When attacking there is a n% chance to either bonus4 bAutoSpellWhenHit,x,y,n,i; n% chance to cast skill x of level y when being hit by physical close range damage - i:0=cast on self 1=cast on enemy
\ No newline at end of file + i:0=cast on self 1=cast on enemy + +//---- 2/22 new card effects ---- + +bonus2 bAddItemHealRate,n,x; Increases HP recovered by n type items by x% + n:1=potions 2=herbs 3=fruits 4=meat 5=candy + 6=juice 7=sashimi diff --git a/src/map/map.h b/src/map/map.h index 96cbc9fb3..fb11bc784 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -293,6 +293,8 @@ struct map_session_data { int addrace2[6],addrace2_[6]; int subsize[3]; short unequip_damage; + int itemid; + int itemhealrate[6]; short spiritball, spiritball_old; int spirit_timer[MAX_SKILL_LEVEL]; @@ -640,7 +642,7 @@ enum { SP_CRIT_ATK_RATE, SP_CRITICAL_ADDRACE, SP_NO_REGEN, SP_ADDEFF_WHENHIT, SP_AUTOSPELL_WHENHIT, // 2013-2017 SP_SKILL_ATK, SP_UNSTRIPABLE, SP_ADD_DAMAGE_BY_CLASS, // 2018-2020 SP_SP_GAIN_VALUE, SP_IGNORE_DEF_MOB, SP_HP_LOSS_RATE, SP_ADDRACE2, SP_HP_GAIN_VALUE, // 2021-2025 - SP_SUBSIZE, SP_DAMAGE_WHEN_UNEQUIP // 2026 + SP_SUBSIZE, SP_DAMAGE_WHEN_UNEQUIP, SP_ADD_ITEM_HEAL_RATE // 2026-2028 }; enum { diff --git a/src/map/party.c b/src/map/party.c index 6c6bf9567..85774c33b 100644 --- a/src/map/party.c +++ b/src/map/party.c @@ -250,11 +250,13 @@ int party_reply_invite(struct map_session_data *sd,int account_id,int flag) // �p�[�e�B���lj����ꂽ int party_member_added(int party_id,int account_id,int flag) { - struct map_session_data *sd= map_id2sd(account_id),*sd2; - if(sd==NULL && flag==0){ - if(battle_config.error_log) - printf("party: member added error %d is not online\n",account_id); - intif_party_leave(party_id,account_id); // �L�������ɓo�^�ł��Ȃ��������ߒE�ޗv�����o�� + struct map_session_data *sd = map_id2sd(account_id),*sd2; + if(sd == NULL){ + if (flag == 0) { + if(battle_config.error_log) + printf("party: member added error %d is not online\n",account_id); + intif_party_leave(party_id,account_id); // �L�������ɓo�^�ł��Ȃ��������ߒE�ޗv�����o�� + } return 0; } sd2=map_id2sd(sd->party_invite_account); diff --git a/src/map/pc.c b/src/map/pc.c index 52c2b6a8f..20f5d8854 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -1855,6 +1855,10 @@ int pc_bonus2(struct map_session_data *sd,int type,int type2,int val) if(sd->state.lr_flag != 2) sd->subsize[type2]+=val; break; + case SP_ADD_ITEM_HEAL_RATE: + if(sd->state.lr_flag != 2) + sd->itemhealrate[type2 - 1] += val; + break; default: if(battle_config.error_log) @@ -2421,17 +2425,18 @@ int pc_isUseitem(struct map_session_data *sd,int n) */ int pc_useitem(struct map_session_data *sd,int n) { - int nameid,amount; + int amount; nullpo_retr(1, sd); if(n >=0 && n < MAX_INVENTORY) { - nameid = sd->status.inventory[n].nameid; + sd->itemid = sd->status.inventory[n].nameid; amount = sd->status.inventory[n].amount; if(sd->status.inventory[n].nameid <= 0 || sd->status.inventory[n].amount <= 0 || sd->sc_data[SC_BERSERK].timer!=-1 || sd->sc_data[SC_MARIONETTE].timer!=-1 || + (pc_issit(sd) && (sd->itemid == 605 || sd->itemid == 606)) || //added item_noequip.txt items check by Maya&[Lupus] (map[sd->bl.m].flag.pvp && (sd->inventory_data[n]->flag.no_equip&1) ) || // PVP (map[sd->bl.m].flag.gvg && (sd->inventory_data[n]->flag.no_equip>1) ) || // GVG @@ -2439,6 +2444,7 @@ int pc_useitem(struct map_session_data *sd,int n) clif_useitemack(sd,n,0,0); return 1; } + if(sd->inventory_data[n]) run_script(sd->inventory_data[n]->use_script,0,sd->bl.id,0); @@ -2902,7 +2908,7 @@ int pc_setpos(struct map_session_data *sd,char *mapname_org,int x,int y,int clrt status_change_end(&sd->bl, SC_HIDING, -1); if(sd->status.option&4) status_change_end(&sd->bl, SC_CLOAKING, -1); - if(sd->status.option&16386) + if(sd->status.option&16384) status_change_end(&sd->bl, SC_CHASEWALK, -1); if(sd->status.pet_id > 0 && sd->pd && sd->pet.intimate > 0) { @@ -4588,7 +4594,7 @@ int pc_damage(struct block_list *src,struct map_session_data *sd,int damage) status_change_end(&sd->bl, SC_HIDING, -1); if(sd->status.option&4) status_change_end(&sd->bl, SC_CLOAKING, -1); - if(sd->status.option&16386) + if(sd->status.option&16384) status_change_end(&sd->bl, SC_CHASEWALK, -1); if(sd->status.hp>0){ @@ -5124,7 +5130,7 @@ int pc_heal(struct map_session_data *sd,int hp,int sp) */ int pc_itemheal(struct map_session_data *sd,int hp,int sp) { - int bonus; + int bonus, type = 0; // if(battle_config.battle_log) // printf("heal %d %d\n",hp,sp); @@ -5147,19 +5153,33 @@ int pc_itemheal(struct map_session_data *sd,int hp,int sp) if(sp > 0) sp = 0; } + + if (sd->itemid >= 501 && sd->itemid <= 505) + type = 1; // potions + else if (sd->itemid >= 507 && sd->itemid <= 510) + type = 2; // herbs + else if (sd->itemid >= 512 && sd->itemid <= 516) + type = 3; // fruits + else if (sd->itemid == 517 || sd->itemid == 528) + type = 4; // meat + else if (sd->itemid == 529 || sd->itemid == 530) + type = 5; // candy + else if (sd->itemid >= 531 && sd->itemid <= 534) + type = 6; // juice + else if (sd->itemid == 544 || sd->itemid == 551) + type = 7; // sashimi + if(hp > 0) { - bonus = (sd->paramc[2]<<1) + 100 + pc_checkskill(sd,SM_RECOVERY)*10; - if(bonus != 100) - hp = hp * bonus / 100; - bonus = 100 + pc_checkskill(sd,AM_LEARNINGPOTION)*5; + bonus = (sd->paramc[2]<<1) + 100 + pc_checkskill(sd,SM_RECOVERY)*10 + + pc_checkskill(sd,AM_LEARNINGPOTION)*5; + if (type > 0) + bonus += sd->itemhealrate[type - 1]; if(bonus != 100) hp = hp * bonus / 100; } if(sp > 0) { - bonus = (sd->paramc[3]<<1) + 100 + pc_checkskill(sd,MG_SRECOVERY)*10; - if(bonus != 100) - sp = sp * bonus / 100; - bonus = 100 + pc_checkskill(sd,AM_LEARNINGPOTION)*5; + bonus = (sd->paramc[3]<<1) + 100 + pc_checkskill(sd,MG_SRECOVERY)*10 + + pc_checkskill(sd,AM_LEARNINGPOTION)*5; if(bonus != 100) sp = sp * bonus / 100; } diff --git a/src/map/skill.c b/src/map/skill.c index 296c95f93..75df62f6b 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -5030,6 +5030,7 @@ struct skill_unit_group *skill_unitsetting( struct block_list *src, int skillid, int target,interval,range,unit_flag; struct skill_unit_layout *layout; struct status_change *sc_data; + int active_flag=1; nullpo_retr(0, src); @@ -5060,6 +5061,7 @@ struct skill_unit_group *skill_unitsetting( struct block_list *src, int skillid, val1=skilllv+6; if(flag==0) limit=2000; + active_flag=0; break; case PR_SANCTUARY: /* �T���N�`���A�� */ @@ -5264,7 +5266,7 @@ struct skill_unit_group *skill_unitsetting( struct block_list *src, int skillid, break; } } - if (range==0) + if (range==0 && active_flag) map_foreachinarea(skill_unit_effect,unit->bl.m ,unit->bl.x,unit->bl.y,unit->bl.x,unit->bl.y ,0,&unit->bl,gettick(),1); @@ -8059,19 +8061,22 @@ int skill_encchant_eremental_end(struct block_list *bl,int type) /* �N��?�L���O?���i����Ɉړ��s�\�n?�����邩�j */ int skill_check_cloaking(struct block_list *bl) { + struct map_session_data *sd = NULL; static int dx[]={ 0, 1, 0, -1, -1, 1, 1, -1}; //optimized by Lupus static int dy[]={-1, 0, 1, 0, -1, -1, 1, 1}; int end=1,i; - //missing sd [Found by Celest, commited by Aria] - struct map_session_data *sd=(struct map_session_data *)bl; - nullpo_retr(0, bl); if(bl->type == BL_PC && !battle_config.pc_cloak_check_type) // If it's No it shouldn't be checked return 0; else if(bl->type == BL_MOB && !battle_config.monster_cloak_check_type) return 0; + + //missing sd [Found by Celest, commited by Aria] + if (bl->type == BL_PC) + sd=(struct map_session_data *)bl; + for(i=0;i<sizeof(dx)/sizeof(dx[0]);i++){ if(map_getcell(bl->m,bl->x+dx[i],bl->y+dy[i],CELL_CHKNOPASS)) { end=0; @@ -8079,17 +8084,16 @@ int skill_check_cloaking(struct block_list *bl) } } if(end){ - if ((bl->type == BL_PC && pc_checkskill(sd,AS_CLOAKING)<3) || bl->type == BL_MOB) { + if ((sd && pc_checkskill(sd,AS_CLOAKING)<3) || bl->type == BL_MOB) { status_change_end(bl, SC_CLOAKING, -1); - *status_get_option(bl)&=~4; /* �O�̂��߂�?�� */ } - else if (bl->type == BL_PC && sd->sc_data[SC_CLOAKING].val3 != 130) { + else if (sd && sd->sc_data[SC_CLOAKING].val3 != 130) { sd->sc_data[SC_CLOAKING].val3 = 130; status_calc_speed (sd); } } else { - if (bl->type == BL_PC && sd->sc_data[SC_CLOAKING].val3 != 103) { + if (sd && sd->sc_data[SC_CLOAKING].val3 != 103) { sd->sc_data[SC_CLOAKING].val3 = 103; status_calc_speed (sd); } |