All pastes #795744 Raw Edit

Someone

public text v1 · immutable
#795744 ·published 2007-11-24 12:10 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 1355)
+++ java/net/sf/l2j/gameserver/model/actor/instance/L2NpcInstance.java	(working copy)
@@ -858,38 +858,34 @@
             }
             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())); 
+            	{ 
+            		if (getCastle().getCastleId() > 6) 
+            		{ 
+            			html.replace("%territory%", "The Kingdom of Elmore"); 
+            		} 
+            		else 
+            		{ 
+            			html.replace("%territory%", "The Kingdom of Aden"); 
+            		} 
+            	} 
+            	player.sendPacket(html); 
             }
             else if (command.startsWith("Quest"))
             {