Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ### Eclipse Workspace Patch 1.0
- #P L2J_Server
- diff --git java/config/options.properties
- index aaf0e66..eeb8480 100644
- --- java/config/options.properties
- +++ java/config/options.properties
- @@ -111,40 +111,44 @@
- # Note: This can increase network traffic
- ForceInventoryUpdate = False
- # Set the html cache's lazy loading True or False
- # (Load html's into cache only on first time requested)
- LazyCache = True
- # Maximum range mobs can randomly go from spawn point
- MaxDriftRange = 200
- # Minimum and maximum variable in seconds for npc animation delay.
- # You must keep MinNPCAnimation <= MaxNPCAnimation.
- # "0" is default value.
- MinNPCAnimation = 0
- MaxNPCAnimation = 0
- # Show L2Monster level and aggro
- ShowNpcLevel = False
- +# Show Red name of NPC / Monster if is agrro
- +# Default: False
- +ShowRedName = True
- # Activate the position recorder
- # valid 3D points will be recorded and written to data/universe.txt on shutdown
- ActivatePositionRecorder = False
- # =================================================================
- # Additionnal features than can be enabled or disabled
- # =================================================================
- # If you are experiencing problems with Warehouse or Freight transactions,
- # feel free to disable them here. (They are both enabled by default).
- AllowWarehouse = True
- # Enable Warehouse Cache - if WH is not used will server clear memory used by this WH
- WarehouseCache = False
- # How long Warehouse should be store in Memory
- WarehouseCacheTime = 15
- AllowFreight = True
- # If True player can try on weapon and armor in shop
- # Each Item tried cost WearPrice adena
- AllowWear = True
- WearDelay = 10
- diff --git java/net/sf/l2j/Config.java
- index 246815b..9303709 100644
- --- java/net/sf/l2j/Config.java
- +++ java/net/sf/l2j/Config.java
- @@ -849,40 +849,41 @@
- public static String GAME_SERVER_LOGIN_HOST;
- /** Internal Hostname */
- public static String INTERNAL_HOSTNAME;
- /** External Hostname */
- public static String EXTERNAL_HOSTNAME;
- public static int PATH_NODE_RADIUS;
- public static int NEW_NODE_ID;
- public static int SELECTED_NODE_ID;
- public static int LINKED_NODE_ID;
- public static String NEW_NODE_TYPE;
- /** Show L2Monster level and aggro ? */
- public static boolean SHOW_NPC_LVL;
- + public static boolean SHOW_RED_NAME_IF_AGGRO;
- /**
- * Force full item inventory packet to be sent for any item change ?<br>
- * <u><i>Note:</i></u> This can increase network traffic
- */
- public static boolean FORCE_INVENTORY_UPDATE;
- /** Disable the use of guards against agressive monsters ? */
- public static boolean ALLOW_GUARDS;
- /** Allow use Event Managers for change occupation ? */
- public static boolean ALLOW_CLASS_MASTERS;
- /** Time between 2 updates of IP */
- public static int IP_UPDATE_TIME;
- /** Zone Setting */
- public static int ZONE_TOWN;
- /** Crafting Enabled? */
- @@ -1569,41 +1570,41 @@
- SHOW_STATUS_COMMUNITYBOARD = Boolean.valueOf(optionsSettings
- .getProperty("ShowStatusOnCommunityBoard", "True"));
- NAME_PAGE_SIZE_COMMUNITYBOARD = Integer.parseInt(optionsSettings
- .getProperty("NamePageSizeOnCommunityBoard", "50"));
- NAME_PER_ROW_COMMUNITYBOARD = Integer.parseInt(optionsSettings
- .getProperty("NamePerRowOnCommunityBoard", "5"));
- ZONE_TOWN = Integer
- .parseInt(optionsSettings.getProperty("ZoneTown", "0"));
- MAX_DRIFT_RANGE = Integer.parseInt(
- optionsSettings.getProperty("MaxDriftRange", "300"));
- MIN_NPC_ANIMATION = Integer.parseInt(
- optionsSettings.getProperty("MinNPCAnimation", "0"));
- MAX_NPC_ANIMATION = Integer.parseInt(
- optionsSettings.getProperty("MaxNPCAnimation", "0"));
- SHOW_NPC_LVL = Boolean.valueOf(
- optionsSettings.getProperty("ShowNpcLevel", "False"));
- + SHOW_RED_NAME_IF_AGGRO = Boolean.valueOf(optionsSettings.getProperty("ShowRedName", "false"));
- FORCE_INVENTORY_UPDATE = Boolean.valueOf(optionsSettings
- .getProperty("ForceInventoryUpdate", "False"));
- AUTODELETE_INVALID_QUEST_DATA = Boolean.valueOf(optionsSettings
- .getProperty("AutoDeleteInvalidQuestData", "False"));
- THREAD_P_EFFECTS = Integer.parseInt(optionsSettings
- .getProperty("ThreadPoolSizeEffects", "6"));
- THREAD_P_GENERAL = Integer.parseInt(optionsSettings
- .getProperty("ThreadPoolSizeGeneral", "15"));
- GENERAL_PACKET_THREAD_CORE_SIZE = Integer
- .parseInt(optionsSettings.getProperty(
- "GeneralPacketThreadCoreSize", "4"));
- URGENT_PACKET_THREAD_CORE_SIZE = Integer
- .parseInt(optionsSettings.getProperty(
- "UrgentPacketThreadCoreSize", "2"));
- AI_MAX_THREAD = Integer.parseInt(
- optionsSettings.getProperty("AiMaxThread", "10"));
- GENERAL_THREAD_CORE_SIZE = Integer.parseInt(optionsSettings
- .getProperty("GeneralThreadCoreSize", "4"));
- diff --git java/net/sf/l2j/gameserver/model/L2Character.java
- index 5c466c7..4d0249d 100644
- --- java/net/sf/l2j/gameserver/model/L2Character.java
- +++ java/net/sf/l2j/gameserver/model/L2Character.java
- @@ -263,41 +263,44 @@
- // necessary to make a copy
- // to avoid that a spell affecting a L2NPCInstance, affects others
- // L2NPCInstance of the same type too.
- _Skills = ((L2NpcTemplate) template).getSkills();
- if (_Skills != null)
- {
- for (Map.Entry<Integer, L2Skill> skill : _Skills.entrySet())
- addStatFuncs(skill.getValue().getStatFuncs(null, this));
- }
- } else
- {
- // Initialize the FastMap _skills to null
- _Skills = new FastMap<>();
- // If L2Character is a L2PcInstance or a L2Summon, create the basic
- // calculator set
- _Calculators = new Calculator[Stats.NUM_STATS];
- Formulas.getInstance().addFuncsToNewCharacter(this);
- }
- }
- + public boolean isAggressive()
- + {
- + return false;
- + }
- protected void initCharStatusUpdateValues()
- {
- _hpUpdateInterval = getMaxHp() / 352.0; // MAX_HP div MAX_HP_BAR_PX
- _hpUpdateIncCheck = getMaxHp();
- _hpUpdateDecCheck = getMaxHp() - _hpUpdateInterval;
- }
- // =========================================================
- // Event - Public
- /**
- * Remove the L2Character from the world when the decay task is
- * launched.<BR>
- * <BR>
- *
- * <FONT COLOR=#FF0000><B> <U>Caution</U> : This method DOESN'T REMOVE the
- * object from _allObjects of L2World </B></FONT><BR>
- * <FONT COLOR=#FF0000><B> <U>Caution</U> : This method DOESN'T SEND
- * Server->Client packets to players</B></FONT><BR>
- * <BR>
- *
- diff --git java/net/sf/l2j/gameserver/serverpackets/NpcInfo.java
- index b29ab6a..46c05d5 100644
- --- java/net/sf/l2j/gameserver/serverpackets/NpcInfo.java
- +++ java/net/sf/l2j/gameserver/serverpackets/NpcInfo.java
- @@ -148,43 +148,52 @@
- writeD(_flWalkSpd);
- writeD(_flyRunSpd);
- writeD(_flyWalkSpd);
- writeF(1.1/* _cha.getProperMultiplier() */);
- // writeF(1/*_cha.getAttackSpeedMultiplier()*/);
- writeF(_pAtkSpd / 277.478340719);
- writeF(collisionRadius);
- writeF(collisionHeight);
- writeD(_rhand); // right hand weapon
- writeD(0);
- writeD(_lhand); // left hand weapon
- writeC(1); // name above char 1=true ... ??
- writeC(_cha.isRunning() ? 1 : 0);
- writeC(_cha.isInCombat() ? 1 : 0);
- writeC(_cha.isAlikeDead() ? 1 : 0);
- writeC(_isSummoned ? 2 : 0); // invisible ?? 0=false 1=true 2=summoned
- // (only works if model has a summon
- // animation)
- writeS(_name);
- writeS(_title);
- - writeD(0);
- - writeD(0);
- - writeD(0000); // hmm karma ??
- + if (Config.SHOW_RED_NAME_IF_AGGRO && _cha instanceof L2MonsterInstance)
- + {
- + writeD(0);
- + writeD(0);
- + writeD(_cha.isAggressive() ? 0x9999 : 0x00);
- + }
- + else
- + {
- + writeD(0);
- + writeD(0);
- + writeD(0000); // hmm karma ??
- + }
- writeD(_cha.getAbnormalEffect()); // C2
- writeD(0000); // C2
- writeD(0000); // C2
- writeD(0000); // C2
- writeD(0000); // C2
- writeC(0000); // C2
- writeC(0x00); // C3 team circle 1-blue, 2-red
- writeF(0x00); // C4 i think it is collisionRadius a second time
- writeF(0x00); // C4 " collisionHeight "
- writeD(0x00); // C4
- }
- /*
- * (non-Javadoc)
- *
- * @see net.sf.l2j.gameserver.serverpackets.ServerBasePacket#getType()
- */
- @Override
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement