diff options
author | Haru <haru@dotalux.com> | 2020-04-05 23:48:00 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-05 23:48:00 +0200 |
commit | 63ae5dda74c1f79de8d00596b323b0f5ef7c9526 (patch) | |
tree | 651eff7c3826ee0067a12ebb69a3a9fa86d7c76b /src | |
parent | 737f8a4280256d36645b3ef3c2f5bbe6f65a757a (diff) | |
parent | acedc5713df59989b8624770a1fbd9a75d1a0c85 (diff) | |
download | hercules-63ae5dda74c1f79de8d00596b323b0f5ef7c9526.tar.gz hercules-63ae5dda74c1f79de8d00596b323b0f5ef7c9526.tar.bz2 hercules-63ae5dda74c1f79de8d00596b323b0f5ef7c9526.tar.xz hercules-63ae5dda74c1f79de8d00596b323b0f5ef7c9526.zip |
Merge pull request #2678 from Kenpachi2k13/unit_bl2ud_assert_fix
Add case for BL_SKILL to unit_bl2ud() to not trigger assert-returning
Diffstat (limited to 'src')
-rw-r--r-- | src/map/unit.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/map/unit.c b/src/map/unit.c index 3c0458cd1..d484056f9 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -96,6 +96,8 @@ static struct unit_data *unit_bl2ud(struct block_list *bl) return &BL_UCAST(BL_MER, bl)->ud; case BL_ELEM: return &BL_UCAST(BL_ELEM, bl)->ud; + case BL_SKILL: // No assertion to not spam the server console when attacking a skill type unit such as Ice Wall. + return NULL; default: Assert_retr(NULL, false); } @@ -128,6 +130,8 @@ static const struct unit_data *unit_cbl2ud(const struct block_list *bl) return &BL_UCCAST(BL_MER, bl)->ud; case BL_ELEM: return &BL_UCCAST(BL_ELEM, bl)->ud; + case BL_SKILL: // No assertion to not spam the server console when attacking a skill type unit such as Ice Wall. + return NULL; default: Assert_retr(NULL, false); } |