summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-11-27 14:58:50 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-11-27 14:58:50 +0000
commit32ebbcf88520ef77425c0b2408ba36c40c3c9aaa (patch)
tree57ed8c019a56b4ab7d2b531007856fe40e876267 /src/map
parente5516cf57ab6852557eac30f3c056b90dfe59b1d (diff)
downloadhercules-32ebbcf88520ef77425c0b2408ba36c40c3c9aaa.tar.gz
hercules-32ebbcf88520ef77425c0b2408ba36c40c3c9aaa.tar.bz2
hercules-32ebbcf88520ef77425c0b2408ba36c40c3c9aaa.tar.xz
hercules-32ebbcf88520ef77425c0b2408ba36c40c3c9aaa.zip
- Corrected KiriKage's range so it works correctly when used by non-players or when use weapon's range is used.
- Changed service for you's flags so it affects all players on range. - Corrected the skill animation for Absorb Spirits - Cleaned up a bit the implementation of how Gravity Field blocks the caster from moving. - Mob class-changing will fail if the new class is the same as the previous one. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9325 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r--src/map/clif.c2
-rw-r--r--src/map/mob.c3
-rw-r--r--src/map/skill.c9
-rw-r--r--src/map/status.c14
-rw-r--r--src/map/unit.c1
5 files changed, 9 insertions, 20 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 561c51912..5083e4a91 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -7107,7 +7107,7 @@ int clif_guild_skillinfo(struct map_session_data *sd)
WFIFOW(fd,c*37+12) = g->skill[i].lv;
WFIFOW(fd,c*37+14) = skill_get_sp(id,g->skill[i].lv);
WFIFOW(fd,c*37+16) = skill_get_range(id,g->skill[i].lv);
- malloc_tsetdword(WFIFOP(fd,c*37+18),0,24);
+ strncpy(WFIFOP(fd,c*37+18), skill_get_name(id), NAME_LENGTH);
if(g->skill[i].lv < guild_skill_get_max(id) && (sd == g->member[0].sd))
up = 1;
else
diff --git a/src/map/mob.c b/src/map/mob.c
index 97564cfd1..4772d5b60 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -2315,6 +2315,9 @@ int mob_class_change (struct mob_data *md, int class_)
if (mob_is_clone(md->class_))
return 0; //Clones
+ if (md->class_ == class_)
+ return 0; //Nothing to change.
+
hp_rate = md->status.hp*100/md->status.max_hp;
md->class_ = class_;
md->db = mob_db(class_);
diff --git a/src/map/skill.c b/src/map/skill.c
index 26f9a8f41..0f78fe32a 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -3174,7 +3174,8 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int
if (unit_movepos(src, x, y, 0, 0))
clif_slide(src,src->x,src->y);
}
- status_change_end(src, SC_HIDING, -1);
+ if (sc && sc->data[SC_HIDING].timer != -1)
+ status_change_end(src, SC_HIDING, -1);
skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag);
break;
case 0:
@@ -3945,10 +3946,8 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
i = 2 * dstmd->level;
mob_target(dstmd,src,0);
}
- if (i) {
- clif_skill_nodamage(src,bl,skillid,skilllv,0);
- status_heal(src, 0, i, 3);
- }
+ if (i) status_heal(src, 0, i, 3);
+ clif_skill_nodamage(src,bl,skillid,skilllv,i?1:0);
break;
case AC_MAKINGARROW:
diff --git a/src/map/status.c b/src/map/status.c
index 0228ec367..adb35c32d 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -5358,13 +5358,6 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val
case SC_GRAVITATION:
val2 = 50*val1; //aspd reduction
- if (val3 == BCT_SELF) {
- struct unit_data *ud = unit_bl2ud(bl);
- if (ud) {
- ud->canmove_tick += tick;
- ud->canact_tick += tick;
- }
- }
break;
case SC_HERMODE:
@@ -6171,13 +6164,6 @@ int status_change_end( struct block_list* bl , int type,int tid )
sc_start4(bl, SC_REGENERATION, 100, 10,0,0,(RGN_HP|RGN_SP),
skill_get_time(LK_BERSERK, sc->data[type].val1));
break;
- case SC_GRAVITATION:
- if (sc->data[type].val3 == BCT_SELF) {
- struct unit_data *ud = unit_bl2ud(bl);
- if (ud)
- ud->canmove_tick = ud->canact_tick = gettick();
- }
- break;
case SC_GOSPEL: //Clear the buffs from other chars.
if (sc->data[type].val3) { //Clear the group.
struct skill_unit_group *group = (struct skill_unit_group *)sc->data[type].val3;
diff --git a/src/map/unit.c b/src/map/unit.c
index 6e3c66288..0d5fb5b71 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -699,6 +699,7 @@ int unit_can_move(struct block_list *bl)
|| (sc->data[SC_CLOAKING].timer != -1 && //Need wall at level 1-2
sc->data[SC_CLOAKING].val1 < 3 && !(sc->data[SC_CLOAKING].val4&1))
|| sc->data[SC_MADNESSCANCEL].timer != -1
+ || (sc->data[SC_GRAVITATION].timer != -1 && sc->data[SC_GRAVITATION].val3 == BCT_SELF)
))
return 0;
}