Преглед на файлове

BETA: Moving reloadNpc call to saveNpc in order to compare changes and reload only things we've modified.

Rumen Nikiforov преди 12 години
родител
ревизия
d6d3d79307
променени са 1 файла, в които са добавени 5 реда и са изтрити 0 реда
  1. 5 0
      L2J_Server_BETA/java/com/l2jserver/gameserver/datatables/NpcTable.java

+ 5 - 0
L2J_Server_BETA/java/com/l2jserver/gameserver/datatables/NpcTable.java

@@ -373,6 +373,11 @@ public class NpcTable
 				updated += performUpdate(npcaidataAttributes, "npcaidata", "npcId", npcaidataAttributeValues, npcId, con);
 				updated += performUpdate(npcElementAttributes, "npc_elementals", "npc_id", npcElementAttributeValues, npcId, con);
 			}
+			
+			if (updated > 0)
+			{
+				reloadNpc(npcId, !npcAttributeValues.isEmpty(), !npcaidataAttributeValues.isEmpty(), !npcElementAttributeValues.isEmpty(), false, false, false);
+			}
 		}
 		catch (Exception e)
 		{