summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-10 14:25:32 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-10 14:25:32 +0000
commit5ab87d86bb158110fc7b32d9e1cd9ff39ace37cf (patch)
tree17dffecbf004bda824dc805f29e0bc71a128c2dd /src/map/skill.c
parent911c7aa759e427e78185e370512886c36dfab83f (diff)
downloadhercules-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/skill.c')
-rw-r--r--src/map/skill.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index 3d7435dbe..8691aaff0 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -760,6 +760,20 @@ int skill_get_range2 (struct block_list *bl, int id, int lv)
return status_get_range(bl);
range *=-1;
}
+
+ if(!range && !(skill_get_inf(id)&INF_SELF_SKILL))
+ { //Use weapon's basic range.
+ if (bl->type==BL_PC) {
+ struct map_session_data *sd = (TBL_PC*)bl;
+ range = sd->equip_index[EQI_HAND_R];
+ if (range >= 0 && sd->inventory_data[range])
+ range = sd->inventory_data[range]->range;
+ else
+ range = 1; //Assume fist range.
+ } else
+ range = status_get_range(bl);
+ }
+
//TODO: Find a way better than hardcoding the list of skills affected by AC_VULTURE
switch (id) {
case AC_SHOWER:
@@ -10876,8 +10890,8 @@ void skill_init_unit_layout (void)
}
case NJ_KAENSIN:
{
- static const int dx[] = {-2,-1, 0, 1, 2,-2,-1, 0, 1, 2,-2,-1, 1, 2,-2,-1, 0, 1, 2,-2,-1, 0, 1, 2,};
- static const int dy[] = { 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 0, 0, 0, 0,-1,-1,-1,-1,-1,-2,-2,-2,-2,-2,};
+ static const int dx[] = {-2,-1, 0, 1, 2,-2,-1, 0, 1, 2,-2,-1, 1, 2,-2,-1, 0, 1, 2,-2,-1, 0, 1, 2};
+ static const int dy[] = { 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 0, 0, 0, 0,-1,-1,-1,-1,-1,-2,-2,-2,-2,-2};
skill_unit_layout[pos].count = 24;
memcpy(skill_unit_layout[pos].dx,dx,sizeof(dx));
memcpy(skill_unit_layout[pos].dy,dy,sizeof(dy));