1
This commit is contained in:
parent
e4431b959a
commit
19de0307b2
@ -878,7 +878,9 @@ void Bullet::GetHitCreatures(BulletCheckResult& result)
|
||||
[this, &result] (Creature* c, bool& stop)
|
||||
{
|
||||
bool no_teammate = IsFlyHook();
|
||||
if (sender.Get()->IsProperTarget(c, no_teammate)) {
|
||||
long long ignore_buff_effects = 0;
|
||||
a8::SetBitFlag(ignore_buff_effects, kBET_Hide);
|
||||
if (sender.Get()->IsProperTarget(c, no_teammate, ignore_buff_effects)) {
|
||||
if (gun_meta->ispenetrate() &&
|
||||
hit_objects_.find(c->GetUniId()) != hit_objects_.end()) {
|
||||
//穿人
|
||||
|
@ -1206,7 +1206,7 @@ void Creature::ResetAction()
|
||||
}
|
||||
}
|
||||
|
||||
bool Creature::IsProperTarget(Creature* target, bool no_teammate)
|
||||
bool Creature::IsProperTarget(Creature* target, bool no_teammate, long long ignore_buff_effects)
|
||||
{
|
||||
if (target->dead) {
|
||||
return false;
|
||||
@ -1220,11 +1220,11 @@ bool Creature::IsProperTarget(Creature* target, bool no_teammate)
|
||||
if (target->IsInvincible()) {
|
||||
return false;
|
||||
}
|
||||
#if 0
|
||||
if (!a8::HasBitFlag(ignore_buff_effects, kBET_Hide)) {
|
||||
if (target->HasBuffEffect(kBET_Hide)) {
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
if (target->HasBuffEffect(kBET_Driver)) {
|
||||
return false;
|
||||
}
|
||||
|
@ -215,7 +215,7 @@ class Creature : public MoveableEntity
|
||||
void RemoveEffects(std::vector<int> effect_uniids);
|
||||
void ClearEffect();
|
||||
|
||||
bool IsProperTarget(Creature* target, bool no_teammate = false);
|
||||
bool IsProperTarget(Creature* target, bool no_teammate = false, long long ignore_buff_effects = 0);
|
||||
bool IsEnemy(Creature* target);
|
||||
virtual void SelectSkillTargets(Skill* skill,
|
||||
const Position& target_pos,
|
||||
|
@ -257,7 +257,9 @@ void VirtualBullet::GetHitCreatures(BulletCheckResult& result)
|
||||
[this, &result] (Creature* c, bool& stop)
|
||||
{
|
||||
bool no_teammate = false;
|
||||
if (sender.Get()->IsProperTarget(c, no_teammate)) {
|
||||
long long ignore_buff_effects = 0;
|
||||
a8::SetBitFlag(ignore_buff_effects, kBET_Hide);
|
||||
if (sender.Get()->IsProperTarget(c, no_teammate, ignore_buff_effects)) {
|
||||
if (gun_meta->ispenetrate() &&
|
||||
hit_objects_.find(c->GetUniId()) != hit_objects_.end()) {
|
||||
//穿人
|
||||
|
Loading…
x
Reference in New Issue
Block a user