summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--db/pre-re/skill_cast_db.txt4
-rw-r--r--src/map/battle.c13
-rw-r--r--src/map/npc.c4
-rw-r--r--src/map/script.c6
4 files changed, 17 insertions, 10 deletions
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
}
}