summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-10-15 14:05:30 -0300
committerJesusaves <cpntb1@ymail.com>2021-10-15 14:05:30 -0300
commitc2d5e591dc3ed47457774dfe8ee9e0e1fe003609 (patch)
treea0c95a1f9b16c7ca885c68b17b640dc99a89b344
parenta3546bd0d2c4a1227711041841477848d1fa46db (diff)
downloadserverdata-c2d5e591dc3ed47457774dfe8ee9e0e1fe003609.tar.gz
serverdata-c2d5e591dc3ed47457774dfe8ee9e0e1fe003609.tar.bz2
serverdata-c2d5e591dc3ed47457774dfe8ee9e0e1fe003609.tar.xz
serverdata-c2d5e591dc3ed47457774dfe8ee9e0e1fe003609.zip
Try to catch a rather annoying bug which is very hard to debug
-rw-r--r--npc/functions/hub.txt9
1 files changed, 8 insertions, 1 deletions
diff --git a/npc/functions/hub.txt b/npc/functions/hub.txt
index 664424a29..45fd8979b 100644
--- a/npc/functions/hub.txt
+++ b/npc/functions/hub.txt
@@ -320,13 +320,20 @@ function script HUB_Logout {
// HUB_SkillInvoke ( )
function script HUB_SkillInvoke {
// Something is... wrong
- if (!@skillId) {
+ if (@skillId < 1) {
Exception("ILLEGAL SKILL PASSED TO HUB. It has been compromised, Jim.", RB_DEBUGMES|RB_IRCBROADCAST);
debugmes "Legal Caster: %s", strcharinfo(0);
debugmes "Effective Caster: %d", @skillCaster;
return;
}
+ // Missing Skill Target - Don't ask me, something went wrong.
+ if (@skillTarget < 1) {
+ //@skillTarget = getcharid(3);
+ consolewarn("Skill %d has no target!", @skillId);
+ consolewarn("Skill Data - Name \"%s\" Level %d User \"%s\"", getskillname(@skillId), @skillLv, strcharinfo(0));
+ }
+
// Homunculus Cycle
/* *********************************************************************** */
//debugmes "Skill caster %d", @skillCaster;