From 9f74d5319f543cd1f97b467a50f2dd4fa2d6f56c Mon Sep 17 00:00:00 2001
From: cade <>
Date: Mon, 10 Jul 2000 21:18:04 +0000
Subject: [PATCH] - fixed goal->Destroyed bug in spells code

---
 src/action/action_spellcast.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/action/action_spellcast.cpp b/src/action/action_spellcast.cpp
index d93ddecf7..e410afc1c 100644
--- a/src/action/action_spellcast.cpp
+++ b/src/action/action_spellcast.cpp
@@ -147,6 +147,10 @@ global void HandleActionSpellCast(Unit* unit)
 		  {
 		  UnitShowAnimation(unit,unit->Type->Animations->Attack);
 		  if ( !unit->Reset ) return;
+		  if ( unit->Command.Data.Move.Goal &&
+		       unit->Command.Data.Move.Goal->Destroyed )
+		  repeat = 0;
+		  else
 		  repeat = SpellCast(unit->Command.Data.Move.SpellId, 
 				    unit, 
 				    unit->Command.Data.Move.Goal,