Exemple #1
0
        void Start()
        {
            AppDomain.CurrentDomain.UnhandledException += this.OnUnhandledException;

            Application.runInBackground = true;
            Application.targetFrameRate = 60;
            DontDestroyOnLoad(this.gameObject);

            Env.isEditor   = Application.isEditor;
            Env.isRunning  = true;
            Env.platform   = ( int )Application.platform;
            Env.useNetwork = this.useNetwork;
            Env.StartTime();

            LoggerProxy.Init(Application.dataPath.Replace("\\", "/") + "/../Log/", this.logServerIp, this.logServerPort);
            LoggerProxy.logLevel = this.logLevel;

            Defs.Init(Resources.Load <TextAsset>("Defs/b_defs").text);

            UIManager.Init();

            if (Env.useNetwork)
            {
                NetworkManager.SetupKCP();
                Windows.CONNECTING_WIN.Open(NetworkConfig.CONNECTION_TIMEOUT / 1000f);
                NetModule.Initialize(this.useKCP ? NetworkManager.PType.Kcp : NetworkManager.PType.Tcp);
                NetModule.instance.OnSocketEvent += this.OnSocketEvent;
                NetModule.instance.Connect(this.ip, this.port);
            }
            else
            {
                Standalone.Init(this.cid, ( byte )this.image, this.map);
                Standalone.Load();
            }
        }
Exemple #2
0
        /*public static void SetToothNum(Procedure procedure,string toothNum){
         *      Procedure oldProcedure=procedure.Copy();
         *      procedure.ToothNum=toothNum;
         *      Procedures.Update(procedure,oldProcedure);
         * }*/

        public static void SetPriority(Procedure procedure, int priority)
        {
            Procedure oldProcedure = procedure.Copy();

            procedure.Priority = Defs.GetDefsForCategory(DefCat.TxPriorities, true)[priority].DefNum;
            Procedures.Update(procedure, oldProcedure);
        }
Exemple #3
0
        public void PaymentEdit_AutoSplitForPayment_NoNegativeAutoSplits()
        {
            long      provNumA = ProviderT.CreateProvider("provA");
            Patient   pat      = PatientT.CreatePatient(MethodBase.GetCurrentMethod().Name);
            Procedure proc1    = ProcedureT.CreateProcedure(pat, "D0120", ProcStat.C, "", 70);
            Procedure proc2    = ProcedureT.CreateProcedure(pat, "D0150", ProcStat.C, "", 20);
            //make an overpayment for one of the procedures so it spills over.
            DateTime payDate = DateTime.Today;
            Payment  pay     = PaymentT.MakePayment(pat.PatNum, 71, payDate, procNum: proc1.ProcNum); //pre-existing payment
            //attempt to make another payment. Auto splits should not suggest a negative split.
            Payment newPayment = PaymentT.MakePaymentNoSplits(pat.PatNum, 2, payDate, isNew: true,
                                                              payType: Defs.GetDefsForCategory(DefCat.PaymentTypes, true)[0].DefNum);//current payment we're trying to make

            PaymentEdit.LoadData loadData = PaymentEdit.GetLoadData(pat, newPayment, new List <long>()
            {
                pat.PatNum
            }, true, false);
            PaymentEdit.ConstructChargesData chargeData = PaymentEdit.GetConstructChargesData(new List <long> {
                pat.PatNum
            }, pat.PatNum,
                                                                                              PaySplits.GetForPayment(pay.PayNum), pay.PayNum, false);
            PaymentEdit.ConstructResults constructResults = PaymentEdit.ConstructAndLinkChargeCredits(new List <long> {
                pat.PatNum
            }, pat.PatNum
                                                                                                      , chargeData.ListPaySplits, newPayment, new List <Procedure> ());
            PaymentEdit.AutoSplit autoSplits = PaymentEdit.AutoSplitForPayment(constructResults);
            Assert.AreEqual(0, autoSplits.ListAutoSplits.FindAll(x => x.SplitAmt < 0).Count);        //assert no negative auto splits were made.
            Assert.AreEqual(0, autoSplits.ListSplitsCur.FindAll(x => x.SplitAmt < 0).Count);         //auto splits not catching everything
        }
