ronancpl / HeavenMS

An improved server based on MapleSolaxia (v83 MapleStory private server)
GNU Affero General Public License v3.0
1.02k stars 718 forks source link

Spawn monster leading to a crash #530

Closed yuxaij closed 4 years ago

yuxaij commented 4 years ago

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...

ronancpl commented 4 years ago

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!

ronancpl commented 4 years ago

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);
ronancpl commented 4 years ago

Issue patched.