Skip to content

Commit

Permalink
Update Entity.js
Browse files Browse the repository at this point in the history
Fixed #495
  • Loading branch information
MrAntares authored Dec 17, 2024
1 parent c94467f commit b0d706b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Engine/MapEngine/Entity.js
Original file line number Diff line number Diff line change
Expand Up @@ -1373,12 +1373,17 @@ define(function( require )
srcWeapon = srcEntity.weapon;
}

// Don't display skill names for mobs and hiding skills
// Don't display skill names for
// - hiding skills
// - mobs
// - skill level <= 0
if (!SkillNameDisplayExclude.includes(pkt.SKID)
&&
(srcEntity.objecttype === Entity.TYPE_PC || srcEntity.objecttype === Entity.TYPE_DISGUISED ||
srcEntity.objecttype === Entity.TYPE_PET || srcEntity.objecttype === Entity.TYPE_HOM ||
srcEntity.objecttype === Entity.TYPE_MERC || srcEntity.objecttype === Entity.TYPE_ELEM)
&&
pkt.level>0
){
srcEntity.dialog.set( ( (SkillInfo[pkt.SKID] && SkillInfo[pkt.SKID].SkillName ) || 'Unknown Skill' ) + ' !!' );
}
Expand Down

0 comments on commit b0d706b

Please sign in to comment.