TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
AbominationDespawner Class Reference

Public Member Functions

 AbominationDespawner (Unit *owner)
 
bool operator() (ObjectGuid guid)
 

Private Attributes

Unit_owner
 

Constructor & Destructor Documentation

AbominationDespawner::AbominationDespawner ( Unit owner)
inlineexplicit
175 : _owner(owner) { }
Unit * _owner
Definition: boss_professor_putricide.cpp:199

Member Function Documentation

bool AbominationDespawner::operator() ( ObjectGuid  guid)
inline
178  {
179  if (Unit* summon = ObjectAccessor::GetUnit(*_owner, guid))
180  {
181  if (summon->GetEntry() == NPC_MUTATED_ABOMINATION_10 || summon->GetEntry() == NPC_MUTATED_ABOMINATION_25)
182  {
183  if (Vehicle* veh = summon->GetVehicleKit())
184  veh->RemoveAllPassengers(); // also despawns the vehicle
185 
186  // Found unit is Mutated Abomination, remove it
187  return true;
188  }
189 
190  // Found unit is not Mutated Abomintaion, leave it
191  return false;
192  }
193 
194  // No unit found, remove from SummonList
195  return true;
196  }
Definition: Vehicle.h:32
TC_GAME_API Unit * GetUnit(WorldObject const &, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:163
Definition: icecrown_citadel.h:237
Definition: icecrown_citadel.h:236
Unit * _owner
Definition: boss_professor_putricide.cpp:199
Definition: Unit.h:1305

+ Here is the call graph for this function:

Member Data Documentation

Unit* AbominationDespawner::_owner
private

The documentation for this class was generated from the following file: