Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
L2j Server Datapack
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
L2j
L2j Server Datapack
Commits
480fd572
Commit
480fd572
authored
11 years ago
by
Adry_85
Browse files
Options
Downloads
Patches
Plain Diff
BETA: Unhardcoded target one handler.
Patch by: MELERIX Tested by: Adry_85
parent
bf85eecf
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
L2J_DataPack_BETA/dist/game/data/scripts/handlers/targethandlers/One.java
+1
-17
1 addition, 17 deletions
...A/dist/game/data/scripts/handlers/targethandlers/One.java
with
1 addition
and
17 deletions
L2J_DataPack_BETA/dist/game/data/scripts/handlers/targethandlers/One.java
+
1
−
17
View file @
480fd572
...
@@ -21,7 +21,6 @@ package handlers.targethandlers;
...
@@ -21,7 +21,6 @@ package handlers.targethandlers;
import
com.l2jserver.gameserver.handler.ITargetTypeHandler
;
import
com.l2jserver.gameserver.handler.ITargetTypeHandler
;
import
com.l2jserver.gameserver.model.L2Object
;
import
com.l2jserver.gameserver.model.L2Object
;
import
com.l2jserver.gameserver.model.actor.L2Character
;
import
com.l2jserver.gameserver.model.actor.L2Character
;
import
com.l2jserver.gameserver.model.effects.L2EffectType
;
import
com.l2jserver.gameserver.model.skills.L2Skill
;
import
com.l2jserver.gameserver.model.skills.L2Skill
;
import
com.l2jserver.gameserver.model.skills.targets.L2TargetType
;
import
com.l2jserver.gameserver.model.skills.targets.L2TargetType
;
import
com.l2jserver.gameserver.network.SystemMessageId
;
import
com.l2jserver.gameserver.network.SystemMessageId
;
...
@@ -31,26 +30,11 @@ import com.l2jserver.gameserver.network.SystemMessageId;
...
@@ -31,26 +30,11 @@ import com.l2jserver.gameserver.network.SystemMessageId;
*/
*/
public
class
One
implements
ITargetTypeHandler
public
class
One
implements
ITargetTypeHandler
{
{
@Override
@Override
public
L2Object
[]
getTargetList
(
L2Skill
skill
,
L2Character
activeChar
,
boolean
onlyFirst
,
L2Character
target
)
public
L2Object
[]
getTargetList
(
L2Skill
skill
,
L2Character
activeChar
,
boolean
onlyFirst
,
L2Character
target
)
{
{
boolean
canTargetSelf
=
false
;
switch
(
skill
.
getSkillType
())
{
case
BUFF:
case
DUMMY:
canTargetSelf
=
true
;
break
;
default
:
{
canTargetSelf
=
skill
.
hasEffectType
(
L2EffectType
.
CANCEL_DEBUFF
,
L2EffectType
.
NEGATE
,
L2EffectType
.
CPHEAL
,
L2EffectType
.
HEAL
,
L2EffectType
.
HEAL_PERCENT
,
L2EffectType
.
MANAHEAL_BY_LEVEL
);
break
;
}
}
// Check for null target or any other invalid target
// Check for null target or any other invalid target
if
((
target
==
null
)
||
target
.
isDead
()
||
((
target
==
activeChar
)
&&
!
canTargetSelf
))
if
((
target
==
null
)
||
target
.
isDead
()
||
((
target
==
activeChar
)
&&
(
skill
.
isOffensive
()
||
skill
.
isPVP
())
))
{
{
activeChar
.
sendPacket
(
SystemMessageId
.
TARGET_IS_INCORRECT
);
activeChar
.
sendPacket
(
SystemMessageId
.
TARGET_IS_INCORRECT
);
return
_emptyTargetList
;
return
_emptyTargetList
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment