优化CallForHelp无限递归
CallOfHelpCreatureInRangeDo类增加 - 如果生物已经在战斗,说明它已经被之前的 CallForHelp 拉入战斗了 - 再次调用 AttackStart 会触发 JustEngagedWith,导致递归循环
This commit is contained in:
parent
8d23d05ee3
commit
f83872ee16
@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
@ -1154,6 +1154,13 @@ namespace Acore
|
||||
if (u == i_funit)
|
||||
return;
|
||||
|
||||
// 尚美CUSTOM: 防止无限递归 - 跳过已经在战斗中的生物
|
||||
// 如果生物已经在战斗,说明它已经被之前的 CallForHelp 拉入战斗了
|
||||
// 再次调用 AttackStart 会触发 JustEngagedWith,导致递归循环
|
||||
if (u->IsInCombat())
|
||||
return;
|
||||
// 尚美END CUSTOM
|
||||
|
||||
if (!u->CanAssistTo(i_funit, i_enemy, false))
|
||||
return;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user