Advertisement
Reynald0

Custom mob title aCis 340

Dec 17th, 2015
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 2.05 KB | None | 0 0
  1. ### Eclipse Workspace Patch 1.0
  2. #P aCis_gameserver
  3. Index: config/npcs.properties
  4. ===================================================================
  5. --- config/npcs.properties  (revision 3)
  6. +++ config/npcs.properties  (working copy)
  7. @@ -90,7 +90,7 @@
  8.  AltMobAgroInPeaceZone = True
  9.  
  10.  # Show L2Monster level and aggro
  11. -ShowNpcLevel = False
  12. +ShowNpcLevel = True
  13.  
  14.  # Show clan && alliance crests on NPCs, default: False
  15.  ShowNpcCrest = False
  16. Index: java/net/sf/l2j/gameserver/network/serverpackets/AbstractNpcInfo.java
  17. ===================================================================
  18. --- java/net/sf/l2j/gameserver/network/serverpackets/AbstractNpcInfo.java   (revision 3)
  19. +++ java/net/sf/l2j/gameserver/network/serverpackets/AbstractNpcInfo.java   (working copy)
  20. @@ -14,6 +14,9 @@
  21.   */
  22.  package net.sf.l2j.gameserver.network.serverpackets;
  23.  
  24. +import java.util.ArrayList;
  25. +import java.util.List;
  26. +
  27.  import net.sf.l2j.Config;
  28.  import net.sf.l2j.gameserver.datatables.ClanTable;
  29.  import net.sf.l2j.gameserver.model.L2Clan;
  30. @@ -39,6 +42,7 @@
  31.     protected int _clanCrest, _allyCrest, _allyId, _clanId;
  32.    
  33.     protected String _name = "", _title = "";
  34. +   protected List<Integer> customTitleMob = new ArrayList<>();
  35.    
  36.     public AbstractNpcInfo(L2Character cha)
  37.     {
  38. @@ -51,6 +55,9 @@
  39.         _pAtkSpd = cha.getPAtkSpd();
  40.         _runSpd = cha.getTemplate().getBaseRunSpd();
  41.         _walkSpd = cha.getTemplate().getBaseWalkSpd();
  42. +      
  43. +       customTitleMob.add(18342);
  44. +       customTitleMob.add(21035);
  45.     }
  46.    
  47.     /**
  48. @@ -85,11 +92,16 @@
  49.            
  50.             if (Config.SHOW_NPC_LVL && _npc instanceof L2MonsterInstance)
  51.             {
  52. -               String t = "Lv " + _npc.getLevel() + (_npc.getAggroRange() > 0 ? "*" : "");
  53. -               if (_title != null)
  54. -                   t += " " + _title;
  55. -              
  56. -               _title = t;
  57. +               if (customTitleMob.contains(_npc.getNpcId()))
  58. +                   _title = "L2DevsAdmins";
  59. +               else
  60. +               {
  61. +                   String t = "Lv " + _npc.getLevel() + (_npc.getAggroRange() > 0 ? "*" : "");
  62. +                   if (_title != null)
  63. +                       t += " " + _title;
  64. +                  
  65. +                   _title = t;
  66. +               }
  67.             }
  68.            
  69.             // NPC crest system
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement