Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Tales of MajEyal
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
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
K'van
Tales of MajEyal
Commits
16e0debf
Commit
16e0debf
authored
10 years ago
by
Grayswandir
Browse files
Options
Downloads
Patches
Plain Diff
Make it so that failing to apply an effect will not remove an existing
instance of it.
parent
35df6d86
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
game/engines/default/engine/interface/ActorTemporaryEffects.lua
+2
-2
2 additions, 2 deletions
...ngines/default/engine/interface/ActorTemporaryEffects.lua
with
2 additions
and
2 deletions
game/engines/default/engine/interface/ActorTemporaryEffects.lua
+
2
−
2
View file @
16e0debf
...
...
@@ -107,7 +107,7 @@ function _M:setEffect(eff_id, dur, p, silent)
p
.
dur
=
dur
p
.
effect_id
=
eff_id
self
:
check
(
"on_set_temporary_effect"
,
eff_id
,
_M
.
tempeffect_def
[
eff_id
],
p
)
if
p
.
dur
<=
0
then
return
self
:
removeEffect
(
eff_id
)
end
if
p
.
dur
<=
0
then
return
end
-- If we already have it, we check if it knows how to "merge", or else we remove it and re-add it
if
self
:
hasEffect
(
eff_id
)
then
...
...
@@ -182,7 +182,7 @@ function _M:copyEffect(eff_id)
param
.
__tmpvals
=
nil
return
param
end
end
--- Removes the effect
function
_M
:
removeAllEffects
()
...
...
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