diff options
author | Jesusaves <cpntb1@ymail.com> | 2020-10-15 13:03:19 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2020-10-15 13:03:19 -0300 |
commit | b84466f049d78258258a12e5b7dc213be4d2844a (patch) | |
tree | 1d9bea5800ad4747e0a6bd35426a5fe4ef89acae | |
parent | d149026186c1bd9eb3c24cc95168faa9bd15f2d7 (diff) | |
download | serverdata-b84466f049d78258258a12e5b7dc213be4d2844a.tar.gz serverdata-b84466f049d78258258a12e5b7dc213be4d2844a.tar.bz2 serverdata-b84466f049d78258258a12e5b7dc213be4d2844a.tar.xz serverdata-b84466f049d78258258a12e5b7dc213be4d2844a.zip |
Anti-exploit patch for the previous commit
-rw-r--r-- | npc/003-3/malindou.txt | 1 | ||||
-rw-r--r-- | npc/functions/hub.txt | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/npc/003-3/malindou.txt b/npc/003-3/malindou.txt index cc9f2a88e..751a89505 100644 --- a/npc/003-3/malindou.txt +++ b/npc/003-3/malindou.txt @@ -660,6 +660,7 @@ OnSkillInvoke: if (!playerattached()) end; HUB_SkillInvoke(); + @skillId=0; end; // Level up events diff --git a/npc/functions/hub.txt b/npc/functions/hub.txt index 95eb02fe0..2cf46f67c 100644 --- a/npc/functions/hub.txt +++ b/npc/functions/hub.txt @@ -230,6 +230,12 @@ function script HUB_Logout { // HUB_SkillInvoke ( ) function script HUB_SkillInvoke { + // Something is... wrong + if (!@skillId) { + Exception("ILLEGAL SKILL PASSED TO HUB. It has been compromised, Jim.", RB_DEBUGMES|RB_IRCBROADCAST) + return; + } + // TODO: Detect what was script-cast and what was player-case. Then, readd RB_IRCBROADCAST // If you can't do this: You can't do this if (getskilllv(@skillId) < @skillLv) |