Show
Ignore:
Timestamp:
11/19/08 13:27:40 (17 years ago)
Author:
yumileroy
Message:

[svn] * Merge Temp dev SVN with Assembla.
* Changes include:

  • Implementation of w12x's Outdoor PvP and Game Event Systems.
  • Temporary removal of IRC Chat Bot (until infinite loop when disabled is fixed).
  • All mangos -> trinity (to convert your mangos_string table, please run mangos_string_to_trinity_string.sql).
  • Improved Config cleanup.
  • And many more changes.

Original author: Seline
Date: 2008-10-14 11:57:03-05:00

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/game/Spell.cpp

    r37 r44  
    11/* 
    2  * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/> 
     2 * Copyright (C) 2008 Trinity <http://www.trinitycore.org/> 
     3 * 
     4 * Thanks to the original authors: MaNGOS <http://www.mangosproject.org/> 
    35 * 
    46 * This program is free software; you can redistribute it and/or modify 
     
    911 * This program is distributed in the hope that it will be useful, 
    1012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
    11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
     13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 
    1214 * GNU General Public License for more details. 
    1315 * 
    1416 * You should have received a copy of the GNU General Public License 
    1517 * along with this program; if not, write to the Free Software 
    16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
     18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 
    1719 */ 
    1820 
     
    184186 
    185187        *data >> m_srcX >> m_srcY >> m_srcZ; 
    186         if(!MaNGOS::IsValidMapCoord(m_srcX, m_srcY, m_srcZ)) 
     188        if(!Trinity::IsValidMapCoord(m_srcX, m_srcY, m_srcZ)) 
    187189            return false; 
    188190    } 
     
    194196 
    195197        *data >> m_destX >> m_destY >> m_destZ; 
    196         if(!MaNGOS::IsValidMapCoord(m_destX, m_destY, m_destZ)) 
     198        if(!Trinity::IsValidMapCoord(m_destX, m_destY, m_destZ)) 
    197199            return false; 
    198200    } 
     
    464466                            float max_range = GetSpellMaxRange(srange); 
    465467 
    466                             CellPair p(MaNGOS::ComputeCellPair(m_caster->GetPositionX(), m_caster->GetPositionY())); 
     468                            CellPair p(Trinity::ComputeCellPair(m_caster->GetPositionX(), m_caster->GetPositionY())); 
    467469                            Cell cell(p); 
    468470                            cell.data.Part.reserved = ALL_DISTRICT; 
     
    471473                            WorldObject* result = NULL; 
    472474 
    473                             MaNGOS::CannibalizeObjectCheck u_check(m_caster, max_range); 
    474                             MaNGOS::WorldObjectSearcher<MaNGOS::CannibalizeObjectCheck > searcher(result, u_check); 
    475  
    476                             TypeContainerVisitor<MaNGOS::WorldObjectSearcher<MaNGOS::CannibalizeObjectCheck >, GridTypeMapContainer > grid_searcher(searcher); 
     475                            Trinity::CannibalizeObjectCheck u_check(m_caster, max_range); 
     476                            Trinity::WorldObjectSearcher<Trinity::CannibalizeObjectCheck > searcher(result, u_check); 
     477 
     478                            TypeContainerVisitor<Trinity::WorldObjectSearcher<Trinity::CannibalizeObjectCheck >, GridTypeMapContainer > grid_searcher(searcher); 
    477479                            CellLock<GridReadGuard> cell_lock(cell, p); 
    478480                            cell_lock->Visit(cell_lock, grid_searcher, *MapManager::Instance().GetMap(m_caster->GetMapId(), m_caster)); 
     
    480482                            if(!result) 
    481483                            { 
    482                                 TypeContainerVisitor<MaNGOS::WorldObjectSearcher<MaNGOS::CannibalizeObjectCheck >, WorldTypeMapContainer > world_searcher(searcher); 
     484                                TypeContainerVisitor<Trinity::WorldObjectSearcher<Trinity::CannibalizeObjectCheck >, WorldTypeMapContainer > world_searcher(searcher); 
    483485                                cell_lock->Visit(cell_lock, world_searcher, *MapManager::Instance().GetMap(m_caster->GetMapId(), m_caster)); 
    484486                            } 
     
    12021204            float max_range = radius + unMaxTargets * CHAIN_SPELL_JUMP_RADIUS; 
    12031205 
    1204             CellPair p(MaNGOS::ComputeCellPair(m_caster->GetPositionX(), m_caster->GetPositionY())); 
     1206            CellPair p(Trinity::ComputeCellPair(m_caster->GetPositionX(), m_caster->GetPositionY())); 
    12051207            Cell cell(p); 
    12061208            cell.data.Part.reserved = ALL_DISTRICT; 
     
    12101212 
    12111213            { 
    1212                 MaNGOS::AnyAoETargetUnitInObjectRangeCheck u_check(m_caster, m_caster, max_range); 
    1213                 MaNGOS::UnitListSearcher<MaNGOS::AnyAoETargetUnitInObjectRangeCheck> searcher(tempUnitMap, u_check); 
    1214  
    1215                 TypeContainerVisitor<MaNGOS::UnitListSearcher<MaNGOS::AnyAoETargetUnitInObjectRangeCheck>, WorldTypeMapContainer > world_unit_searcher(searcher); 
    1216                 TypeContainerVisitor<MaNGOS::UnitListSearcher<MaNGOS::AnyAoETargetUnitInObjectRangeCheck>, GridTypeMapContainer >  grid_unit_searcher(searcher); 
     1214                Trinity::AnyAoETargetUnitInObjectRangeCheck u_check(m_caster, m_caster, max_range); 
     1215                Trinity::UnitListSearcher<Trinity::AnyAoETargetUnitInObjectRangeCheck> searcher(tempUnitMap, u_check); 
     1216 
     1217                TypeContainerVisitor<Trinity::UnitListSearcher<Trinity::AnyAoETargetUnitInObjectRangeCheck>, WorldTypeMapContainer > world_unit_searcher(searcher); 
     1218                TypeContainerVisitor<Trinity::UnitListSearcher<Trinity::AnyAoETargetUnitInObjectRangeCheck>, GridTypeMapContainer >  grid_unit_searcher(searcher); 
    12171219 
    12181220                CellLock<GridReadGuard> cell_lock(cell, p); 
     
    12981300                    max_range = radius + unMaxTargets * CHAIN_SPELL_JUMP_RADIUS; 
    12991301 
    1300                 CellPair p(MaNGOS::ComputeCellPair(m_caster->GetPositionX(), m_caster->GetPositionY())); 
     1302                CellPair p(Trinity::ComputeCellPair(m_caster->GetPositionX(), m_caster->GetPositionY())); 
    13011303                Cell cell(p); 
    13021304                cell.data.Part.reserved = ALL_DISTRICT; 
     
    13091311 
    13101312                    { 
    1311                         MaNGOS::AnyAoETargetUnitInObjectRangeCheck u_check(pUnitTarget, originalCaster, max_range); 
    1312                         MaNGOS::UnitListSearcher<MaNGOS::AnyAoETargetUnitInObjectRangeCheck> searcher(tempUnitMap, u_check); 
    1313  
    1314                         TypeContainerVisitor<MaNGOS::UnitListSearcher<MaNGOS::AnyAoETargetUnitInObjectRangeCheck>, WorldTypeMapContainer > world_unit_searcher(searcher); 
    1315                         TypeContainerVisitor<MaNGOS::UnitListSearcher<MaNGOS::AnyAoETargetUnitInObjectRangeCheck>, GridTypeMapContainer >  grid_unit_searcher(searcher); 
     1313                        Trinity::AnyAoETargetUnitInObjectRangeCheck u_check(pUnitTarget, originalCaster, max_range); 
     1314                        Trinity::UnitListSearcher<Trinity::AnyAoETargetUnitInObjectRangeCheck> searcher(tempUnitMap, u_check); 
     1315 
     1316                        TypeContainerVisitor<Trinity::UnitListSearcher<Trinity::AnyAoETargetUnitInObjectRangeCheck>, WorldTypeMapContainer > world_unit_searcher(searcher); 
     1317                        TypeContainerVisitor<Trinity::UnitListSearcher<Trinity::AnyAoETargetUnitInObjectRangeCheck>, GridTypeMapContainer >  grid_unit_searcher(searcher); 
    13161318 
    13171319                        CellLock<GridReadGuard> cell_lock(cell, p); 
     
    13631365            if (m_spellInfo->Effect[i]!=SPELL_EFFECT_PERSISTENT_AREA_AURA) 
    13641366            { 
    1365                 CellPair p(MaNGOS::ComputeCellPair(m_targets.m_destX, m_targets.m_destY)); 
     1367                CellPair p(Trinity::ComputeCellPair(m_targets.m_destX, m_targets.m_destY)); 
    13661368                Cell cell(p); 
    13671369                cell.data.Part.reserved = ALL_DISTRICT; 
    13681370                cell.SetNoCreate(); 
    13691371 
    1370                 MaNGOS::SpellNotifierCreatureAndPlayer notifier(*this, TagUnitMap, radius, PUSH_DEST_CENTER,SPELL_TARGETS_AOE_DAMAGE); 
    1371  
    1372                 TypeContainerVisitor<MaNGOS::SpellNotifierCreatureAndPlayer, WorldTypeMapContainer > world_object_notifier(notifier); 
    1373                 TypeContainerVisitor<MaNGOS::SpellNotifierCreatureAndPlayer, GridTypeMapContainer >  grid_object_notifier(notifier); 
     1372                Trinity::SpellNotifierCreatureAndPlayer notifier(*this, TagUnitMap, radius, PUSH_DEST_CENTER,SPELL_TARGETS_AOE_DAMAGE); 
     1373 
     1374                TypeContainerVisitor<Trinity::SpellNotifierCreatureAndPlayer, WorldTypeMapContainer > world_object_notifier(notifier); 
     1375                TypeContainerVisitor<Trinity::SpellNotifierCreatureAndPlayer, GridTypeMapContainer >  grid_object_notifier(notifier); 
    13741376 
    13751377                CellLock<GridReadGuard> cell_lock(cell, p); 
     
    14461448        case TARGET_ALL_AROUND_CASTER: 
    14471449        { 
    1448             CellPair p(MaNGOS::ComputeCellPair(m_caster->GetPositionX(), m_caster->GetPositionY())); 
     1450            CellPair p(Trinity::ComputeCellPair(m_caster->GetPositionX(), m_caster->GetPositionY())); 
    14491451            Cell cell(p); 
    14501452            cell.data.Part.reserved = ALL_DISTRICT; 
    14511453            cell.SetNoCreate(); 
    14521454 
    1453             MaNGOS::SpellNotifierCreatureAndPlayer notifier(*this, TagUnitMap, radius, PUSH_SELF_CENTER,SPELL_TARGETS_AOE_DAMAGE); 
    1454  
    1455             TypeContainerVisitor<MaNGOS::SpellNotifierCreatureAndPlayer, WorldTypeMapContainer > world_object_notifier(notifier); 
    1456             TypeContainerVisitor<MaNGOS::SpellNotifierCreatureAndPlayer, GridTypeMapContainer >  grid_object_notifier(notifier); 
     1455            Trinity::SpellNotifierCreatureAndPlayer notifier(*this, TagUnitMap, radius, PUSH_SELF_CENTER,SPELL_TARGETS_AOE_DAMAGE); 
     1456 
     1457            TypeContainerVisitor<Trinity::SpellNotifierCreatureAndPlayer, WorldTypeMapContainer > world_object_notifier(notifier); 
     1458            TypeContainerVisitor<Trinity::SpellNotifierCreatureAndPlayer, GridTypeMapContainer >  grid_object_notifier(notifier); 
    14571459 
    14581460            CellLock<GridReadGuard> cell_lock(cell, p); 
     
    14621464        case TARGET_ALL_FRIENDLY_UNITS_AROUND_CASTER: 
    14631465        { 
    1464             CellPair p(MaNGOS::ComputeCellPair(m_caster->GetPositionX(), m_caster->GetPositionY())); 
     1466            CellPair p(Trinity::ComputeCellPair(m_caster->GetPositionX(), m_caster->GetPositionY())); 
    14651467            Cell cell(p); 
    14661468            cell.data.Part.reserved = ALL_DISTRICT; 
    14671469            cell.SetNoCreate(); 
    14681470 
    1469             MaNGOS::SpellNotifierCreatureAndPlayer notifier(*this, TagUnitMap, radius, PUSH_SELF_CENTER,SPELL_TARGETS_FRIENDLY); 
    1470  
    1471             TypeContainerVisitor<MaNGOS::SpellNotifierCreatureAndPlayer, WorldTypeMapContainer > world_object_notifier(notifier); 
    1472             TypeContainerVisitor<MaNGOS::SpellNotifierCreatureAndPlayer, GridTypeMapContainer >  grid_object_notifier(notifier); 
     1471            Trinity::SpellNotifierCreatureAndPlayer notifier(*this, TagUnitMap, radius, PUSH_SELF_CENTER,SPELL_TARGETS_FRIENDLY); 
     1472 
     1473            TypeContainerVisitor<Trinity::SpellNotifierCreatureAndPlayer, WorldTypeMapContainer > world_object_notifier(notifier); 
     1474            TypeContainerVisitor<Trinity::SpellNotifierCreatureAndPlayer, GridTypeMapContainer >  grid_object_notifier(notifier); 
    14731475 
    14741476            CellLock<GridReadGuard> cell_lock(cell, p); 
     
    14781480        case TARGET_ALL_FRIENDLY_UNITS_IN_AREA: 
    14791481        { 
    1480             CellPair p(MaNGOS::ComputeCellPair(m_targets.m_destX, m_targets.m_destY)); 
     1482            CellPair p(Trinity::ComputeCellPair(m_targets.m_destX, m_targets.m_destY)); 
    14811483            Cell cell(p); 
    14821484            cell.data.Part.reserved = ALL_DISTRICT; 
    14831485            cell.SetNoCreate(); 
    14841486 
    1485             MaNGOS::SpellNotifierCreatureAndPlayer notifier(*this, TagUnitMap, radius, PUSH_DEST_CENTER,SPELL_TARGETS_FRIENDLY); 
    1486  
    1487             TypeContainerVisitor<MaNGOS::SpellNotifierCreatureAndPlayer, WorldTypeMapContainer > world_object_notifier(notifier); 
    1488             TypeContainerVisitor<MaNGOS::SpellNotifierCreatureAndPlayer, GridTypeMapContainer >  grid_object_notifier(notifier); 
     1487            Trinity::SpellNotifierCreatureAndPlayer notifier(*this, TagUnitMap, radius, PUSH_DEST_CENTER,SPELL_TARGETS_FRIENDLY); 
     1488 
     1489            TypeContainerVisitor<Trinity::SpellNotifierCreatureAndPlayer, WorldTypeMapContainer > world_object_notifier(notifier); 
     1490            TypeContainerVisitor<Trinity::SpellNotifierCreatureAndPlayer, GridTypeMapContainer >  grid_object_notifier(notifier); 
    14891491 
    14901492            CellLock<GridReadGuard> cell_lock(cell, p); 
     
    15541556        case TARGET_IN_FRONT_OF_CASTER: 
    15551557        { 
    1556             CellPair p(MaNGOS::ComputeCellPair(m_caster->GetPositionX(), m_caster->GetPositionY())); 
     1558            CellPair p(Trinity::ComputeCellPair(m_caster->GetPositionX(), m_caster->GetPositionY())); 
    15571559            Cell cell(p); 
    15581560            cell.data.Part.reserved = ALL_DISTRICT; 
     
    15601562 
    15611563            bool inFront = m_spellInfo->SpellVisual != 3879; 
    1562             MaNGOS::SpellNotifierCreatureAndPlayer notifier(*this, TagUnitMap, radius, inFront ? PUSH_IN_FRONT : PUSH_IN_BACK,SPELL_TARGETS_AOE_DAMAGE); 
    1563  
    1564             TypeContainerVisitor<MaNGOS::SpellNotifierCreatureAndPlayer, WorldTypeMapContainer > world_object_notifier(notifier); 
    1565             TypeContainerVisitor<MaNGOS::SpellNotifierCreatureAndPlayer, GridTypeMapContainer >  grid_object_notifier(notifier); 
     1564            Trinity::SpellNotifierCreatureAndPlayer notifier(*this, TagUnitMap, radius, inFront ? PUSH_IN_FRONT : PUSH_IN_BACK,SPELL_TARGETS_AOE_DAMAGE); 
     1565 
     1566            TypeContainerVisitor<Trinity::SpellNotifierCreatureAndPlayer, WorldTypeMapContainer > world_object_notifier(notifier); 
     1567            TypeContainerVisitor<Trinity::SpellNotifierCreatureAndPlayer, GridTypeMapContainer >  grid_object_notifier(notifier); 
    15661568 
    15671569            CellLock<GridReadGuard> cell_lock(cell, p); 
     
    16051607            if (m_spellInfo->Effect[i]!=SPELL_EFFECT_PERSISTENT_AREA_AURA) 
    16061608            { 
    1607                 CellPair p(MaNGOS::ComputeCellPair(m_caster->GetPositionX(), m_caster->GetPositionY())); 
     1609                CellPair p(Trinity::ComputeCellPair(m_caster->GetPositionX(), m_caster->GetPositionY())); 
    16081610                Cell cell(p); 
    16091611                cell.data.Part.reserved = ALL_DISTRICT; 
    16101612                cell.SetNoCreate(); 
    16111613 
    1612                 MaNGOS::SpellNotifierCreatureAndPlayer notifier(*this, TagUnitMap, radius, PUSH_DEST_CENTER,SPELL_TARGETS_AOE_DAMAGE); 
    1613  
    1614                 TypeContainerVisitor<MaNGOS::SpellNotifierCreatureAndPlayer, WorldTypeMapContainer > world_object_notifier(notifier); 
    1615                 TypeContainerVisitor<MaNGOS::SpellNotifierCreatureAndPlayer, GridTypeMapContainer >  grid_object_notifier(notifier); 
     1614                Trinity::SpellNotifierCreatureAndPlayer notifier(*this, TagUnitMap, radius, PUSH_DEST_CENTER,SPELL_TARGETS_AOE_DAMAGE); 
     1615 
     1616                TypeContainerVisitor<Trinity::SpellNotifierCreatureAndPlayer, WorldTypeMapContainer > world_object_notifier(notifier); 
     1617                TypeContainerVisitor<Trinity::SpellNotifierCreatureAndPlayer, GridTypeMapContainer >  grid_object_notifier(notifier); 
    16161618 
    16171619                CellLock<GridReadGuard> cell_lock(cell, p); 
     
    17241726 
    17251727                { 
    1726                     CellPair p(MaNGOS::ComputeCellPair(m_caster->GetPositionX(), m_caster->GetPositionY())); 
     1728                    CellPair p(Trinity::ComputeCellPair(m_caster->GetPositionX(), m_caster->GetPositionY())); 
    17271729                    Cell cell(p); 
    17281730                    cell.data.Part.reserved = ALL_DISTRICT; 
    17291731                    cell.SetNoCreate(); 
    17301732 
    1731                     MaNGOS::SpellNotifierCreatureAndPlayer notifier(*this, tempUnitMap, max_range, PUSH_SELF_CENTER, SPELL_TARGETS_FRIENDLY); 
    1732  
    1733                     TypeContainerVisitor<MaNGOS::SpellNotifierCreatureAndPlayer, WorldTypeMapContainer > world_object_notifier(notifier); 
    1734                     TypeContainerVisitor<MaNGOS::SpellNotifierCreatureAndPlayer, GridTypeMapContainer >  grid_object_notifier(notifier); 
     1733                    Trinity::SpellNotifierCreatureAndPlayer notifier(*this, tempUnitMap, max_range, PUSH_SELF_CENTER, SPELL_TARGETS_FRIENDLY); 
     1734 
     1735                    TypeContainerVisitor<Trinity::SpellNotifierCreatureAndPlayer, WorldTypeMapContainer > world_object_notifier(notifier); 
     1736                    TypeContainerVisitor<Trinity::SpellNotifierCreatureAndPlayer, GridTypeMapContainer >  grid_object_notifier(notifier); 
    17351737 
    17361738                    CellLock<GridReadGuard> cell_lock(cell, p); 
     
    17921794                if(m_spellInfo->EffectImplicitTargetB[i]==TARGET_ALL_ENEMY_IN_AREA_INSTANT) 
    17931795                { 
    1794                     CellPair p(MaNGOS::ComputeCellPair(currentTarget->GetPositionX(), currentTarget->GetPositionY())); 
     1796                    CellPair p(Trinity::ComputeCellPair(currentTarget->GetPositionX(), currentTarget->GetPositionY())); 
    17951797                    Cell cell(p); 
    17961798                    cell.data.Part.reserved = ALL_DISTRICT; 
    17971799                    cell.SetNoCreate(); 
    1798                     MaNGOS::SpellNotifierCreatureAndPlayer notifier(*this, TagUnitMap, radius,PUSH_TARGET_CENTER, SPELL_TARGETS_AOE_DAMAGE); 
    1799                     TypeContainerVisitor<MaNGOS::SpellNotifierCreatureAndPlayer, WorldTypeMapContainer > world_notifier(notifier); 
    1800                     TypeContainerVisitor<MaNGOS::SpellNotifierCreatureAndPlayer, GridTypeMapContainer > grid_notifier(notifier); 
     1800                    Trinity::SpellNotifierCreatureAndPlayer notifier(*this, TagUnitMap, radius,PUSH_TARGET_CENTER, SPELL_TARGETS_AOE_DAMAGE); 
     1801                    TypeContainerVisitor<Trinity::SpellNotifierCreatureAndPlayer, WorldTypeMapContainer > world_notifier(notifier); 
     1802                    TypeContainerVisitor<Trinity::SpellNotifierCreatureAndPlayer, GridTypeMapContainer > grid_notifier(notifier); 
    18011803                    CellLock<GridReadGuard> cell_lock(cell, p); 
    18021804                    cell_lock->Visit(cell_lock, world_notifier, *MapManager::Instance().GetMap(m_caster->GetMapId(), m_caster)); 
     
    18411843                if (m_spellInfo->EffectImplicitTargetB[i] && m_spellInfo->EffectImplicitTargetB[i]!=TARGET_TABLE_X_Y_Z_COORDINATES) 
    18421844                { 
    1843                     CellPair p(MaNGOS::ComputeCellPair(m_caster->GetPositionX(), m_caster->GetPositionY())); 
     1845                    CellPair p(Trinity::ComputeCellPair(m_caster->GetPositionX(), m_caster->GetPositionY())); 
    18441846                    Cell cell(p); 
    18451847                    cell.data.Part.reserved = ALL_DISTRICT; 
     
    18511853                        targetB = SPELL_TARGETS_FRIENDLY; 
    18521854 
    1853                     MaNGOS::SpellNotifierCreatureAndPlayer notifier(*this, TagUnitMap, radius,PUSH_DEST_CENTER, targetB); 
    1854  
    1855                     TypeContainerVisitor<MaNGOS::SpellNotifierCreatureAndPlayer, WorldTypeMapContainer > world_notifier(notifier); 
    1856                     TypeContainerVisitor<MaNGOS::SpellNotifierCreatureAndPlayer, GridTypeMapContainer > grid_notifier(notifier); 
     1855                    Trinity::SpellNotifierCreatureAndPlayer notifier(*this, TagUnitMap, radius,PUSH_DEST_CENTER, targetB); 
     1856 
     1857                    TypeContainerVisitor<Trinity::SpellNotifierCreatureAndPlayer, WorldTypeMapContainer > world_notifier(notifier); 
     1858                    TypeContainerVisitor<Trinity::SpellNotifierCreatureAndPlayer, GridTypeMapContainer > grid_notifier(notifier); 
    18571859 
    18581860                    CellLock<GridReadGuard> cell_lock(cell, p); 
     
    33653367                            if(i_spellST->second.targetEntry) 
    33663368                            { 
    3367                                 CellPair p(MaNGOS::ComputeCellPair(m_caster->GetPositionX(), m_caster->GetPositionY())); 
     3369                                CellPair p(Trinity::ComputeCellPair(m_caster->GetPositionX(), m_caster->GetPositionY())); 
    33683370                                Cell cell(p); 
    33693371                                cell.data.Part.reserved = ALL_DISTRICT; 
    33703372 
    3371                                 MaNGOS::NearestGameObjectEntryInObjectRangeCheck go_check(*m_caster,i_spellST->second.targetEntry,range); 
    3372                                 MaNGOS::GameObjectLastSearcher<MaNGOS::NearestGameObjectEntryInObjectRangeCheck> checker(p_GameObject,go_check); 
    3373  
    3374                                 TypeContainerVisitor<MaNGOS::GameObjectLastSearcher<MaNGOS::NearestGameObjectEntryInObjectRangeCheck>, GridTypeMapContainer > object_checker(checker); 
     3373                                Trinity::NearestGameObjectEntryInObjectRangeCheck go_check(*m_caster,i_spellST->second.targetEntry,range); 
     3374                                Trinity::GameObjectLastSearcher<Trinity::NearestGameObjectEntryInObjectRangeCheck> checker(p_GameObject,go_check); 
     3375 
     3376                                TypeContainerVisitor<Trinity::GameObjectLastSearcher<Trinity::NearestGameObjectEntryInObjectRangeCheck>, GridTypeMapContainer > object_checker(checker); 
    33753377                                CellLock<GridReadGuard> cell_lock(cell, p); 
    33763378                                cell_lock->Visit(cell_lock, object_checker, *MapManager::Instance().GetMap(m_caster->GetMapId(), m_caster)); 
     
    34023404                            Creature *p_Creature = NULL; 
    34033405 
    3404                             CellPair p(MaNGOS::ComputeCellPair(m_caster->GetPositionX(), m_caster->GetPositionY())); 
     3406                            CellPair p(Trinity::ComputeCellPair(m_caster->GetPositionX(), m_caster->GetPositionY())); 
    34053407                            Cell cell(p); 
    34063408                            cell.data.Part.reserved = ALL_DISTRICT; 
    34073409                            cell.SetNoCreate();             // Really don't know what is that??? 
    34083410 
    3409                             MaNGOS::NearestCreatureEntryWithLiveStateInObjectRangeCheck u_check(*m_caster,i_spellST->second.targetEntry,i_spellST->second.type!=SPELL_TARGET_TYPE_DEAD,range); 
    3410                             MaNGOS::CreatureLastSearcher<MaNGOS::NearestCreatureEntryWithLiveStateInObjectRangeCheck> searcher(p_Creature, u_check); 
    3411  
    3412                             TypeContainerVisitor<MaNGOS::CreatureLastSearcher<MaNGOS::NearestCreatureEntryWithLiveStateInObjectRangeCheck>, GridTypeMapContainer >  grid_creature_searcher(searcher); 
     3411                            Trinity::NearestCreatureEntryWithLiveStateInObjectRangeCheck u_check(*m_caster,i_spellST->second.targetEntry,i_spellST->second.type!=SPELL_TARGET_TYPE_DEAD,range); 
     3412                            Trinity::CreatureLastSearcher<Trinity::NearestCreatureEntryWithLiveStateInObjectRangeCheck> searcher(p_Creature, u_check); 
     3413 
     3414                            TypeContainerVisitor<Trinity::CreatureLastSearcher<Trinity::NearestCreatureEntryWithLiveStateInObjectRangeCheck>, GridTypeMapContainer >  grid_creature_searcher(searcher); 
    34133415 
    34143416                            CellLock<GridReadGuard> cell_lock(cell, p); 
     
    44404442    if(m_spellInfo->RequiresSpellFocus) 
    44414443    { 
    4442         CellPair p(MaNGOS::ComputeCellPair(m_caster->GetPositionX(), m_caster->GetPositionY())); 
     4444        CellPair p(Trinity::ComputeCellPair(m_caster->GetPositionX(), m_caster->GetPositionY())); 
    44434445        Cell cell(p); 
    44444446        cell.data.Part.reserved = ALL_DISTRICT; 
    44454447 
    44464448        GameObject* ok = NULL; 
    4447         MaNGOS::GameObjectFocusCheck go_check(m_caster,m_spellInfo->RequiresSpellFocus); 
    4448         MaNGOS::GameObjectSearcher<MaNGOS::GameObjectFocusCheck> checker(ok,go_check); 
    4449  
    4450         TypeContainerVisitor<MaNGOS::GameObjectSearcher<MaNGOS::GameObjectFocusCheck>, GridTypeMapContainer > object_checker(checker); 
     4449        Trinity::GameObjectFocusCheck go_check(m_caster,m_spellInfo->RequiresSpellFocus); 
     4450        Trinity::GameObjectSearcher<Trinity::GameObjectFocusCheck> checker(ok,go_check); 
     4451 
     4452        TypeContainerVisitor<Trinity::GameObjectSearcher<Trinity::GameObjectFocusCheck>, GridTypeMapContainer > object_checker(checker); 
    44514453        CellLock<GridReadGuard> cell_lock(cell, p); 
    44524454        cell_lock->Visit(cell_lock, object_checker, *MapManager::Instance().GetMap(m_caster->GetMapId(), m_caster));