1
This commit is contained in:
parent
d40c8d5348
commit
52fb6567b2
@ -55,8 +55,7 @@ void Bullet::OnHit(std::set<Entity*>& objects)
|
||||
case ET_Player:
|
||||
{
|
||||
Human* hum = (Human*)target;
|
||||
if (hum->HasBuffEffect(kBET_Invincible) ||
|
||||
hum->HasBuffEffect(kBET_AdPlaying)) {
|
||||
if (hum->IsInvincible()) {
|
||||
continue;
|
||||
}
|
||||
if (sender.Get()->room->GetRoomMode() == kZombieMode &&
|
||||
|
@ -1076,7 +1076,7 @@ bool Creature::IsProperTarget(Creature* target)
|
||||
if (room->GetRoomMode() == kZombieMode && GetRace() == target->GetRace()) {
|
||||
return false;
|
||||
}
|
||||
if (target->HasBuffEffect(kBET_Invincible)) {
|
||||
if (target->IsInvincible()) {
|
||||
return false;
|
||||
}
|
||||
if (target->HasBuffEffect(kBET_Hide)) {
|
||||
@ -1580,3 +1580,12 @@ void Creature::RemoveMoreObstacle(int buff_id, int id, int num)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool Creature::IsInvincible()
|
||||
{
|
||||
return HasBuffEffect(kBET_Invincible) ||
|
||||
HasBuffEffect(kBET_AdPlaying) ||
|
||||
HasBuffEffect(kBET_Driver) ||
|
||||
HasBuffEffect(kBET_Passenger)
|
||||
;
|
||||
}
|
||||
|
@ -150,6 +150,7 @@ class Creature : public MoveableEntity
|
||||
void UpdateSkill();
|
||||
bool FreezeOperate();
|
||||
void SlaveOnRemove(Entity* slave);
|
||||
bool IsInvincible();
|
||||
|
||||
private:
|
||||
|
||||
|
@ -51,8 +51,7 @@ void FragMiTask::Done()
|
||||
);
|
||||
|
||||
for (auto& target : objects) {
|
||||
if (target->HasBuffEffect(kBET_Invincible) ||
|
||||
target->HasBuffEffect(kBET_AdPlaying)) {
|
||||
if (target->IsInvincible()) {
|
||||
continue;
|
||||
}
|
||||
if (sender.Get()->room->GetRoomMode() == kZombieMode &&
|
||||
|
Loading…
x
Reference in New Issue
Block a user