summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-12-13 13:54:56 +0000
committercelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-12-13 13:54:56 +0000
commit7fae29dea80ba1c6b005b195dc65e5e4df73ae21 (patch)
tree29e1165d361f4d5b85215c741e164cdd327bd369
parent469d68189f96c332eba0b90cd50f851ae751d75d (diff)
downloadhercules-7fae29dea80ba1c6b005b195dc65e5e4df73ae21.tar.gz
hercules-7fae29dea80ba1c6b005b195dc65e5e4df73ae21.tar.bz2
hercules-7fae29dea80ba1c6b005b195dc65e5e4df73ae21.tar.xz
hercules-7fae29dea80ba1c6b005b195dc65e5e4df73ae21.zip
* Added 'Throw Tomahawk'
* Added some new monster skills - still not complete. * Adjusted Palm Strike, Tiger Fist and Chain Crush * Removed redundant 'sg_count' * Save both persons' data after trading * Removed 'type' paramater from pc_unequipitem * Moved unequip checking code from clif.c to pc.c git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@554 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog.txt9
-rw-r--r--db/item_db.txt2
-rw-r--r--db/skill_db.txt15
-rw-r--r--db/skill_require_db.txt9
-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
16 files changed, 143 insertions, 68 deletions
diff --git a/Changelog.txt b/Changelog.txt
index a6810b769..414f3c095 100644
--- a/Changelog.txt
+++ b/Changelog.txt
@@ -1,5 +1,14 @@
Date Added
12/13
+ * Skill Updates [celest]
+ - Added the new 'Throw Tomahawk' skill (Requires Sakexe1129 or newer)
+ - Added some new monster skills - but still not complete.
+ - Adjusted Palm Strike, Tiger Fist and Chain Crush based on 11/14's patch
+ * Removed redundant 'sg_count' for map_session_data and mob_data [celest]
+ * Save both persons' data after trading in case a crash causes them to
+ rollback - fix by Freya [celest]
+ * Removed 'type' paramater from pc_unequipitem to use 'flag' instead[celest]
+ * Moved unequip checking code from clif.c to pc.c [celest]
* Replaced many printf's in map-server with _ShowMessage(). [MC Cameri]
* Skill timers for skills with id's higher then 450 were
corrupting memory [MouseJstr]
diff --git a/db/item_db.txt b/db/item_db.txt
index 96be1587c..f248cf7d9 100644
--- a/db/item_db.txt
+++ b/db/item_db.txt
@@ -558,7 +558,7 @@
1365,Sabbath,Sabbath,4,20,0,2300,120,,1,0,279714,2,34,4,44,7,{},{ bonus2 bWeaponComaRace,6,50; bonus bAtkEle,7; },
1366,Light_Epsilon,Light Epsilon,4,20,0,2300,180,,1,0,279714,2,34,4,44,7,{},{ bonus bAtkEle,6; skill 28,3; bonus2 bAddRace,6,3; }
1367,Slaughter,Slaughter,4,20,0,2500,120,,1,0,279714,2,34,4,44,7,{},{ bonus bIgnoreDefRace,2; bonus2 bWeaponComaRace,2,50; },
-1368,Tomahawk,Tomahawk,4,20,0,2500,165,,1,0,279714,2,34,4,44,7,{},{ bonus bAtkEle,4; },,,
+1368,Tomahawk,Tomahawk,4,20,0,2500,165,,1,0,279714,2,34,4,44,7,{},{ bonus bAtkEle,4; skill 337,1; },,,
1369,Guillotine,Guillotine,4,20,0,3000,215,,1,0,279714,2,34,4,44,7,{},{ bonus2 bWeaponComaRace,7,30; bonus2 bSPDrainRate,5,2; },,
// Spears
1401,Javelin,Javelin,4,150,0,700,28,,3,3,16514,2,2,1,4,4,{},{},,,
diff --git a/db/skill_db.txt b/db/skill_db.txt
index cfdc9ac1b..50623f3e3 100644
--- a/db/skill_db.txt
+++ b/db/skill_db.txt
@@ -386,11 +386,19 @@
334,8,6,4,0,1,1,1,yes,0,0,0,magic,0 //WE_MALE#君だけは護るよ#
335,8,6,4,0,1,1,1,yes,0,0,0,magic,0 //WE_FEMALE#あなたに尽くします#
336,8,6,4,0,1,1,1,yes,0,0,1,magic,0 //WE_CALLPARTNER#あなたに逢いたい#
+337,9,6,1,0,0,1,1,no,0,0,0,weapon,0 //ITM_TOMAHAWK#ォネォ゙ォロ?ォッ皙イ#
//338 //NPC_DARKCROSS#ダーククロス#
339,0,6,4,7,0,10,1,no,33,256,0,magic,0 //NPC_DARKGRANDCROSS#闇グランドクロス#
-340,8,8,1,7,0,10,1:1:2:2:3:3:4:4:5:5,yes,0,0,0,magic,0 //NPC_DARKSOULSTRIKE#闇ソウルストライク#
-341,8,8,1,7,0,10,3:4:5:6:7:8:9:10:11:12,yes,0,0,0,magic,2:3:3:4:4:5:5:6:6:7//NPC_DARKJUPITEL#闇ユピテル#
+340,8,8,1,7,0,10,1:1:2:2:3:3:4:4:5:5,yes,0,2,0,magic,0 //NPC_DARKSOULSTRIKE#闇ソウルストライク#
+341,8,8,1,7,0,10,3:4:5:6:7:8:9:10:11:12,yes,0,2,0,magic,2:3:3:4:4:5:5:6:6:7 //NPC_DARKJUPITEL#闇ユピテル#
+
+343,1,6,1,0,1,10,1,yes,0,2,0,weapon,0 //NPC_BREAKWEAPON
+344,1,6,1,0,1,10,1,yes,0,2,0,weapon,0 //NPC_BREAKARMOR
+345,1,6,1,0,1,10,1,yes,0,2,0,weapon,0 //NPC_BREAKHELM
+346,1,6,1,0,1,10,1,yes,0,2,0,weapon,0 //NPC_BREAKSHIELD
+347,-1,6,1,9,0,10,1,no,0,2,0,weapon,0 //NPC_UNDEADATTACK
+
//342束縛
//343武器壊し
//344鎧壊し
@@ -546,6 +554,3 @@
10012,0,0,4,0,1,1,0,no,0,0,0,none,0 //GD_RESTORE##
10013,0,0,4,0,1,1,0,no,0,0,0,none,0 //GD_EMERGENCYCALL##
10014,0,0,0,0,0,1,0,no,0,0,0,none,0 //GD_DEVELOPMENT##
-
-
-// ITM_TOMAHAWK#ナ荳カネ」ナゥ_エチア# 337 \ No newline at end of file
diff --git a/db/skill_require_db.txt b/db/skill_require_db.txt
index 014f24a68..18d7a63c2 100644
--- a/db/skill_require_db.txt
+++ b/db/skill_require_db.txt
@@ -220,7 +220,7 @@
312,0,0,10,0,0,0,13:14,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //BD_INTOABYSS#深淵の中に#
313,0,0,20,0,0,0,13:14,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //BD_SIEGFRIED#不死身のジ?クフリ?ド#
-316,0,0,8,0,0,0,13,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //BA_MUSICALSTRIKE#ミュ?ジカルストライク#
+316,0,0,1:3:5:7:9,0,0,0,13,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //BA_MUSICALSTRIKE#ミュ?ジカルストライク#
317,0,0,18:21:24:27:30,0,0,0,13,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //BA_DISSONANCE#不協和音#
318,0,0,12:14:16:18:20,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //BA_FROSTJOKE#寒いジョ?ク#
319,0,0,24:28:32:36:40:44:48:52:56:60,0,0,0,13,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //BA_WHISTLE#口笛#
@@ -228,7 +228,7 @@
321,0,0,40:45:50:55:60:65:70:75:80:85,0,0,0,13,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //BA_POEMBRAGI#ブラギの詩#
322,0,0,40:45:50:55:60:65:70:75:80:85,0,0,0,13,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //BA_APPLEIDUN#イドゥンの林檎#
-324,0,0,8,0,0,0,14,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //DC_THROWARROW#矢?ち#
+324,0,0,1:3:5:7:9,0,0,0,14,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //DC_THROWARROW#矢?ち#
325,0,0,23:26:29:32:35,0,0,0,14,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //DC_UGLYDANCE#自分勝手なダンス#
326,0,0,12:14:16:18:20,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //DC_SCREAM#スクリ?ム#
327,0,0,22:24:26:28:30:32:34:36:38:40,0,0,0,14,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //DC_HUMMING#ハミング#
@@ -239,8 +239,7 @@
334,0,0,1,15,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //WE_MALE#君だけは護るよ#
335,0,0,1,0,15,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //WE_FEMALE#あなたに?くします#
336,0,0,1,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //WE_CALLPARTNER#あなたに逢いたい#
-
-
+337,0,0,1,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //ITM_TOMAHAWK##
355,0,0,18:26:34:42:50,0,0,0,1:2:3:4:5:6:7:8:9:10:11:12:13:14:15:16:17:18:19:20:21:22,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //LK_AURABLADE#オ?ラブレ?ド#
356,0,0,50,0,0,0,3,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //LK_PARRYING#パリイング#
@@ -258,7 +257,7 @@
369,0,0,80:80:80:80:80:100:100:100:100:100,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //PA_GOSPEL#ゴスペル#
370,0,0,12:14:16:18:20,0,0,0,99,explosionspirits,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //CH_PALMSTRIKE#猛虎硬派山#
371,0,0,12:14:16:18:20,0,0,0,99,none,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //CH_TIGERFIST#伏虎拳#
-372,0,0,12:14:16:18:20:22:24:26:28:30,0,0,0,99,none,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //CH_CHAINCRUSH#連柱崩?#
+372,0,0,12:14:16:18:20:22:24:26:28:30,0,0,0,99,none,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //CH_CHAINCRUSH#連柱崩?#
373,0,0,1:2:3:4:5,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //PF_HPCONVERSION#???????#
374,0,0,5,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //PF_SOULCHANGE#ソウルチェンジ#
375,0,0,80:90:100:110:120,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //PF_SOULBURN#?ウルバ?ン#
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
}
}
}