禁用 GM 攻击


Published:   Comment: No Comments

游戏设置

编辑ObjAttack.cpp

BOOL CObjAttack::Attack(LPOBJ lpObj, LPOBJ lpTargetObj, CMagicInf* lpMagic, int magicsend, unsigned char MSBFlag, int AttackDamage, BOOL bCombo,BYTE byBarrageCount, BYTE byReflect)
{
// at the function beginning add:

if ( (lpTargetObj->Authority & 32) == 32 )
{
MsgOutput(lpObj->m_Index, "Cannot attack GM!");

MsgOutput(lpTargetObj->m_Index, "%s tried to attack you!", lpObj->Name);

return false;
}

...
}
none
Last Modified:2025-09-03 21:09:12

我有话说