Index: /trunk/src/game/SpellEffects.cpp
===================================================================
--- /trunk/src/game/SpellEffects.cpp (revision 160)
+++ /trunk/src/game/SpellEffects.cpp (revision 161)
@@ -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
  */
 
@@ -3919,54 +3919,34 @@
         return;
 
-    if(m_caster->getClass() == CLASS_HUNTER)
-    {
-        // cast finish successfully
-        //SendChannelUpdate(0);
-        finish();
-
-        Pet* pet = new Pet(HUNTER_PET);
-
-        if(!pet->CreateBaseAtCreature(creatureTarget))
-        {
-            delete pet;
-            return;
-        }
-
-        creatureTarget->setDeathState(JUST_DIED);
-        creatureTarget->RemoveCorpse();
-        creatureTarget->SetHealth(0);                       // just for nice GM-mode view
-
-        pet->SetUInt64Value(UNIT_FIELD_SUMMONEDBY, m_caster->GetGUID());
-        pet->SetUInt64Value(UNIT_FIELD_CREATEDBY, m_caster->GetGUID());
-        pet->SetUInt32Value(UNIT_FIELD_FACTIONTEMPLATE,m_caster->getFaction());
-        pet->SetUInt32Value(UNIT_CREATED_BY_SPELL, m_spellInfo->Id);
-
-        if(!pet->InitStatsForLevel(creatureTarget->getLevel()))
-        {
-            sLog.outError("ERROR: InitStatsForLevel() in EffectTameCreature failed! Pet deleted.");
-            delete pet;
-            return;
-        }
-
-        // prepare visual effect for levelup
-        pet->SetUInt32Value(UNIT_FIELD_LEVEL,creatureTarget->getLevel()-1);
-
-        pet->GetCharmInfo()->SetPetNumber(objmgr.GeneratePetNumber(), true);
-                                                            // this enables pet details window (Shift+P)
-        pet->AIM_Initialize();
-        pet->InitPetCreateSpells();
-        pet->SetHealth(pet->GetMaxHealth());
-
-        MapManager::Instance().GetMap(pet->GetMapId(), pet)->Add((Creature*)pet);
-
-        // visual effect for levelup
-        pet->SetUInt32Value(UNIT_FIELD_LEVEL,creatureTarget->getLevel());
-
-        if(m_caster->GetTypeId() == TYPEID_PLAYER)
-        {
-            m_caster->SetPet(pet);
-            pet->SavePetToDB(PET_SAVE_AS_CURRENT);
-            ((Player*)m_caster)->PetSpellInitialize();
-        }
+    if(m_caster->getClass() != CLASS_HUNTER)
+        return;
+
+    // cast finish successfully
+    //SendChannelUpdate(0);
+    finish();
+
+    Pet* pet = m_caster->CreateTamedPetFrom(creatureTarget,m_spellInfo->Id);
+
+    // kill original creature
+    creatureTarget->setDeathState(JUST_DIED);
+    creatureTarget->RemoveCorpse();
+    creatureTarget->SetHealth(0);                       // just for nice GM-mode view
+
+    // prepare visual effect for levelup
+    pet->SetUInt32Value(UNIT_FIELD_LEVEL,creatureTarget->getLevel()-1);
+
+    // add to world
+    MapManager::Instance().GetMap(pet->GetMapId(), pet)->Add((Creature*)pet);
+
+    // visual effect for levelup
+    pet->SetUInt32Value(UNIT_FIELD_LEVEL,creatureTarget->getLevel());
+
+    // caster have pet now
+    m_caster->SetPet(pet);
+
+    if(m_caster->GetTypeId() == TYPEID_PLAYER)
+    {
+        pet->SavePetToDB(PET_SAVE_AS_CURRENT);
+        ((Player*)m_caster)->PetSpellInitialize();
     }
 }
Index: /trunk/src/game/Unit.h
===================================================================
--- /trunk/src/game/Unit.h (revision 149)
+++ /trunk/src/game/Unit.h (revision 161)
@@ -11,5 +11,5 @@
  * 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.
  *
@@ -217,4 +217,6 @@
     HITINFO_RESIST              = 0x00000040,               // resisted atleast some damage
     HITINFO_CRITICALHIT         = 0x00000080,
+    HITINFO_UNK2                = 0x00000100,               // wotlk?
+    HITINFO_UNK3                = 0x00002000,               // wotlk?
     HITINFO_GLANCING            = 0x00004000,
     HITINFO_CRUSHING            = 0x00008000,
