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
298bc039
Commit
298bc039
authored
4 years ago
by
Zoey76
Browse files
Options
Downloads
Patches
Plain Diff
Enemy Only target handler should not work on non-attackable NPC
Reported by: @ShinichiYao Fixes #312
parent
97c2a3a7
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/com/l2jserver/datapack/handlers/targethandlers/EnemyOnly.java
+8
-4
8 additions, 4 deletions
...l2jserver/datapack/handlers/targethandlers/EnemyOnly.java
with
8 additions
and
4 deletions
src/main/java/com/l2jserver/datapack/handlers/targethandlers/EnemyOnly.java
+
8
−
4
View file @
298bc039
...
@@ -51,10 +51,14 @@ public class EnemyOnly implements ITargetTypeHandler {
...
@@ -51,10 +51,14 @@ public class EnemyOnly implements ITargetTypeHandler {
return
EMPTY_TARGET_LIST
;
return
EMPTY_TARGET_LIST
;
}
}
if
(
target
.
isAttackable
())
{
if
(
target
.
isNpc
())
{
return
new
L2Character
[]
{
if
(
target
.
isAttackable
())
{
target
return
new
L2Character
[]
{
};
target
};
}
activeChar
.
sendPacket
(
INCORRECT_TARGET
);
return
EMPTY_TARGET_LIST
;
}
}
final
var
player
=
activeChar
.
getActingPlayer
();
final
var
player
=
activeChar
.
getActingPlayer
();
...
...
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