All pastes #741545 Raw Edit

Mine

public text v1 · immutable
·published 2007-10-18 19:51 UTC
rendered paste body
Index: java/net/sf/l2j/gameserver/model/actor/instance/L2NpcInstance.java
===================================================================
--- java/net/sf/l2j/gameserver/model/actor/instance/L2NpcInstance.java	(revision 1226)
+++ java/net/sf/l2j/gameserver/model/actor/instance/L2NpcInstance.java	(working copy)
@@ -857,38 +857,23 @@
             }
             else if (command.equalsIgnoreCase("TerritoryStatus"))
             {
-                NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
-                html.setFile("data/html/territorystatus.htm");
-                html.replace("%objectId%", String.valueOf(getObjectId()));
-                html.replace("%npcname%", getName());
-                
-                if (getIsInTown())
-                {
-                    html.replace("%castlename%", getCastle().getName());
-                    html.replace("%taxpercent%", "" + getCastle().getTaxPercent());
-                    
-                    if (getCastle().getOwnerId() > 0)
-                    {
-                        L2Clan clan = ClanTable.getInstance().getClan(getCastle().getOwnerId());
-                        html.replace("%clanname%", clan.getName());
-                        html.replace("%clanleadername%", clan.getLeaderName());
-                    }
-                    else
-                    {
-                        html.replace("%clanname%", "NPC");
-                        html.replace("%clanleadername%", "NPC");
-                    }
-                }
-                else
-                {
-                    html.replace("%castlename%", "Open");
-                    html.replace("%taxpercent%", "0");
-                    
-                    html.replace("%clanname%", "No");
-                    html.replace("%clanleadername%", getName());
-                }
-                
-                player.sendPacket(html);
+            	NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
+            	if (getCastle().getOwnerId() > 0)
+            	{
+            		html.setFile("data/html/territorystatus.htm");
+            		L2Clan clan = ClanTable.getInstance().getClan(getCastle().getOwnerId());
+            		html.replace("%clanname%", clan.getName());
+            		html.replace("%clanleadername%", clan.getLeaderName());
+            	}
+            	else
+            	{
+            		html.setFile("data/html/territorynoclan.htm");
+            	}
+            	html.replace("%castlename%", getCastle().getName());
+            	html.replace("%taxpercent%", "" + getCastle().getTaxPercent());
+            	html.replace("%objectId%", String.valueOf(getObjectId()));
+            	
+            	player.sendPacket(html);
             }
             else if (command.startsWith("Quest"))
             {