@@ -513,5 +515,5 @@
     UNIT_NPC_FLAG_STABLEMASTER          = 0x00400000,       // 100%
     UNIT_NPC_FLAG_GUILD_BANKER          = 0x00800000,       // cause client to send 997 opcode
-    UNIT_NPC_FLAG_UNK3                  = 0x01000000,       // cause client to send 1015 opcode
+    UNIT_NPC_FLAG_SPELLCLICK            = 0x01000000,       // cause client to send 1015 opcode (spell click)
     UNIT_NPC_FLAG_GUARD                 = 0x10000000,       // custom flag for guards
     UNIT_NPC_FLAG_OUTDOORPVP            = 0x20000000,       // custom flag for outdoor pvp creatures
@@ -648,6 +650,6 @@
         bool HasCommandState(CommandStates state) { return (m_CommandState == state); }
         void SetReactState(ReactStates st) { m_reactState = st; }
-		ReactStates GetReactState() { return m_reactState; }
-		bool HasReactState(ReactStates state) { return (m_reactState == state); }
+        ReactStates GetReactState() { return m_reactState; }
+        bool HasReactState(ReactStates state) { return (m_reactState == state); }
 
         void InitPossessCreateSpells();
@@ -992,4 +994,6 @@
         CharmInfo* GetCharmInfo() { return m_charmInfo; }
         CharmInfo* InitCharmInfo(Unit* charm);
+
+        Pet* CreateTamedPetFrom(Creature* creatureTarget,uint32 spell_id = 0);
 
         bool AddAura(Aura *aur);
@@ -1330,4 +1334,5 @@
         bool HandleHasteAuraProc(Unit *pVictim, SpellEntry const *spellProto, uint32 effIndex, uint32 damage, Aura* triggredByAura, SpellEntry const * procSpell, uint32 procFlag,uint32 cooldown);
         bool HandleOverrideClassScriptAuraProc(Unit *pVictim, int32 scriptId, uint32 damage, Aura* triggredByAura, SpellEntry const *procSpell,uint32 cooldown);
+
         uint32 m_state;                                     // Even derived shouldn't modify
         uint32 m_CombatTimer;
Index: /trunk/src/game/Unit.cpp
===================================================================
--- /trunk/src/game/Unit.cpp (revision 157)
+++ /trunk/src/game/Unit.cpp (revision 161)
@@ -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
  */
 
@@ -1697,54 +1697,58 @@
     }
 
