1
This commit is contained in:
parent
3588c93f0e
commit
99dfdb022a
@ -959,20 +959,21 @@ Human* Room::GetWatchWarTarget(Human* hum)
|
||||
|
||||
std::vector<Human*> players;
|
||||
std::vector<Human*> humans;
|
||||
for (auto& pair : human_hash_) {
|
||||
if (pair.first != hum->GetUniId() &&
|
||||
!pair.second->dead &&
|
||||
!a8::HasBitFlag(pair.second->status, CS_Disable)) {
|
||||
if (pair.second->IsOb()) {
|
||||
continue;
|
||||
}
|
||||
if (pair.second->IsPlayer()) {
|
||||
players.push_back(pair.second);
|
||||
} else {
|
||||
humans.push_back(pair.second);
|
||||
}
|
||||
}
|
||||
}
|
||||
TraverseHumanList
|
||||
(
|
||||
[hum, &players, &humans] (Human* ele_hum) -> bool
|
||||
{
|
||||
if (ele_hum->GetUniId() != hum->GetUniId() &&
|
||||
!ele_hum->dead &&
|
||||
!a8::HasBitFlag(ele_hum->status, CS_Disable)) {
|
||||
if (ele_hum->IsPlayer()) {
|
||||
players.push_back(ele_hum);
|
||||
} else {
|
||||
humans.push_back(ele_hum);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
});
|
||||
|
||||
Human* target = nullptr;
|
||||
if (!players.empty()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user