Simplified flood protector methods.
This commit is contained in:
		| @@ -24,13 +24,6 @@ FloodProtectorRollDicePunishmentLimit = 0 | ||||
| FloodProtectorRollDicePunishmentType = none | ||||
| FloodProtectorRollDicePunishmentTime = 0 | ||||
|  | ||||
| # Firework - firework flooding | ||||
| FloodProtectorFireworkInterval = 42 | ||||
| FloodProtectorFireworkLogFlooding = False | ||||
| FloodProtectorFireworkPunishmentLimit = 0 | ||||
| FloodProtectorFireworkPunishmentType = none | ||||
| FloodProtectorFireworkPunishmentTime = 0 | ||||
|  | ||||
| # ItemPetSummon - item summoning and pet mounting flooding | ||||
| FloodProtectorItemPetSummonInterval = 16 | ||||
| FloodProtectorItemPetSummonLogFlooding = False | ||||
| @@ -94,13 +87,6 @@ FloodProtectorManufacturePunishmentLimit = 0 | ||||
| FloodProtectorManufacturePunishmentType = none | ||||
| FloodProtectorManufacturePunishmentTime = 0 | ||||
|  | ||||
| # Manor | ||||
| FloodProtectorManorInterval = 30 | ||||
| FloodProtectorManorLogFlooding = False | ||||
| FloodProtectorManorPunishmentLimit = 0 | ||||
| FloodProtectorManorPunishmentType = none | ||||
| FloodProtectorManorPunishmentTime = 0 | ||||
|  | ||||
| # SendMail - sending mail interval, 10s on retail | ||||
| FloodProtectorSendMailInterval = 100 | ||||
| FloodProtectorSendMailLogFlooding = False | ||||
|   | ||||
| @@ -72,7 +72,7 @@ public class ItemAuctionLink implements IBypassHandler | ||||
| 			final String cmd = st.nextToken(); | ||||
| 			if ("show".equalsIgnoreCase(cmd)) | ||||
| 			{ | ||||
| 				if (!player.getFloodProtectors().getItemAuction().tryPerformAction("RequestInfoItemAuction")) | ||||
| 				if (!player.getClient().getFloodProtectors().canUseItemAuction()) | ||||
| 				{ | ||||
| 					return false; | ||||
| 				} | ||||
|   | ||||
| @@ -56,7 +56,7 @@ public class ChatHeroVoice implements IChatHandler | ||||
| 			activeChar.sendPacket(SystemMessageId.CHATTING_IS_CURRENTLY_PROHIBITED); | ||||
| 			return; | ||||
| 		} | ||||
| 		if (!activeChar.getFloodProtectors().getHeroVoice().tryPerformAction("hero voice")) | ||||
| 		if (!activeChar.getClient().getFloodProtectors().canUseHeroVoice()) | ||||
| 		{ | ||||
| 			activeChar.sendMessage("Action failed. Heroes are only able to speak in the global channel once every 10 seconds."); | ||||
| 			return; | ||||
|   | ||||
| @@ -89,7 +89,7 @@ public class ChatShout implements IChatHandler | ||||
| 		} | ||||
| 		else if (Config.DEFAULT_GLOBAL_CHAT.equalsIgnoreCase("global")) | ||||
| 		{ | ||||
| 			if (!activeChar.canOverrideCond(PlayerCondOverride.CHAT_CONDITIONS) && !activeChar.getFloodProtectors().getGlobalChat().tryPerformAction("global chat")) | ||||
| 			if (!activeChar.canOverrideCond(PlayerCondOverride.CHAT_CONDITIONS) && !activeChar.getClient().getFloodProtectors().canUseGlobalChat()) | ||||
| 			{ | ||||
| 				activeChar.sendMessage("Do not spam shout channel."); | ||||
| 				return; | ||||
|   | ||||
| @@ -89,7 +89,7 @@ public class ChatTrade implements IChatHandler | ||||
| 		} | ||||
| 		else if (Config.DEFAULT_TRADE_CHAT.equalsIgnoreCase("global")) | ||||
| 		{ | ||||
| 			if (!activeChar.canOverrideCond(PlayerCondOverride.CHAT_CONDITIONS) && !activeChar.getFloodProtectors().getGlobalChat().tryPerformAction("global chat")) | ||||
| 			if (!activeChar.canOverrideCond(PlayerCondOverride.CHAT_CONDITIONS) && !activeChar.getClient().getFloodProtectors().canUseGlobalChat()) | ||||
| 			{ | ||||
| 				activeChar.sendMessage("Do not spam trade channel."); | ||||
| 				return; | ||||
|   | ||||
| @@ -84,14 +84,10 @@ public class RollingDice implements IItemHandler | ||||
| 		return true; | ||||
| 	} | ||||
| 	 | ||||
| 	/** | ||||
| 	 * @param player | ||||
| 	 * @return | ||||
| 	 */ | ||||
| 	private int rollDice(PlayerInstance player) | ||||
| 	{ | ||||
| 		// Check if the dice is ready | ||||
| 		if (!player.getFloodProtectors().getRollDice().tryPerformAction("roll dice")) | ||||
| 		if (!player.getClient().getFloodProtectors().canRollDice()) | ||||
| 		{ | ||||
| 			return 0; | ||||
| 		} | ||||
|   | ||||
| @@ -39,7 +39,7 @@ public class SummonItems extends ItemSkillsTemplate | ||||
| 		} | ||||
| 		 | ||||
| 		final PlayerInstance player = playable.getActingPlayer(); | ||||
| 		if (!player.getFloodProtectors().getItemPetSummon().tryPerformAction("summon items") || (player.getBlockCheckerArena() != -1) || player.inObserverMode() || player.isAllSkillsDisabled() || player.isCastingNow()) | ||||
| 		if (!player.getClient().getFloodProtectors().canUsePetSummonItem() || (player.getBlockCheckerArena() != -1) || player.inObserverMode() || player.isAllSkillsDisabled() || player.isCastingNow()) | ||||
| 		{ | ||||
| 			return false; | ||||
| 		} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 MobiusDevelopment
					MobiusDevelopment