ronancpl/HeavenMS

Spawn monster leading to a crash

Closed this issue · 3 comments

With current wz.
In the balrog event, a monster (Jr. balrog) with id 6400005 will be summoned by a mobskill, which leading to client crash immediately. The monster's xml file seems to be incompleted.
Using spawn command to create such a monster in a normal map reproduces that, which affects to any player who goes into the map until the monster is removed.
It's easy to fix the balrog case by adding a skip/replacement trick to the summon part, though...

Your explanation over the subject has been very much appreciated.

After a bit of issue solving, figured out this pattern would get repeated on other linked bosses. By a mistake performed server-side, some linked bosses would be inheriting boss HPbar nodes from the base mobid, leading to a crash on the client when trying to render an HPbar for a boss that doesn't actually sport it.

Thanks for your feedback!

The patch: locate stats.setTagColor inside MapleLifeFactory.

boolean hpbarBoss = stats.isBoss() && hpbarBosses.contains(mid);
stats.setTagColor(hpbarBoss ? MapleDataTool.getIntConvert("hpTagColor", monsterInfoData, 0) : 0);
stats.setTagBgColor(hpbarBoss ? MapleDataTool.getIntConvert("hpTagBgcolor", monsterInfoData, 0) : 0);

Issue patched.