Exemple #4
0
        public static void DeleteAllForCategory(DefCat defCat)
        {
            string command = $"DELETE FROM definition WHERE Category={POut.Int((int)defCat)}";

            DataCore.NonQ(command);
            Defs.RefreshCache();
        }
Exemple #5
0
 void MakeAnimation()
 {
     _pointsCount             = DefsGame.gameBestScore;
     textField.text           = _pointsCount.ToString();
     img.transform.localScale = new Vector3(_startScale * 1.4f, _startScale * 1.4f, 1f);
     Defs.PlaySound(_sndNewHighScore);
 }
Exemple #6
0
    void Start()
    {
        _sndStart = Resources.Load <AudioClip>("snd/start");
        Defs.PlaySound(_sndStart);

        showButtons();
    }
Exemple #7
0
    private void ThrowBall()
    {
        if (!_isSetStartPoint)
        {
            return;
        }

        Hint.SetActive(false);

        ++DefsGame.ThrowsCounter;

        _targetLosePosition = _mouseTarget;

        GameEvents.Send(OnThrow);

        Vector2 dist = new Vector2(_mouseTarget.x - transform.position.x, _mouseTarget.y - transform.position.y);

        CutDistance(ref dist);

        _pointsCount = 3;

        _body.velocity        = new Vector2();
        _body.angularVelocity = 0f;
        _body.isKinematic     = false;

        Vector2 force = CalcForce(dist.x, dist.y);

        _body.AddForce(new Vector2(force.x * 87.2f, force.y * 87.2f)); //74.4
        _body.AddTorque(1);
        _isThrow = true;

        Defs.PlaySound(_ballThrow);
        ParticleTrail.Play();
    }
Exemple #8
0
        ///<summary>Returns the proc</summary>
        ///<param name="procDate">If not included, will be set to DateTime.Now.</param>
        public static Procedure CreateProcedure(Patient pat, string procCodeStr, ProcStat procStatus, string toothNum, double procFee,
                                                DateTime procDate = default(DateTime), int priority = 0, long plannedAptNum = 0, long provNum = 0)
        {
            Procedure proc = new Procedure();

            proc.CodeNum = ProcedureCodes.GetCodeNum(procCodeStr);
            proc.PatNum  = pat.PatNum;
            if (procDate == default(DateTime))
            {
                proc.ProcDate = DateTime.Today;
            }
            else
            {
                proc.ProcDate = procDate;
            }
            proc.ProcStatus = procStatus;
            proc.ProvNum    = provNum;
            if (provNum == 0)
            {
                proc.ProvNum = pat.PriProv;
            }
            proc.ProcFee       = procFee;
            proc.ToothNum      = toothNum;
            proc.Prosthesis    = "I";
            proc.Priority      = Defs.GetDefsForCategory(DefCat.TxPriorities, true)[priority].DefNum;
            proc.PlannedAptNum = plannedAptNum;
            proc.ClinicNum     = pat.ClinicNum;
            Procedures.Insert(proc);
            return(proc);
        }
        private void CboxLastIdol_SelectedIndexChanged(object sender, System.EventArgs e)
        {
            Diag.WriteLine("LAST IDOL SET!");
            var idol = cboxLastIdol.SelectedItem.ToString().Idol();

            if (idol == null)
            {
                return;
            }
            var idolId = idol.Id;

            var remoteProc = RemoteProc.Instance();

            if (remoteProc == null)
            {
                return;
            }

            var pointer = Defs.PointerByName("LastCommutedIdol");

            if (pointer == null || pointer.BasePtr() == IntPtr.Zero)
            {
                return;
            }
            remoteProc.Write(pointer.GetAddress(remoteProc), idolId);
        }
        private void BtnTest_Click(object sender, EventArgs e)
        {
            var confetti = Defs.ItemByName("divine confetti");

            new AddItem(confetti, 8).Execute();
            // new AddItem()
        }
        public void RenderFlag(FormMain form)
        {
            _ptr = Defs.PointerByName(Name);
            if (_ptr == null)
            {
                return;
            }
            _form  = form;
            _panel = _form.Controls.Find(Category, true)[0] as MetroPanel;

            var chkd   = Default;
            var sekiro = Utils.Sekiro();

            if (sekiro != null)
            {
                using (var remoteProc = new RemoteProcess(Utils.Sekiro())) {
                    chkd = remoteProc.Read <byte>(_ptr.BasePtr());
                }
            }

            _checkBox = new MetroCheckBox {
                Text       = string.IsNullOrEmpty(Text) ? Name : Text,
                Checked    = chkd > 0,
                Theme      = MetroThemeStyle.Dark,
                Style      = MetroColorStyle.Teal,
                AutoSize   = false,
                Dock       = DockStyle.Top,
                CheckAlign = ContentAlignment.MiddleRight
            };

            _checkBox.CheckedChanged += CheckBoxOnCheckedChanged;

            _panel.InvokeIfRequired(() => _panel.Controls.Add(_checkBox));
        }
