This commit is contained in:
gsemaj 2022-04-13 08:51:50 -04:00
parent 231e88fd55
commit 748a82e223
2 changed files with 8 additions and 4 deletions

View File

@ -449,6 +449,7 @@ bool doDamageNDebuff(Mob* mob, sSkillResult_Damage_N_Debuff* respdata, int i, in
respdata[i].iConditionBitFlag = plr->iConditionBitFlag; respdata[i].iConditionBitFlag = plr->iConditionBitFlag;
if (plr->HP <= 0) { if (plr->HP <= 0) {
if (!MobAI::aggroCheck(mob, getTime()))
mob->transition(AIState::RETREAT, mob->target); mob->transition(AIState::RETREAT, mob->target);
} }
@ -523,6 +524,7 @@ bool doDamage(Mob* mob, sSkillResult_Damage* respdata, int i, int32_t targetID,
respdata[i].iHP = plr->HP -= damage; respdata[i].iHP = plr->HP -= damage;
if (plr->HP <= 0) { if (plr->HP <= 0) {
if (!MobAI::aggroCheck(mob, getTime()))
mob->transition(AIState::RETREAT, mob->target); mob->transition(AIState::RETREAT, mob->target);
} }
@ -575,6 +577,7 @@ bool doLeech(Mob* mob, sSkillResult_Heal_HP* healdata, int i, int32_t targetID,
damagedata->iHP = plr->HP -= damage; damagedata->iHP = plr->HP -= damage;
if (plr->HP <= 0) { if (plr->HP <= 0) {
if (!MobAI::aggroCheck(mob, getTime()))
mob->transition(AIState::RETREAT, mob->target); mob->transition(AIState::RETREAT, mob->target);
} }

View File

@ -313,6 +313,7 @@ void Combat::npcAttackPc(Mob *mob, time_t currTime) {
PlayerManager::sendToViewable(mob->target, respbuf, P_FE2CL_NPC_ATTACK_PCs); PlayerManager::sendToViewable(mob->target, respbuf, P_FE2CL_NPC_ATTACK_PCs);
if (plr->HP <= 0) { if (plr->HP <= 0) {
if (!MobAI::aggroCheck(mob, getTime()))
mob->transition(AIState::RETREAT, mob->target); mob->transition(AIState::RETREAT, mob->target);
} }
} }