*Remove all ghouls after quest is completed in dk's "give gift" quest;
--HG-- branch : trunk
This commit is contained in:
@@ -8612,6 +8612,19 @@ void Unit::SetMinion(Minion *minion, bool apply)
|
||||
}
|
||||
}
|
||||
|
||||
void Unit::RemoveAllMinionsByEntry(uint32 entry)
|
||||
{
|
||||
for(Unit::ControlList::iterator itr = m_Controlled.begin(); itr != m_Controlled.end();)
|
||||
{
|
||||
Unit *unit = *itr;
|
||||
++itr;
|
||||
if(unit->GetEntry() == entry && unit->GetTypeId() == TYPEID_UNIT
|
||||
&& ((Creature*)unit)->isSummon()) // minion, actually
|
||||
((TempSummon*)unit)->UnSummon();
|
||||
// i think this is safe because i have never heard that a despawned minion will trigger a same minion
|
||||
}
|
||||
}
|
||||
|
||||
void Unit::SetCharm(Unit* charm, bool apply)
|
||||
{
|
||||
if(apply)
|
||||
|
||||
@@ -1404,6 +1404,7 @@ class TRINITY_DLL_SPEC Unit : public WorldObject
|
||||
Player* GetCharmerOrOwnerPlayerOrPlayerItself() const;
|
||||
|
||||
void SetMinion(Minion *minion, bool apply);
|
||||
void RemoveAllMinionsByEntry(uint32 entry);
|
||||
void SetCharm(Unit* target, bool apply);
|
||||
Unit* GetNextRandomRaidMemberOrPet(float radius);
|
||||
bool SetCharmedBy(Unit* charmer, CharmType type);
|
||||
|
||||
Reference in New Issue
Block a user