Ceremony of Chaos addition and cleanup.
This commit is contained in:
-6
@@ -41,12 +41,6 @@ public class GlobalVariablesManager extends AbstractVariables
|
||||
private static final String DELETE_QUERY = "DELETE FROM global_variables";
|
||||
private static final String INSERT_QUERY = "INSERT INTO global_variables (var, value) VALUES (?, ?)";
|
||||
|
||||
// Public variable names
|
||||
public static final String COC_TOP_MARKS = "COC_TOP_MARKS";
|
||||
public static final String COC_TOP_MEMBER = "COC_TOP_MEMBER";
|
||||
public static final String COC_TRUE_HERO = "COC_TRUE_HERO";
|
||||
public static final String COC_TRUE_HERO_REWARDED = "COC_TRUE_HERO_REWARDED";
|
||||
|
||||
protected GlobalVariablesManager()
|
||||
{
|
||||
restoreMe();
|
||||
|
||||
-37
@@ -124,7 +124,6 @@ import org.l2jmobius.gameserver.instancemanager.CursedWeaponsManager;
|
||||
import org.l2jmobius.gameserver.instancemanager.DuelManager;
|
||||
import org.l2jmobius.gameserver.instancemanager.FortManager;
|
||||
import org.l2jmobius.gameserver.instancemanager.FortSiegeManager;
|
||||
import org.l2jmobius.gameserver.instancemanager.GlobalVariablesManager;
|
||||
import org.l2jmobius.gameserver.instancemanager.HandysBlockCheckerManager;
|
||||
import org.l2jmobius.gameserver.instancemanager.IdManager;
|
||||
import org.l2jmobius.gameserver.instancemanager.ItemsOnGroundManager;
|
||||
@@ -263,7 +262,6 @@ import org.l2jmobius.gameserver.model.olympiad.OlympiadGameManager;
|
||||
import org.l2jmobius.gameserver.model.olympiad.OlympiadGameTask;
|
||||
import org.l2jmobius.gameserver.model.olympiad.OlympiadManager;
|
||||
import org.l2jmobius.gameserver.model.punishment.PunishmentAffect;
|
||||
import org.l2jmobius.gameserver.model.punishment.PunishmentTask;
|
||||
import org.l2jmobius.gameserver.model.punishment.PunishmentType;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.model.quest.QuestState;
|
||||
@@ -6800,26 +6798,6 @@ public class PlayerInstance extends Playable
|
||||
}
|
||||
}
|
||||
|
||||
// CoC Monthly winner. (True Hero)
|
||||
final int trueHeroId = GlobalVariablesManager.getInstance().getInt(GlobalVariablesManager.COC_TRUE_HERO, 0);
|
||||
if (trueHeroId == player.getObjectId())
|
||||
{
|
||||
if (!GlobalVariablesManager.getInstance().getBoolean(GlobalVariablesManager.COC_TRUE_HERO_REWARDED, true))
|
||||
{
|
||||
GlobalVariablesManager.getInstance().set(GlobalVariablesManager.COC_TRUE_HERO_REWARDED, true);
|
||||
player.addItem("CoC-Hero", 35565, 1, player, true); // Mysterious Belt
|
||||
player.addItem("CoC-Hero", 35564, 1, player, true); // Ruler's Authority
|
||||
player.setFame(player.getFame() + 5000);
|
||||
player.sendMessage("You have been rewarded with 5.000 fame points.");
|
||||
final Clan clan = player.getClan();
|
||||
if (clan != null)
|
||||
{
|
||||
clan.addReputationScore(150000, true);
|
||||
}
|
||||
}
|
||||
player.setTrueHero(true);
|
||||
}
|
||||
|
||||
// Recalculate all stats
|
||||
player.getStat().recalculateStats(false);
|
||||
|
||||
@@ -13646,21 +13624,6 @@ public class PlayerInstance extends Playable
|
||||
getVariables().set(PlayerVariables.WORLD_CHAT_VARIABLE_NAME, timesUsed);
|
||||
}
|
||||
|
||||
public void prohibiteCeremonyOfChaos()
|
||||
{
|
||||
if (!PunishmentManager.getInstance().hasPunishment(getObjectId(), PunishmentAffect.CHARACTER, PunishmentType.COC_BAN))
|
||||
{
|
||||
PunishmentManager.getInstance().startPunishment(new PunishmentTask(getObjectId(), PunishmentAffect.CHARACTER, PunishmentType.COC_BAN, 0, "", getClass().getSimpleName()));
|
||||
final int penalties = getVariables().getInt(PlayerVariables.CEREMONY_OF_CHAOS_PROHIBITED_PENALTIES, 0);
|
||||
getVariables().set(PlayerVariables.CEREMONY_OF_CHAOS_PROHIBITED_PENALTIES, penalties + 1);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isCeremonyOfChaosProhibited()
|
||||
{
|
||||
return PunishmentManager.getInstance().hasPunishment(getObjectId(), PunishmentAffect.CHARACTER, PunishmentType.COC_BAN) || (getVariables().getInt(PlayerVariables.CEREMONY_OF_CHAOS_PROHIBITED_PENALTIES, 0) >= 30);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Side of the player.
|
||||
*/
|
||||
|
||||
+1
-2
@@ -24,8 +24,7 @@ public enum PunishmentType
|
||||
BAN,
|
||||
CHAT_BAN,
|
||||
PARTY_BAN,
|
||||
JAIL,
|
||||
COC_BAN;
|
||||
JAIL;
|
||||
|
||||
public static PunishmentType getByName(String name)
|
||||
{
|
||||
|
||||
-2
@@ -52,8 +52,6 @@ public class PlayerVariables extends AbstractVariables
|
||||
public static final String ATTENDANCE_DATE = "ATTENDANCE_DATE";
|
||||
public static final String ATTENDANCE_INDEX = "ATTENDANCE_INDEX";
|
||||
private static final String DAILY_MISSION_REWARDS = "DAILY_MISSION_REWARDS";
|
||||
public static final String CEREMONY_OF_CHAOS_PROHIBITED_PENALTIES = "CEREMONY_OF_CHAOS_PENALTIES";
|
||||
public static final String CEREMONY_OF_CHAOS_MARKS = "CEREMONY_OF_CHAOS_MARKS";
|
||||
public static final String ABILITY_POINTS_MAIN_CLASS = "ABILITY_POINTS";
|
||||
public static final String ABILITY_POINTS_DUAL_CLASS = "ABILITY_POINTS_DUAL_CLASS";
|
||||
public static final String ABILITY_POINTS_USED_MAIN_CLASS = "ABILITY_POINTS_USED";
|
||||
|
||||
Reference in New Issue
Block a user