From d5a143875678c9fbe3a76f23a7a810bc13b2edba Mon Sep 17 00:00:00 2001 From: fusion32 Date: Tue, 1 Jul 2025 09:35:07 -0300 Subject: minor cleanup --- src/magic.cc | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) (limited to 'src/magic.cc') diff --git a/src/magic.cc b/src/magic.cc index ca7aaec..0f36bee 100644 --- a/src/magic.cc +++ b/src/magic.cc @@ -3312,16 +3312,6 @@ void HomeTeleport(TCreature *Actor, const char *Name){ // Spell Casting // ============================================================================= -static void SpellFailed(uint32 CreatureID){ - TCreature *Actor = GetCreature(CreatureID); - if(Actor == NULL){ - error("SpellFailed: Kreatur existiert nicht.\n"); - return; - } - - GraphicalEffect(Actor->posx, Actor->posy, Actor->posz, EFFECT_POFF); -} - static void CharacterRightSpell(uint32 CreatureID, int SpellNr, const char (*SpellStr)[512]){ TCreature *Actor = GetCreature(CreatureID); if(Actor == NULL){ @@ -4288,12 +4278,13 @@ void UseMagicItem(uint32 CreatureID, Object Obj, Object Dest){ } } }catch(RESULT r){ - // TODO(fusion): Same as with `CheckForSpell` except that `Actor` is - // already in scope. if(r != ERROR){ GraphicalEffect(Actor->posx, Actor->posy, Actor->posz, EFFECT_POFF); } - SendResult(Actor->Connection, r); + + if(Actor->Type == PLAYER){ + SendResult(Actor->Connection, r); + } return; } -- cgit v1.2.3