-    AuraList const& vSplitDamageFlat = pVictim->GetAurasByType(SPELL_AURA_SPLIT_DAMAGE_FLAT);
-    for(AuraList::const_iterator i = vSplitDamageFlat.begin(), next; i != vSplitDamageFlat.end() && RemainingDamage >= 0; i = next)
-    {
-        next = i; ++next;
-
-        // check damage school mask
-        if(((*i)->GetModifier()->m_miscvalue & schoolMask)==0)
-            continue;
-
-        // Damage can be splitted only if aura has an alive caster
-        Unit *caster = (*i)->GetCaster();
-        if(!caster || caster == pVictim || !caster->IsInWorld() || !caster->isAlive())
-            continue;
-
-        int32 currentAbsorb;
-        if (RemainingDamage >= (*i)->GetModifier()->m_amount)
-            currentAbsorb = (*i)->GetModifier()->m_amount;
-        else
-            currentAbsorb = RemainingDamage;
-
-        RemainingDamage -= currentAbsorb;
-
-        SendSpellNonMeleeDamageLog(caster, (*i)->GetSpellProto()->Id, currentAbsorb, schoolMask, 0, 0, false, 0, false);
-
-        CleanDamage cleanDamage = CleanDamage(currentAbsorb, BASE_ATTACK, MELEE_HIT_NORMAL);
-        DealDamage(caster, currentAbsorb, &cleanDamage, DIRECT_DAMAGE, schoolMask, (*i)->GetSpellProto(), false);
-    }
-
-    AuraList const& vSplitDamagePct = pVictim->GetAurasByType(SPELL_AURA_SPLIT_DAMAGE_PCT);
-    for(AuraList::const_iterator i = vSplitDamagePct.begin(), next; i != vSplitDamagePct.end() && RemainingDamage >= 0; i = next)
-    {
-        next = i; ++next;
-
-        // check damage school mask
-        if(((*i)->GetModifier()->m_miscvalue & schoolMask)==0)
-            continue;
-
-        // Damage can be splitted only if aura has an alive caster
-        Unit *caster = (*i)->GetCaster();
-        if(!caster || caster == pVictim || !caster->IsInWorld() || !caster->isAlive())
-            continue;
-
-        int32 splitted = int32(RemainingDamage * (*i)->GetModifier()->m_amount / 100.0f);
-
-        RemainingDamage -= splitted;
-
-        SendSpellNonMeleeDamageLog(caster, (*i)->GetSpellProto()->Id, splitted, schoolMask, 0, 0, false, 0, false);
-
-        CleanDamage cleanDamage = CleanDamage(splitted, BASE_ATTACK, MELEE_HIT_NORMAL);
-        DealDamage(caster, splitted, &cleanDamage, DIRECT_DAMAGE, schoolMask, (*i)->GetSpellProto(), false);
+    // only split damage if not damaing yourself
+    if(pVictim != this)
+    {
+        AuraList const& vSplitDamageFlat = pVictim->GetAurasByType(SPELL_AURA_SPLIT_DAMAGE_FLAT);
+        for(AuraList::const_iterator i = vSplitDamageFlat.begin(), next; i != vSplitDamageFlat.end() && RemainingDamage >= 0; i = next)
+        {
+            next = i; ++next;
+
+            // check damage school mask
+            if(((*i)->GetModifier()->m_miscvalue & schoolMask)==0)
+                continue;
+
+            // Damage can be splitted only if aura has an alive caster
+            Unit *caster = (*i)->GetCaster();
+            if(!caster || caster == pVictim || !caster->IsInWorld() || !caster->isAlive())
+                continue;
+
+            int32 currentAbsorb;
+            if (RemainingDamage >= (*i)->GetModifier()->m_amount)
+                currentAbsorb = (*i)->GetModifier()->m_amount;
+            else
+                currentAbsorb = RemainingDamage;
+
+            RemainingDamage -= currentAbsorb;
+
+            SendSpellNonMeleeDamageLog(caster, (*i)->GetSpellProto()->Id, currentAbsorb, schoolMask, 0, 0, false, 0, false);
+
+            CleanDamage cleanDamage = CleanDamage(currentAbsorb, BASE_ATTACK, MELEE_HIT_NORMAL);
+            DealDamage(caster, currentAbsorb, &cleanDamage, DIRECT_DAMAGE, schoolMask, (*i)->GetSpellProto(), false);
+        }
+
+        AuraList const& vSplitDamagePct = pVictim->GetAurasByType(SPELL_AURA_SPLIT_DAMAGE_PCT);
+        for(AuraList::const_iterator i = vSplitDamagePct.begin(), next; i != vSplitDamagePct.end() && RemainingDamage >= 0; i = next)
+        {
+            next = i; ++next;
+
+            // check damage school mask
+            if(((*i)->GetModifier()->m_miscvalue & schoolMask)==0)
+                continue;
+
+            // Damage can be splitted only if aura has an alive caster
+            Unit *caster = (*i)->GetCaster();
+            if(!caster || caster == pVictim || !caster->IsInWorld() || !caster->isAlive())
+                continue;
+
+            int32 splitted = int32(RemainingDamage * (*i)->GetModifier()->m_amount / 100.0f);
+
+            RemainingDamage -= splitted;
+
+            SendSpellNonMeleeDamageLog(caster, (*i)->GetSpellProto()->Id, splitted, schoolMask, 0, 0, false, 0, false);
+
+            CleanDamage cleanDamage = CleanDamage(splitted, BASE_ATTACK, MELEE_HIT_NORMAL);
+            DealDamage(caster, splitted, &cleanDamage, DIRECT_DAMAGE, schoolMask, (*i)->GetSpellProto(), false);
+        }
     }
 
@@ -1945,5 +1949,5 @@
 
                 // after parry nearest next attack time will reduced at %40 from full attack time.
-                // The delay cannot be reduced to less than 20% of your weapon's base swing delay.
+                // The delay cannot be reduced to less than 20% of your weapon base swing delay.
                 if (pVictim->haveOffhandWeapon() && offtime < basetime)
                 {
@@ -6490,5 +6494,5 @@
         case 836:                                           // Improved Blizzard (Rank 1)
         {
-            if( !procSpell || procSpell->SpellVisual!=9487)
+            if (!procSpell || procSpell->SpellVisual!=9487)
                 return false;
             triggered_spell_id = 12484;
@@ -6497,5 +6501,5 @@
         case 988:                                           // Improved Blizzard (Rank 2)
         {
-            if( !procSpell || procSpell->SpellVisual!=9487)
+            if (!procSpell || procSpell->SpellVisual!=9487)
                 return false;
             triggered_spell_id = 12485;
@@ -6504,5 +6508,5 @@
         case 989:                                           // Improved Blizzard (Rank 3)
         {
-            if( !procSpell || procSpell->SpellVisual!=9487)
+            if (!procSpell || procSpell->SpellVisual!=9487)
                 return false;
             triggered_spell_id = 12486;
@@ -7303,4 +7307,5 @@
         }
     }
+
     // .. taken pct: dummy auras
     AuraList const& mDummyAuras = pVictim->GetAurasByType(SPELL_AURA_DUMMY);
@@ -7536,5 +7541,5 @@
             }
             // Holy Nova - 14%
-            else if ((spellProto->SpellFamilyFlags & 0x400000LL) && spellProto->SpellIconID == 1874) 
+            else if ((spellProto->SpellFamilyFlags & 0x400000LL) && spellProto->SpellIconID == 1874)
             {
                 CastingTime = 500;
@@ -7776,5 +7781,4 @@
         return healamount;
 
-
     int32 AdvertisedBenefit = SpellBaseHealingBonus(GetSpellSchoolMask(spellProto));
     uint32 CastingTime = GetSpellCastTime(spellProto);
@@ -7881,5 +7885,5 @@
             case SPELLFAMILY_PRIEST:
                 // Holy Nova - 14%
-                if ((spellProto->SpellFamilyFlags & 0x8000000LL) && spellProto->SpellIconID == 1874) 
+                if ((spellProto->SpellFamilyFlags & 0x8000000LL) && spellProto->SpellIconID == 1874)
                     CastingTime = 500;
                 break;
@@ -8643,5 +8647,5 @@
     // raw invisibility
     bool invisible = (m_invisibilityMask != 0 || u->m_invisibilityMask !=0);
-    
+
     // detectable invisibility case
     if( invisible && (
@@ -10376,5 +10380,5 @@
     WorldPacket data(SMSG_SPELL_COOLDOWN, 8+1+4+4);
     data << uint64(GetGUID());
-    data << uint8(0x0);
+    data << uint8(0x0);                                     // flags (0x1, 0x2)
     data << uint32(spellid);
     data << uint32(cooltime);
@@ -10887,2 +10891,33 @@
         pet->RemoveAurasDueToSpell(petSpell->GetAura(pet->GetEntry()));
 }
+
+Pet* Unit::CreateTamedPetFrom(Creature* creatureTarget,uint32 spell_id)
+{
+    Pet* pet = new Pet(HUNTER_PET);
+
+    if(!pet->CreateBaseAtCreature(creatureTarget))
+    {
+        delete pet;
+        return NULL;
+    }
+
+    pet->SetUInt64Value(UNIT_FIELD_SUMMONEDBY, this->GetGUID());
+    pet->SetUInt64Value(UNIT_FIELD_CREATEDBY, this->GetGUID());
+    pet->SetUInt32Value(UNIT_FIELD_FACTIONTEMPLATE,this->getFaction());
+    pet->SetUInt32Value(UNIT_CREATED_BY_SPELL, spell_id);
+
+    if(!pet->InitStatsForLevel(creatureTarget->getLevel()))
+    {
+        sLog.outError("ERROR: Pet::InitStatsForLevel() failed for creature (Entry: %u)!",creatureTarget->GetEntry());
+        delete pet;
+        return NULL;
+    }
+
+    pet->GetCharmInfo()->SetPetNumber(objmgr.GeneratePetNumber(), true);
+    // this enables pet details window (Shift+P)
+    pet->AIM_Initialize();
+    pet->InitPetCreateSpells();
+    pet->SetHealth(pet->GetMaxHealth());
+
+    return pet;
+}
Index: /trunk/src/game/SpellAuras.cpp
===================================================================
--- /trunk/src/game/SpellAuras.cpp (revision 139)
+++ /trunk/src/game/SpellAuras.cpp (revision 161)
@@ -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
  */
 
@@ -2912,5 +2912,4 @@
         if(m_target->GetTypeId() == TYPEID_PLAYER)
             ((Player*)m_target)->setFactionForRace(m_target->getRace());
-
         else if(m_target->GetTypeId() == TYPEID_UNIT)
         {
@@ -4625,34 +4624,20 @@
 void Aura::HandleAuraModIncreaseHealth(bool apply, bool Real)
 {
-    // Special case with temporary increase max/current health
-    switch(GetId())
-    {
-        case 12976:                                         // Warrior Last Stand triggered spell
-        case 28726:                                         // Nightmare Seed ( Nightmare Seed )
-        case 34511:                                         // Valor (Bulwark of Kings, Bulwark of the Ancient Kings)
-        case 44055:                                         // Tremendous Fortitude (Battlemaster's Alacrity)
-        {
-            if(Real)
-            {
-                if(apply)
-                {
-                    m_target->HandleStatModifier(UNIT_MOD_HEALTH, TOTAL_VALUE, float(m_modifier.m_amount), apply);
-                    m_target->ModifyHealth(m_modifier.m_amount);
-                }
-                else
-                {
-                    if (int32(m_target->GetHealth()) > m_modifier.m_amount)
-                        m_target->ModifyHealth(-m_modifier.m_amount);
-                    else
-                        m_target->SetHealth(1);
-                    m_target->HandleStatModifier(UNIT_MOD_HEALTH, TOTAL_VALUE, float(m_modifier.m_amount), apply);
-                }
-            }
-            return;
-        }
-    }
-
-    // generic case
-    m_target->HandleStatModifier(UNIT_MOD_HEALTH, TOTAL_VALUE, float(m_modifier.m_amount), apply);
+    if(Real)
+    {
+        if(apply)
+        {
+            m_target->HandleStatModifier(UNIT_MOD_HEALTH, TOTAL_VALUE, float(m_modifier.m_amount), apply);
+            m_target->ModifyHealth(m_modifier.m_amount);
+        }
+        else
+        {
+            if (int32(m_target->GetHealth()) > m_modifier.m_amount)
+                m_target->ModifyHealth(-m_modifier.m_amount);
+            else
+                m_target->SetHealth(1);
+            m_target->HandleStatModifier(UNIT_MOD_HEALTH, TOTAL_VALUE, float(m_modifier.m_amount), apply);
+        }
+    }
 }
 
Index: /trunk/src/game/Creature.cpp
===================================================================
--- /trunk/src/game/Creature.cpp (revision 136)
+++ /trunk/src/game/Creature.cpp (revision 161)
@@ -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
  */
 
@@ -122,5 +122,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_regenTimer(2000), m_defaultMovementType(IDLE_MOTION_TYPE), m_equipmentId(0),
 m_AlreadyCallAssistence(false), m_regenHealth(true), m_AI_locked(false), m_isDeadByDefault(false),
@@ -574,5 +574,4 @@
 
     TrainerSpellData const* trainer_spells = GetTrainerSpells();
-
 
     if(!trainer_spells || trainer_spells->spellList.empty())
@@ -835,4 +834,5 @@
     uint32 zoneid=GetZoneId();
     uint64 guid=GetGUID();
+
     GossipOption const *gossip=GetGossipOption( action );
     uint32 textid;
@@ -852,5 +852,5 @@
         case GOSSIP_OPTION_GOSSIP:
             player->PlayerTalkClass->CloseGossip();
-            player->PlayerTalkClass->SendTalking( textid );
+            player->PlayerTalkClass->SendTalking(textid);
             break;
         case GOSSIP_OPTION_OUTDOORPVP:
@@ -858,5 +858,5 @@
             break;
         case GOSSIP_OPTION_SPIRITHEALER:
-            if( player->isDead() )
+            if (player->isDead())
                 CastSpell(this,17251,true,NULL,NULL,player->GetGUID());
             break;
@@ -1394,5 +1394,5 @@
         if (force)
         {
-            for (uint8 i=0;i<3;i++)
+            for (uint8 i = 0; i < 3; i++)
             {
                 SetUInt32Value( UNIT_VIRTUAL_ITEM_SLOT_DISPLAY + i, 0);
@@ -1410,5 +1410,5 @@
 
     m_equipmentId = equip_entry;
-    for (uint8 i=0;i<3;i++)
+    for (uint8 i = 0; i < 3; i++)
     {
         SetUInt32Value( UNIT_VIRTUAL_ITEM_SLOT_DISPLAY + i, einfo->equipmodel[i]);
@@ -2023,5 +2023,4 @@
 }
 
-
 VendorItemData const* Creature::GetVendorItems() const
 {
@@ -2053,5 +2052,5 @@
         if((vCount->count + diff * pProto->BuyCount) >= vItem->maxcount )
         {
-            m_vendorItemCounts.erase(itr);        
+            m_vendorItemCounts.erase(itr);
             return vItem->maxcount;
         }
Index: /trunk/sql/updates/146_world.sql
===================================================================
--- /trunk/sql/updates/146_world.sql (revision 160)
+++ /trunk/sql/updates/146_world.sql (revision 161)
@@ -6,5 +6,5 @@
   `spell_effect` int(10) NOT NULL default '0',
   `type` smallint(3) unsigned NOT NULL default '0',
-  `comment` text NOT NULL default '',
+  `comment` text NOT NULL,
   PRIMARY KEY (`spell_trigger`)
 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
