From e24e5c9b3f954d8d7707c2c859a2de94ab412ded Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Mon, 7 Oct 2019 11:05:23 -0300 Subject: Autoset ViewSprite - Because ManaPlus is too dumb to interpret a ViewSprite of 0 --- src/emap/itemdb.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src') 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(); } -- cgit v1.2.3-70-g09d2