summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorKenpachi Developer <Kenpachi.Developer@gmx.de>2020-02-14 23:40:40 +0100
committerHaru <haru@dotalux.com>2020-04-05 21:20:35 +0200
commit484405005eba7399f435802443487e2b6ae1e163 (patch)
treee7d06cd8d116b62da8610865b16f6427451ee7d3 /src/map
parent81e3e74facba25aa1ecd7bea54f5d898612efe39 (diff)
downloadhercules-484405005eba7399f435802443487e2b6ae1e163.tar.gz
hercules-484405005eba7399f435802443487e2b6ae1e163.tar.bz2
hercules-484405005eba7399f435802443487e2b6ae1e163.tar.xz
hercules-484405005eba7399f435802443487e2b6ae1e163.zip
Remove SpriteName field from pet DB
Since it was never used for anything, the SpriteName field is removed from the pet DB. Internally it's kept and set to the sprite name corresponding to the defined monster ID, to not break plug-ins which may use it.
Diffstat (limited to 'src/map')
-rw-r--r--src/map/pet.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/map/pet.c b/src/map/pet.c
index 196f1f5a6..dbbce7e04 100644
--- a/src/map/pet.c
+++ b/src/map/pet.c
@@ -1357,12 +1357,7 @@ static int pet_read_db_sub(struct config_setting_t *it, int n, const char *sourc
}
pet->db[n].class_ = i32;
-
- if (!libconfig->setting_lookup_string(it, "SpriteName", &str) || !*str ) {
- ShowWarning("pet_read_db_sub: Missing SpriteName in pet %d of \"%s\", skipping.\n", pet->db[n].class_, source);
- return 0;
- }
- safestrncpy(pet->db[n].name, str, sizeof(pet->db[n].name));
+ safestrncpy(pet->db[n].name, mob->db(i32)->sprite, sizeof(pet->db[n].name));
if (!libconfig->setting_lookup_string(it, "Name", &str) || !*str) {
ShowWarning("pet_read_db_sub: Missing Name in pet %d of \"%s\", skipping.\n", pet->db[n].class_, source);