Files
caliverse_server/GameServer/Contents/Craft/Helper/CraftHelper.cs
2025-05-01 07:20:41 +09:00

32 lines
1.0 KiB
C#

using ServerCommon;
using ServerCore; using ServerBase;
namespace GameServer
{
internal static class CraftHelper
{
public static Result checkAnchorCrafting(Player player, List<string> anchorGuids)
{
var result = new Result();
var err_msg = string.Empty;
var crafting_action = player.getEntityAction<CraftAction>();
NullReferenceCheckHelper.throwIfNull(crafting_action, () => $"crafting_action is null !!! - {player.toBasicString()}");
foreach (var anchor_guid in anchorGuids)
{
if (crafting_action.isAnchorCrafting(anchor_guid))
{
err_msg = $"Anchor is Already Crafting !!! : AnchorGuid:{anchor_guid} - {player.toBasicString()}";
result.setFail(ServerErrorCode.CraftingAlreadyCrafting, err_msg);
Log.getLogger().error(result.toBasicString());
return result;
}
}
return result;
}
}
}