Page 1 of 1
How to disable Mana Potion in PvP&Siege
Posted: Mon Nov 08, 2010 3:18 pm
by lucky.it
If you want to receive support we need this info to help you properly.
» Find Revision
L2J Revision
4422:
L2JDP Revision
7669:
Hi all,
in Freya release how to disable Mana Potions during PvP and Siege?
I find this old solution for Epilogue:
https://www.l2jserver.com/forum/viewtop ... 10&start=0 but i don't find solution for Freya.
Thank in advanced.
Re: How to disable Mana Potion in PvP&Siege
Posted: Mon Nov 08, 2010 4:33 pm
by Naonah
if (player.isinsiege())
return;
something like that
Re: How to disable Mana Potion in PvP&Siege
Posted: Mon Nov 08, 2010 4:39 pm
by lucky.it
In this file?
ManaPotion.java
Code: Select all
package handlers.itemhandlers; import com.l2jserver.Config;import com.l2jserver.gameserver.model.L2ItemInstance;import com.l2jserver.gameserver.model.actor.L2Playable;import com.l2jserver.gameserver.network.SystemMessageId;import com.l2jserver.gameserver.network.serverpackets.SystemMessage; public class ManaPotion extends ItemSkills{ /** * * @see com.l2jserver.gameserver.handler.IItemHandler#useItem(com.l2jserver.gameserver.model.actor.L2Playable, com.l2jserver.gameserver.model.L2ItemInstance, boolean) */ @Override public void useItem(L2Playable playable, L2ItemInstance item, boolean forceUse) { if (!Config.L2JMOD_ENABLE_MANA_POTIONS_SUPPORT) { playable.sendPacket(new SystemMessage(SystemMessageId.NOTHING_HAPPENED)); return; } super.useItem(playable, item, forceUse); }}
Re: How to disable Mana Potion in PvP&Siege
Posted: Mon Nov 08, 2010 5:45 pm
by Naonah
yes but check this player.isinsiege or activeChar.isinsiege in L2PcInstance, check also the method isinsiege() if I named this correctly
Re: How to disable Mana Potion in PvP&Siege
Posted: Mon Nov 08, 2010 6:07 pm
by _DS_
LOL ?
Code: Select all
<cond msgId="113" addName="1"> <not> <player SiegeZone="126" /> </not> </cond>