예제 #1
0
    public override bool ShouldEnchant()
    {
        string keyName = $"{Name}.ENCHANT";

        if (CurrentStep == null)
        {
            FrameHelper.UpdateDebugFrame(keyName, "No step");
            return(false);
        }
        if (!MyCharLevelIsHighEnough())
        {
            FrameHelper.UpdateDebugFrame(keyName, "Level up first");
            return(false);
        }
        if (!CurrentStep.ItemoCraft.IsAnEnchant)
        {
            FrameHelper.UpdateDebugFrame(keyName, "Not an enchant");
            return(false);
        }
        if (!CurrentStep.HasMatsToCraftOne())
        {
            FrameHelper.UpdateDebugFrame(keyName, "Not enough materials");
            return(false);
        }
        if (!CurrentStep.KnownRecipe)
        {
            FrameHelper.UpdateDebugFrame(keyName, "We don't know the recipe");
            return(false);
        }

        FrameHelper.UpdateDebugFrame(keyName, "RUNNING");
        return(true);
    }
 // We have mats to craft one ?
 public bool WeHaveMatsToCraftOne(string key = null)
 {
     if (CurrentStep.HasMatsToCraftOne())
     {
         FrameHelper.UpdateDebugFrame(key, "We have mats to craft one");
         return(true);
     }
     FrameHelper.UpdateDebugFrame(key, "We don't have mats to craft one");
     return(false);
 }