Exemplo n.º 1
0
 public static void UseTrinket(Obj_AI_Base target)
 {
     if (target == null)
     {
         return;
     }
     if (Variables._Player.Spellbook.GetSpell(SpellSlot.Trinket).IsReady&&
         Variables._Player.Spellbook.GetSpell(SpellSlot.Trinket).SData.Name.ToLower().Contains("totem"))
     {
         Core.DelayAction(delegate
         {
             if (MenuManager.CondemnMenu["trinket"].Cast <CheckBox>().CurrentValue)
             {
                 var pos = Mechanics.GetFirstNonWallPos(Variables._Player.Position.To2D(), target.Position.To2D());
                 if (NavMesh.GetCollisionFlags(pos).HasFlag(CollisionFlags.Grass))
                 {
                     Program.totem.Cast(pos.To3D());
                 }
             }
         }, 200);
     }
 }