◆ PrepareSpellScript()
◆ Register()
void spell_item_fetch_ball::Register |
( |
| ) |
|
|
inlineoverrideprivatevirtual |
◆ SelectTarget()
void spell_item_fetch_ball::SelectTarget |
( |
std::list< WorldObject * > & |
targets | ) |
|
|
inlineprivate |
910 {
912 for (std::list<WorldObject*>::const_iterator itr = targets.begin(); itr != targets.end(); ++itr)
914 {
915 if (creature->GetOwnerGUID() ==
GetCaster()->
GetOwnerGUID() && !creature->IsNonMeleeSpellCast(
false) &&
916 creature->GetMotionMaster()->GetCurrentMovementGeneratorType() !=
POINT_MOTION_TYPE)
917 {
918 target = creature;
919 break;
920 }
921 }
922
923 targets.clear();
924 if (target)
925 targets.push_back(target);
926 }
@ POINT_MOTION_TYPE
Definition MotionMaster.h:48
Creature * ToCreature()
Definition Object.h:205
Unit * GetCaster()
Definition SpellScript.cpp:401
ObjectGuid GetOwnerGUID() const
Definition Unit.h:684
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: