From f9005c40ca41167aea6cdc6b7ed4a6f8ec543a00 Mon Sep 17 00:00:00 2001 From: malufett Date: Thu, 13 Jun 2013 20:22:53 -0700 Subject: Fixed Bug#7359 Map Crashed on battle_calc_return_damage. --- src/map/battle.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/map/battle.c b/src/map/battle.c index 9fa4224f5..91733c945 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -5134,10 +5134,10 @@ int battle_calc_return_damage(struct block_list* bl, struct block_list *src, int rdelay = clif->damage(src, src, iTimer->gettick(), status_get_amotion(src), status_get_dmotion(src), rdamage, 1, 4, 0); } } - } - if( sc->data[SC_SHIELDSPELL_DEF] && sc->data[SC_SHIELDSPELL_DEF]->val1 == 2 && !is_boss(src) ){ - NORMALIZE_RDAMAGE(damage * sc->data[SC_SHIELDSPELL_DEF]->val2 / 100); - rdelay = clif->damage(src, src, iTimer->gettick(), status_get_amotion(src), status_get_dmotion(src), rdamage, 1, 4, 0); + if( sc->data[SC_SHIELDSPELL_DEF] && sc->data[SC_SHIELDSPELL_DEF]->val1 == 2 && !is_boss(src) ){ + NORMALIZE_RDAMAGE(damage * sc->data[SC_SHIELDSPELL_DEF]->val2 / 100); + rdelay = clif->damage(src, src, iTimer->gettick(), status_get_amotion(src), status_get_dmotion(src), rdamage, 1, 4, 0); + } } } else { if (sd && sd->bonus.long_weapon_damage_return){ -- cgit v1.2.3-70-g09d2 From 1262d8f55993c57a12268cf05a9d2956602bd65f Mon Sep 17 00:00:00 2001 From: Matheus Macabu Date: Fri, 14 Jun 2013 00:47:28 -0300 Subject: Attempt to fix #7340. or —Oh the inconsistency between clients—. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If it doesn't help and you are having problems with party booking search, keep reporting and giving thorough information, so we can actually help. Signed-off-by: Matheus Macabu --- src/config/const.h | 2 ++ src/map/packets.h | 6 ++++++ 2 files changed, 8 insertions(+) (limited to 'src') diff --git a/src/config/const.h b/src/config/const.h index 7acdea688..06a54a76f 100644 --- a/src/config/const.h +++ b/src/config/const.h @@ -93,9 +93,11 @@ #define MAX_CARTS 5 #endif /* Client Supports Party Recruit or Party Booking? */ +#ifdef PACKETVER_RE #if (PACKETVER == 20120410) || (PACKETVER == 20120418) #define PARTY_RECRUIT #endif +#endif // Renewal variable cast time reduction #ifdef RENEWAL_CAST #define VARCAST_REDUCTION(val){ \ diff --git a/src/map/packets.h b/src/map/packets.h index bcce36040..aada5d53f 100644 --- a/src/map/packets.h +++ b/src/map/packets.h @@ -2019,6 +2019,12 @@ packet(0x020d,-1); packet(0x0916,26,clif->pGuildInvite2,2); #endif +#ifndef PACKETVER_RE +#if PACKETVER >= 20120604 + packet(0x0861,18,clif->pPartyBookingRegisterReq,2,4,6); +#endif +#endif + //2012-06-18aRagexeRE #if PACKETVER >= 20120618 packet(0x0983,29); -- cgit v1.2.3-70-g09d2 From 94bd7167765a0e66b74ab0484d4b202d22578438 Mon Sep 17 00:00:00 2001 From: Matheus Macabu Date: Fri, 14 Jun 2013 00:57:18 -0300 Subject: Partial fix for #7339. There is another topic on it that has to be discussed. Signed-off-by: Matheus Macabu --- src/map/unit.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/map/unit.c b/src/map/unit.c index 371a75ac7..7b270adc7 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -327,7 +327,8 @@ int unit_walktoxy( struct block_list *bl, short x, short y, int flag) path_search(&wpd, bl->m, bl->x, bl->y, x, y, flag&1, CELL_CHKNOPASS); // Count walk path cells #ifdef OFFICIAL_WALKPATH if( !path_search_long(NULL, bl->m, bl->x, bl->y, x, y, CELL_CHKNOPASS) // Check if there is an obstacle between - && wpd.path_len > 14 ) // Official number of walkable cells is 14 if and only if there is an obstacle between. [malufett] + && (wpd.path_len > 14) // Official number of walkable cells is 14 if and only if there is an obstacle between. [malufett] + && (bl->type != BL_NPC) ) // If type is a NPC, please disregard. return 0; #endif if( (battle_config.max_walk_path < wpd.path_len) && (bl->type != BL_NPC) ) -- cgit v1.2.3-70-g09d2 From af26debad8ef2d756e027fa9920ef0f68522d9c9 Mon Sep 17 00:00:00 2001 From: malufett Date: Fri, 14 Jun 2013 00:12:56 -0700 Subject: Fixed Bug#7361 Crash in 'status_get_matk'. Thanks to Axiom --- src/map/status.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/map/status.c b/src/map/status.c index 096e673c2..8363b8021 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -10916,7 +10916,7 @@ int status_get_matk(struct block_list *bl, int flag){ } if ((bl->type&BL_HOM && battle_config.hom_setting&0x20) //Hom Min Matk is always the same as Max Matk - || sc->data[SC_RECOGNIZEDSPELL]) + || (sc && sc->data[SC_RECOGNIZEDSPELL])) status->matk_min = status->matk_max; #ifdef RENEWAL -- cgit v1.2.3-70-g09d2 From d663d4d86a2a403764baa0de27af6f9950d9a09f Mon Sep 17 00:00:00 2001 From: malufett Date: Fri, 14 Jun 2013 01:59:38 -0700 Subject: Fixed Bug#7362, Bug#7363 & Bug#7355 Fixed compilation error and server console error. --- db/pre-re/skill_cast_db.txt | 4 ++-- src/map/battle.c | 13 ++++++++++--- src/map/npc.c | 4 ++-- src/map/script.c | 6 +++--- 4 files changed, 17 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/db/pre-re/skill_cast_db.txt b/db/pre-re/skill_cast_db.txt index 9a2c4bafb..abcda323b 100644 --- a/db/pre-re/skill_cast_db.txt +++ b/db/pre-re/skill_cast_db.txt @@ -1188,7 +1188,7 @@ //-- AB_SILENTIUM 2057,4000,0,0,20000:30000:40000:50000:60000,0,15000 //-- AB_OFFERTORIUM -5011,4000,0,0,90000,0,0,-1 +5011,4000,0,0,90000,0,0 //========================================== //===== Warlock ============================ @@ -1672,7 +1672,7 @@ //-- KO_MAKIBISHI 3010,0,0,0,12000:14000:16000:18000:20000,10000,10000 //-- KO_MEIKYOUSISUI -3011,3000,0,0,10000,0 +3011,3000,0,0,10000,0,10000 //-- KO_ZANZOU 3012,0,1000,0,30000:27000:24000:21000:18000,0,0 //-- KO_KYOUGAKU diff --git a/src/map/battle.c b/src/map/battle.c index 91733c945..f78e4f9a8 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -1185,9 +1185,13 @@ int battle_calc_defense(int attack_type, struct block_list *src, struct block_li **/ defType def1 = status_get_def(target); //Don't use tstatus->def1 due to skill timer reductions. short def2 = tstatus->def2, vit_def; - +#ifdef RENEWAL def1 = status_calc_def2(target, tsc, def1, false); // equip def(RE) def2 = status_calc_def(target, tsc, def2, false); // status def(RE) +#else + def1 = status_calc_def(target, tsc, def1, false); // equip def(RE) + def2 = status_calc_def2(target, tsc, def2, false); // status def(RE) +#endif if( sd ){ i = sd->ignore_def[is_boss(target)?RC_BOSS:RC_NONBOSS]; @@ -1291,10 +1295,13 @@ int battle_calc_defense(int attack_type, struct block_list *src, struct block_li { defType mdef = tstatus->mdef; short mdef2= tstatus->mdef2; - +#ifdef RENEWAL mdef2 = status_calc_mdef(target, tsc, mdef2, false); // status mdef(RE) mdef = status_calc_mdef2(target, tsc, mdef, false); // equip mde(RE) - +#else + mdef2 = status_calc_mdef2(target, tsc, mdef2, false); // status mdef(RE) + mdef = status_calc_mdef(target, tsc, mdef, false); // equip mde(RE) +#endif if( flag&1 ) mdef = 0; diff --git a/src/map/npc.c b/src/map/npc.c index 5e03191e7..f4027096c 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -276,7 +276,7 @@ int npc_rr_secure_timeout_timer(int tid, unsigned int tick, int id, intptr_t dat clif->scriptclear(sd,sd->npc_id); sd->npc_idle_timer = INVALID_TIMER; } else //Create a new instance of ourselves to continue - sd->npc_idle_timer = add_timer(gettick() + (SECURE_NPCTIMEOUT_INTERVAL*1000),npc_rr_secure_timeout_timer,sd->bl.id,0); + sd->npc_idle_timer = iTimer->add_timer(iTimer->gettick() + (SECURE_NPCTIMEOUT_INTERVAL*1000),npc_rr_secure_timeout_timer,sd->bl.id,0); return 0; } #endif @@ -1245,7 +1245,7 @@ int npc_scriptcont(struct map_session_data* sd, int id, bool closing) /** * Update the last NPC iteration **/ - sd->npc_idle_tick = gettick(); + sd->npc_idle_tick = iTimer->gettick(); #endif /** diff --git a/src/map/script.c b/src/map/script.c index b414247da..26d64726c 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -3351,7 +3351,7 @@ static void script_detach_state(struct script_state* st, bool dequeue_event) * We're done with this NPC session, so we cancel the timer (if existent) and move on **/ if( sd->npc_idle_timer != INVALID_TIMER ) { - delete_timer(sd->npc_idle_timer,npc_rr_secure_timeout_timer); + iTimer->delete_timer(sd->npc_idle_timer,npc_rr_secure_timeout_timer); sd->npc_idle_timer = INVALID_TIMER; } #endif @@ -3392,8 +3392,8 @@ static void script_attach_state(struct script_state* st) **/ #ifdef SECURE_NPCTIMEOUT if( sd->npc_idle_timer == INVALID_TIMER ) - sd->npc_idle_timer = add_timer(gettick() + (SECURE_NPCTIMEOUT_INTERVAL*1000),npc_rr_secure_timeout_timer,sd->bl.id,0); - sd->npc_idle_tick = gettick(); + sd->npc_idle_timer = iTimer->add_timer(iTimer->gettick() + (SECURE_NPCTIMEOUT_INTERVAL*1000),npc_rr_secure_timeout_timer,sd->bl.id,0); + sd->npc_idle_tick = iTimer->gettick(); #endif } } -- cgit v1.2.3-70-g09d2