summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-10-07 11:05:23 -0300
committerJesusaves <cpntb1@ymail.com>2019-10-07 11:05:23 -0300
commite24e5c9b3f954d8d7707c2c859a2de94ab412ded (patch)
tree192740d45aa9ef55b906a9363ab9f719d988102d /src
parentc650eab56a6619700d1ac70a8d4adeeef57f003b (diff)
downloadevol-hercules-e24e5c9b3f954d8d7707c2c859a2de94ab412ded.tar.gz
evol-hercules-e24e5c9b3f954d8d7707c2c859a2de94ab412ded.tar.bz2
evol-hercules-e24e5c9b3f954d8d7707c2c859a2de94ab412ded.tar.xz
evol-hercules-e24e5c9b3f954d8d7707c2c859a2de94ab412ded.zip
Autoset ViewSprite - Because ManaPlus is too dumb to interpret a ViewSprite of 0
Diffstat (limited to 'src')
-rw-r--r--src/emap/itemdb.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/emap/itemdb.c b/src/emap/itemdb.c
index d9ff7d8..e60783b 100644
--- a/src/emap/itemdb.c
+++ b/src/emap/itemdb.c
@@ -196,6 +196,14 @@ void eitemdb_readdb_additional_fields_pre(int *itemid,
if (itemdb->lookup_const(it, "MinRange", &i32))
data->minRange = i32;
+
+ // TMW2 fixes
+ if (item->type == IT_WEAPON || item->type == IT_ARMOR) {
+ if (item->view_sprite == 0) {
+ item->view_sprite=*itemid;
+ }
+ }
+
hookStop();
}