From c2d5e591dc3ed47457774dfe8ee9e0e1fe003609 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Fri, 15 Oct 2021 14:05:30 -0300 Subject: Try to catch a rather annoying bug which is very hard to debug --- npc/functions/hub.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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; -- cgit v1.2.3-70-g09d2