summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/map/atcommand.c10
-rw-r--r--src/map/battle.c15
-rw-r--r--src/map/chrif.c6
-rw-r--r--src/map/clif.c13
-rw-r--r--src/map/map.h5
-rw-r--r--src/map/mob.c9
-rw-r--r--src/map/pc.c48
-rw-r--r--src/map/pc.h2
-rw-r--r--src/map/script.c6
-rw-r--r--src/map/skill.c49
-rw-r--r--src/map/skill.h9
-rw-r--r--src/map/trade.c4
12 files changed, 119 insertions, 57 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index d5a4d0807..d460bfa2d 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -3464,7 +3464,7 @@ int atcommand_refine(
if (sd->status.inventory[i].refine != final_refine) {
sd->status.inventory[i].refine = final_refine;
current_position = sd->status.inventory[i].equip;
- pc_unequipitem(sd, i, 0, BF_NORMAL);
+ pc_unequipitem(sd, i, 3);
clif_refine(fd, sd, 0, i, sd->status.inventory[i].refine);
clif_delitem(sd, i, 1);
clif_additem(sd, i, 1, 0);
@@ -7231,7 +7231,7 @@ atcommand_dropall(const int fd, struct map_session_data* sd,
for (i = 0; i < MAX_INVENTORY; i++) {
if (sd->status.inventory[i].amount) {
if(sd->status.inventory[i].equip != 0)
- pc_unequipitem(sd, i, 0, BF_NORMAL);
+ pc_unequipitem(sd, i, 3);
pc_dropitem(sd, i, sd->status.inventory[i].amount);
}
}
@@ -7259,7 +7259,7 @@ atcommand_chardropall(const int fd, struct map_session_data* sd,
for (i = 0; i < MAX_INVENTORY; i++) {
if (pl_sd->status.inventory[i].amount) {
if(pl_sd->status.inventory[i].equip != 0)
- pc_unequipitem(pl_sd, i, 0, BF_NORMAL);
+ pc_unequipitem(pl_sd, i, 3);
pc_dropitem(pl_sd, i, pl_sd->status.inventory[i].amount);
}
}
@@ -7290,7 +7290,7 @@ atcommand_storeall(const int fd, struct map_session_data* sd,
for (i = 0; i < MAX_INVENTORY; i++) {
if (sd->status.inventory[i].amount) {
if(sd->status.inventory[i].equip != 0)
- pc_unequipitem(sd, i, 0, BF_NORMAL);
+ pc_unequipitem(sd, i, 3);
storage_storageadd(sd, i, sd->status.inventory[i].amount);
}
}
@@ -7326,7 +7326,7 @@ atcommand_charstoreall(const int fd, struct map_session_data* sd,
for (i = 0; i < MAX_INVENTORY; i++) {
if (pl_sd->status.inventory[i].amount) {
if(pl_sd->status.inventory[i].equip != 0)
- pc_unequipitem(pl_sd, i, 0, BF_NORMAL);
+ pc_unequipitem(pl_sd, i, 3);
storage_storageadd(pl_sd, i, sd->status.inventory[i].amount);
}
}
diff --git a/src/map/battle.c b/src/map/battle.c
index d039ce032..9c6b313cf 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -1993,6 +1993,7 @@ static struct Damage battle_calc_pet_weapon_attack(
case NPC_POISONATTACK:
case NPC_HOLYATTACK:
case NPC_DARKNESSATTACK:
+ case NPC_UNDEADATTACK:
case NPC_TELEKINESISATTACK:
div_= pd->skillduration; // [Valaris]
break;
@@ -2072,14 +2073,14 @@ static struct Damage battle_calc_pet_weapon_attack(
flag=(flag&~BF_RANGEMASK)|BF_LONG;
break;
case CH_TIGERFIST: // 伏虎拳
- damage = damage*(100+ 60*skill_lv)/100;
+ damage = damage*(40+ 100*skill_lv)/100;
break;
case CH_CHAINCRUSH: // 連柱崩撃
- damage = damage*(100+ 60*skill_lv)/100;
+ damage = damage*(400+ 100*skill_lv)/100;
div_=skill_get_num(skill_num,skill_lv);
break;
case CH_PALMSTRIKE: // 猛虎硬派山
- damage = damage*(50+ 100*skill_lv)/100;
+ damage = damage*(200+ 100*skill_lv)/100;
break;
case LK_SPIRALPIERCE: /* スパイラルピアース */
damage = damage*(100+ 50*skill_lv)/100; //増加量が分からないので適当に
@@ -2486,6 +2487,7 @@ static struct Damage battle_calc_mob_weapon_attack(
case NPC_POISONATTACK:
case NPC_HOLYATTACK:
case NPC_DARKNESSATTACK:
+ case NPC_UNDEADATTACK:
case NPC_TELEKINESISATTACK:
damage = damage*(100+25*(skill_lv-1))/100;
break;
@@ -2565,14 +2567,14 @@ static struct Damage battle_calc_mob_weapon_attack(
damage = damage*(240+ 60*skill_lv)/100;
break;
case CH_TIGERFIST: // 伏虎拳
- damage = damage*(100+ 20*skill_lv)/100;
+ damage = damage*(40+ 100*skill_lv)/100;
break;
case CH_CHAINCRUSH: // 連柱崩撃
- damage = damage*(100+ 60*skill_lv)/100;
+ damage = damage*(400+ 100*skill_lv)/100;
div_=skill_get_num(skill_num,skill_lv);
break;
case CH_PALMSTRIKE: // 猛虎硬派山
- damage = damage*(50+ 100*skill_lv)/100;
+ damage = damage*(200+ 100*skill_lv)/100;
break;
case LK_SPIRALPIERCE: /* スパイラルピアース */
damage = damage*(100+ 50*skill_lv)/100; //増加量が分からないので適当に
@@ -3254,6 +3256,7 @@ static struct Damage battle_calc_pc_weapon_attack(
case NPC_POISONATTACK:
case NPC_HOLYATTACK:
case NPC_DARKNESSATTACK:
+ case NPC_UNDEADATTACK:
case NPC_TELEKINESISATTACK:
damage = damage*(100+25*skill_lv)/100;
damage2 = damage2*(100+25*skill_lv)/100;
diff --git a/src/map/chrif.c b/src/map/chrif.c
index 59e8adb48..3d3f7d233 100644
--- a/src/map/chrif.c
+++ b/src/map/chrif.c
@@ -612,7 +612,7 @@ int chrif_changedsex(int fd)
// to avoid any problem with equipment and invalid sex, equipment is unequiped.
for (i = 0; i < MAX_INVENTORY; i++) {
if (sd->status.inventory[i].nameid && sd->status.inventory[i].equip)
- pc_unequipitem((struct map_session_data*)sd, i, 0, BF_NORMAL);
+ pc_unequipitem((struct map_session_data*)sd, i, 2);
}
// reset skill of some job
if (s_class.job == 19 || s_class.job == 4020 || s_class.job == 4042 ||
@@ -644,7 +644,7 @@ int chrif_changedsex(int fd)
chrif_save(sd);
sd->login_id1++; // change identify, because if player come back in char within the 5 seconds, he can change its characters
// do same modify in login-server for the account, but no in char-server (it ask again login_id1 to login, and don't remember it)
- clif_displaymessage(sd->fd, "Your sex has been changed (need disconexion by the server)...");
+ clif_displaymessage(sd->fd, "Your sex has been changed (need disconnection by the server)...");
clif_setwaitclose(sd->fd); // forced to disconnect for the change
}
} else {
@@ -749,7 +749,7 @@ int chrif_accountdeletion(int fd)
if (acc > 0) {
if (sd != NULL) {
sd->login_id1++; // change identify, because if player come back in char within the 5 seconds, he can change its characters
- clif_displaymessage(sd->fd, "Your account has been deleted (disconnexion)...");
+ clif_displaymessage(sd->fd, "Your account has been deleted (disconnection)...");
clif_setwaitclose(sd->fd); // forced to disconnect for the change
}
} else {
diff --git a/src/map/clif.c b/src/map/clif.c
index 0d2370890..7e4605807 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -8306,17 +8306,18 @@ void clif_parse_UnequipItem(int fd,struct map_session_data *sd)
clif_clearchar_area(&sd->bl,1);
return;
}
+ if(sd->npc_id!=0 || sd->vender_id != 0 || sd->opt1 > 0)
+ return;
index = RFIFOW(fd,2)-2;
- if(sd->status.inventory[index].attribute == 1 && sd->sc_data && sd->sc_data[SC_BROKNWEAPON].timer!=-1)
+
+ /*if(sd->status.inventory[index].attribute == 1 && sd->sc_data && sd->sc_data[SC_BROKNWEAPON].timer!=-1)
skill_status_change_end(&sd->bl,SC_BROKNWEAPON,-1);
if(sd->status.inventory[index].attribute == 1 && sd->sc_data && sd->sc_data[SC_BROKNARMOR].timer!=-1)
skill_status_change_end(&sd->bl,SC_BROKNARMOR,-1);
- if(sd->sc_data && ( sd->sc_data[SC_BLADESTOP].timer!=-1 || sd->sc_data[SC_BERSERK].timer!=-1 ))
- return;
+ if(sd->sc_count && ( sd->sc_data[SC_BLADESTOP].timer!=-1 || sd->sc_data[SC_BERSERK].timer!=-1 ))
+ return;*/
- if(sd->npc_id!=0 || sd->vender_id != 0 || sd->opt1 > 0)
- return;
- pc_unequipitem(sd,index,0,BF_NORMAL);
+ pc_unequipitem(sd,index,1);
}
/*==========================================
diff --git a/src/map/map.h b/src/map/map.h
index e05b6d125..3ad6105ad 100644
--- a/src/map/map.h
+++ b/src/map/map.h
@@ -271,7 +271,6 @@ struct map_session_data {
int unbreakable;
int classchange; // [Valaris]
-
int die_counter;
short doridori_counter;
@@ -315,8 +314,7 @@ struct map_session_data {
int eventtimer[MAX_EVENTTIMER];
int last_skillid,last_skilllv; // Added by RoVeRT
- short sg_count;
-
+
unsigned char change_level; // [celest]
#ifndef TXT_ONLY
@@ -425,7 +423,6 @@ struct mob_data {
short sc_count;
short opt1,opt2,opt3,option;
short min_chase;
- short sg_count;
int guild_id;
int deletetimer;
diff --git a/src/map/mob.c b/src/map/mob.c
index 0c9bbc734..d773de1ec 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -961,7 +961,6 @@ int mob_spawn(int id)
md->guild_id = gc->guild_id;
}
- md->sg_count=0;
md->deletetimer=-1;
md->skilltimer=-1;
@@ -2672,8 +2671,7 @@ int mob_class_change(struct mob_data *md,int *value)
md->next_walktime = tick+rand()%50+5000;
md->attackabletime = tick;
md->canmove_tick = tick;
- md->sg_count=0;
-
+
for(i=0,c=tick-1000*3600*10;i<MAX_MOBSKILL;i++)
md->skilldelay[i] = c;
md->skillid=0;
@@ -3281,6 +3279,11 @@ int mobskill_use_id(struct mob_data *md,struct block_list *target,int skill_idx)
case SA_SPELLBREAKER:
forcecast=1;
break;
+ case NPC_SUMMONSLAVE:
+ case NPC_SUMMONMONSTER:
+ if(md->master_id!=0)
+ return 0;
+ break;
}
if(battle_config.mob_skill_log)
diff --git a/src/map/pc.c b/src/map/pc.c
index 7f6b2cb1f..b7c540e1d 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -1,4 +1,4 @@
-// $Id: pc.c 101 2004-12-2 12:58:29 AM Celestia $
+// $Id: pc.c 101 2004-12-13 7:23:07 PM Celestia $
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -609,7 +609,7 @@ int pc_breakweapon(struct map_session_data *sd)
if(sd->status.inventory[i].equip && sd->status.inventory[i].equip & 0x0002 && !sd->status.inventory[i].attribute==1){
item=sd->inventory_data[i];
sd->status.inventory[i].attribute=1;
- pc_unequipitem(sd,i,0,BF_NORMAL);
+ pc_unequipitem(sd,i,3);
sprintf(output, "%s has broken.",item->jname);
clif_emotion(&sd->bl,23);
clif_displaymessage(sd->fd, output);
@@ -641,7 +641,7 @@ int pc_breakarmor(struct map_session_data *sd)
if(sd->status.inventory[i].equip && sd->status.inventory[i].equip & 0x0010 && !sd->status.inventory[i].attribute==1){
item=sd->inventory_data[i];
sd->status.inventory[i].attribute=1;
- pc_unequipitem(sd,i,0,BF_NORMAL);
+ pc_unequipitem(sd,i,3);
sprintf(output, "%s has broken.",item->jname);
clif_emotion(&sd->bl,23);
clif_displaymessage(sd->fd, output);
@@ -697,8 +697,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->sg_count = 0;
-
+
sd->deal_locked = 0;
sd->trade_partner = 0;
@@ -3146,7 +3145,7 @@ int pc_delitem(struct map_session_data *sd,int n,int amount,int type)
sd->weight -= sd->inventory_data[n]->weight*amount ;
if(sd->status.inventory[n].amount<=0){
if(sd->status.inventory[n].equip)
- pc_unequipitem(sd,n,0,BF_NORMAL);
+ pc_unequipitem(sd,n,3);
memset(&sd->status.inventory[n],0,sizeof(sd->status.inventory[0]));
sd->inventory_data[n] = NULL;
}
@@ -3556,7 +3555,7 @@ int pc_item_refine(struct map_session_data *sd,int idx)
pc_delitem(sd, i, 1, 0);
if(item->equip) {
ep = item->equip;
- pc_unequipitem(sd,idx,0, BF_NORMAL);
+ pc_unequipitem(sd,idx,3);
}
clif_refine(sd->fd,sd,0,idx,item->refine);
clif_delitem(sd,idx,1);
@@ -3569,7 +3568,7 @@ int pc_item_refine(struct map_session_data *sd,int idx)
pc_delitem(sd, i, 1, 0);
item->refine = 0;
if(item->equip)
- pc_unequipitem(sd,idx,0, BF_NORMAL);
+ pc_unequipitem(sd,idx,3);
clif_refine(sd->fd,sd,1,idx,item->refine);
pc_delitem(sd,idx,1,0);
clif_misceffect(&sd->bl,2);
@@ -5253,7 +5252,7 @@ int pc_resetlvl(struct map_session_data* sd,int type)
for(i=0;i<11;i++) { // unequip items that can't be equipped by base 1 [Valaris]
if(sd->equip_index[i] >= 0)
if(!pc_isequip(sd,sd->equip_index[i]))
- pc_unequipitem(sd,sd->equip_index[i],1,BF_NORMAL);
+ pc_unequipitem(sd,sd->equip_index[i],2);
}
clif_skillinfoblock(sd);
@@ -5532,7 +5531,7 @@ int pc_damage(struct block_list *src,struct map_session_data *sd,int damage)
int n = eq_n[rand()%eq_num];//該?アイテムの中からランダム
if(rand()%10000 < per){
if(sd->status.inventory[n].equip)
- pc_unequipitem(sd,n,0,BF_NORMAL);
+ pc_unequipitem(sd,n,3);
pc_dropitem(sd,n,1);
}
}
@@ -5545,7 +5544,7 @@ int pc_damage(struct block_list *src,struct map_session_data *sd,int damage)
|| (type == 2 && sd->status.inventory[i].equip)
|| type == 3) ){
if(sd->status.inventory[i].equip)
- pc_unequipitem(sd,i,0,BF_NORMAL);
+ pc_unequipitem(sd,i,3);
pc_dropitem(sd,i,1);
break;
}
@@ -6056,7 +6055,7 @@ int pc_jobchange(struct map_session_data *sd,int job, int upper)
for(i=0;i<11;i++) {
if(sd->equip_index[i] >= 0)
if(!pc_isequip(sd,sd->equip_index[i]))
- pc_unequipitem(sd,sd->equip_index[i],1,BF_NORMAL); // ?備外し
+ pc_unequipitem(sd,sd->equip_index[i],2); // ?備外し
}
clif_changelook(&sd->bl,LOOK_BASE,sd->view_class); // move sprite update to prevent client crashes with incompatible equipment [Valaris]
@@ -6693,7 +6692,7 @@ int pc_equipitem(struct map_session_data *sd,int n,int pos)
arrow=pc_search_inventory(sd,pc_checkequip(sd,9)); // Added by RoVeRT
for(i=0;i<11;i++) {
if(sd->equip_index[i] >= 0 && sd->status.inventory[sd->equip_index[i]].equip&pos) {
- pc_unequipitem(sd,sd->equip_index[i],1,BF_NORMAL);
+ pc_unequipitem(sd,sd->equip_index[i],2);
}
}
// 弓矢?備
@@ -6789,15 +6788,19 @@ int pc_equipitem(struct map_session_data *sd,int n,int pos)
/*==========================================
* ? 備した物を外す
+ * type:
+ * 0 - only unequip
+ * 1 - calculate status after unequipping
+ * 2 - force unequip
*------------------------------------------
*/
-int pc_unequipitem(struct map_session_data *sd,int n,int type, int flag)
+int pc_unequipitem(struct map_session_data *sd,int n,int flag)
{
nullpo_retr(0, sd);
// -- moonsoul (if player is berserk then cannot unequip)
//
- if(!flag && sd->sc_count && sd->sc_data[SC_BERSERK].timer!=-1){
+ if(flag<2 && sd->sc_count && (sd->sc_data[SC_BLADESTOP].timer!=-1 || sd->sc_data[SC_BERSERK].timer!=-1)){
clif_unequipitemack(sd,n,0,0);
return 0;
}
@@ -6836,20 +6839,25 @@ int pc_unequipitem(struct map_session_data *sd,int n,int type, int flag)
if(sd->status.inventory[n].equip & 0x0040)
clif_changelook(&sd->bl,LOOK_SHOES,0);
- if(sd->sc_count && sd->sc_data[SC_BROKNWEAPON].timer != -1 && sd->status.inventory[n].equip & 0x0002 &&
- sd->status.inventory[i].attribute==1)
- skill_status_change_end(&sd->bl,SC_BROKNWEAPON,-1);
+ if(sd->sc_count) {
+ if (sd->sc_data[SC_BROKNWEAPON].timer != -1 && sd->status.inventory[n].equip & 0x0002 &&
+ sd->status.inventory[n].attribute == 1)
+ skill_status_change_end(&sd->bl,SC_BROKNWEAPON,-1);
+ if(sd->sc_data[SC_BROKNARMOR].timer != -1 && sd->status.inventory[n].equip & 0x0010 &&
+ sd->status.inventory[n].attribute == 1)
+ skill_status_change_end(&sd->bl,SC_BROKNARMOR,-1);
+ }
clif_unequipitemack(sd,n,sd->status.inventory[n].equip,1);
sd->status.inventory[n].equip=0;
- if(!type)
+ if(flag&1)
pc_checkallowskill(sd);
if(sd->weapontype1 == 0 && sd->weapontype2 == 0)
skill_encchant_eremental_end(&sd->bl,-1); //武器持ち誓えは無?件で?性付?解除
} else {
clif_unequipitemack(sd,n,0,0);
}
- if(!type) {
+ if(flag&1) {
pc_calcstatus(sd,0);
if(sd->sc_count && sd->sc_data[SC_SIGNUMCRUCIS].timer != -1 && !battle_check_undead(7,sd->def_ele))
skill_status_change_end(&sd->bl,SC_SIGNUMCRUCIS,-1);
diff --git a/src/map/pc.h b/src/map/pc.h
index 3a4352aa6..5e6ff280d 100644
--- a/src/map/pc.h
+++ b/src/map/pc.h
@@ -118,7 +118,7 @@ int pc_resetlvl(struct map_session_data*,int type);
int pc_resetstate(struct map_session_data*);
int pc_resetskill(struct map_session_data*);
int pc_equipitem(struct map_session_data*,int,int);
-int pc_unequipitem(struct map_session_data*,int,int,int);
+int pc_unequipitem(struct map_session_data*,int,int);
int pc_checkitem(struct map_session_data*);
int pc_useitem(struct map_session_data*,int);
diff --git a/src/map/script.c b/src/map/script.c
index 750ef4d0c..bf6c577cb 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -3035,7 +3035,7 @@ int buildin_successrefitem(struct script_state *st)
#endif //USE_SQL
sd->status.inventory[i].refine++;
- pc_unequipitem(sd,i,0, BF_NORMAL);
+ pc_unequipitem(sd,i,2);
clif_refine(sd->fd,sd,0,i,sd->status.inventory[i].refine);
clif_delitem(sd,i,1);
clif_additem(sd,i,1,0);
@@ -3065,7 +3065,7 @@ int buildin_failedrefitem(struct script_state *st)
#endif //USE_SQL
sd->status.inventory[i].refine = 0;
- pc_unequipitem(sd,i,0, BF_NORMAL);
+ pc_unequipitem(sd,i,3);
// 精錬失敗エフェクトのパケット
clif_refine(sd->fd,sd,1,i,sd->status.inventory[i].refine);
pc_delitem(sd,i,1,0);
@@ -5885,7 +5885,7 @@ int buildin_nude(struct script_state *st)
for(i=0;i<11;i++)
if(sd->equip_index[i] >= 0)
- pc_unequipitem(sd,sd->equip_index[i],1, BF_NORMAL);
+ pc_unequipitem(sd,sd->equip_index[i],2);
return 0;
}
diff --git a/src/map/skill.c b/src/map/skill.c
index 83382ef70..be23b2234 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -1,4 +1,4 @@
-// $Id: skill.c,v 1.8 2004/12/9 8:14:18 PM Celestia Exp $
+// $Id: skill.c,v 1.8 2004/12/13 7:22:51 PM Celestia $
/* スキル?係 */
#include <stdio.h>
@@ -2323,6 +2323,7 @@ int skill_castend_damage_id( struct block_list* src, struct block_list *bl,int s
case NPC_HOLYATTACK:
case NPC_DARKNESSATTACK:
case NPC_TELEKINESISATTACK:
+ case NPC_UNDEADATTACK:
case LK_AURABLADE: /* オ?ラブレ?ド */
case LK_SPIRALPIERCE: /* スパイラルピア?ス */
case LK_HEADCRUSH: /* ヘッドクラッシュ */
@@ -2333,6 +2334,7 @@ int skill_castend_damage_id( struct block_list* src, struct block_list *bl,int s
case CG_ARROWVULCAN: /* アロ?バルカン */
case ASC_BREAKER: /* ソウルブレ?カ? */
case HW_MAGICCRASHER: /* マジッククラッシャ? */
+ case ITM_TOMAHAWK:
skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag);
break;
case NPC_DARKBREATH:
@@ -2789,6 +2791,14 @@ int skill_castend_damage_id( struct block_list* src, struct block_list *bl,int s
}
}
break;
+
+ // unknown skills [Celest]
+ case NPC_BIND:
+ case NPC_EXPLOSIONSPIRITS:
+ case NPC_INCAGI:
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ break;
+
case 0:
if(sd) {
if(flag&3){
@@ -3877,7 +3887,7 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
if(dstsd){
for(i=0;i<MAX_INVENTORY;i++){
if(dstsd->status.inventory[i].equip && dstsd->status.inventory[i].equip & 0x0002){
- pc_unequipitem(dstsd,i,0,BF_SKILL);
+ pc_unequipitem(dstsd,i,3);
break;
}
}
@@ -3900,7 +3910,7 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
if(dstsd){
for(i=0;i<MAX_INVENTORY;i++){
if(dstsd->status.inventory[i].equip && dstsd->status.inventory[i].equip & 0x0020){
- pc_unequipitem(dstsd,i,0,BF_SKILL);
+ pc_unequipitem(dstsd,i,3);
break;
}
}
@@ -3923,7 +3933,7 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
if(dstsd){
for(i=0;i<MAX_INVENTORY;i++){
if(dstsd->status.inventory[i].equip && dstsd->status.inventory[i].equip & 0x0010){
- pc_unequipitem(dstsd,i,0,BF_SKILL);
+ pc_unequipitem(dstsd,i,3);
break;
}
}
@@ -3946,7 +3956,7 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
if(dstsd){
for(i=0;i<MAX_INVENTORY;i++){
if(dstsd->status.inventory[i].equip && dstsd->status.inventory[i].equip & 0x0100){
- pc_unequipitem(dstsd,i,0,BF_SKILL);
+ pc_unequipitem(dstsd,i,3);
break;
}
}
@@ -3982,7 +3992,7 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
if(dstsd){
for(i=0;i<MAX_INVENTORY;i++){
if(dstsd->status.inventory[i].equip && dstsd->status.inventory[i].equip & striplist[1][j]){
- pc_unequipitem(dstsd,i,0,BF_SKILL);
+ pc_unequipitem(dstsd,i,3);
--c;
break;
}
@@ -4353,6 +4363,33 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
clif_skill_nodamage(src,bl,skillid,skilllv,1);
break;
+ // Equipment breaking monster skills [Celest]
+ case NPC_BREAKWEAPON:
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ if(bl->type == BL_PC && rand()%100 < skilllv && battle_config.equipment_breaking)
+ pc_breakweapon((struct map_session_data *)bl);
+ break;
+
+ case NPC_BREAKARMOR:
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ if(bl->type == BL_PC && rand()%100 < skilllv && battle_config.equipment_breaking)
+ pc_breakarmor((struct map_session_data *)bl);
+ break;
+
+ case NPC_BREAKHELM:
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ if(bl->type == BL_PC && rand()%100 < skilllv && battle_config.equipment_breaking)
+ // since we don't have any code for helm breaking yet...
+ pc_breakweapon((struct map_session_data *)bl);
+ break;
+
+ case NPC_BREAKSHIELD:
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ if(bl->type == BL_PC && rand()%100 < skilllv && battle_config.equipment_breaking)
+ // since we don't have any code for helm breaking yet...
+ pc_breakweapon((struct map_session_data *)bl);
+ break;
+
case WE_MALE: /* 君だけは護るよ */
if(sd && dstsd){
int hp_rate=(skilllv <= 0)? 0:skill_db[skillid].hp_rate[skilllv-1];
diff --git a/src/map/skill.h b/src/map/skill.h
index 57cc1f084..b5081de49 100644
--- a/src/map/skill.h
+++ b/src/map/skill.h
@@ -741,6 +741,15 @@ enum {
NPC_DARKGRANDCROSS,
NPC_DARKSOULSTRIKE,
NPC_DARKJUPITEL,
+ // temporary names for mob skills [Celest]
+ NPC_BIND,
+ NPC_BREAKWEAPON,
+ NPC_BREAKARMOR,
+ NPC_BREAKHELM,
+ NPC_BREAKSHIELD,
+ NPC_UNDEADATTACK,
+ NPC_EXPLOSIONSPIRITS = 349,
+ NPC_INCAGI,
LK_AURABLADE = 355,
LK_PARRYING,
diff --git a/src/map/trade.c b/src/map/trade.c
index ddb45a73b..33b061a46 100644
--- a/src/map/trade.c
+++ b/src/map/trade.c
@@ -10,6 +10,7 @@
#include "battle.h"
#include "nullpo.h"
#include "log.h"
+#include "chrif.h"
/*==========================================
* 取引要請を相手に送る
@@ -288,6 +289,9 @@ void trade_tradecommit(struct map_session_data *sd)
target_sd->trade_partner=0;
clif_tradecompleted(sd,0);
clif_tradecompleted(target_sd,0);
+ // save both player to avoid crash: they always have no advantage/disadvantage between the 2 players [Yor]
+ chrif_save(sd); // do pc_makesavestatus and save storage too
+ chrif_save(target_sd); // do pc_makesavestatus and save storage too
}
}
}