Issue information

Issue ID
#3614
Status
Fixed
Severity
None
Started
Hercules Elf Bot
Sep 25, 2009 15:08
Last Post
Hercules Elf Bot
Apr 19, 2012 10:18
Confirmation
N/A

Hercules Elf Bot - Sep 25, 2009 15:08

Originally posted by [b]theultramage[/b]
http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=3614

The mob_avail system is used to fake the mob id / view id of custom mobs, without having to configure the client (copy sprites, add entires to view tables, etc). This works by parsing db/mob_avail.txt and patching the appropriate mobdb entries' view data (vd->class_).

Code that performs class change / metamorphosis, however, passes the raw mob id to the clif code. Whenever this happens, any client observing a class-changing mob will crash on the spot.

The root function is:
CODE
int clif_class_change(struct block_list *bl,int class_,int type);
#define clif_mob_class_change(md, class_) clif_class_change(&md->bl, class_, 1)


There are 2 options
- fix it on the topmost level, by finding all places that ultimately call the above function, and ensure that they pass in the right class id.
- fix it on the bottommost level, by always looking up the view data for the class, and if it exists, using that instead of the raw value.

Something like itemdb already uses...
CODE
viewid = ( mob_get_viewdata(class_) != NULL ) ? mob_get_viewdata(class_)->class_ : class_;


(this would probably work best on the bottommost level)

This post has been edited by theultramage: Sep 25 2009, 08:09 AM

Hercules Elf Bot - Jan 4, 2012 5:04

Originally posted by [b]Ind[/b]
was fixed in a previous eA revision