Noticias:

Debes de estar registrado para poder ver el contenido indicado. Registrate o Conectate

Menú Principal

Noble name color

Iniciado por Swarlog, Ago 19, 2022, 12:34 AM

Tema anterior - Siguiente tema

Swarlog

Con esto podemos especificar de que color queremos que tenga cada personaje si es noble.

Index: java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
===================================================================
--- java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (revision 4088)
+++ java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (working copy)
@@ -8223,6 +8223,9 @@
     public void setNoble(boolean val)
     {
+      if (val)
+    getAppearance().setNameColor(Config.NOBLESS_COLOR_NAME);
+   
    if (val)
      for (L2Skill s : NobleSkillTable.getInstance().GetNobleSkills())
      addSkill(s, false); //Dont Save Noble skills to Sql
      else
Index: java/net/sf/l2j/Config.java
===================================================================
--- java/net/sf/l2j/Config.java (revision 4088)
+++ java/net/sf/l2j/Config.java (working copy)
@@ -881,6 +881,9 @@
     public static boolean L2JMOD_WEDDING_SAMESEX;
     public static boolean L2JMOD_WEDDING_FORMALWEAR;
     public static int L2JMOD_WEDDING_DIVORCE_COSTS;
+   
+    public static boolean ENABLE_NOBLESS_COLOR;
+    public static int NOBLESS_COLOR_NAME;
 
     // Packet information
     /** Count the a-beep-t of packets per minute ? */
@@ -1858,6 +1861,9 @@
                 L2JMOD_WEDDING_SAMESEX                  = Boolean.parseBoolean(L2JModSettings.getProperty("WeddingAllowSameSex", "False"));
                 L2JMOD_WEDDING_FORMALWEAR               = Boolean.parseBoolean(L2JModSettings.getProperty("WeddingFormalWear", "True"));
                 L2JMOD_WEDDING_DIVORCE_COSTS            = Integer.parseInt(L2JModSettings.getProperty("WeddingDivorceCosts", "20"));
+               
+                ENABLE_NOBLESS_COLOR                    = Boolean.parseBoolean(L2JModSettings.getProperty("EnableNoblessColor", "False"));
+                NOBLESS_COLOR_NAME                      = Integer.decode("0x" + L2JModSettings.getProperty("NoblessColorName", "000000"));
 
                 if (TVT_EVENT_PARTICIPATION_NPC_ID == 0)
                 {
Index: java/config/l2jmods.properties
===================================================================
--- java/config/l2jmods.properties (revision 4088)
+++ java/config/l2jmods.properties (working copy)
@@ -132,3 +132,13 @@
 # ex.: 1;2;3;4;5;6
 # no ";" at the start or end
 TvTEventDoorsCloseOpenOnStartEnd =
+
+#---------------------------------------------------------------
+# Nobless Color Name                                              -
+#---------------------------------------------------------------
+# Enable Nobless Color Name?
+# Deafult: False
+EnableNoblessColor = False
+
+# Set Nobless Color
+NoblessColorName = 000000
Index: java/net/sf/l2j/gameserver/clientpackets/EnterWorld.java
===================================================================
--- java/net/sf/l2j/gameserver/clientpackets/EnterWorld.java (revision 4088)
+++ java/net/sf/l2j/gameserver/clientpackets/EnterWorld.java (working copy)
@@ -174,6 +174,15 @@
             engage(activeChar);
             notifyPartner(activeChar,activeChar.getPartnerId());
         }
+       
+        if (Config.ENABLE_NOBLESS_COLOR)
+        {
+        if (activeChar.isNoble())
+        {
+            activeChar.getAppearance().setNameColor(Config.NOBLESS_COLOR_NAME);
+        }
+        }
+       
 
         if (activeChar.getAllEffects() != null)
         {