diff --git a/L2J_Mobius_Underground/dist/game/config/Custom.ini b/L2J_Mobius_Underground/dist/game/config/Custom.ini index 7b17a07cd1..a3113060c0 100644 --- a/L2J_Mobius_Underground/dist/game/config/Custom.ini +++ b/L2J_Mobius_Underground/dist/game/config/Custom.ini @@ -392,6 +392,10 @@ CommunityCombatDisabled = True # Default: True CommunityKarmaDisabled = True +# Cast animations of each buff. +# Default: False +CommunityCastAnimations = False + # --------------------------------------------------------------------------- # Faction System (Good vs Evil) diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/handlers/communityboard/HomeBoard.java b/L2J_Mobius_Underground/dist/game/data/scripts/handlers/communityboard/HomeBoard.java index 748a7145b4..fc26273d29 100644 --- a/L2J_Mobius_Underground/dist/game/data/scripts/handlers/communityboard/HomeBoard.java +++ b/L2J_Mobius_Underground/dist/game/data/scripts/handlers/communityboard/HomeBoard.java @@ -31,6 +31,8 @@ import com.l2jmobius.gameserver.handler.CommunityBoardHandler; import com.l2jmobius.gameserver.handler.IParseBoardHandler; import com.l2jmobius.gameserver.model.actor.L2Summon; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; +import com.l2jmobius.gameserver.model.skills.Skill; +import com.l2jmobius.gameserver.model.skills.SkillCaster; import com.l2jmobius.gameserver.model.zone.ZoneId; import com.l2jmobius.gameserver.network.serverpackets.BuyList; import com.l2jmobius.gameserver.network.serverpackets.ExBuySellList; @@ -148,17 +150,36 @@ public final class HomeBoard implements IParseBoardHandler else { activeChar.getInventory().destroyItemByItemId("CB_Buff", Config.COMMUNITYBOARD_CURRENCY, Config.COMMUNITYBOARD_BUFF_PRICE, activeChar, activeChar); - SkillData.getInstance().getSkill(buffId, buffLevel).applyEffects(activeChar, activeChar); - if (activeChar.getServitors().size() > 0) + final Skill skill = SkillData.getInstance().getSkill(buffId, buffLevel); + if (Config.COMMUNITYBOARD_CAST_ANIMATIONS) { - for (L2Summon summon : activeChar.getServitors().values()) + SkillCaster.triggerCast(activeChar, activeChar, skill); + if (activeChar.getServitors().size() > 0) { - SkillData.getInstance().getSkill(buffId, buffLevel).applyEffects(summon, summon); + for (L2Summon summon : activeChar.getServitors().values()) + { + SkillCaster.triggerCast(summon, summon, skill); + } + } + if (activeChar.hasPet()) + { + SkillCaster.triggerCast(activeChar.getPet(), activeChar.getPet(), skill); } } - if (activeChar.hasPet()) + else { - SkillData.getInstance().getSkill(buffId, buffLevel).applyEffects(activeChar.getPet(), activeChar.getPet()); + skill.applyEffects(activeChar, activeChar); + if (activeChar.getServitors().size() > 0) + { + for (L2Summon summon : activeChar.getServitors().values()) + { + skill.applyEffects(summon, summon); + } + } + if (activeChar.hasPet()) + { + skill.applyEffects(activeChar.getPet(), activeChar.getPet()); + } } } CommunityBoardHandler.separateAndSend(HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/CommunityBoard/Custom/" + page + ".html"), activeChar); diff --git a/L2J_Mobius_Underground/java/com/l2jmobius/Config.java b/L2J_Mobius_Underground/java/com/l2jmobius/Config.java index eae3670fa9..fb1316bca6 100644 --- a/L2J_Mobius_Underground/java/com/l2jmobius/Config.java +++ b/L2J_Mobius_Underground/java/com/l2jmobius/Config.java @@ -661,6 +661,7 @@ public final class Config public static int COMMUNITYBOARD_BUFF_PRICE; public static boolean COMMUNITYBOARD_COMBAT_DISABLED; public static boolean COMMUNITYBOARD_KARMA_DISABLED; + public static boolean COMMUNITYBOARD_CAST_ANIMATIONS; public static boolean FACTION_SYSTEM_ENABLED; public static Location FACTION_STARTING_LOCATION; public static int FACTION_MANAGER_NPCID; @@ -2106,6 +2107,7 @@ public final class Config COMMUNITYBOARD_BUFF_PRICE = CustomSettings.getInt("CommunityBuffPrice", 0); COMMUNITYBOARD_COMBAT_DISABLED = CustomSettings.getBoolean("CommunityCombatDisabled", true); COMMUNITYBOARD_KARMA_DISABLED = CustomSettings.getBoolean("CommunityKarmaDisabled", true); + COMMUNITYBOARD_CAST_ANIMATIONS = CustomSettings.getBoolean("CommunityCastAnimations", false); String[] tempString; FACTION_SYSTEM_ENABLED = Boolean.valueOf(CustomSettings.getBoolean("EnableFactionSystem", false));