Index: /trunk/src/game/Creature.cpp
===================================================================
--- /trunk/src/game/Creature.cpp (revision 260)
+++ /trunk/src/game/Creature.cpp (revision 265)
@@ -123,5 +123,5 @@
 m_lootMoney(0), m_lootRecipient(0),
 m_deathTimer(0), m_respawnTime(0), m_respawnDelay(25), m_corpseDelay(60), m_respawnradius(0.0f),
-m_gossipOptionLoaded(false), m_emoteState(0), m_isPet(false), m_isTotem(false),
+m_gossipOptionLoaded(false), m_emoteState(0), m_isPet(false), m_isTotem(false), m_isAggressive(true),
 m_regenTimer(2000), m_defaultMovementType(IDLE_MOTION_TYPE), m_equipmentId(0),
 m_AlreadyCallAssistence(false), m_regenHealth(true), m_AI_locked(false), m_isDeadByDefault(false),
@@ -294,4 +294,5 @@
     SetUInt32Value(UNIT_DYNAMIC_FLAGS,GetCreatureInfo()->dynamicflags);
 
+    SetMeleeDamageSchool(SpellSchools(GetCreatureInfo()->dmgschool));
     SetModifierValue(UNIT_MOD_ARMOR,             BASE_VALUE, float(GetCreatureInfo()->armor));
     SetModifierValue(UNIT_MOD_RESISTANCE_HOLY,   BASE_VALUE, float(GetCreatureInfo()->resistance1));
@@ -323,4 +324,10 @@
     if(GetCreatureInfo()->flags_extra & CREATURE_FLAG_EXTRA_TRIGGER)
         SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+
+    if(isTotem() || isCivilian() || GetCreatureInfo()->flags_extra & CREATURE_FLAG_EXTRA_TRIGGER
+        || GetCreatureType() == CREATURE_TYPE_CRITTER)
+        m_isAggressive = false;
+    else
+        m_isAggressive = true;
 
     return true;
@@ -1411,6 +1418,4 @@
     SetPower(POWER_MANA,data->curmana);
 
-    SetMeleeDamageSchool(SpellSchools(GetCreatureInfo()->dmgschool));
-
     // checked at creature_template loading
     m_defaultMovementType = MovementGeneratorType(data->movementType);
Index: /trunk/src/game/Creature.h
===================================================================
--- /trunk/src/game/Creature.h (revision 260)
+++ /trunk/src/game/Creature.h (revision 265)
@@ -427,4 +427,6 @@
         bool canSwim() const { return GetCreatureInfo()->InhabitType & INHABIT_WATER; }
         bool canFly()  const { return GetCreatureInfo()->InhabitType & INHABIT_AIR; }
+        bool isAggressive() const { return m_isAggressive; }
+        void SetAggressive(bool agg) { m_isAggressive = agg; }
         ///// TODO RENAME THIS!!!!!
         bool isCanTrainingOf(Player* player, bool msg) const;
@@ -637,4 +639,5 @@
         bool m_isPet;                                       // set only in Pet::Pet
         bool m_isTotem;                                     // set only in Totem::Totem
+        bool m_isAggressive;
         void RegenerateMana();
         void RegenerateHealth();
Index: /trunk/src/game/Totem.cpp
===================================================================
--- /trunk/src/game/Totem.cpp (revision 126)
+++ /trunk/src/game/Totem.cpp (revision 265)
@@ -98,4 +98,7 @@
         default: break;
     }
+
+    if(GetEntry() == SENTRY_TOTEM_ENTRY)
+        SetAggressive(true);
 }
 
Index: /trunk/src/game/Unit.cpp
===================================================================
--- /trunk/src/game/Unit.cpp (revision 264)
+++ /trunk/src/game/Unit.cpp (revision 265)
@@ -8492,5 +8492,6 @@
         target->SetStandState(PLAYER_STATE_NONE);
 
