summaryrefslogtreecommitdiff
path: root/src/map/status.c
diff options
context:
space:
mode:
authorrud0lp20 <rud0lp20@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-07-01 17:27:37 +0000
committerrud0lp20 <rud0lp20@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-07-01 17:27:37 +0000
commit9755833db59badc0e1c890646db6dcc504a654a4 (patch)
tree109f0d1580fd8cbf6e2afb3ff1336de09aea0e25 /src/map/status.c
parentbff5eb4080d3f376c13956ccfc9fe77a268656b9 (diff)
downloadhercules-9755833db59badc0e1c890646db6dcc504a654a4.tar.gz
hercules-9755833db59badc0e1c890646db6dcc504a654a4.tar.bz2
hercules-9755833db59badc0e1c890646db6dcc504a654a4.tar.xz
hercules-9755833db59badc0e1c890646db6dcc504a654a4.zip
Fixed bugreport:5788 WL_READING_SB should now work like official behavior(save preserved spell on relog, proper skill fail message, maximum number of spell that a char can hold)
Fixed bugreport:5657 WL_EARTHSTRAIN should now work like official behavior(total number of range [15x4+lv], layout when casted, interval) Updated WL_IMPRISON duration, rate and proper skill fail message. Special thanks to Yommy and his amazing tool... git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16365 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/status.c')
-rw-r--r--src/map/status.c25
1 files changed, 20 insertions, 5 deletions
diff --git a/src/map/status.c b/src/map/status.c
index 701d2db9b..b2a233f07 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -785,6 +785,14 @@ void initChangeTables(void) {
StatusIconChangeTable[SC_SPHERE_3] = SI_SPHERE_3;
StatusIconChangeTable[SC_SPHERE_4] = SI_SPHERE_4;
StatusIconChangeTable[SC_SPHERE_5] = SI_SPHERE_5;
+ // Warlock Preserved spells
+ StatusIconChangeTable[SC_SPELLBOOK1] = SI_SPELLBOOK1;
+ StatusIconChangeTable[SC_SPELLBOOK2] = SI_SPELLBOOK2;
+ StatusIconChangeTable[SC_SPELLBOOK3] = SI_SPELLBOOK3;
+ StatusIconChangeTable[SC_SPELLBOOK4] = SI_SPELLBOOK4;
+ StatusIconChangeTable[SC_SPELLBOOK5] = SI_SPELLBOOK5;
+ StatusIconChangeTable[SC_SPELLBOOK6] = SI_SPELLBOOK6;
+ StatusIconChangeTable[SC_MAXSPELLBOOK] = SI_SPELLBOOK7;
StatusIconChangeTable[SC_NEUTRALBARRIER_MASTER] = SI_NEUTRALBARRIER_MASTER;
StatusIconChangeTable[SC_STEALTHFIELD_MASTER] = SI_STEALTHFIELD_MASTER;
@@ -5831,9 +5839,12 @@ int status_get_sc_def(struct block_list *bl, enum sc_type type, int rate, int ti
if (sd) //Duration greatly reduced for players.
tick /= 15;
//No defense against it (buff).
- case SC_WHITEIMPRISON:
rate -= (status_get_lv(bl) / 5 + status->vit / 4 + status->agi / 10)*100; // Lineal Reduction of Rate
- //tick_def = (int)floor(log10(status_get_lv(bl)) * 10.);
+ break;
+ case SC_WHITEIMPRISON:
+ rate -= (status_get_lv(bl) / 5 + status->vit / 4 + status->agi / 10)*100;
+ if( tick != 5000) // not applied on caster
+ tick -= (status->vit + status->luk) / 20 * 1000;
break;
case SC_BURNING:
// From iROwiki : http://forums.irowiki.org/showpost.php?p=577240&postcount=583
@@ -7600,7 +7611,7 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
break;
case SC_READING_SB:
// val2 = sp reduction per second
- tick_time = 1000; // [GodLesZ] tick time
+ tick_time = 5000; // [GodLesZ] tick time
break;
case SC_SPHERE_1:
case SC_SPHERE_2:
@@ -9644,9 +9655,13 @@ int status_change_timer(int tid, unsigned int tick, int id, intptr_t data)
break;
case SC_READING_SB:
- if( !status_charge(bl, 0, sce->val2) )
+ if( !status_charge(bl, 0, sce->val2) ){
+ int i;
+ for(i = SC_SPELLBOOK1; i <= SC_MAXSPELLBOOK; i++) // Also remove stored spell as well.
+ status_change_end(bl, (sc_type)i, INVALID_TIMER);
break;
- sc_timer_next(1000 + tick, status_change_timer, bl->id, data);
+ }
+ sc_timer_next(5000 + tick, status_change_timer, bl->id, data);
return 0;
case SC_ELECTRICSHOCKER: