mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
Merge branch 'master' into 303
Conflicts: src/game/SpellEffects.cpp
This commit is contained in:
commit
397efd4fac
29 changed files with 132 additions and 124 deletions
|
|
@ -477,12 +477,12 @@ void Spell::FillTargetMap()
|
|||
|
||||
TypeContainerVisitor<MaNGOS::WorldObjectSearcher<MaNGOS::CannibalizeObjectCheck >, GridTypeMapContainer > grid_searcher(searcher);
|
||||
CellLock<GridReadGuard> cell_lock(cell, p);
|
||||
cell_lock->Visit(cell_lock, grid_searcher, *MapManager::Instance().GetMap(m_caster->GetMapId(), m_caster));
|
||||
cell_lock->Visit(cell_lock, grid_searcher, *m_caster->GetMap());
|
||||
|
||||
if(!result)
|
||||
{
|
||||
TypeContainerVisitor<MaNGOS::WorldObjectSearcher<MaNGOS::CannibalizeObjectCheck >, WorldTypeMapContainer > world_searcher(searcher);
|
||||
cell_lock->Visit(cell_lock, world_searcher, *MapManager::Instance().GetMap(m_caster->GetMapId(), m_caster));
|
||||
cell_lock->Visit(cell_lock, world_searcher, *m_caster->GetMap());
|
||||
}
|
||||
|
||||
if(result)
|
||||
|
|
@ -1222,8 +1222,8 @@ void Spell::SetTargetMap(uint32 i,uint32 cur,std::list<Unit*> &TagUnitMap)
|
|||
TypeContainerVisitor<MaNGOS::UnitListSearcher<MaNGOS::AnyAoETargetUnitInObjectRangeCheck>, GridTypeMapContainer > grid_unit_searcher(searcher);
|
||||
|
||||
CellLock<GridReadGuard> cell_lock(cell, p);
|
||||
cell_lock->Visit(cell_lock, world_unit_searcher, *MapManager::Instance().GetMap(m_caster->GetMapId(), m_caster));
|
||||
cell_lock->Visit(cell_lock, grid_unit_searcher, *MapManager::Instance().GetMap(m_caster->GetMapId(), m_caster));
|
||||
cell_lock->Visit(cell_lock, world_unit_searcher, *m_caster->GetMap());
|
||||
cell_lock->Visit(cell_lock, grid_unit_searcher, *m_caster->GetMap());
|
||||
}
|
||||
|
||||
if(tempUnitMap.empty())
|
||||
|
|
@ -1321,8 +1321,8 @@ void Spell::SetTargetMap(uint32 i,uint32 cur,std::list<Unit*> &TagUnitMap)
|
|||
TypeContainerVisitor<MaNGOS::UnitListSearcher<MaNGOS::AnyAoETargetUnitInObjectRangeCheck>, GridTypeMapContainer > grid_unit_searcher(searcher);
|
||||
|
||||
CellLock<GridReadGuard> cell_lock(cell, p);
|
||||
cell_lock->Visit(cell_lock, world_unit_searcher, *MapManager::Instance().GetMap(m_caster->GetMapId(), m_caster));
|
||||
cell_lock->Visit(cell_lock, grid_unit_searcher, *MapManager::Instance().GetMap(m_caster->GetMapId(), m_caster));
|
||||
cell_lock->Visit(cell_lock, world_unit_searcher, *m_caster->GetMap());
|
||||
cell_lock->Visit(cell_lock, grid_unit_searcher, *m_caster->GetMap());
|
||||
}
|
||||
|
||||
tempUnitMap.sort(TargetDistanceOrder(pUnitTarget));
|
||||
|
|
@ -1379,8 +1379,8 @@ void Spell::SetTargetMap(uint32 i,uint32 cur,std::list<Unit*> &TagUnitMap)
|
|||
TypeContainerVisitor<MaNGOS::SpellNotifierCreatureAndPlayer, GridTypeMapContainer > grid_object_notifier(notifier);
|
||||
|
||||
CellLock<GridReadGuard> cell_lock(cell, p);
|
||||
cell_lock->Visit(cell_lock, world_object_notifier, *MapManager::Instance().GetMap(m_caster->GetMapId(), m_caster));
|
||||
cell_lock->Visit(cell_lock, grid_object_notifier, *MapManager::Instance().GetMap(m_caster->GetMapId(), m_caster));
|
||||
cell_lock->Visit(cell_lock, world_object_notifier, *m_caster->GetMap());
|
||||
cell_lock->Visit(cell_lock, grid_object_notifier, *m_caster->GetMap());
|
||||
|
||||
// exclude caster (this can be important if this not original caster)
|
||||
TagUnitMap.remove(m_caster);
|
||||
|
|
@ -1462,8 +1462,8 @@ void Spell::SetTargetMap(uint32 i,uint32 cur,std::list<Unit*> &TagUnitMap)
|
|||
TypeContainerVisitor<MaNGOS::SpellNotifierCreatureAndPlayer, GridTypeMapContainer > grid_object_notifier(notifier);
|
||||
|
||||
CellLock<GridReadGuard> cell_lock(cell, p);
|
||||
cell_lock->Visit(cell_lock, world_object_notifier, *MapManager::Instance().GetMap(m_caster->GetMapId(), m_caster));
|
||||
cell_lock->Visit(cell_lock, grid_object_notifier, *MapManager::Instance().GetMap(m_caster->GetMapId(), m_caster));
|
||||
cell_lock->Visit(cell_lock, world_object_notifier, *m_caster->GetMap());
|
||||
cell_lock->Visit(cell_lock, grid_object_notifier, *m_caster->GetMap());
|
||||
}break;
|
||||
case TARGET_ALL_FRIENDLY_UNITS_AROUND_CASTER:
|
||||
{
|
||||
|
|
@ -1478,8 +1478,8 @@ void Spell::SetTargetMap(uint32 i,uint32 cur,std::list<Unit*> &TagUnitMap)
|
|||
TypeContainerVisitor<MaNGOS::SpellNotifierCreatureAndPlayer, GridTypeMapContainer > grid_object_notifier(notifier);
|
||||
|
||||
CellLock<GridReadGuard> cell_lock(cell, p);
|
||||
cell_lock->Visit(cell_lock, world_object_notifier, *MapManager::Instance().GetMap(m_caster->GetMapId(), m_caster));
|
||||
cell_lock->Visit(cell_lock, grid_object_notifier, *MapManager::Instance().GetMap(m_caster->GetMapId(), m_caster));
|
||||
cell_lock->Visit(cell_lock, world_object_notifier, *m_caster->GetMap());
|
||||
cell_lock->Visit(cell_lock, grid_object_notifier, *m_caster->GetMap());
|
||||
}break;
|
||||
case TARGET_ALL_FRIENDLY_UNITS_IN_AREA:
|
||||
{
|
||||
|
|
@ -1494,8 +1494,8 @@ void Spell::SetTargetMap(uint32 i,uint32 cur,std::list<Unit*> &TagUnitMap)
|
|||
TypeContainerVisitor<MaNGOS::SpellNotifierCreatureAndPlayer, GridTypeMapContainer > grid_object_notifier(notifier);
|
||||
|
||||
CellLock<GridReadGuard> cell_lock(cell, p);
|
||||
cell_lock->Visit(cell_lock, world_object_notifier, *MapManager::Instance().GetMap(m_caster->GetMapId(), m_caster));
|
||||
cell_lock->Visit(cell_lock, grid_object_notifier, *MapManager::Instance().GetMap(m_caster->GetMapId(), m_caster));
|
||||
cell_lock->Visit(cell_lock, world_object_notifier, *m_caster->GetMap());
|
||||
cell_lock->Visit(cell_lock, grid_object_notifier, *m_caster->GetMap());
|
||||
}break;
|
||||
// TARGET_SINGLE_PARTY means that the spells can only be casted on a party member and not on the caster (some seals, fire shield from imp, etc..)
|
||||
case TARGET_SINGLE_PARTY:
|
||||
|
|
@ -1571,8 +1571,8 @@ void Spell::SetTargetMap(uint32 i,uint32 cur,std::list<Unit*> &TagUnitMap)
|
|||
TypeContainerVisitor<MaNGOS::SpellNotifierCreatureAndPlayer, GridTypeMapContainer > grid_object_notifier(notifier);
|
||||
|
||||
CellLock<GridReadGuard> cell_lock(cell, p);
|
||||
cell_lock->Visit(cell_lock, world_object_notifier, *MapManager::Instance().GetMap(m_caster->GetMapId(), m_caster));
|
||||
cell_lock->Visit(cell_lock, grid_object_notifier, *MapManager::Instance().GetMap(m_caster->GetMapId(), m_caster));
|
||||
cell_lock->Visit(cell_lock, world_object_notifier, *m_caster->GetMap());
|
||||
cell_lock->Visit(cell_lock, grid_object_notifier, *m_caster->GetMap());
|
||||
}break;
|
||||
case TARGET_DUELVSPLAYER:
|
||||
{
|
||||
|
|
@ -1621,8 +1621,8 @@ void Spell::SetTargetMap(uint32 i,uint32 cur,std::list<Unit*> &TagUnitMap)
|
|||
TypeContainerVisitor<MaNGOS::SpellNotifierCreatureAndPlayer, GridTypeMapContainer > grid_object_notifier(notifier);
|
||||
|
||||
CellLock<GridReadGuard> cell_lock(cell, p);
|
||||
cell_lock->Visit(cell_lock, world_object_notifier, *MapManager::Instance().GetMap(m_caster->GetMapId(), m_caster));
|
||||
cell_lock->Visit(cell_lock, grid_object_notifier, *MapManager::Instance().GetMap(m_caster->GetMapId(), m_caster));
|
||||
cell_lock->Visit(cell_lock, world_object_notifier, *m_caster->GetMap());
|
||||
cell_lock->Visit(cell_lock, grid_object_notifier, *m_caster->GetMap());
|
||||
}
|
||||
}break;
|
||||
case TARGET_MINION:
|
||||
|
|
@ -1740,8 +1740,8 @@ void Spell::SetTargetMap(uint32 i,uint32 cur,std::list<Unit*> &TagUnitMap)
|
|||
TypeContainerVisitor<MaNGOS::SpellNotifierCreatureAndPlayer, GridTypeMapContainer > grid_object_notifier(notifier);
|
||||
|
||||
CellLock<GridReadGuard> cell_lock(cell, p);
|
||||
cell_lock->Visit(cell_lock, world_object_notifier, *MapManager::Instance().GetMap(m_caster->GetMapId(), m_caster));
|
||||
cell_lock->Visit(cell_lock, grid_object_notifier, *MapManager::Instance().GetMap(m_caster->GetMapId(), m_caster));
|
||||
cell_lock->Visit(cell_lock, world_object_notifier, *m_caster->GetMap());
|
||||
cell_lock->Visit(cell_lock, grid_object_notifier, *m_caster->GetMap());
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -1805,8 +1805,8 @@ void Spell::SetTargetMap(uint32 i,uint32 cur,std::list<Unit*> &TagUnitMap)
|
|||
TypeContainerVisitor<MaNGOS::SpellNotifierCreatureAndPlayer, WorldTypeMapContainer > world_notifier(notifier);
|
||||
TypeContainerVisitor<MaNGOS::SpellNotifierCreatureAndPlayer, GridTypeMapContainer > grid_notifier(notifier);
|
||||
CellLock<GridReadGuard> cell_lock(cell, p);
|
||||
cell_lock->Visit(cell_lock, world_notifier, *MapManager::Instance().GetMap(m_caster->GetMapId(), m_caster));
|
||||
cell_lock->Visit(cell_lock, grid_notifier, *MapManager::Instance().GetMap(m_caster->GetMapId(), m_caster));
|
||||
cell_lock->Visit(cell_lock, world_notifier, *m_caster->GetMap());
|
||||
cell_lock->Visit(cell_lock, grid_notifier, *m_caster->GetMap());
|
||||
}
|
||||
}
|
||||
}break;
|
||||
|
|
@ -1862,8 +1862,8 @@ void Spell::SetTargetMap(uint32 i,uint32 cur,std::list<Unit*> &TagUnitMap)
|
|||
TypeContainerVisitor<MaNGOS::SpellNotifierCreatureAndPlayer, GridTypeMapContainer > grid_notifier(notifier);
|
||||
|
||||
CellLock<GridReadGuard> cell_lock(cell, p);
|
||||
cell_lock->Visit(cell_lock, world_notifier, *MapManager::Instance().GetMap(m_caster->GetMapId(), m_caster));
|
||||
cell_lock->Visit(cell_lock, grid_notifier, *MapManager::Instance().GetMap(m_caster->GetMapId(), m_caster));
|
||||
cell_lock->Visit(cell_lock, world_notifier, *m_caster->GetMap());
|
||||
cell_lock->Visit(cell_lock, grid_notifier, *m_caster->GetMap());
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -3461,7 +3461,7 @@ uint8 Spell::CanCast(bool strict)
|
|||
|
||||
TypeContainerVisitor<MaNGOS::GameObjectLastSearcher<MaNGOS::NearestGameObjectEntryInObjectRangeCheck>, GridTypeMapContainer > object_checker(checker);
|
||||
CellLock<GridReadGuard> cell_lock(cell, p);
|
||||
cell_lock->Visit(cell_lock, object_checker, *MapManager::Instance().GetMap(m_caster->GetMapId(), m_caster));
|
||||
cell_lock->Visit(cell_lock, object_checker, *m_caster->GetMap());
|
||||
|
||||
if(p_GameObject)
|
||||
{
|
||||
|
|
@ -3500,7 +3500,7 @@ uint8 Spell::CanCast(bool strict)
|
|||
TypeContainerVisitor<MaNGOS::CreatureLastSearcher<MaNGOS::NearestCreatureEntryWithLiveStateInObjectRangeCheck>, GridTypeMapContainer > grid_creature_searcher(searcher);
|
||||
|
||||
CellLock<GridReadGuard> cell_lock(cell, p);
|
||||
cell_lock->Visit(cell_lock, grid_creature_searcher, *MapManager::Instance().GetMap(m_caster->GetMapId(), m_caster));
|
||||
cell_lock->Visit(cell_lock, grid_creature_searcher, *m_caster->GetMap());
|
||||
|
||||
if(p_Creature )
|
||||
{
|
||||
|
|
@ -4518,7 +4518,7 @@ uint8 Spell::CheckItems()
|
|||
|
||||
TypeContainerVisitor<MaNGOS::GameObjectSearcher<MaNGOS::GameObjectFocusCheck>, GridTypeMapContainer > object_checker(checker);
|
||||
CellLock<GridReadGuard> cell_lock(cell, p);
|
||||
cell_lock->Visit(cell_lock, object_checker, *MapManager::Instance().GetMap(m_caster->GetMapId(), m_caster));
|
||||
cell_lock->Visit(cell_lock, object_checker, *m_caster->GetMap());
|
||||
|
||||
if(!ok)
|
||||
return (uint8)SPELL_FAILED_REQUIRES_SPELL_FOCUS;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue