本文整理汇总了C++中SummonList::Despawn方法的典型用法代码示例。如果您正苦于以下问题:C++ SummonList::Despawn方法的具体用法?C++ SummonList::Despawn怎么用?C++ SummonList::Despawn使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SummonList
的用法示例。
在下文中一共展示了SummonList::Despawn方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SummonedCreatureDespawn
void SummonedCreatureDespawn(Creature *summon)
{
uint32 phase= summon->GetPhaseMask();
uint32 nextPhase = 0;
Summons.Despawn(summon);
// Check if all summons in this phase killed
for (SummonList::const_iterator iter = Summons.begin(); iter != Summons.end(); ++iter)
{
if (Creature *visage = Unit::GetCreature(*me, *iter))
{
// Not all are dead
if (phase == visage->GetPhaseMask())
return;
else
nextPhase = visage->GetPhaseMask();
}
}
// Roll Insanity
uint32 spell = GetSpellForPhaseMask(phase);
uint32 spell2 = GetSpellForPhaseMask(nextPhase);
Map* pMap = me->GetMap();
if (!pMap)
return;
Map::PlayerList const &PlayerList = pMap->GetPlayers();
if (!PlayerList.isEmpty())
{
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
{
if (Player* pPlayer = i->getSource())
{
if (pPlayer->HasAura(spell))
{
pPlayer->RemoveAurasDueToSpell(spell);
if (spell2) // if there is still some different mask cast spell for it
pPlayer->CastSpell(pPlayer, spell2, true);
}
}
}
}
}
示例2: SummonedCreatureDespawn
void SummonedCreatureDespawn(Creature* summon) override
{
uint32 nextPhase = 0;
Summons.Despawn(summon);
// Check if all summons in this phase killed
for (SummonList::const_iterator iter = Summons.begin(); iter != Summons.end(); ++iter)
{
if (Creature* visage = ObjectAccessor::GetCreature(*me, *iter))
{
// Not all are dead
if (visage->IsInPhase(summon))
return;
else
{
nextPhase = *visage->GetPhases().begin();
break;
}
}
}
// Roll Insanity
Map* map = me->GetMap();
if (!map)
return;
Map::PlayerList const &PlayerList = map->GetPlayers();
if (!PlayerList.isEmpty())
{
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
{
if (Player* player = i->GetSource())
{
for (uint32 index = 0; index <= 4; ++index)
player->RemoveAurasDueToSpell(SPELL_INSANITY_TARGET + index);
player->CastSpell(player, SPELL_INSANITY_TARGET + nextPhase - 173, true);
}
}
}
}
示例3: SummonedCreatureDespawn
void SummonedCreatureDespawn(Creature* summon)
{
if (summon->GetEntry() == NPC_DEFENDER || summon->GetEntry() == 23523 || summon->GetEntry() == 23318 || summon->GetEntry() == 23524)
summons.Despawn(summon);
}
示例4: SummonedCreatureDespawn
void SummonedCreatureDespawn(Creature* creature)
{
summons.Despawn(creature);
}
示例5: SummonedMobDied
void SummonedMobDied(Creature *pSummoned)
{
listOfMobs.Despawn(pSummoned);
if (pSummoned)
pInstance->SetData64(DATA_DELETE_TRASH_MOB, pSummoned->GetGUID());
}
示例6: SummonedCreatureDespawn
void SummonedCreatureDespawn(Creature* pSummoned)
{
if (pSummoned->GetEntry() == CREATURE_GRAUF)
m_uiGraufGUID = 0;
Summons.Despawn(pSummoned);
}
示例7: SummonedCreatureDespawn
void SummonedCreatureDespawn(Creature* pSummoned)
{
Summons.Despawn(pSummoned);
--KillCount;
}
示例8: SummonedCreatureDespawn
void SummonedCreatureDespawn(Creature* summoned)
{
if (summoned->GetEntry() == NPC_SPARK_OF_IONAR)
lSparkList.Despawn(summoned);
}
示例9: SummonedCreatureDies
void SummonedCreatureDies(Creature* summoned, Unit* /*who*/) override
{
Summons.Despawn(summoned);
++KillCount;
}
示例10: SummonedCreatureDespawn
void SummonedCreatureDespawn(Creature* summoned)
{
Summons.Despawn(summoned);
}
示例11: SummonedCreatureDies
void SummonedCreatureDies(Creature* cr, Unit*)
{
summons.Despawn(cr);
events.ScheduleEvent(EVENT_SUMMON_NEXT_MINION, 4000);
}
示例12: SummonedCreatureDies
void SummonedCreatureDies(Creature* summoned, Unit* /*killer*/) override
{
listOfMobs.Despawn(summoned);
instance->SetGuidData(DATA_DEL_TRASH_MOB, summoned->GetGUID());
}
示例13: SummonedMobDied
void SummonedMobDied(Creature* summoned)
{
listOfMobs.Despawn(summoned);
if (summoned)
instance->SetData64(DATA_DEL_TRASH_MOB, summoned->GetGUID());
}
示例14: SummonedCreatureDespawn
void SummonedCreatureDespawn(Creature* summon) override
{
Summons.Despawn(summon);
}
示例15: SummonedCreatureDespawn
void SummonedCreatureDespawn(Creature* summoned) override
{
Summons.Despawn(summoned);
--KillCount;
}