Index: /trunk/src/game/DynamicObject.cpp
===================================================================
--- /trunk/src/game/DynamicObject.cpp (revision 233)
+++ /trunk/src/game/DynamicObject.cpp (revision 237)
@@ -11,10 +11,10 @@
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
@@ -71,5 +71,5 @@
     }
 
-    SetUInt32Value( OBJECT_FIELD_ENTRY, spellId );
+    SetEntry(spellId);
     SetFloatValue( OBJECT_FIELD_SCALE_X, 1 );
     SetUInt64Value( DYNAMICOBJECT_CASTER, caster->GetGUID() );
@@ -154,4 +154,6 @@
 bool DynamicObject::isVisibleForInState(Player const* u, bool inVisibleList) const
 {
-    return IsInWorld() && u->IsInWorld() /*&& IsWithinDistInMap(u,World::GetMaxVisibleDistanceForObject()+(inVisibleList ? World::GetVisibleObjectGreyDistance() : 0.0f))*/;
+    return IsInWorld() && u->IsInWorld() 
+        && (IsWithinDistInMap(u,World::GetMaxVisibleDistanceForObject()+(inVisibleList ? World::GetVisibleObjectGreyDistance() : 0.0f))
+        || GetCasterGUID() == u->GetGUID());
 }
Index: /trunk/src/game/ObjectAccessor.cpp
===================================================================
--- /trunk/src/game/ObjectAccessor.cpp (revision 233)
+++ /trunk/src/game/ObjectAccessor.cpp (revision 237)
@@ -11,10 +11,10 @@
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
@@ -613,5 +613,4 @@
             (cell_min.y_coord <= p.y_coord && p.y_coord <= cell_max.y_coord) )
             return true;
-
     }
 
Index: /trunk/src/trinitycore/CliRunnable.cpp
===================================================================
--- /trunk/src/trinitycore/CliRunnable.cpp (revision 112)
+++ /trunk/src/trinitycore/CliRunnable.cpp (revision 237)
@@ -11,10 +11,10 @@
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
@@ -52,5 +52,5 @@
     printf(temp_buf);
 #else
-	printf(str);
+    printf(str);
 #endif
 }
@@ -119,5 +119,5 @@
     }
 
-	return true;
+    return true;
 }
 
@@ -127,16 +127,16 @@
         return false;
 
-	char *character_name_str = strtok((char*)args," ");
+    char *character_name_str = strtok((char*)args," ");
     if(!character_name_str)
-		return false;
+        return false;
 
     std::string character_name = character_name_str;
     if(!normalizePlayerName(character_name))
-		return false;
+        return false;
 
     uint64 character_guid;
     uint32 account_id;
 
-	Player *player = objmgr.GetPlayer(character_name.c_str());
+    Player *player = objmgr.GetPlayer(character_name.c_str());
     if(player)
     {
@@ -158,8 +158,8 @@
     }
 
-	std::string account_name;
+    std::string account_name;
     accmgr.GetName (account_id,account_name);
 
-    Player::DeleteFromDB(character_guid, account_id, true); 
+    Player::DeleteFromDB(character_guid, account_id, true);
     PSendSysMessage(LANG_CHARACTER_DELETED,character_name.c_str(),GUID_LOPART(character_guid),account_name.c_str(), account_id);
     return true;
@@ -171,5 +171,5 @@
     SendSysMessage(LANG_COMMAND_EXIT);
     World::m_stopEvent = true;
-	return true;
+    return true;
 }
 
@@ -228,5 +228,5 @@
     char *szPassword = strtok(NULL, " ");
     if(!szAcc || !szPassword)
-		return false;
+        return false;
 
     // normilized in accmgr.CreateAccount
@@ -257,6 +257,6 @@
             return false;
     }
-	
-	return true;
+
+    return true;
 }
 
@@ -269,8 +269,8 @@
     char *NewLevel = strtok((char*)args, " ");
     if (!NewLevel)
-		return false;
+        return false;
 
     sLog.SetLogLevel(NewLevel);
-	return true;
+    return true;
 }
 
@@ -326,10 +326,11 @@
             for(int x=0;command_str[x];x++)
                 if(command_str[x]=='\r'||command_str[x]=='\n')
-				{
-					command_str[x]=0;
-					break;
-				}
-
-			if(!*command_str)
+            {
+                command_str[x]=0;
+                break;
+            }
+
+
+            if(!*command_str)
             {
                 printf("TC>");
@@ -347,5 +348,7 @@
         }
         else if (feof(stdin))
+        {
             World::m_stopEvent = true;
+        }
     }
 