Exemple #12
0
    private void GetReward(OnGiveReward e)
    {
        if (_isWaitReward)
        {
            _isWaitReward = false;
            if (e.isAvailable)
            {
                _state        = 2;
                _isNextLevel  = true;
                IsGameOver    = false;
                _isReviveUsed = true;
//				_bubbleField.Hide();

                ReviveClose();
                Defs.PlaySound(_sndGrab);

                FlurryEventsManager.SendEvent("RV_revive_complete");
            }
            else
            {
                ReviveClose();
                _state = 6;
            }
        }
    }
        public void AssemblyStart(Assembly assembly, IAutoCodeGeneratorContext context)
        {
            foreach (var def in Defs.Where(a => a.TargetAssembly == assembly))
            {
                var ns       = context.GetOrCreateNamespace(assembly.GetName().Name);
                var csStruct = ns.GetOrCreateClass(def.TypeName);
                csStruct.Description = def.TypeDescription;
                csStruct.IsPartial   = true;
                // csStruct.Kind        = CsNamespaceMemberKind.Struct;

                csStruct.AddProperty(def.ValuePropertyName, def.CsWrappedType)
                .WithMakeAutoImplementIfPossible()
                .WithIsPropertyReadOnly()
                .WithNoEmitField();

                AddConstructor(csStruct, def);

                AddEqualsMethods(csStruct, def);
                AddGetHashCodeMethod(csStruct, def);
                AddToStringMethod(csStruct, def);

                if (def.WrappedType == WrappedTypes.Int)
                {
                    csStruct.ImplementedInterfaces.Add(csStruct.GetTypeName <IIntegerBasedKey>());
                }
            }
        }
Exemple #14
0
        /// <summary>
        /// Adds a Projectile to the game
        /// </summary>
        /// <param name="p">The Projectile to add</param>
        /// <param name="texture">The texture of the projectile to add</param>
        /// <param name="param">Common object loading parameters</param>
        /// <param name="pet">Wether the Projectile is a pet or not</param>
        public static void AddToGame(Projectile p, Texture2D texture, LoadParameters param, bool pet = false)
        {
            p.type = Defs.projectileNextType++;
            p.name = param.ModBase.modName + ":" + param.Name;

            if (!String.IsNullOrEmpty(param.SubClassTypeName))
            {
                p.subClass = (ModProjectile)param.Assembly.CreateInstance(param.SubClassTypeName, false, BindingFlags.Public | BindingFlags.Instance, null,
                                                                          new object[] { param.ModBase, p }, CultureInfo.CurrentCulture, new object[] { });

                if (p.subClass != null)
                {
                    Defs.FillCallPriorities(p.subClass.GetType());
                }
            }

            if (pet)
            {
                Array.Resize(ref Main.projPet, Main.projPet.Length + 1);
                Main.projPet[p.type] = pet;
            }

            if (!Main.dedServ)
            {
                Main.projectileTexture.Add(p.type, texture);
            }
            Defs.projectiles.Add(p.name, p);
            Defs.projectileNames.Add(p.type, p.name);
        }
