Core/SmartScripts: Add SMART_TARGET_LOOT_RECIPIENTS. Does what it says on the tin.
Use this new target type to fix The Rider of Blood, The Rider of Frost, The Rider of the Unholy. Closes #17817.
This commit is contained in:
1 parent
8d12a82f5b
commit
c2fd73c95d
4 files changed
+22
-1
No files matched your search
@@ -2761,6 +2761,23 @@ ObjectList* SmartScript::GetTargets(SmartScriptHolder const& e, Unit* invoker /*
|
||||
l->push_back(target);
|
||||
break;
|
||||
}
|
||||
case SMART_TARGET_LOOT_RECIPIENTS:
|
||||
{
|
||||
if (me)
|
||||
{
|
||||
if (Group* lootGroup = me->GetLootRecipientGroup())
|
||||
{
|
||||
for (GroupReference* it = lootGroup->GetFirstMember(); it != nullptr; it = it->next())
|
||||
if (Player* recipient = it->GetSource())
|
||||
l->push_back(recipient);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Player* recipient = me->GetLootRecipient())
|
||||
l->push_back(recipient);
|
||||
}
|
||||
}
|
||||
}
|
||||
case SMART_TARGET_POSITION:
|
||||
case SMART_TARGET_NONE:
|
||||
default:
|
||||
|
||||
Reference in new issue
Block a user