本文整理汇总了C++中cSearcher函数的典型用法代码示例。如果您正苦于以下问题:C++ cSearcher函数的具体用法?C++ cSearcher怎么用?C++ cSearcher使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了cSearcher函数的19个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: SendAttacker
void SendAttacker(Unit *pTarget) {
std::list<Creature*> templist;
float x, y, z;
me->GetPosition(x, y, z);
{
CellPair pair(Trinity::ComputeCellPair(x, y));
Cell cell(pair);
cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();
Trinity::AllFriendlyCreaturesInGrid check(me);
Trinity::CreatureListSearcher<
Trinity::AllFriendlyCreaturesInGrid> searcher(me,
templist, check);
TypeContainerVisitor<
Trinity::CreatureListSearcher<
Trinity::AllFriendlyCreaturesInGrid>,
GridTypeMapContainer> cSearcher(searcher);
cell.Visit(pair, cSearcher, *(me->GetMap()));
}
if (!templist.size())
return;
for (std::list<Creature*>::const_iterator i = templist.begin();
i != templist.end(); ++i) {
if ((*i) && me->IsWithinDistInMap((*i), 25)) {
(*i)->SetNoCallAssistance(true);
(*i)->AI()->AttackStart(pTarget);
}
}
}
开发者ID:dsstest,项目名称:ArkCORE,代码行数:35,代码来源:boss_nalorakk.cpp
示例2: DespawnSummons
void DespawnSummons(uint32 entry)
{
std::list<Creature*> templist;
float x, y, z;
me->GetPosition(x, y, z);
CellCoord pair(Trinity::ComputeCellCoord(x, y));
Cell cell(pair);
cell.SetNoCreate();
Trinity::AllCreaturesOfEntryInRange check(me, entry, 100);
Trinity::CreatureListSearcher<Trinity::AllCreaturesOfEntryInRange> searcher(me, templist, check);
TypeContainerVisitor<Trinity::CreatureListSearcher<Trinity::AllCreaturesOfEntryInRange>, GridTypeMapContainer> cSearcher(searcher);
cell.Visit(pair, cSearcher, *(me->GetMap()), *me, me->GetGridActivationRange());
for (std::list<Creature*>::const_iterator i = templist.begin(); i != templist.end(); ++i)
{
if (entry == MOB_VAPOR_TRAIL && phase == PHASE_FLIGHT)
{
(*i)->GetPosition(x, y, z);
me->SummonCreature(MOB_DEAD, x, y, z, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
}
(*i)->SetVisible(false);
(*i)->setDeathState(JUST_DIED);
if ((*i)->getDeathState() == CORPSE)
(*i)->RemoveCorpse();
}
}
开发者ID:GlassFace,项目名称:Core,代码行数:28,代码来源:boss_felmyst.cpp
示例3: DoGuardList
void DoGuardList()
{
float x, y, z;
std::list<Creature*> lCreatureList;
me->GetPosition(x, y, z);
CellPair pair(Trinity::ComputeCellPair(x, y));
Cell cell(pair);
cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();
Trinity::AllCreaturesOfEntryInRange check(me, NPC_STORMWIND_ROYAL, 10);
Trinity::CreatureListSearcher<Trinity::AllCreaturesOfEntryInRange> searcher(lCreatureList, check);
TypeContainerVisitor<Trinity::CreatureListSearcher<Trinity::AllCreaturesOfEntryInRange>, GridTypeMapContainer> cSearcher(searcher);
cell.Visit(pair, cSearcher, *(me->GetMap()));
if (!lCreatureList.empty())
{
for (std::list<Creature*>::iterator itr = lCreatureList.begin(); itr != lCreatureList.end(); ++itr)
{
CAST_AI(npc_stormwind_royal_guardAI,(*itr)->AI())->SpybotGUID = me->GetGUID();
CAST_AI(npc_stormwind_royal_guardAI,(*itr)->AI())->uiSpybotPhase = 1;
}
}
}
开发者ID:Bootz,项目名称:SF1,代码行数:25,代码来源:stormwind_city.cpp
示例4: GetPlayer
void WorldSession::HandleLootMoneyOpcode(WorldPacket& /*recvData*/)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_LOOT_MONEY");
Player* player = GetPlayer();
uint64 guid = player->GetLootGUID();
if (!guid)
return;
Loot* masterLoot = NULL;
std::list<Loot*> linkedLoots;
bool shareMoney = true;
switch (GUID_HIPART(guid))
{
case HIGHGUID_GAMEOBJECT:
{
GameObject* go = GetPlayer()->GetMap()->GetGameObject(guid);
// do not check distance for GO if player is the owner of it (ex. fishing bobber)
if (go && ((go->GetOwnerGUID() == player->GetGUID() || go->IsWithinDistInMap(player, INTERACTION_DISTANCE))))
masterLoot = &go->loot;
break;
}
case HIGHGUID_CORPSE: // remove insignia ONLY in BG
{
Corpse* bones = ObjectAccessor::GetCorpse(*player, guid);
if (bones && bones->IsWithinDistInMap(player, INTERACTION_DISTANCE))
{
masterLoot = &bones->loot;
shareMoney = false;
}
break;
}
case HIGHGUID_ITEM:
{
if (Item* item = player->GetItemByGuid(guid))
{
masterLoot = &item->loot;
shareMoney = false;
}
break;
}
case HIGHGUID_UNIT:
case HIGHGUID_VEHICLE:
{
Creature* creature = player->GetMap()->GetCreature(guid);
bool lootAllowed = creature && creature->isAlive() == (player->getClass() == CLASS_ROGUE && creature->lootForPickPocketed);
if (lootAllowed && creature->IsWithinDistInMap(player, INTERACTION_DISTANCE))
{
masterLoot = &creature->loot;
if (creature->isAlive())
shareMoney = false;
// Check creature around for radius loot
else
{
std::list<Creature*> linkedLootCreatures;
CellCoord p(WoWSource::ComputeCellCoord(player->GetPositionX(), player->GetPositionY()));
Cell cell(p);
cell.SetNoCreate();
WoWSource::AllDeadCreaturesInRange check(player, 25.0f, creature->GetGUID());
WoWSource::CreatureListSearcher<WoWSource::AllDeadCreaturesInRange> searcher(player, linkedLootCreatures, check);
TypeContainerVisitor<WoWSource::CreatureListSearcher<WoWSource::AllDeadCreaturesInRange>, GridTypeMapContainer> cSearcher(searcher);
cell.Visit(p, cSearcher, *(player->GetMap()), *player, 25.0f);
for (auto itr : linkedLootCreatures)
{
Player* recipient = itr->GetLootRecipient();
if (!recipient)
continue;
if (itr->loot.HasLooter(player->GetGUID()))
linkedLoots.push_back(&itr->loot);
}
}
}
break;
}
default:
return; // unlootable type
}
if (masterLoot)
linkedLoots.push_back(masterLoot);
for (auto loot : linkedLoots)
{
if (shareMoney && player->GetGroup()) //item, pickpocket and players can be looted only single player
{
Group* group = player->GetGroup();
std::vector<Player*> playersNear;
for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next())
{
Player* member = itr->getSource();
if (!member)
//.........这里部分代码省略.........
开发者ID:Cailiaock,项目名称:5.4.7-Wow-source,代码行数:101,代码来源:LootHandler.cpp
示例5: HatchAllEggs
bool HatchAllEggs(uint32 action) //1: reset, 2: isHatching all
{
std::list<Creature*> templist;
float x, y, z;
me->GetPosition(x, y, z);
{
CellCoord pair(Trinity::ComputeCellCoord(x, y));
Cell cell(pair);
cell.SetNoCreate();
Trinity::AllCreaturesOfEntryInRange check(me, NPC_EGG, 100);
Trinity::CreatureListSearcher<Trinity::AllCreaturesOfEntryInRange> searcher(me, templist, check);
TypeContainerVisitor<Trinity::CreatureListSearcher<Trinity::AllCreaturesOfEntryInRange>, GridTypeMapContainer> cSearcher(searcher);
cell.Visit(pair, cSearcher, *me->GetMap(), *me, me->GetGridActivationRange());
}
//TC_LOG_ERROR("scripts", "Eggs %d at middle", templist.size());
if (templist.empty())
return false;
for (std::list<Creature*>::const_iterator i = templist.begin(); i != templist.end(); ++i)
{
if (action == 1)
(*i)->SetDisplayId(10056);
else if (action == 2 &&(*i)->GetDisplayId() != 11686)
(*i)->CastSpell(*i, SPELL_HATCH_EGG, false);
}
return true;
}
开发者ID:3306665,项目名称:trinitycore,代码行数:32,代码来源:boss_janalai.cpp
示例6: Boom
void Boom()
{
std::list<Creature*> templist;
float x, y, z;
me->GetPosition(x, y, z);
{
CellPair pair(Trinity::ComputeCellPair(x, y));
Cell cell(pair);
cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();
Trinity::AllCreaturesOfEntryInRange check(me, MOB_FIRE_BOMB, 100);
Trinity::CreatureListSearcher<Trinity::AllCreaturesOfEntryInRange> searcher(me, templist, check);
TypeContainerVisitor<Trinity::CreatureListSearcher<Trinity::AllCreaturesOfEntryInRange>, GridTypeMapContainer> cSearcher(searcher);
cell.Visit(pair, cSearcher, *(me->GetMap()));
}
for (std::list<Creature*>::const_iterator i = templist.begin(); i != templist.end(); ++i)
{
(*i)->CastSpell(*i, SPELL_FIRE_BOMB_DAMAGE, true);
(*i)->RemoveAllAuras();
}
}
开发者ID:A-Metaphysical-Drama,项目名称:BloodyCore,代码行数:25,代码来源:boss_janalai.cpp
示例7: JustStartedEscort
void JustStartedEscort()
{
m_uiEventTimer = 5000;
m_uiEventCount = 0;
m_lResearchersList.clear();
float x, y, z;
me->GetPosition(x, y, z);
CellPair pair(Trinity::ComputeCellPair(x, y));
Cell cell(pair);
cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();
Trinity::AllCreaturesOfEntryInRange check(me, NPC_RESEARCHER, 25);
Trinity::CreatureListSearcher<Trinity::AllCreaturesOfEntryInRange> searcher(me,m_lResearchersList, check);
TypeContainerVisitor<Trinity::CreatureListSearcher<Trinity::AllCreaturesOfEntryInRange>, GridTypeMapContainer> cSearcher(searcher);
cell.Visit(pair, cSearcher, *(me->GetMap()));
if (!m_lResearchersList.empty())
SetFormation();
}
开发者ID:Gamerzon94,项目名称:wowrean-emu,代码行数:23,代码来源:terokkar_forest.cpp
示例8: DespawnSummons
void DespawnSummons(uint32 entry)
{
std::list<Creature*> templist;
float x, y, z;
m_creature->GetPosition(x, y, z);
{
CellPair pair(MaNGOS::ComputeCellPair(x, y));
Cell cell(pair);
cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();
AllCreaturesOfEntryInRange check(m_creature, entry, 100);
MaNGOS::CreatureListSearcher<AllCreaturesOfEntryInRange> searcher(templist, check);
TypeContainerVisitor<MaNGOS::CreatureListSearcher<AllCreaturesOfEntryInRange>, GridTypeMapContainer> cSearcher(searcher);
CellLock<GridReadGuard> cell_lock(cell, pair);
cell_lock->Visit(cell_lock, cSearcher, *(m_creature->GetMap()));
}
for(std::list<Creature*>::iterator i = templist.begin(); i != templist.end(); ++i)
{
(*i)->SetVisibility(VISIBILITY_OFF);
(*i)->setDeathState(JUST_DIED);
}
}
开发者ID:wk23,项目名称:tst,代码行数:27,代码来源:boss_akilzon.cpp
示例9: DoGuardList
void DoGuardList()
{
float x, y, z;
uint8 PointID;
PointID = 0;
std::list<Creature*> lCreatureList;
me->GetPosition(x, y, z);
CellCoord pair(Oregon::ComputeCellCoord(x, y));
Cell cell(pair);
cell.SetNoCreate();
Oregon::AllCreaturesOfEntryInRange check(me, NPC_STORMWIND_ROYAL, 10);
Oregon::CreatureListSearcher<Oregon::AllCreaturesOfEntryInRange> searcher(lCreatureList, check);
TypeContainerVisitor<Oregon::CreatureListSearcher<Oregon::AllCreaturesOfEntryInRange>, GridTypeMapContainer> cSearcher(searcher);
cell.Visit(pair, cSearcher, *(me->GetMap()), *me, me->GetGridActivationRange());
if (!lCreatureList.empty())
{
for (std::list<Creature*>::iterator itr = lCreatureList.begin(); itr != lCreatureList.end(); ++itr)
{
CAST_AI(npc_stormwind_royal_guardAI, (*itr)->AI())->MovePoint = 1;
CAST_AI(npc_stormwind_royal_guardAI, (*itr)->AI())->PointID = PointID;
PointID++;
}
}
}
开发者ID:Adeer,项目名称:OregonCore,代码行数:27,代码来源:stormwind_city.cpp
示例10: DoAttackPlayer
void DoAttackPlayer()
{
Player* player = Unit::GetPlayer(*me, PlayerGUID);
if (!player)
return;
me->setFaction(FACTION_HOSTILE);
me->AI()->AttackStart(player);
float x, y, z;
me->GetPosition(x, y, z);
CellPair pair(Trinity::ComputeCellPair(x, y));
Cell cell(pair);
cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();
Trinity::AllCreaturesOfEntryInRange check(me, NPC_SENTRY, 20);
Trinity::CreatureListSearcher<Trinity::AllCreaturesOfEntryInRange> searcher(me, lCreatureList, check);
TypeContainerVisitor<Trinity::CreatureListSearcher<Trinity::AllCreaturesOfEntryInRange>, GridTypeMapContainer> cSearcher(searcher);
cell.Visit(pair, cSearcher, *(me->GetMap()));
if (!lCreatureList.empty())
{
for (std::list<Creature*>::iterator itr = lCreatureList.begin(); itr != lCreatureList.end(); ++itr)
{
if ((*itr)->isAlive())
{
(*itr)->setFaction(FACTION_HOSTILE);
(*itr)->AI()->AttackStart(player);
}
}
}
}
开发者ID:Blumfield,项目名称:TBCPvP,代码行数:34,代码来源:dustwallow_marsh.cpp
示例11: Boom
void Boom()
{
std::list<Creature*> templist;
float x, y, z;
m_creature->GetPosition(x, y, z);
{
CellPair pair(MaNGOS::ComputeCellPair(x, y));
Cell cell(pair);
cell.SetNoCreate();
AllCreaturesOfEntryInRangeCheck check(m_creature, MOB_FIRE_BOMB, 100);
MaNGOS::CreatureListSearcher<AllCreaturesOfEntryInRangeCheck> searcher(templist, check);
TypeContainerVisitor<MaNGOS::CreatureListSearcher<AllCreaturesOfEntryInRangeCheck>, GridTypeMapContainer> cSearcher(searcher);
//CellLock<GridReadGuard> cell_lock(cell, pair);
cell.Visit(pair, cSearcher, *(m_creature->GetMap()),*m_creature,100);
}
for(std::list<Creature*>::iterator i = templist.begin(); i != templist.end(); ++i)
{
(*i)->CastSpell(*i, SPELL_FIRE_BOMB_DAMAGE, true);
(*i)->RemoveAllAuras();
}
}
开发者ID:leecher228,项目名称:scriptdev2,代码行数:25,代码来源:boss_janalai.cpp
示例12: Boom
void Boom()
{
std::list<Creature*> templist;
float x, y, z;
me->GetPosition(x, y, z);
{
CellCoord pair(JadeCore::ComputeCellCoord(x, y));
Cell cell(pair);
cell.SetNoCreate();
JadeCore::AllCreaturesOfEntryInRange check(me, MOB_FIRE_BOMB, 100);
JadeCore::CreatureListSearcher<JadeCore::AllCreaturesOfEntryInRange> searcher(me, templist, check);
TypeContainerVisitor<JadeCore::CreatureListSearcher<JadeCore::AllCreaturesOfEntryInRange>, GridTypeMapContainer> cSearcher(searcher);
cell.Visit(pair, cSearcher, *me->GetMap(), *me, me->GetGridActivationRange());
}
for (std::list<Creature*>::const_iterator i = templist.begin(); i != templist.end(); ++i)
{
(*i)->CastSpell(*i, SPELL_FIRE_BOMB_DAMAGE, true);
(*i)->RemoveAllAuras();
}
}
开发者ID:AlucardVoss,项目名称:Patchs,代码行数:24,代码来源:boss_janalai.cpp
示例13: DoAttackPlayer
void DoAttackPlayer()
{
Player* pPlayer = Unit::GetPlayer(*me, PlayerGUID);
if (!pPlayer)
return;
me->setFaction(FACTION_HOSTILE);
me->AI()->AttackStart(pPlayer);
float x, y, z;
me->GetPosition(x, y, z);
CellCoord pair(Oregon::ComputeCellCoord(x, y));
Cell cell(pair);
cell.SetNoCreate();
Oregon::AllCreaturesOfEntryInRange check(me, NPC_SENTRY, 20);
Oregon::CreatureListSearcher<Oregon::AllCreaturesOfEntryInRange> searcher(lCreatureList, check);
TypeContainerVisitor<Oregon::CreatureListSearcher<Oregon::AllCreaturesOfEntryInRange>, GridTypeMapContainer> cSearcher(searcher);
cell.Visit(pair, cSearcher, *(me->GetMap()), *me, me->GetGridActivationRange());
if (!lCreatureList.empty())
{
for (std::list<Creature*>::iterator itr = lCreatureList.begin(); itr != lCreatureList.end(); ++itr)
{
if ((*itr)->IsAlive())
{
(*itr)->setFaction(FACTION_HOSTILE);
(*itr)->AI()->AttackStart(pPlayer);
}
}
}
}
开发者ID:Zaffy,项目名称:OregonCore,代码行数:33,代码来源:dustwallow_marsh.cpp
示例14: SendAttacker
void SendAttacker(Unit* target)
{
std::list<Creature*> templist;
float x, y, z;
me->GetPosition(x, y, z);
{
CellCoord pair(MistCore::ComputeCellCoord(x, y));
Cell cell(pair);
cell.SetNoCreate();
MistCore::AllFriendlyCreaturesInGrid check(me);
MistCore::CreatureListSearcher<MistCore::AllFriendlyCreaturesInGrid> searcher(me, templist, check);
TypeContainerVisitor<MistCore::CreatureListSearcher<MistCore::AllFriendlyCreaturesInGrid>, GridTypeMapContainer> cSearcher(searcher);
cell.Visit(pair, cSearcher, *(me->GetMap()), *me, me->GetGridActivationRange());
}
if (templist.empty())
return;
for (std::list<Creature*>::const_iterator i = templist.begin(); i != templist.end(); ++i)
{
if ((*i) && me->IsWithinDistInMap((*i), 25))
{
(*i)->SetNoCallAssistance(true);
(*i)->AI()->AttackStart(target);
}
}
}
开发者ID:3DViking,项目名称:MistCore,代码行数:31,代码来源:boss_nalorakk.cpp
示例15: DespawnSummons
void DespawnSummons(uint32 entry)
{
std::list<Creature*> templist;
float x, y, z;
m_creature->GetPosition(x, y, z);
{
CellPair pair(MaNGOS::ComputeCellPair(x, y));
Cell cell(pair);
cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();
AllCreaturesOfEntryInRange check(m_creature, entry, 100);
MaNGOS::CreatureListSearcher<AllCreaturesOfEntryInRange> searcher(templist, check);
TypeContainerVisitor<MaNGOS::CreatureListSearcher<AllCreaturesOfEntryInRange>, GridTypeMapContainer> cSearcher(searcher);
CellLock<GridReadGuard> cell_lock(cell, pair);
cell_lock->Visit(cell_lock, cSearcher, *(m_creature->GetMap()));
}
for(std::list<Creature*>::iterator i = templist.begin(); i != templist.end(); ++i)
{
if(entry == MOB_VAPOR_TRAIL && Phase == PHASE_FLIGHT)
{
float x, y, z;
(*i)->GetPosition(x, y, z);
m_creature->SummonCreature(MOB_DEAD, x, y, z, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
}
(*i)->SetVisibility(VISIBILITY_OFF);
(*i)->setDeathState(JUST_DIED);
if((*i)->getDeathState() == CORPSE)
(*i)->RemoveCorpse();
}
}
开发者ID:wk23,项目名称:tst,代码行数:35,代码来源:boss_felmyst.cpp
示例16: HatchAllEggs
bool HatchAllEggs(uint32 uiAction) //1: reset, 2: isHatching all
{
std::list<Creature*> templist;
float x, y, z;
me->GetPosition(x, y, z);
{
CellPair pair(Trinity::ComputeCellPair(x, y));
Cell cell(pair);
cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();
Trinity::AllCreaturesOfEntryInRange check(me, MOB_EGG, 100);
Trinity::CreatureListSearcher<Trinity::AllCreaturesOfEntryInRange> searcher(me, templist, check);
TypeContainerVisitor<Trinity::CreatureListSearcher<Trinity::AllCreaturesOfEntryInRange>, GridTypeMapContainer> cSearcher(searcher);
cell.Visit(pair, cSearcher, *(me->GetMap()));
}
//sLog->outError("Eggs %d at middle", templist.size());
if (!templist.size())
return false;
for (std::list<Creature*>::const_iterator i = templist.begin(); i != templist.end(); ++i)
{
if (uiAction == 1)
(*i)->SetDisplayId(10056);
else if (uiAction == 2 &&(*i)->GetDisplayId() != 11686)
(*i)->CastSpell(*i, SPELL_HATCH_EGG, false);
}
return true;
}
开发者ID:A-Metaphysical-Drama,项目名称:BloodyCore,代码行数:33,代码来源:boss_janalai.cpp
示例17: HatchAllEggs
bool HatchAllEggs(uint32 action) //1: reset, 2: isHatching all
{
std::list<Creature*> templist;
float x, y, z;
m_creature->GetPosition(x, y, z);
{
CellPair pair(MaNGOS::ComputeCellPair(x, y));
Cell cell(pair);
cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();
AllCreaturesOfEntryInRange check(m_creature, MOB_EGG, 100);
MaNGOS::CreatureListSearcher<AllCreaturesOfEntryInRange> searcher(m_creature, templist, check);
TypeContainerVisitor<MaNGOS::CreatureListSearcher<AllCreaturesOfEntryInRange>, GridTypeMapContainer> cSearcher(searcher);
// CellLock<GridReadGuard> cell_lock(cell, pair);
cell.Visit(pair, cSearcher, *(m_creature->GetMap()));
}
//error_log("Eggs %d at middle", templist.size());
if(!templist.size())
return false;
for(std::list<Creature*>::iterator i = templist.begin(); i != templist.end(); ++i)
{
if(action == 1)
(*i)->SetDisplayId(10056);
else if(action == 2 &&(*i)->GetDisplayId() != 11686)
(*i)->CastSpell(*i, SPELL_HATCH_EGG, false);
}
return true;
}
开发者ID:Deathwatch,项目名称:Dark-iCE-scriptdev2,代码行数:34,代码来源:boss_janalai.cpp
示例18: HatchEggs
bool HatchEggs(uint32 num)
{
std::list<Creature*> templist;
float x, y, z;
me->GetPosition(x, y, z);
{
CellPair pair(Trinity::ComputeCellPair(x, y));
Cell cell(pair);
cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();
Trinity::AllCreaturesOfEntryInRange check(me, 23817, 50);
Trinity::CreatureListSearcher<Trinity::AllCreaturesOfEntryInRange> searcher(me, templist, check);
TypeContainerVisitor<Trinity::CreatureListSearcher<Trinity::AllCreaturesOfEntryInRange>, GridTypeMapContainer> cSearcher(searcher);
cell.Visit(pair, cSearcher, *(me->GetMap()));
}
//sLog->outError("Eggs %d at %d", templist.size(), side);
for (std::list<Creature*>::const_iterator i = templist.begin(); i != templist.end() && num > 0; ++i)
if ((*i)->GetDisplayId() != 11686)
{
(*i)->CastSpell(*i, SPELL_HATCH_EGG, false);
num--;
}
return num == 0; // if num == 0, no more templist
}
开发者ID:A-Metaphysical-Drama,项目名称:BloodyCore,代码行数:31,代码来源:boss_janalai.cpp
示例19: ReleaseDogs
void ReleaseDogs()
{
std::list<Creature*> templist;
float x, y, z;
me->GetPosition(x, y, z);
{
CellCoord pair(JadeCore::ComputeCellCoord(x, y));
Cell cell(pair);
cell.SetNoCreate();
JadeCore::AllCreaturesOfEntryInRange check(me, MOB_OBEDIENT_HOUND, 200);
JadeCore::CreatureListSearcher<JadeCore::AllCreaturesOfEntryInRange> searcher(me, templist, check);
TypeContainerVisitor<JadeCore::CreatureListSearcher<JadeCore::AllCreaturesOfEntryInRange>, GridTypeMapContainer> cSearcher(searcher);
cell.Visit(pair, cSearcher, *me->GetMap(), *me, me->GetGridActivationRange());
}
if (templist.empty())
return;
for (std::list<Creature*>::const_iterator i = templist.begin(); i != templist.end(); ++i)
{
// (*i)->setFaction(35);
(*i)->SetReactState(REACT_AGGRESSIVE);
(*i)->AI()->DoAction(ACTION_ATTACK_BRAUN);
}
}
开发者ID:Caydan,项目名称:JadeCore548,代码行数:27,代码来源:boss_houndmaster_braun.cpp
注:本文中的cSearcher函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论