diff options
author | Jesusaves <cpntb1@ymail.com> | 2019-10-07 11:05:23 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2019-10-07 11:05:23 -0300 |
commit | e24e5c9b3f954d8d7707c2c859a2de94ab412ded (patch) | |
tree | 192740d45aa9ef55b906a9363ab9f719d988102d /src | |
parent | c650eab56a6619700d1ac70a8d4adeeef57f003b (diff) | |
download | evol-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.c | 8 |
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(); } |