diff CastSpellInfo.cpp @ 1420:e11c498c0dc6

more label cleaning 3
author zipi
date Sun, 28 Jul 2013 19:07:12 +0100
parents c9e3b93ec570
children c7489dd19f88
line wrap: on
line diff
--- a/CastSpellInfo.cpp	Sun Jul 28 18:54:40 2013 +0100
+++ b/CastSpellInfo.cpp	Sun Jul 28 19:07:12 2013 +0100
@@ -4070,29 +4070,25 @@
 unsigned int CastSpellInfo::PushCastSpellInfo(__int16 a2, __int16 uPlayerID, __int16 skill_level, __int16 a5, int spell_sound_id)
 {
   unsigned int result; // eax@1
-  CastSpellInfo *v7; // edx@1
   CastSpellInfo *v8; // ecx@5
 
   result = 0;
-  v7 = this;
-  while ( v7->spellnum )
+  for( result = 0; result < 10; result++ )
   {
-    ++result;
-    ++v7;
-    if ( (signed int)result >= 10 )
-      goto LABEL_8;
+	  if(!this[result].spellnum)
+	  {
+		  v8 = &this[result];
+		  v8->spellnum = a2;
+		  v8->uPlayerID = uPlayerID;
+		  if ( a5 & 0x10 )
+			v8->uPlayerID_2 = uPlayerID;
+		  v8->field_6 = 0;
+		  v8->spell_target_pid = 0;
+		  v8->field_8 = a5;
+		  v8->forced_spell_skill_level = skill_level;
+		  v8->sound_id = spell_sound_id;
+	  }
   }
-  v8 = &this[result];
-  v8->spellnum = a2;
-  v8->uPlayerID = uPlayerID;
-  if ( a5 & 0x10 )
-    v8->uPlayerID_2 = uPlayerID;
-  v8->field_6 = 0;
-  v8->spell_target_pid = 0;
-  v8->field_8 = a5;
-  v8->forced_spell_skill_level = skill_level;
-  v8->sound_id = spell_sound_id;
-LABEL_8:
   if ( result == 10 )
     result = -1;
   return result;