rendered paste bodyIndex: java/net/sf/l2j/Config.java
===================================================================
--- java/net/sf/l2j/Config.java (revision 1245)
+++ java/net/sf/l2j/Config.java (working copy)
@@ -130,6 +130,8 @@
public static double ALT_GAME_CREATION_SP_RATE;
/** Alternative setting to blacksmith use of recipes to craft - default true*/
public static boolean ALT_BLACKSMITH_USE_RECIPES;
+ /** Remove Castle circlets after clan lose his castle? - default true*/
+ public static boolean REMOVE_CASTLE_CIRCLETS;
/** Alternative game weight limit multiplier - default 1*/
public static double ALT_WEIGHT_LIMIT;
@@ -1640,6 +1642,7 @@
ALT_PARTY_RANGE = Integer.parseInt(altSettings.getProperty("AltPartyRange", "1600"));
ALT_PARTY_RANGE2 = Integer.parseInt(altSettings.getProperty("AltPartyRange2", "1400"));
ALT_GAME_SKILL_HIT_RATE = Float.parseFloat(altSettings.getProperty("AltGameSkillHitRate", "1."));
+ REMOVE_CASTLE_CIRCLETS = Boolean.parseBoolean(altSettings.getProperty("RemoveCastleCirclets", "true"));
IS_CRAFTING_ENABLED = Boolean.parseBoolean(altSettings.getProperty("CraftingEnabled", "true"));
LIFE_CRYSTAL_NEEDED = Boolean.parseBoolean(altSettings.getProperty("LifeCrystalNeeded", "true"));
SP_BOOK_NEEDED = Boolean.parseBoolean(altSettings.getProperty("SpBookNeeded", "true"));
@@ -2299,7 +2302,7 @@
else if (pName.equalsIgnoreCase("AltWeightLimit")) ALT_WEIGHT_LIMIT = Double.parseDouble(pValue);
else if (pName.equalsIgnoreCase("AltBlacksmithUseRecipes")) ALT_BLACKSMITH_USE_RECIPES = Boolean.valueOf(pValue);
else if (pName.equalsIgnoreCase("AltGameSkillLearn")) ALT_GAME_SKILL_LEARN = Boolean.valueOf(pValue);
-
+ else if (pName.equalsIgnoreCase("RemoveCastleCirclets")) REMOVE_CASTLE_CIRCLETS = Boolean.valueOf(pValue);
else if (pName.equalsIgnoreCase("AltGameCancelByHit"))
{
ALT_GAME_CANCEL_BOW = pValue.equalsIgnoreCase("bow") || pValue.equalsIgnoreCase("all");
Index: java/config/altsettings.properties
===================================================================
--- java/config/altsettings.properties (revision 1245)
+++ java/config/altsettings.properties (working copy)
@@ -177,6 +177,9 @@
# Privilege browse warehouse enables at the same time also withdraw from warehouse!
AltMembersCanWithdrawFromClanWH = False
+#Remove Castle circlets after clan lose his castle? - default true
+RemoveCastleCirclets = True
+
#-------------------------------------------------------------
# Olympiad config
#-------------------------------------------------------------
Index: /java/net/sf/l2j/gameserver/model/entity/Castle.java
===================================================================
--- java/net/sf/l2j/gameserver/model/entity/Castle.java (revision 1240)
+++ java/net/sf/l2j/gameserver/model/entity/Castle.java (working copy)
@@ -25,6 +25,7 @@
import java.util.logging.Logger;
import javolution.util.FastList;
+import net.sf.l2j.Config;
import net.sf.l2j.L2DatabaseFactory;
import net.sf.l2j.gameserver.Announcements;
import net.sf.l2j.gameserver.CastleUpdater;
@@ -256,6 +257,10 @@
if (clan != null)
{
_formerOwner = clan;
+ if (Config.REMOVE_CASTLE_CIRCLETS)
+ {
+ CastleManager.getInstance().removeCirclets(clan,clan.getHasCastle());
+ }
clan.setHasCastle(0);
new Announcements().announceToAll(clan.getName() + " has lost " +getName() + " castle");
clan.broadcastToOnlineMembers(new PledgeShowInfoUpdate(clan));
@@ -264,7 +269,6 @@
updateOwnerInDB(null);
if (getSiege().getIsInProgress())
getSiege().midVictory();
-
updateClansReputation();
}