summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2014-08-20 04:55:22 +0200
committerHaru <haru@dotalux.com>2014-08-20 04:58:02 +0200
commit769b1d05aa5cfa8cddfe7d21b35d5c5e4da3bbd6 (patch)
tree99907d827264e501774e58ab4630e41fa7103c02 /src/map/script.c
parentb294026e6614a652c23bb0cea8a0d4dc69d8b125 (diff)
downloadhercules-769b1d05aa5cfa8cddfe7d21b35d5c5e4da3bbd6.tar.gz
hercules-769b1d05aa5cfa8cddfe7d21b35d5c5e4da3bbd6.tar.bz2
hercules-769b1d05aa5cfa8cddfe7d21b35d5c5e4da3bbd6.tar.xz
hercules-769b1d05aa5cfa8cddfe7d21b35d5c5e4da3bbd6.zip
Follow-up to b294026e6614a652c23bb0cea8a0d4dc69d8b125
- Added documentation for the pc->search_item function and formalized its return values. If the searched item is not found, now it returns the newly introduced constant INDEX_NOT_FOUND. - Updated pc->search_item checks to make use of INDEX_NOT_FOUND. - Fixed an issue with anvils not detected by the weapon forginc code, if they were in the first position of the inventory. - Added ITEMID constants for the four anvil types. Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 53161be5b..ecd12a3c1 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -10343,7 +10343,7 @@ BUILDIN(homunculus_mutate) {
m_id = homun->class2type(homun_id);
if( m_class == HT_EVO && m_id == HT_S &&
- sd->hd->homunculus.level >= 99 && i >= 0 &&
+ sd->hd->homunculus.level >= 99 && i != INDEX_NOT_FOUND &&
!pc->delitem(sd, i, 1, 0, 0, LOG_TYPE_SCRIPT) ) {
sd->hd->homunculus.vaporize = HOM_ST_REST; // Remove morph state.
homun->call(sd); // Respawn homunculus.