mirror of
https://github.com/ErikasKontenis/SabrehavenServer.git
synced 2025-04-29 09:09:20 +02:00
fix monsters to not walk on fields when aggresive if they cannot push items
This commit is contained in:
parent
7e37b2c935
commit
618bb6917b
14
src/tile.cpp
14
src/tile.cpp
@ -521,6 +521,20 @@ ReturnValue Tile::queryAdd(int32_t, const Thing& thing, uint32_t, uint32_t flags
|
||||
}
|
||||
}
|
||||
|
||||
if (monster->hasCondition(CONDITION_AGGRESSIVE) && !monster->canPushItems()) {
|
||||
if (hasFlag(TILESTATE_FIREDAMAGE) && !monster->isImmune(COMBAT_FIREDAMAGE)) {
|
||||
return RETURNVALUE_NOTPOSSIBLE;
|
||||
}
|
||||
|
||||
if (hasFlag(TILESTATE_POISONDAMAGE) && !monster->isImmune(COMBAT_EARTHDAMAGE)) {
|
||||
return RETURNVALUE_NOTPOSSIBLE;
|
||||
}
|
||||
|
||||
if (hasFlag(TILESTATE_ENERGYDAMAGE) && !monster->isImmune(COMBAT_ENERGYDAMAGE)) {
|
||||
return RETURNVALUE_NOTPOSSIBLE;
|
||||
}
|
||||
}
|
||||
|
||||
if (!monster->hasCondition(CONDITION_AGGRESSIVE) &&
|
||||
!hasBitSet(FLAG_IGNOREFIELDDAMAGE, flags)) {
|
||||
if (hasFlag(TILESTATE_FIREDAMAGE) && !monster->isImmune(COMBAT_FIREDAMAGE)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user