diff options
author | (no author) <(no author)@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2005-01-25 15:43:48 +0000 |
---|---|---|
committer | (no author) <(no author)@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2005-01-25 15:43:48 +0000 |
commit | 6bd2b81c4f1b71fcbc7d0a34d0c617b5251a4f04 (patch) | |
tree | 06deda066b55ec24e23ee5be03e8a7c2251ceb48 /src | |
parent | b2f9f553b6631d2efcad3acbc051ef88e1f3832a (diff) | |
download | hercules-6bd2b81c4f1b71fcbc7d0a34d0c617b5251a4f04.tar.gz hercules-6bd2b81c4f1b71fcbc7d0a34d0c617b5251a4f04.tar.bz2 hercules-6bd2b81c4f1b71fcbc7d0a34d0c617b5251a4f04.tar.xz hercules-6bd2b81c4f1b71fcbc7d0a34d0c617b5251a4f04.zip |
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@991 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r-- | src/char/Makefile | 2 | ||||
-rw-r--r-- | src/login/Makefile | 2 | ||||
-rw-r--r-- | src/map/Makefile | 2 | ||||
-rw-r--r-- | src/map/battle.c | 6 | ||||
-rw-r--r-- | src/map/clif.c | 17 | ||||
-rw-r--r-- | src/map/skill.c | 115 |
6 files changed, 46 insertions, 98 deletions
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]); |