Hello All,
I've run into an issue where $client->InterruptSpell($spell_id) inside of EVENT_CAST or EVENT_CAST_BEGIN does nothing when the spell is cast from an item or from spellbar. The spell is non-instant, cast time of 3 seconds (through item) or spellbar, but it does not stop. I get the interrupted message, but the casting continues until completion.
Any ideas?
-
Hate
EDIT: Examples
Code:
sub EVENT_CAST_BEGIN
{
my @pogtokens = (11853, 11854, 11855, 11856, 11857, 11858, 11859, 11860, 11861, 11862, 11863, 11864, 11865, 11866, 11867);
if($zonesn ne "airplane" && $spell_id ~~ @pogtokens) { $client->InterruptSpell($spell_id); $client->Message(315, "You cannot use this item outside of the Plane of Gods!"); }
}
sub EVENT_CAST
{
my @pogtokens = (11853, 11854, 11855, 11856, 11857, 11858, 11859, 11860, 11861, 11862, 11863, 11864, 11865, 11866, 11867);
if($zonesn ne "airplane" && $spell_id ~~ @pogtokens) { $client->InterruptSpell($spell_id); $client->Message(315, "You cannot use this item outside of the Plane of Gods!"); }
}