mirror of
https://github.com/ErikasKontenis/SabrehavenServer.git
synced 2025-05-01 10:09:20 +02:00
Monster Idle Bug fix
Should fix #33 Credits [monsters idle bug fix official TFS](https://github.com/otland/forgottenserver/pull/2545])
This commit is contained in:
parent
a7a253f5eb
commit
0044688420
@ -746,9 +746,19 @@ void Monster::updateIdleStatus()
|
||||
{
|
||||
bool idle = false;
|
||||
|
||||
if (conditions.empty()) {
|
||||
if (!isSummon() && targetList.empty()) {
|
||||
if (!isSummon()) {
|
||||
if (conditions.empty() && targetList.empty()) {
|
||||
idle = true;
|
||||
} else if (!conditions.empty()) {
|
||||
bool hasAggressiveCondition = false;
|
||||
for (Condition* condition : conditions) {
|
||||
if (condition->getType() >= CONDITION_ENERGY && condition->getType() <= CONDITION_ENERGY) {
|
||||
hasAggressiveCondition = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
idle = !hasAggressiveCondition;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user