diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-08-10 14:25:32 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-08-10 14:25:32 +0000 |
commit | 5ab87d86bb158110fc7b32d9e1cd9ff39ace37cf (patch) | |
tree | 17dffecbf004bda824dc805f29e0bc71a128c2dd /src/map/script.c | |
parent | 911c7aa759e427e78185e370512886c36dfab83f (diff) | |
download | hercules-5ab87d86bb158110fc7b32d9e1cd9ff39ace37cf.tar.gz hercules-5ab87d86bb158110fc7b32d9e1cd9ff39ace37cf.tar.bz2 hercules-5ab87d86bb158110fc7b32d9e1cd9ff39ace37cf.tar.xz hercules-5ab87d86bb158110fc7b32d9e1cd9ff39ace37cf.zip |
- Fixed two instances in the login-sql server where the ip in the log-login table was being stored backwards.
- Now when a skill's range is 0 and the skill is NOT casted on self, it will take the basic weapon's range (without Vulture/Snake Eye bonus).
- Now when a duration is not specified, sc_start/sc_start2/sc_start4 will try to guess the duration by extracting it from the skill_db (it uses skill_get_time on whatever skill is associated to the status-change using val1 as skill-level)
- Corrected that extra comma at the end of the Kaensin layout setup.
- Some cleanups on trade_tradeaccept to prevent packets being resent when they shouldn't.
- Corrected that ALLOW NULL thingie on main.sql
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8229 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/script.c')
-rw-r--r-- | src/map/script.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/map/script.c b/src/map/script.c index 73b3b6e89..377785fe4 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -7571,6 +7571,14 @@ int buildin_sc_start(struct script_state *st) tick/=2; //Thrown potions only last half. val4 = 1; //Mark that this was a thrown sc_effect } + if (type >= 0 && type < SC_MAX && val1 && !tick) + { //When there isn't a duration specified, try to get it from the skill_db + tick = StatusSkillChangeTable[type]; + if (tick) + tick = skill_get_time(tick,val1); + else //Failed to retrieve duration, reset to what it was. + tick = 0; + } if (bl) status_change_start(bl,type,10000,val1,0,0,val4,tick,11); return 0; @@ -7593,6 +7601,15 @@ int buildin_sc_start2(struct script_state *st) else bl = map_id2bl(st->rid); + if (type >= 0 && type < SC_MAX && val1 && !tick) + { //When there isn't a duration specified, try to get it from the skill_db + tick = StatusSkillChangeTable[type]; + if (tick) + tick = skill_get_time(tick,val1); + else //Failed to retrieve duration, reset to what it was. + tick = 0; + } + if (potion_flag==1 && potion_target) { bl = map_id2bl(potion_target); tick/=2; @@ -7625,6 +7642,15 @@ int buildin_sc_start4(struct script_state *st) else bl = map_id2bl(st->rid); + if (type >= 0 && type < SC_MAX && val1 && !tick) + { //When there isn't a duration specified, try to get it from the skill_db + tick = StatusSkillChangeTable[type]; + if (tick) + tick = skill_get_time(tick,val1); + else //Failed to retrieve duration, reset to what it was. + tick = 0; + } + if (potion_flag==1 && potion_target) { bl = map_id2bl(potion_target); tick/=2; |