This commit is contained in:
aozhiwei 2021-09-08 07:12:42 +00:00
parent d405985c1c
commit 23c5165560

View File

@ -379,51 +379,53 @@ void Buff::ProcSeletTargetWithSelfPos()
( (
[this, &targets] (Creature* c, bool& stop) [this, &targets] (Creature* c, bool& stop)
{ {
switch (meta->int_param1) { if (owner_->GetPos().Distance(c->GetPos()) < meta->int_param3) {
case kBST_All: switch (meta->int_param1) {
{ case kBST_All:
targets.push_back(c); {
}
break;
case kBST_Self:
{
if (c == owner) {
targets.push_back(c); targets.push_back(c);
} }
} break;
break; case kBST_Self:
case kBST_FriendlyIncludeSelf: {
{ if (c == owner) {
if (c->team_id == owner->team_id) { targets.push_back(c);
targets.push_back(c); }
} }
} break;
break; case kBST_FriendlyIncludeSelf:
case kBST_FriendlyExcludeSelf: {
{ if (c->team_id == owner->team_id) {
if (c->team_id == owner->team_id && c != owner) { targets.push_back(c);
targets.push_back(c); }
} }
} break;
break; case kBST_FriendlyExcludeSelf:
case kBST_Enemy: {
{ if (c->team_id == owner->team_id && c != owner) {
if (c->team_id != owner->team_id) { targets.push_back(c);
targets.push_back(c); }
} }
} break;
break; case kBST_Enemy:
case kBST_EnemyAndSelf: {
{ if (c->team_id != owner->team_id) {
if (c->team_id != owner->team_id || c == owner) { targets.push_back(c);
targets.push_back(c); }
} }
break;
case kBST_EnemyAndSelf:
{
if (c->team_id != owner->team_id || c == owner) {
targets.push_back(c);
}
}
break;
default:
{
}
break;
} }
break;
default:
{
}
break;
} }
} }
); );