-    if(!target->isInCombat() && target->GetTypeId() != TYPEID_PLAYER && ((Creature*)target)->AI())
+    if(!target->isInCombat() && target->GetTypeId() != TYPEID_PLAYER
+        && ((Creature*)target)->isAggressive() && ((Creature*)target)->AI())
         ((Creature*)target)->AI()->AttackStart(this);
 
Index: /trunk/src/game/GridNotifiersImpl.h
===================================================================
--- /trunk/src/game/GridNotifiersImpl.h (revision 186)
+++ /trunk/src/game/GridNotifiersImpl.h (revision 265)
@@ -73,5 +73,5 @@
 
     // Creature AI reaction
-    if(!c->hasUnitState(UNIT_STAT_CHASE | UNIT_STAT_SEARCHING | UNIT_STAT_FLEEING))
+    if(c->isAggressive() && !c->hasUnitState(UNIT_STAT_CHASE | UNIT_STAT_SEARCHING | UNIT_STAT_FLEEING))
     {
         if( c->AI() && c->IsWithinSightDist(pl) /*c->AI()->IsVisible(pl)*/ && !c->IsInEvadeMode() )
@@ -82,5 +82,5 @@
 inline void CreatureCreatureRelocationWorker(Creature* c1, Creature* c2)
 {
-    if(!c1->hasUnitState(UNIT_STAT_CHASE | UNIT_STAT_SEARCHING | UNIT_STAT_FLEEING))
+    if(c1->isAggressive() && !c1->hasUnitState(UNIT_STAT_CHASE | UNIT_STAT_SEARCHING | UNIT_STAT_FLEEING))
     {
         if( c1->AI() && c1->IsWithinSightDist(c2) /*c1->AI()->IsVisible(c2)*/ && !c1->IsInEvadeMode() )
@@ -88,5 +88,5 @@
     }
 
-    if(!c2->hasUnitState(UNIT_STAT_CHASE | UNIT_STAT_SEARCHING | UNIT_STAT_FLEEING))
+    if(c2->isAggressive() && !c2->hasUnitState(UNIT_STAT_CHASE | UNIT_STAT_SEARCHING | UNIT_STAT_FLEEING))
     {
         if( c2->AI() && c1->IsWithinSightDist(c2) /*c2->AI()->IsVisible(c1)*/ && !c2->IsInEvadeMode() )
Index: /trunk/src/game/Pet.cpp
===================================================================
--- /trunk/src/game/Pet.cpp (revision 262)
+++ /trunk/src/game/Pet.cpp (revision 265)
@@ -1467,5 +1467,6 @@
 
     // same spells don't have autocast option
-    if (spellInfo->AttributesEx & SPELL_ATTR_EX_UNAUTOCASTABLE_BY_PET) active = ACT_CAST;
+    if (spellInfo->AttributesEx & SPELL_ATTR_EX_UNAUTOCASTABLE_BY_PET)
+        active = ACT_CAST;
 
     PetSpellMap::iterator itr = m_spells.find(spell_id);
@@ -1543,5 +1544,5 @@
         CastSpell(this, spell_id, true);
     else if(state == PETSPELL_NEW)
-        m_charmInfo->AddSpellToAB(oldspell_id, spell_id, active);
+        m_charmInfo->AddSpellToAB(oldspell_id, spell_id, (ActiveStates)active);
 
     if(newspell->active == ACT_ENABLED)
Index: /trunk/src/game/SpellMgr.cpp
===================================================================
--- /trunk/src/game/SpellMgr.cpp (revision 264)
+++ /trunk/src/game/SpellMgr.cpp (revision 265)
@@ -1073,5 +1073,5 @@
     else if(spellInfo_1->SpellFamilyName == SPELLFAMILY_POTION)
     {
-        if(spellId_spec_1 || spellId_spec_2))
+        if(spellId_spec_1 || spellId_spec_2)
             return false;
     }