Index: /trunk/src/trinitycore/RASocket.cpp
===================================================================
--- /trunk/src/trinitycore/RASocket.cpp (revision 149)
+++ /trunk/src/trinitycore/RASocket.cpp (revision 237)
@@ -11,10 +11,10 @@
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
@@ -198,6 +198,6 @@
 
                     QueryResult *check = loginDatabase.PQuery(
-						"SELECT 1 FROM account WHERE username = '%s' AND sha_pass_hash=SHA1(CONCAT(username,':','%s'))",
-						login.c_str(), pw.c_str());
+                        "SELECT 1 FROM account WHERE username = '%s' AND sha_pass_hash=SHA1(CONCAT(username,':','%s'))",
+                        login.c_str(), pw.c_str());
 
                     if(check)
@@ -245,11 +245,11 @@
     #ifdef RA_CRYPT
 
-	char *megabuffer=strdup(szText);
+    char *megabuffer=strdup(szText);
     unsigned int sz=strlen(megabuffer);
     Encrypt(megabuffer,sz);
-	send(r,megabuffer,sz,0);
+    send(r,megabuffer,sz,0);
     delete [] megabuffer;
-    
-	#else
+
+    #else
 
     unsigned int sz=strlen(szText);
Index: /trunk/src/trinitycore/WorldRunnable.cpp
===================================================================
--- /trunk/src/trinitycore/WorldRunnable.cpp (revision 102)
+++ /trunk/src/trinitycore/WorldRunnable.cpp (revision 237)
@@ -11,10 +11,10 @@
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
@@ -78,5 +78,5 @@
     sWorld.KickAll();                                       // save and kick all players
     sWorld.UpdateSessions( 1 );                             // real players unload required UpdateSessions call
-    
+
     sWorldSocketMgr->StopNetwork();
 
Index: /trunk/src/trinitycore/Main.cpp
===================================================================
--- /trunk/src/trinitycore/Main.cpp (revision 102)
+++ /trunk/src/trinitycore/Main.cpp (revision 237)
@@ -11,10 +11,10 @@
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
@@ -138,5 +138,4 @@
         return 1;
     }
-
     sLog.outString("Using configuration file %s.", cfg_file);
     
Index: /trunk/src/trinitycore/Master.cpp
===================================================================
--- /trunk/src/trinitycore/Master.cpp (revision 149)
+++ /trunk/src/trinitycore/Master.cpp (revision 237)
@@ -11,10 +11,10 @@
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
@@ -84,6 +84,6 @@
             //DEBUG_LOG("anti-freeze: time=%u, counters=[%u; %u]",curtime,Master::m_masterLoopCounter,World::m_worldLoopCounter);
 
-            // There is no Master anymore 
-            // TODO: clear the rest of the code 
+            // There is no Master anymore
+            // TODO: clear the rest of the code
 //            // normal work
 //            if(m_loops != Master::m_masterLoopCounter)
@@ -92,5 +92,5 @@
 //                m_loops = Master::m_masterLoopCounter;
 //            }
-//            // possible freeze 
+//            // possible freeze
 //            else if(getMSTimeDiff(m_lastchange,curtime) > _delaytime)
 //            {
@@ -105,5 +105,5 @@
                 w_loops = World::m_worldLoopCounter;
             }
-            // possible freeze 
+            // possible freeze
             else if(getMSTimeDiff(w_lastchange,curtime) > _delaytime)
             {
@@ -251,5 +251,5 @@
         ZThread::Thread td1(new CliRunnable);
     }
-    
+
     ZThread::Thread td2(new RARunnable);
 
@@ -329,5 +329,5 @@
 
     sWorldSocketMgr->Wait ();
-    
+
     // set server offline
     loginDatabase.PExecute("UPDATE realmlist SET color = 2 WHERE id = '%d'",realmID);
@@ -340,5 +340,5 @@
     t.wait();
     td2.wait ();
-    
+
     ///- Clean database before leaving
     clearOnlineAccounts();
@@ -460,5 +460,5 @@
     sWorld.LoadDBVersion();
 
-	sLog.outString("Using %s", sWorld.GetDBVersion());
+    sLog.outString("Using %s", sWorld.GetDBVersion());
     return true;
 }
@@ -472,5 +472,5 @@
         "UPDATE account SET online = 0 WHERE online > 0 "
         "AND id IN (SELECT acctid FROM realmcharacters WHERE realmid = '%d')",realmID);
-    
+
 
     CharacterDatabase.Execute("UPDATE characters SET online = 0");
