◆ PrepareSpellScript()
◆ Register()
void spell_item_fetch_ball::Register |
( |
| ) |
|
|
inlineoverrideprivatevirtual |
◆ SelectTarget()
void spell_item_fetch_ball::SelectTarget |
( |
std::list< WorldObject * > & |
targets | ) |
|
|
inlineprivate |
911 {
913 for (std::list<WorldObject*>::const_iterator itr = targets.begin(); itr != targets.end(); ++itr)
915 {
916 if (creature->GetOwnerGUID() ==
GetCaster()->
GetOwnerGUID() && !creature->IsNonMeleeSpellCast(
false) &&
917 creature->GetMotionMaster()->GetCurrentMovementGeneratorType() !=
POINT_MOTION_TYPE)
918 {
919 target = creature;
920 break;
921 }
922 }
923
924 targets.clear();
925 if (target)
926 targets.push_back(target);
927 }
@ POINT_MOTION_TYPE
Definition MotionMaster.h:48
Creature * ToCreature()
Definition Object.h:206
Unit * GetCaster()
Definition SpellScript.cpp:401
ObjectGuid GetOwnerGUID() const
Definition Unit.h:668
References SpellScript::GetCaster(), Unit::GetOwnerGUID(), POINT_MOTION_TYPE, and Object::ToCreature().
Referenced by Register().
The documentation for this class was generated from the following file: