Custom - Anti grief buffing voice command.

Support for the latest build of L2J Server, get help here with installations, upgrades, problems.
Do not post bugs reports here, use viewforum.php?f=77 instead.
There is no support for other server builds than the official provided by l2jserver.com
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
Lineage
Posts: 63
Joined: Thu Jan 31, 2008 7:39 am

Custom - Anti grief buffing voice command.

Post by Lineage »

If you want to receive support we need this info to help you properly.
» Find Revision
L2J Revision Number: 3707
L2JDP Revision Number: 6788

I have a voice command for anti-grief buffing. Once the player enters buff_off mode, players cant buff him.

Its working as it should but it seems its also blocking offensive/debuffs skills. Once a debuff is casted on someone "who has buff_off activated". The caster thinks it has landed "since he didnt get a message that it has failed" but it never lands. Here is the code im using:

Code: Select all

      public final L2Effect[] getEffects(L2Character effector, L2Character effected, Env env)    {        if (isPassive()) return _emptyEffectSet;         if (_effectTemplates == null)        	return _emptyEffectSet;         // doors and siege flags cannot receive any effects        if (effected instanceof L2DoorInstance ||effected instanceof L2SiegeFlagInstance )        	return _emptyEffectSet;         if (effector != effected)        {        	if (effected.isInvul())        		return _emptyEffectSet; 			[color=#FF0000][b]if ((effector instanceof L2PcInstance && (!isOffensive() || !isSkillTypeOffensive() || !isDebuff() || !isChance() || !isPvpSkill())) && effected instanceof L2PcInstance && (((L2PcInstance)effected).isBuffOff()))				return _emptyEffectSet;[/b][/color]         	if ((isOffensive() || isDebuff()) && effector instanceof L2PcInstance && ((L2PcInstance)effector).isGM())            {        		 if (!((L2PcInstance)effector).getAccessLevel().canGiveDamage())        			 return _emptyEffectSet;            }        } 
What did I miss!?
User avatar
momo61
Posts: 1648
Joined: Fri Jun 06, 2008 2:05 pm
Location: Europe

Re: Custom - Anti grief buffing voice command.

Post by momo61 »

maybe it's better if you do an active list of specified buffs that should not be allowed.

For example ID 123,124,125 etc. (im not sure these IDs are buff-skills, but im just making my point)
Post Reply