초기커밋
This commit is contained in:
31
GameServer/Contents/Craft/Helper/CraftHelper.cs
Normal file
31
GameServer/Contents/Craft/Helper/CraftHelper.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user