Example #1
1
void SummonHandler::ExpireSummonsInSlot()
{
    for (std::tr1::array< Unit*, SUMMON_SLOTS >::iterator itr = summonslots.begin(); itr != summonslots.end(); ++itr)
    {
        Unit* u = *itr;

        if (u != NULL)
            u->Delete();
    }
    std::fill(summonslots.begin(), summonslots.end(), reinterpret_cast<Unit*>(NULL));
}
Example #2
1
void SummonHandler::RemoveAllSummons()
{
    for (std::set< Unit* >::iterator itr = guardians.begin(); itr != guardians.end();)
    {
        Unit* g = *itr;
        ++itr;
        g->Delete();
    }
    guardians.clear();

    ExpireSummonsInSlot();
}