mirror of
https://github.com/SWG-Source/src.git
synced 2026-08-01 01:16:03 -04:00
Suppress deletion fail warning if script blocks deletion
This commit is contained in:
@@ -6739,7 +6739,13 @@ static void commandFuncServerDestroyObject(Command const &, NetworkId const & ac
|
||||
Chat::sendSystemMessage(*player, pp);
|
||||
}
|
||||
else
|
||||
{
|
||||
// don't throw a warning if the only reason destruction failed is because the no destroy script blocked the request
|
||||
if (targetObject->getScriptObject()->hasScript("item.special.nodestroy")) {
|
||||
return;
|
||||
}
|
||||
WARNING(true, ("commandFuncServerDestroyObject: Error encountered while deleting object %s", target.getValueString().c_str()));
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
@@ -9822,4 +9828,4 @@ void CommandCppFuncs::remove()
|
||||
{
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
// ======================================================================
|
||||
|
||||
Reference in New Issue
Block a user