mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 04:37:00 +00:00
[10513] Clear grid *Check/*Searcher clases use
* Check class considered have all info select object in world from suggested but grid walker list in some grid. This also meaning that Check must always have focus object around that (and in same phase) fit objects must be. * Searcher only must ask Check and know how from all objects fiting to Check select result object(s). For this reason and for better compatibility removed first arg (searcher) form all Searcher classes. Instead expected used Check::GetFocusObject() object if need ( by always need check and simolify Check classes phase checked in Search classes). This also restore source code compatibilty in related lines with prev.client version branches code. * While focus object adding fixed possible wrong phase object selection at stealth detection and at corpse searches.
This commit is contained in:
parent
5e9b5a5297
commit
b0edd807d7
13 changed files with 169 additions and 94 deletions
|
|
@ -1258,8 +1258,8 @@ Unit* CreatureEventAI::DoSelectLowestHpFriendly(float range, uint32 MinHPDiff)
|
|||
{
|
||||
Unit* pUnit = NULL;
|
||||
|
||||
MaNGOS::MostHPMissingInRange u_check(m_creature, range, MinHPDiff);
|
||||
MaNGOS::UnitLastSearcher<MaNGOS::MostHPMissingInRange> searcher(m_creature, pUnit, u_check);
|
||||
MaNGOS::MostHPMissingInRangeCheck u_check(m_creature, range, MinHPDiff);
|
||||
MaNGOS::UnitLastSearcher<MaNGOS::MostHPMissingInRangeCheck> searcher(pUnit, u_check);
|
||||
|
||||
/*
|
||||
typedef TYPELIST_4(GameObject, Creature*except pets*, DynamicObject, Corpse*Bones*) AllGridObjectTypes;
|
||||
|
|
@ -1271,15 +1271,15 @@ Unit* CreatureEventAI::DoSelectLowestHpFriendly(float range, uint32 MinHPDiff)
|
|||
|
||||
void CreatureEventAI::DoFindFriendlyCC(std::list<Creature*>& _list, float range)
|
||||
{
|
||||
MaNGOS::FriendlyCCedInRange u_check(m_creature, range);
|
||||
MaNGOS::CreatureListSearcher<MaNGOS::FriendlyCCedInRange> searcher(m_creature, _list, u_check);
|
||||
MaNGOS::FriendlyCCedInRangeCheck u_check(m_creature, range);
|
||||
MaNGOS::CreatureListSearcher<MaNGOS::FriendlyCCedInRangeCheck> searcher(_list, u_check);
|
||||
Cell::VisitGridObjects(m_creature, searcher, range);
|
||||
}
|
||||
|
||||
void CreatureEventAI::DoFindFriendlyMissingBuff(std::list<Creature*>& _list, float range, uint32 spellid)
|
||||
{
|
||||
MaNGOS::FriendlyMissingBuffInRange u_check(m_creature, range, spellid);
|
||||
MaNGOS::CreatureListSearcher<MaNGOS::FriendlyMissingBuffInRange> searcher(m_creature, _list, u_check);
|
||||
MaNGOS::FriendlyMissingBuffInRangeCheck u_check(m_creature, range, spellid);
|
||||
MaNGOS::CreatureListSearcher<MaNGOS::FriendlyMissingBuffInRangeCheck> searcher(_list, u_check);
|
||||
Cell::VisitGridObjects(m_creature,searcher, range);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue