diff options
| author | fusion32 <marcopuzziello@gmail.com> | 2025-07-01 09:35:07 -0300 |
|---|---|---|
| committer | fusion32 <marcopuzziello@gmail.com> | 2025-07-01 09:35:07 -0300 |
| commit | d5a143875678c9fbe3a76f23a7a810bc13b2edba (patch) | |
| tree | d2a709470a0518be3650f27707f588a8845fe281 /src/magic.cc | |
| parent | 5cfe00df82a69f44187b1cd77fe3d6865cf3425f (diff) | |
| download | game-d5a143875678c9fbe3a76f23a7a810bc13b2edba.tar.gz game-d5a143875678c9fbe3a76f23a7a810bc13b2edba.zip | |
minor cleanup
Diffstat (limited to 'src/magic.cc')
| -rw-r--r-- | src/magic.cc | 17 |
1 files changed, 4 insertions, 13 deletions
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; } |
