summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-03-14 14:23:59 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-03-14 14:23:59 +0000
commit3f8b52f6d673b3e5d259a9bb10004375d7647533 (patch)
treef0ba225918e30910109a972412ecdec99da20217
parenteadab5ba5011a8b999c9a5674081df81c2d0b5a2 (diff)
downloadhercules-3f8b52f6d673b3e5d259a9bb10004375d7647533.tar.gz
hercules-3f8b52f6d673b3e5d259a9bb10004375d7647533.tar.bz2
hercules-3f8b52f6d673b3e5d259a9bb10004375d7647533.tar.xz
hercules-3f8b52f6d673b3e5d259a9bb10004375d7647533.zip
- Status_check_skilluse again does the status_isdead check, but only on non-skills checks.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5597 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog-Trunk.txt2
-rw-r--r--src/map/battle.c2
-rw-r--r--src/map/status.c16
3 files changed, 15 insertions, 5 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index bed251192..a1f78e6dd 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -5,6 +5,8 @@ IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. EV
GOES INTO TRUNK AND WILL BE MERGED INTO STABLE BY VALARIS AND WIZPUTER. -- VALARIS
2006/03/14
+ * Changed a bit status_check_skilluse to check for dead characters, should
+ fix all the weird attack/attacked while dead bugs. [Skotlex]
* Fixed player auto-attack not cancelling when dead. [Skotlex]
2006/03/13
* Finished some checks to make sure Land Protector Only blocks BF_MAGIC
diff --git a/src/map/battle.c b/src/map/battle.c
index 7ef94a4ea..21aea2593 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -1605,7 +1605,7 @@ static struct Damage battle_calc_weapon_attack(
short index = sd->equip_index[8];
wd.damage = status_get_batk(src);
- if (flag.lh) wd.damage2 = status_get_batk(src);
+ if (flag.lh) wd.damage2 = wd.damage;
if (index >= 0 &&
sd->inventory_data[index] &&
diff --git a/src/map/status.c b/src/map/status.c
index 5b44f6ba4..548be4d1f 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -355,12 +355,20 @@ int status_check_skilluse(struct block_list *src, struct block_list *target, int
struct status_change *sc=NULL, *tsc;
mode = src?status_get_mode(src):MD_CANATTACK;
-
- if (!skill_num && !(mode&MD_CANATTACK))
- return 0; //This mode is only needed for melee attacking.
+
+ if (!skill_num) { //Normal attack checks.
+ if (!(mode&MD_CANATTACK))
+ return 0; //This mode is only needed for melee attacking.
+ //Dead state is not checked for skills as some skills can be used
+ //by/on dead characters, said checks are left to skill.c [Skotlex]
+ if (src && status_isdead(src))
+ return 0;
+ if (target && status_isdead(target))
+ return 0;
+ }
if (skill_num == PA_PRESSURE && flag) {
- //Gloria Avoids pretty much everythng....
+ //Gloria Avoids pretty much everything....
tsc = target?status_get_sc(target):NULL;
if(tsc) {
if (tsc->option&OPTION_HIDE)