Players can kill teamates on TvT with AoE skills.

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
JMD
Advanced User
Advanced User
Posts: 1440
Joined: Wed Apr 15, 2009 10:07 am

Players can kill teamates on TvT with AoE skills.

Post by JMD »

If you want to receive support we need this info to help you properly.
» Find Revision
L2J Revision 5123:
L2JDP Revision 8628:

Im using stable and i get a lot of complaints about this. I dont want to enable the notargetteamates because it will ruin parties and stuff, is there any other way to fix it?
Starter
Posts: 484
Joined: Sat Jan 23, 2010 4:42 pm

Re: Players can kill teamates on TvT with AoE skills.

Post by Starter »

Ofc and I think there is already a topic about it but I dont remember now.. 5 months ago or so when I was active the last time.^^
I have promises to keep and miles to go before I sleep.
User avatar
theone
Posts: 1384
Joined: Tue Aug 12, 2008 2:28 am
Location: Quebec, Canada

Re: Players can kill teamates on TvT with AoE skills.

Post by theone »

This is a very old problem, which had been solved a long time ago (2+ years).
I'm surprised that it has come back... it's not a very hard thing to solve.
Lets wait for Zoey to finish comitting his skills engine rework and then we can fix this thing. Please bump this thread if there's no update within a few weeks (just so I dont forget to look into this ;) )
Image
HorridoJoho
L2j Senior Developer
L2j Senior Developer
Posts: 795
Joined: Sun Aug 14, 2005 11:27 am

Re: Players can kill teamates on TvT with AoE skills.

Post by HorridoJoho »

Fast way to just get the thing done in stable
  • com.l2jserver.gameserver.model.L2Skill
    • public final L2Object[] getTargetList(L2Character, boolean, L2Character) - don't return the target list from target type handler directly, check for (SKILL_IS_OFFENSIVE & (ACTIVE_CHAR_TVT_TEAM == TARGET_ARRAY_TVT_TEAM) to recreate the array without the tvt team mates


Fast way to just get the thing done in unstable
  • com.l2jserver.gameserver.model.skills.L2Skill.java
    • public final L2Object[] getTargetList(L2Character, boolean, L2Character) - don't return the target list from target type handler directly, check for (SKILL_IS_OFFENSIVE & (ACTIVE_CHAR_TVT_TEAM == TARGET_ARRAY_TVT_TEAM) to recreate the array without the tvt team mates


Recreate or setting null
If the code which calls getTargetList is ok with null elements within the array(didn't checked that) it would be as easy as:

Code: Select all

 L2Object[] targetList = handler.getTargetList(this, activeChar, onlyFirst, target);if (activeChar is participant in tvt && skill is offensive){    for (int i = 0;i < targetList.length;++ i)    {        if (tagetList[i] is in activeChar team)            targetList[i] = null;    }} 
But if the code which calls getTargetList musn't have nulls in the target list:

Code: Select all

 L2Object[] targetList = handler.getTargetList(this, activeChar, onlyFirst, target);if (activeChar is participant in tvt && skill is offensive){    ListToHoldNewTargets newTargetList = ....;    for (int i = 0;i < targetList.length;++ i)    {        if (tagetList[i] is not in activeChar team)            newTargetList.add(targetList[i]);    }    return newTargetList.toArray();} 
This is in no way the best practice to get that done it's more like "just get that damn thing running no matter how"
I think the best would be to notify the TvT event itself with a target list for a skill and filter it there. But for a fast test to stop all offensive skills on team mates in TvT it is sufficient.
Post Reply