summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog.txt13
-rw-r--r--Makefile8
-rw-r--r--conf-tmpl/battle_athena.conf19
-rw-r--r--src/char/Makefile2
-rw-r--r--src/login/Makefile2
-rw-r--r--src/map/Makefile2
-rw-r--r--src/map/battle.c6
-rw-r--r--src/map/clif.c17
-rw-r--r--src/map/skill.c115
9 files changed, 73 insertions, 111 deletions
diff --git a/Changelog.txt b/Changelog.txt
index 81b9d5db2..9bff594ee 100644
--- a/Changelog.txt
+++ b/Changelog.txt
@@ -1,5 +1,18 @@
Date Added
+01/25
+ * Fixed TXT compile problems with libGC [celest]
+ * Added "Clients older than 2004-09-06aSakray" option to packet_ver_flag in
+ battle_athena, just in case server owners still prefer the older clients.
+ With so many changes to Sakray over the past months its much better upgrading
+ to the newer clients (November or higher recommended) available ;P [celest]
+ * Merged Full Strip into jA's tidier stripping skills code -- also fixes
+ a typo that was causing Full Strip to do the reverse effect instead,
+ and the skill not updating the target's status after successfully unequipping
+ items [celest]
+ * Tidy up the 4 chemical protection skills into one code block [celest]
+ * Corrected Slim Pitcher's code -- sorry, i missed a few things ^^; [celest]
+
01/24
* Fixed a typo in Provoke that was causing crashes [celest]
* Fixed another compile warning in src/char/char.c
diff --git a/Makefile b/Makefile
index fe096d619..292c3ff2c 100644
--- a/Makefile
+++ b/Makefile
@@ -1,12 +1,12 @@
-CC = gcc -pipe
+# CC = gcc -pipe
# CC = g++
-# CC = gcc -pipe -DGCOLLECT
+CC = gcc -pipe -DGCOLLECT
# CC = gcc -pipe -DDMALLOC -DDMALLOC_FUNC_CHECK
# CC = /usr/local/bin/gcc -fbounds-checking -pipe -DBCHECK
-# GCLIB = -lgc
-GCLIB =
+GCLIB = -L/usr/local/lib -lgc
+# GCLIB =
# GCLIB = -ldmalloc
PACKETDEF = -DPACKETVER=6 -DNEW_006b -DSO_REUSEPORT
diff --git a/conf-tmpl/battle_athena.conf b/conf-tmpl/battle_athena.conf
index 35b20f7d9..3b2b93c94 100644
--- a/conf-tmpl/battle_athena.conf
+++ b/conf-tmpl/battle_athena.conf
@@ -772,15 +772,16 @@ any_warp_GM_min_level: 20
// Set here which client version do you accept. Add all values of clients:
// Clients older than accepted versions, and versions not set to 'accepted'
// here will be rejected when logging in
-// 1: 2004-09-06aSakray client
-// 2: 2004-09-21aSakray Client
-// 4: 2004-10-18bSakexe Client
-// 8: 2004-10-25aSakexe Client
-// 16: 2004-11-01aSakexe Client
-// 32: 2004-12-06aSakexe Client
-// 64: 2005-01-10aSakexe Client
-// default value: 127 (all clients)
-packet_ver_flag: 127
+// 1: Clients older than 2004-09-06aSakray
+// 2: 2004-09-06aSakray client
+// 4: 2004-09-21aSakray Client
+// 8: 2004-10-18bSakexe Client
+// 16: 2004-10-25aSakexe Client
+// 32: 2004-11-01aSakexe Client
+// 64: 2004-12-06aSakexe Client
+// 128: 2005-01-10aSakexe Client
+// default value: 255 (all clients)
+packet_ver_flag: 255
// Allow GMs to mute players or not?
muting_players: no
diff --git a/src/char/Makefile b/src/char/Makefile
index 877f83c5a..3c09db92c 100644
--- a/src/char/Makefile
+++ b/src/char/Makefile
@@ -4,7 +4,7 @@ txt: char-server
COMMON_OBJ = ../common/core.o ../common/socket.o ../common/timer.o ../common/db.o ../common/lock.o ../common/malloc.o ../common/showmsg.o ../common/strlib.o
COMMON_H = ../common/core.h ../common/socket.h ../common/timer.h ../common/mmo.h ../common/db.h ../common/lock.h ../common/timer.h ../common/malloc.h ../common/showmsg.h ../common/strlib.h
char-server: char.o inter.o int_party.o int_guild.o int_storage.o int_pet.o $(COMMON_OBJ)
- $(CC) -o ../../$@ $>
+ $(CC) -o ../../$@ $> $(LIB_S)
char.o: char.c char.h inter.h int_pet.h $(COMMON_H) ../common/version.h
inter.o: inter.c inter.h int_party.h int_guild.h int_storage.h int_pet.h char.h $(COMMON_H)
diff --git a/src/login/Makefile b/src/login/Makefile
index 191a015cb..482503969 100644
--- a/src/login/Makefile
+++ b/src/login/Makefile
@@ -5,7 +5,7 @@ COMMON_OBJ = ../common/core.o ../common/socket.o ../common/timer.o ../common/db.
COMMON_H = ../common/core.h ../common/socket.h ../common/timer.h ../common/mmo.h ../common/version.h ../common/db.h ../common/lock.h ../common/malloc.h ../common/showmsg.h ../common/strlib.h
login-server: login.o md5calc.o $(COMMON_OBJ)
- $(CC) -o ../../$@ login.o md5calc.o $(COMMON_OBJ)
+ $(CC) -o ../../$@ login.o md5calc.o $(COMMON_OBJ) $(LIB_S)
login.o: login.c login.h md5calc.h $(COMMON_H)
md5calc.o: md5calc.c md5calc.h
diff --git a/src/map/Makefile b/src/map/Makefile
index 0dddf6132..ac9ba9bf7 100644
--- a/src/map/Makefile
+++ b/src/map/Makefile
@@ -14,7 +14,7 @@ COMMON_OBJ = ../common/core.o ../common/socket.o ../common/timer.o ../common/grf
LIBS = -lz -lm
map-server: txtobj/map.o txtobj/chrif.o txtobj/clif.o txtobj/pc.o txtobj/npc.o txtobj/chat.o txtobj/path.o txtobj/itemdb.o txtobj/mob.o txtobj/script.o txtobj/storage.o txtobj/skill.o txtobj/atcommand.o txtobj/charcommand.o txtobj/battle.o txtobj/intif.o txtobj/trade.o txtobj/party.o txtobj/vending.o txtobj/guild.o txtobj/pet.o txtobj/log.o $(COMMON_OBJ)
- $(CC) -o ../../$@ $> $(LIBS)
+ $(CC) -o ../../$@ $> $(LIBS) $(LIB_S)
map-server_sql: sqlobj/map.o sqlobj/chrif.o sqlobj/clif.o sqlobj/pc.o sqlobj/npc.o sqlobj/chat.o sqlobj/path.o sqlobj/itemdb.o sqlobj/mob.o sqlobj/script.o sqlobj/storage.o sqlobj/skill.o sqlobj/atcommand.o sqlobj/charcommand.o sqlobj/battle.o sqlobj/intif.o sqlobj/trade.o sqlobj/party.o sqlobj/vending.o sqlobj/guild.o sqlobj/pet.o sqlobj/mail.o sqlobj/log.o $(COMMON_OBJ)
$(CC) -o ../../$@ $> $(LIB_S)
diff --git a/src/map/battle.c b/src/map/battle.c
index ce691158c..a11facfc9 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -5622,7 +5622,7 @@ void battle_set_defaults() {
battle_config.ban_spoof_namer = 5; // added by [Yor] (default: 5 minutes)
battle_config.hack_info_GM_level = 60; // added by [Yor] (default: 60, GM level)
battle_config.any_warp_GM_min_level = 20; // added by [Yor]
- battle_config.packet_ver_flag = 127; // added by [Yor]
+ battle_config.packet_ver_flag = 255; // added by [Yor]
battle_config.min_hair_style = 0;
battle_config.max_hair_style = 20;
battle_config.min_hair_color = 0;
@@ -5760,8 +5760,8 @@ void battle_validate_conf() {
battle_config.any_warp_GM_min_level = 100;
// at least 1 client must be accepted
- if ((battle_config.packet_ver_flag & 127) == 0) // added by [Yor]
- battle_config.packet_ver_flag = 127; // accept all clients
+ if ((battle_config.packet_ver_flag & 255) == 0) // added by [Yor]
+ battle_config.packet_ver_flag = 255; // accept all clients
if (battle_config.night_darkness_level > 10) // Celest
battle_config.night_darkness_level = 10;
diff --git a/src/map/clif.c b/src/map/clif.c
index d15fdf3a1..eeae87439 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -10626,14 +10626,15 @@ static int clif_parse(int fd) {
}
// check if version is accepted
- if (packet_ver <= 9 || // reject any client versions older than 6sept04
- (packet_ver == 10 && (battle_config.packet_ver_flag & 1) == 0) ||
- (packet_ver == 11 && (battle_config.packet_ver_flag & 2) == 0) ||
- (packet_ver == 12 && (battle_config.packet_ver_flag & 4) == 0) ||
- (packet_ver == 13 && (battle_config.packet_ver_flag & 8) == 0) ||
- (packet_ver == 14 && (battle_config.packet_ver_flag & 16) == 0) ||
- (packet_ver == 15 && (battle_config.packet_ver_flag & 32) == 0) ||
- (packet_ver == 16 && (battle_config.packet_ver_flag & 64) == 0) ||
+ if (packet_ver <= 5 || // reject really old client versions
+ (packet_ver <= 9 && (battle_config.packet_ver_flag & 1) == 0) || // older than 6sept04
+ (packet_ver == 10 && (battle_config.packet_ver_flag & 2) == 0) ||
+ (packet_ver == 11 && (battle_config.packet_ver_flag & 4) == 0) ||
+ (packet_ver == 12 && (battle_config.packet_ver_flag & 8) == 0) ||
+ (packet_ver == 13 && (battle_config.packet_ver_flag & 16) == 0) ||
+ (packet_ver == 14 && (battle_config.packet_ver_flag & 32) == 0) ||
+ (packet_ver == 15 && (battle_config.packet_ver_flag & 64) == 0) ||
+ (packet_ver == 16 && (battle_config.packet_ver_flag & 128) == 0) ||
packet_ver > MAX_PACKET_VER || // no packet version support yet
// identified version, but unknown client?
(!sd && packet_db[packet_ver][cmd].func != clif_parse_WantToConnection)) {
diff --git a/src/map/skill.c b/src/map/skill.c
index 964354c53..55d3ce175 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -3975,9 +3975,10 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
case RG_STRIPSHIELD: /* ストリップシールド */
case RG_STRIPARMOR: /* ストリップアーマー */
case RG_STRIPHELM: /* ストリップヘルム */
+ case ST_FULLSTRIP: // Celest
{
struct status_change *tsc_data = battle_get_sc_data(bl);
- int scid, equip, strip_fix;
+ int scid, equip, strip_fix, strip_num = 0;
scid = SkillStatusChangeTable[skillid];
switch (skillid) {
case RG_STRIPWEAPON:
@@ -3992,6 +3993,10 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
case RG_STRIPHELM:
equip = EQP_HELM;
break;
+ case ST_FULLSTRIP:
+ equip = EQP_WEAPON | EQP_SHIELD | EQP_ARMOR | EQP_HELM;
+ strip_num = 3;
+ break;
default:
return 1;
}
@@ -4009,8 +4014,9 @@ 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 & equip){
- pc_unequipitem(dstsd,i,0);
- break;
+ pc_unequipitem(dstsd,i,3);
+ if ((--strip_num) <= 0)
+ break;
}
}
if (i == MAX_INVENTORY)
@@ -4022,49 +4028,6 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
break;
}
- // Full Strip [Celest]
- case ST_FULLSTRIP:
- {
- struct status_change *tsc_data = battle_get_sc_data(bl);
- int c=0, i, j, strip_fix;
- int striplist[2][4] = { { 0, 0, 0, 0 },
- { 0x0002, 0x0020, 0x0010, 0x0100 } };
-
- strip_fix = battle_get_dex(src) - battle_get_dex(bl);
- if(strip_fix < 0)
- strip_fix=0;
- strip_per = 5+2*skilllv+strip_fix/5;
- strip_time = skill_get_time(skillid,skilllv)+strip_fix/2;
- for (i=0; i<4; i++) {
- if(tsc_data && tsc_data[SC_CP_WEAPON + i].timer != -1)
- break;
- if(rand()%100 < strip_per) {
- striplist[0][i] = 1;
- c++;
- }
- }
-
- if (c > 0) {
- clif_skill_nodamage(src,bl,skillid,skilllv,1);
- for (j=0; j<4 && c > 0; j++) {
- if (striplist[0][j]) {
- skill_status_change_start(bl,SC_STRIPWEAPON + i,skilllv,0,0,0,strip_time,0 );
- 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,3);
- --c;
- break;
- }
- }
- }
- }
- }
- }
- }
- break;
-
-
/* PotionPitcher */
case AM_POTIONPITCHER: /* ポ?ションピッチャ? */
{
@@ -4135,38 +4098,15 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
}
break;
case AM_CP_WEAPON:
- {
- struct status_change *tsc_data = battle_get_sc_data(bl);
- clif_skill_nodamage(src,bl,skillid,skilllv,1);
- if(tsc_data && tsc_data[SC_STRIPWEAPON].timer != -1)
- skill_status_change_end(bl, SC_STRIPWEAPON, -1 );
- skill_status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
- }
- break;
case AM_CP_SHIELD:
- {
- struct status_change *tsc_data = battle_get_sc_data(bl);
- clif_skill_nodamage(src,bl,skillid,skilllv,1);
- if(tsc_data && tsc_data[SC_STRIPSHIELD].timer != -1)
- skill_status_change_end(bl, SC_STRIPSHIELD, -1 );
- skill_status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
- }
- break;
case AM_CP_ARMOR:
- {
- struct status_change *tsc_data = battle_get_sc_data(bl);
- clif_skill_nodamage(src,bl,skillid,skilllv,1);
- if(tsc_data && tsc_data[SC_STRIPARMOR].timer != -1)
- skill_status_change_end(bl, SC_STRIPARMOR, -1 );
- skill_status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
- }
- break;
case AM_CP_HELM:
{
+ int scid = SC_STRIPWEAPON + (skillid - AM_CP_WEAPON);
struct status_change *tsc_data = battle_get_sc_data(bl);
clif_skill_nodamage(src,bl,skillid,skilllv,1);
- if(tsc_data && tsc_data[SC_STRIPHELM].timer != -1)
- skill_status_change_end(bl, SC_STRIPHELM, -1 );
+ if(tsc_data && tsc_data[scid].timer != -1)
+ skill_status_change_end(bl, SC_STRIPWEAPON, -1 );
skill_status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
}
break;
@@ -4654,12 +4594,18 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
case CR_SLIMPITCHER:
{
if (sd && flag&1) {
+ struct block_list tbl;
int hp = sd->potion_hp * (100 + pc_checkskill(sd,CR_SLIMPITCHER)*10 + pc_checkskill(sd,AM_POTIONPITCHER)*10 + pc_checkskill(sd,AM_LEARNINGPOTION)*5)/100;
hp = hp * (100 + (battle_get_vit(bl)<<1))/100;
- if (dstsd)
+ if (dstsd) {
hp = hp * (100 + pc_checkskill(dstsd,SM_RECOVERY)*10)/100;
- clif_skill_nodamage(src,bl,skillid,skilllv,1);
- battle_heal(src,bl,hp,0,0);
+ }
+ tbl.id = 0;
+ tbl.m = src->m;
+ tbl.x = src->x;
+ tbl.y = src->y;
+ clif_skill_nodamage(&tbl,bl,AL_HEAL,hp,1);
+ battle_heal(NULL,bl,hp,0,0);
}
}
break;
@@ -5160,23 +5106,23 @@ int skill_castend_pos2( struct block_list *src, int x,int y,int skillid,int skil
case CR_SLIMPITCHER:
{
if (sd) {
- int x = skilllv%11 - 1;
- int i = pc_search_inventory(sd,skill_db[skillid].itemid[x]);
- if(i < 0 || skill_db[skillid].itemid[x] <= 0 || sd->inventory_data[i] == NULL ||
- sd->status.inventory[i].amount < skill_db[skillid].amount[x]) {
+ int i = skilllv%11 - 1;
+ int j = pc_search_inventory(sd,skill_db[skillid].itemid[i]);
+ if(j < 0 || skill_db[skillid].itemid[i] <= 0 || sd->inventory_data[j] == NULL ||
+ sd->status.inventory[j].amount < skill_db[skillid].amount[i]) {
clif_skill_fail(sd,skillid,0,0);
- map_freeblock_unlock();
return 1;
}
sd->state.potionpitcher_flag = 1;
sd->potion_hp = 0;
- run_script(sd->inventory_data[i]->use_script,0,sd->bl.id,0);
- pc_delitem(sd,i,skill_db[skillid].amount[x],0);
+ run_script(sd->inventory_data[j]->use_script,0,sd->bl.id,0);
+ pc_delitem(sd,j,skill_db[skillid].amount[i],0);
sd->state.potionpitcher_flag = 0;
+ clif_skill_poseffect(src,skillid,skilllv,x,y,tick);
if(sd->potion_hp > 0) {
map_foreachinarea(skill_area_sub,
src->m,x-3,y-3,x+3,y+3,0,
- src,skillid,skilllv,tick,flag|BCT_ALL|1,
+ src,skillid,skilllv,tick,flag|BCT_PARTY|1,
skill_castend_nodamage_id);
}
}
@@ -7380,7 +7326,8 @@ int skill_check_condition(struct map_session_data *sd,int type)
continue;
if(skill == WZ_FIREPILLAR && lv<=5)
continue; // no gemstones for 1-5 [Celest]
- if(skill == AM_POTIONPITCHER && i != x)
+ if((skill == AM_POTIONPITCHER ||
+ skill == CR_SLIMPITCHER) && i != x)
continue;
index[i] = pc_search_inventory(sd,itemid[i]);