Exemple #15
0
        private void BtnSaveSpider_Click(object sender, EventArgs e)
        {
            if (!_spiderInitialized)
            {
                MetroMessageBox.Show(this, "You should spider something first!", "Error", MessageBoxButtons.OK,
                                     MessageBoxIcon.Error);
                return;
            }

            try {
                var remoteProc = RemoteProc.Instance();
                if (remoteProc == null)
                {
                    return;
                }

                var address = Defs.PointerByName("inventory").GetAddress(remoteProc);
                foreach (var item in _inventory)
                {
                    remoteProc.Write(address, item.SekiroItem);
                    address += 16;
                }
            } catch (Exception ex) {
                Diag.WriteLine(ex.Message);
                MessageBox.Show($"Failed to save inventory :( \n{ex.Message}", "Error", MessageBoxButtons.OK,
                                MessageBoxIcon.Error);
                return;
            }

            MetroMessageBox.Show(this,
                                 "Inventory saved! Do something that forces the game to reparse your inventory such as warping or saving and loading",
                                 ":o", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }
Exemple #16
0
        internal void GenerateObjects()
        {
            lock (objectLock)
            {
                if (Objects != null)
                {
                    return;
                }
                Objects = new List <T>();
                lock (indexLock)
                {
                    foreach (var ilist in Index)
                    {
                        var il   = ilist;
                        var defs = Defs.Where(x => x.Key == il.Key).ToArray();
                        var def  = defs.First();
                        foreach (var i in il.Value)
                        {
                            T   obj  = null;
                            var path = "";
#if (!DEBUG)
                            try
                            {
#endif
                            path = Path.Combine(
                                i.FullName, def.Parts.First(x => x.PartType == PartType.File).PartString);
                            if (def.Config.Cache != null)
                            {
                                obj = def.Config.Cache.GetObjectFromPath <T>(path);
                            }
                            if (obj == null)
                            {
                                obj = (T)def.Serializer.Deserialize(path);
                                if (def.Config.Cache != null)
                                {
                                    def.Config.Cache.AddObjectToCache(path, obj);
                                }
                            }
#if (!DEBUG)
                        }
                        catch (UserMessageException)
                        {
                            throw;
                        }
                        catch (Exception e)
                        {
                            obj = null;
                            Log.Error("Error desterilizing " + path + " for collection " + typeof(T).Name, e);
                        }
#endif
                            if (obj != null)
                            {
                                Objects.Add(obj);
                            }
                        }
                    }
                }
            }
        }
Exemple #17
0
 public void RateClose()
 {
     UIManager.HideUiElement("ScreenRate");
     UIManager.HideUiElement("ScreenRateBtnRate");
     UIManager.HideUiElement("ScreenRateBtnBack");
     Defs.PlaySound(_sndClose);
     EndCurrentGame();
 }
Exemple #18
0
 public void Fill()
 {
     var repository = new Defs(Conexao.CreateSessionFactory().OpenSession());
     var defs = repository.All<Def>().ToList();
     var defsDTO = Convert(defs);
     var service = new SaveDefInLuceneService();
     service.Save(defsDTO);
 }
Exemple #19
0
        ///<summary>Should run AllFieldsAreValid() first. This is called from the parent form to retrieve the data that the user entered.  Returns an arraylist.  For most fields, the length of the arraylist will be 0 or 1.</summary>
        public ArrayList GetCurrentValues(int item)
        {
            ArrayList retVal = new ArrayList();

            if (multInputItems[item].ValueType == FieldValueType.Boolean)
            {
                if (((CheckBox)inputs[item]).Checked)
                {
                    retVal.Add(true);
                }
            }
            else if (multInputItems[item].ValueType == FieldValueType.Date)
            {
                retVal.Add(PIn.Date(inputs[item].Text));
            }
            else if (multInputItems[item].ValueType == FieldValueType.Def)
            {
                ComboBoxMulti comboBox = (ComboBoxMulti)inputs[item];
                List <Def>    listDefs = Defs.GetDefsForCategory(multInputItems[item].DefCategory, true);
                for (int j = 0; j < comboBox.SelectedIndices.Count; j++)
                {
                    retVal.Add(
                        listDefs[(int)comboBox.SelectedIndices[j]].DefNum);
                }
            }
            else if (multInputItems[item].ValueType == FieldValueType.Enum)
            {
                ComboBoxMulti comboBox = (ComboBoxMulti)inputs[item];
                Type          eType    = Type.GetType("OpenDental." + multInputItems[item].EnumerationType.ToString());
                for (int j = 0; j < comboBox.SelectedIndices.Count; j++)
                {
                    retVal.Add(
                        (int)(Enum.Parse(eType, Enum.GetNames(eType)[(int)comboBox.SelectedIndices[j]])));
                }
            }
            else if (multInputItems[item].ValueType == FieldValueType.Integer)
            {
                retVal.Add(PIn.Long(inputs[item].Text));
            }
            else if (multInputItems[item].ValueType == FieldValueType.Number)
            {
                retVal.Add(PIn.Double(inputs[item].Text));
            }
            else if (multInputItems[item].ValueType == FieldValueType.String)
            {
                if (inputs[item].Text != "")
                {
                    //the text is first stripped of any ?'s
                    retVal.Add(Regex.Replace(inputs[item].Text, @"\?", ""));
                }
            }
            else if (multInputItems[item].ValueType == FieldValueType.YesNoUnknown)
            {
                retVal.Add(((ContrYN)inputs[item]).CurrentValue);
            }
            //MessageBox.Show(multInputItems[1].CurrentValues.Count.ToString());
            return(retVal);
        }
Exemple #20
0
        //private Hashtable hash;


        ///<summary>Constructor</summary>
        public MakeReadableDefNum()
        {
            //hash=new Hashtable();
            string         command = "SELECT * FROM definition ORDER BY Category,ItemOrder";
            DataConnection dcon    = new DataConnection();
            DataTable      table   = dcon.GetTable(command);

            Defs.FillCache(table);
        }
Exemple #21
0
    public void Share()
    {
//		FlurryEventsManager.SendEvent ("share");
        if (SystemInfo.deviceModel.Contains("iPad"))
        {
//			Defs.shareVoxel.ShareClick ();
        }
        Defs.PlaySound(sndBtnClick, 1f);
    }
Exemple #22
0
 public void Rate()
 {
     UIManager.HideUiElement("ScreenRate");
     UIManager.HideUiElement("ScreenRateBtnRate");
     UIManager.HideUiElement("ScreenRateBtnBack");
     Defs.PlaySound(_sndGrab);
     Defs.Rate.RateUs();
     FlurryEventsManager.SendEvent("rate_us_impression", "revive_screen");
     EndCurrentGame();
 }
Exemple #23
0
    public void ReviveClose()
    {
        UIManager.HideUiElement("ScreenRevive");
        UIManager.HideUiElement("ScreenReviveBtnRevive");
        UIManager.HideUiElement("ScreenReviveBtnBack");
        Defs.PlaySound(_sndClose);
        EndCurrentGame();

        FlurryEventsManager.SendEvent("RV_revive_home");
    }
Exemple #24
0
    public void ShareClose()
    {
        UIManager.HideUiElement("ScreenShare");
        UIManager.HideUiElement("ScreenShareBtnShare");
        UIManager.HideUiElement("ScreenShareBtnBack");
        Defs.PlaySound(_sndClose);
        EndCurrentGame();

        FlurryEventsManager.SendEvent("high_score_home");
    }
Exemple #25
0
    public void Respown(Vector3 position)
    {
        if (_isLose && DefsGame.currentPointsCount == 0)
        {
            _mouseTarget = _targetLosePosition;
        }
        else
        {
            _mouseTarget = _mouseStartPosition;
        }

        if (_isLose)
        {
            if (DefsGame.currentPointsCount < 3)
            {
                ++_hintCounter;
            }
            if (_hintCounter >= 3)
            {
                _targetHintPartCount = TargetHintPartCountMax;
                _hintCounter         = 0;
            }
        }

        Hint.SetActive(true);

        _mouseTarget = _targetLosePosition;

        _startPosition     = position;
        transform.position = new Vector3(_startPosition.x - 0.3f, _startPosition.y + 0.48f, _startPosition.z);

        _lifeTime             = 0f;
        _isShield             = false;
        _isRing               = false;
        _isWeb                = false;
        _isLose               = false;
        _isGoal               = false;
        _isGoalTrigger        = false;
        _isGoalTrigger2       = false;
        _isSetStartPoint      = false;
        _isHideBall           = false;
        _isShowBall           = true;
        transform.localScale  = new Vector3(0f, 0f, transform.localScale.z);
        transform.rotation    = Quaternion.identity;
        _isThrow              = false;
        _body.isKinematic     = true;
        _body.velocity        = new Vector2();
        _body.angularVelocity = 0f;
        _body.rotation        = 0;

        _isTryThrow  = false;
        _pointsCount = 1;
        Defs.PlaySound(_ballRespown);
        ParticleTrail.Stop();
    }
Exemple #26
0
        public bool IsDefinded(string word, PartOfSpeech pos)
        {
            // db query about 10 times slower than dictionary
            // return Lemmas.Any(l => l.Value == word && l.Poses.Contains(pos.symbol));

            // string posSym;
            // return Words.TryGetValue(word, out posSym) && posSym.Contains(pos.symbol);

            PosGlosses[] defs;
            return(Defs.TryGetValue(word, out defs) && defs.Any(def => def.Pos == pos.symbol));
        }
Exemple #27
0
 public IRAssignment(IRBasicBlock parentBlock, IRExpression destination, IRExpression source)
     : base(parentBlock)
 {
     Destination = destination;
     Source      = source;
     if (Destination is IRVariable v)
     {
         Defs.Add(v);
     }
     Uses.UnionWith(Source.GetAllVariables());
 }
        // flagToggle _flagToggle FlagToggle

        private void ForceQuit()
        {
            var rp = RemoteProc.Instance();

            if (rp == null)
            {
                return;
            }

            rp.Write(Defs.PointerByName("QuitToTitle").GetAddress(rp), (byte)1);
        }
Exemple #29
0
        ///<summary></summary>
        public static Def CreateDefinition(DefCat category, string itemName, string itemValue = "", Color itemColor = new Color())
        {
            Def def = new Def();

            def.Category  = category;
            def.ItemColor = itemColor;
            def.ItemName  = itemName;
            def.ItemValue = itemValue;
            Defs.Insert(def);
            return(def);
        }
        private void BtnSave_Click(object sender, EventArgs e)
        {
            // We have to rewrite the entire inventory so first let's build it

            var invBytes = new List <byte[]>();

            try {
                for (var currentRow = 0; currentRow < itemGrid.RowCount; currentRow++)
                {
                    var itemName    = itemGrid.Rows[currentRow].Cells[1].Value.ToString();
                    var item        = Defs.ItemByName(itemName);
                    var initialItem = _items.ElementAt(currentRow);
                    if (item == null)
                    {
                        invBytes.Add(initialItem);
                        continue;
                    }

                    var id0Bytes      = BitConverter.GetBytes(item.Id1).Concat(new byte[] { 0x00, 0xB0 }).ToArray();
                    var id2Bytes      = BitConverter.GetBytes(item.Id1).Concat(new byte[] { 0x00, 0x40 }).ToArray();
                    var quantityBytes = BitConverter.GetBytes(Convert.ToInt32(itemGrid.Rows[currentRow].Cells[2].Value.ToString(), 10));
                    //var someIdBytes = BitConverter.GetBytes(item.Id2).ToArray().Take(3);
                    var indexBytes       = initialItem.Skip(12).Take(4);
                    var actualFinalBytes = id0Bytes.Concat(id2Bytes).Concat(quantityBytes).Concat(indexBytes).ToArray();

                    invBytes.Add(actualFinalBytes);
                }
            } catch (Exception ex) {
                Debug.WriteLine(ex);
                MetroMessageBox.Show(this, ex.Message, "Error", MessageBoxButtons.OK,
                                     MessageBoxIcon.Error);
            }

            Debug.WriteLine("SPIDER");
            foreach (var bytese in invBytes)
            {
                Debug.WriteLine(BitConverter.ToString(bytese).Replace("-", " "));
            }

            Debug.WriteLine("=========");

            Debug.WriteLine("MEMORY");
            foreach (var bytese in _items)
            {
                Debug.WriteLine(BitConverter.ToString(bytese).Replace("-", " "));
            }

            Debug.WriteLine("Trying to write spider");

            using (var remoteProc = new RemoteProcess(Utils.Sekiro())) {
                var address = remoteProc.Read <IntPtr>(new IntPtr(0x143B49D10)) + 0x2E30;
                remoteProc.WriteBytes(address, invBytes.SelectMany(b => b).ToArray());
            }
        }
Exemple #31
0
 /// <summary>
 /// Send a message to server
 /// </summary>
 /// <param name="Message"></param>
 /// <param name="Pr"></param>
 public void DeliverMessage(string Message, Defs.Priority Pr = Defs.Priority.Normal)
 {
     Message text = new Message();
     text._Priority = Pr;
     text.message = Message;
     lock (messages)
     {
         messages.Add(text);
         return;
     }
 }
Exemple #32
0
        protected override void InternalOnAddedToBattle(EntityParam param)
        {
            base.InternalOnAddedToBattle(param);

            Hashtable def = Defs.GetEntity(this.id);

            this.detectRange = def.GetFloat("detect_range");
            this.angleSpeed  = def.GetFloat("angle_speed");
            this.angleSpeed2 = def.GetFloat("angle_speed2");
            this.dashDelay   = def.GetFloat("dash_delay");
            this.dashDelay2  = def.GetFloat("dash_delay2");
        }
Exemple #33
0
        public void MigrarDEF()
        {
            var conexao = Conexao.CreateSessionFactoryOracle();
            DefsIntegracao defs = new DefsIntegracao(conexao.OpenSession());

            var listaDefIntegracao = defs.All<DefMigracao>();

            Defs repositorioDef = new Defs(Conexao.CreateSessionFactory().OpenSession());

            List<Def> listaDef = new List<Def>();

            foreach (var defIntegracao in listaDefIntegracao)
            {
                var def = new Def();
                def.Description = defIntegracao.Produto;

                listaDef.Add(def);
            }

            repositorioDef.SalvarLista(listaDef);
        }
Exemple #34
0
 /// <summary>
 /// /me style
 /// </summary>
 /// <param name="text"></param>
 /// <param name="to"></param>
 /// <param name="priority"></param>
 /// <returns></returns>
 public override Result Act(string text, string to, Network network, Defs.Priority priority = Defs.Priority.Normal)
 {
     Transfer("PRIVMSG " + to + " :" + Separator.ToString() + "ACTION " + text + Separator.ToString(), priority);
     return Result.Done;
 }
Exemple #35
0
 /// <summary>
 /// Send a message either to channel or user
 /// </summary>
 /// <param name="text">Text.</param>
 /// <param name="to">To.</param>
 /// <param name="priority">Priority.</param>
 public virtual void Message(string text, string to, Defs.Priority priority = Defs.Priority.Normal)
 {
     Message(text, to, null, priority);
 }
Exemple #36
0
 /// <summary>
 /// Sends a message either to channel or user
 /// </summary>
 /// <param name="text"></param>
 /// <param name="to"></param>
 /// <param name="network"></param>
 /// <param name="priority"></param>
 /// <param name="pmsg"></param>
 /// <returns></returns>
 public override Result Message(string text, string to, Network network, Defs.Priority priority = Defs.Priority.Normal)
 {
     Transfer("PRIVMSG " + to + " :" + text, priority);
     return Result.Done;
 }
Exemple #37
0
 /// <summary>
 /// Transfer
 /// </summary>
 /// <param name="text"></param>
 /// <param name="priority"></param>
 /// <param name="network"></param>
 public override Result Transfer(string text, Defs.Priority priority = Defs.Priority.Normal, Network network = null)
 {
     Messages.DeliverMessage(text, priority);
     return Result.Done;
 }