◆ PrepareSpellScript()
◆ Register()
| void spell_item_fetch_ball::Register |
( |
| ) |
|
|
inlineoverrideprivatevirtual |
◆ SelectTarget()
| void spell_item_fetch_ball::SelectTarget |
( |
std::list< WorldObject * > & |
targets | ) |
|
|
inlineprivate |
1122 {
1124 for (std::list<WorldObject*>::const_iterator itr = targets.begin(); itr != targets.end(); ++itr)
1126 {
1127 if (creature->GetOwnerGUID() ==
GetCaster()->
GetOwnerGUID() && !creature->IsNonMeleeSpellCast(
false) &&
1128 creature->GetMotionMaster()->GetCurrentMovementGeneratorType() !=
POINT_MOTION_TYPE)
1129 {
1130 target = creature;
1131 break;
1132 }
1133 }
1134
1135 targets.clear();
1136 if (target)
1137 targets.push_back(target);
1138 }
@ POINT_MOTION_TYPE
Definition MotionMaster.h:48
Creature * ToCreature()
Definition Object.h:212
Unit * GetCaster()
Definition SpellScript.cpp:401
ObjectGuid GetOwnerGUID() const override
Definition Unit.h:714
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: