public void OnTriggerEnter(Collider other)
 {
     otherBehaviourObj = other.GetComponent <IDBehavior>();
     if (otherBehaviourObj == null)
     {
         return;
     }
     otherIdObj = otherBehaviourObj.nameIdObj;
     CheckId(1);
 }
 private void OnTriggerExit(Collider other)
 {
     otherBehaviourObj = other.GetComponent <IDBehavior>();
     if (otherBehaviourObj == null)
     {
         return;
     }
     otherIdObj = otherBehaviourObj.nameIdObj;
     CheckId(3);
 }
    private IEnumerator OnTriggerExit(Collider other)
    {
        otherBehaviourObj = other.GetComponent <IDBehavior>();
        if (otherBehaviourObj == null)
        {
            yield break;
        }
        otherIdObj = otherBehaviourObj.nameIdObj;
        yield return(waitExitObj);

        CheckId(3);
    }
Exemplo n.º 4
0
    protected static IDNameList fillIDNameList(string selectStr)
    {
        //select personID and jump type 'SJ' mean
        dbcmd.CommandText = selectStr;
        LogB.SQL(dbcmd.CommandText.ToString());
        dbcmd.ExecuteNonQuery();

        SqliteDataReader reader = dbcmd.ExecuteReader();

        IDNameList list = new IDNameList();
        while(reader.Read()) {
            IDName idname = new IDName( Convert.ToInt32(reader[0].ToString()),
                        reader[1].ToString());
            LogB.SQL(idname.ToString());

            list.Add(new IDName( Convert.ToInt32(reader[0].ToString()),
                        reader[1].ToString() ));
        }
        reader.Close();
        return list;
    }
Exemplo n.º 5
0
        private void CreateImbueList()
        {
            List<IDNameLoadable> TempList = new List<IDNameLoadable>();

            IDNameLoadable info;
            info = new IDNameLoadable(0x1 ,"Critical Strike");
            TempList.Add(info);
            info = new IDNameLoadable(0x2 ,"Cripping Blow");
            TempList.Add(info);
            info = new IDNameLoadable(0x4 ,"Armor Rending");
            TempList.Add(info);
            info = new IDNameLoadable(0x8, "Slash Rending");
            TempList.Add(info);
            info = new IDNameLoadable(0x10, "Pierce Rending");
            TempList.Add(info);
            info = new IDNameLoadable(0x20, "Bludgeon Rending");
            TempList.Add(info);
            info = new IDNameLoadable(0x40, "Acid Rending");
            TempList.Add(info);
            info = new IDNameLoadable(0x80, "Cold Rending");
            TempList.Add(info);
            info = new IDNameLoadable(0x100, "Light Rending");
            TempList.Add(info);
            info = new IDNameLoadable(0x200, "Fire Rending");
            TempList.Add(info);
            info = new IDNameLoadable(0x400, "Melee Defense Imbued");
            TempList.Add(info);
            info = new IDNameLoadable(0x800, "Missile Defense Imbued");
            TempList.Add(info);
            info = new IDNameLoadable(0x1000, "Magic Defense Imbued");
            TempList.Add(info);
            info = new IDNameLoadable(0x2000, "Hematited");
            TempList.Add(info);
            info = new IDNameLoadable(0x20000000,"Magic Absorb Imbued");
            TempList.Add(info);

                foreach(IDNameLoadable idl in TempList.OrderBy(x => x.name))
                {
                    IDName id = new IDName();
                    id.name = idl.name;
                    id.ID = idl.ID;
                    nDataTable.ImbueList.Add(id);
                }

                TempList.Clear();
        }
Exemplo n.º 6
0
        private void CreateElementalInvList()
        {
            List<IDNameLoadable> ElementalInvList = new List<IDNameLoadable>();
            IDNameLoadable info;

            info = new IDNameLoadable(0, "None");
            ElementalInvList.Add(info);
            info = new IDNameLoadable(1, "Slashing");
            ElementalInvList.Add(info);
            info = new IDNameLoadable(2, "Piercing");
            ElementalInvList.Add(info);
            info = new IDNameLoadable(3, "Slashing:Piercing");
            ElementalInvList.Add(info);
            info = new IDNameLoadable(4, "Bludgeoning");
            ElementalInvList.Add(info);
            info = new IDNameLoadable(8, "Cold");
            ElementalInvList.Add(info);
            info = new IDNameLoadable(16, "Fire");
            ElementalInvList.Add(info);
            info = new IDNameLoadable(32, "Acid");
            ElementalInvList.Add(info);
            info = new IDNameLoadable(64, "Electric");
            ElementalInvList.Add(info);
            info = new IDNameLoadable(1024, "Void");
            ElementalInvList.Add(info);

            foreach(IDNameLoadable idl in ElementalInvList)
            {
                IDName idn = new IDName();
                idn.ID = idl.ID;
                idn.name = idl.name;
                nDataTable.ElementalInvList.Add(idn);
            }
        }
Exemplo n.º 7
0
        private void CreateEmbueInvList()
        {
            try
            {
                List<IDNameLoadable> EmbueInvList = new List<IDNameLoadable>();
                IDNameLoadable info;
                info = new IDNameLoadable(0, "None");
                EmbueInvList.Add(info);
                info = new IDNameLoadable(1, "Critical_Strike");
                EmbueInvList.Add(info);
                info = new IDNameLoadable(2, "Crippling_Blow");
                EmbueInvList.Add(info);
                info = new IDNameLoadable(4, "Armor");
                EmbueInvList.Add(info);
                info = new IDNameLoadable(8, "Slashing");
                EmbueInvList.Add(info);
                info = new IDNameLoadable(16, "Piercing");
                EmbueInvList.Add(info);
                info = new IDNameLoadable(32, "Bludgeon");
                EmbueInvList.Add(info);
                info = new IDNameLoadable(64, "Acid");
                EmbueInvList.Add(info);
                info = new IDNameLoadable(128, "Frost");
                EmbueInvList.Add(info);
                info = new IDNameLoadable(256, "Lightning");
                EmbueInvList.Add(info);
                info = new IDNameLoadable(512, "Fire");
                EmbueInvList.Add(info);
                info = new IDNameLoadable(1000, "MagicD_PlusOne");
                EmbueInvList.Add(info);

                foreach(IDNameLoadable idl in EmbueInvList)
                {
                    IDName idn = new IDName();
                    idn.ID = idl.ID;
                    idn.name = idl.name;
                    nDataTable.EmbueInvList.Add(idn);
                }

            }
            catch (Exception ex) { LogError(ex); }
        }
Exemplo n.º 8
0
 private void CreateAttribIndex()
 {
     for(int i = 0; i < fs.AttributeTable.Length; i++)
     {
         IDName info = new IDName();
         info.ID = i;
         try
         {
             info.name = (fs.AttributeTable.GetById(i)).Name;
         }
         catch
         {
             info.name = "NoAttrib";
         }
         nDataTable.AttribIndex.Add(info);
     }
 }
Exemplo n.º 9
0
 private void CreateComponentTable()
 {
     try
     {
         for(int i = 0; i < fs.ComponentTable.Length; i++)
         {
             IDName tcomp = new IDName();
             tcomp.ID = fs.ComponentTable[i].Id;
             tcomp.name = fs.ComponentTable[i].Name;
             nDataTable.ComponentList.Add(tcomp);
         }
     }catch(Exception ex){LogError(ex);}
 }
Exemplo n.º 10
0
        private void CreateSalvageWorkInvList()
        {
            try
            {
                List<IDNameLoadable> SalvageWorkInvList = new List<IDNameLoadable>();
               IDNameLoadable info;
                info = new IDNameLoadable(0, "None");
                SalvageWorkInvList.Add(info);
                info = new IDNameLoadable(1, "1-6");
                SalvageWorkInvList.Add(info);
                info = new IDNameLoadable(2, "7-8");
                SalvageWorkInvList.Add(info);
                info = new IDNameLoadable(3, "9");
                SalvageWorkInvList.Add(info);
                info = new IDNameLoadable(4, "10");
                SalvageWorkInvList.Add(info);

                foreach(IDNameLoadable idl in SalvageWorkInvList)
                {
                    IDName idn = new IDName();
                    idn.ID = idl.ID;
                    idn.name = idl.name;
                    nDataTable.SalvageWorkInvList.Add(idn);
                }
            }
            catch (Exception ex) { LogError(ex); }
        }
Exemplo n.º 11
0
        private void CreateArmorSetsInvList()
        {
            List<IDNameLoadable> ArmorSetsInvList = new List<IDNameLoadable>();
            IDNameLoadable info = new IDNameLoadable(0,"None");
            ArmorSetsInvList.Add(info);
            var armors = from sets in nDataTable.SetsIndex
                         where !sets.name.Contains("Weave") && !sets.name.Contains("Unknown") && !sets.name.Contains("Sigil")
                            orderby sets.name
                         select sets;
            foreach (var armorsets in armors)
            {
                info = new IDNameLoadable(armorsets.ID, armorsets.name);
                ArmorSetsInvList.Add(info);
            }
            var armors2 = from sets2 in nDataTable.SetsIndex
                         where sets2.name.Contains("Weave")
                         orderby sets2.name
                         select sets2;
            foreach (var armorsets2 in armors2)
            {
                info = new IDNameLoadable(armorsets2.ID, armorsets2.name);
                ArmorSetsInvList.Add(info);
               }

            foreach(IDNameLoadable idl in ArmorSetsInvList)
            {
                IDName idn = new IDName();
                idn.ID = idl.ID;
                idn.name = idl.name;
                nDataTable.ArmorSetsInvList.Add(idn);
            }
        }
Exemplo n.º 12
0
        private void CreateMeleeTypeInvList()
        {
            try
            {
                IDNameLoadable info;
                List<IDNameLoadable> MeleeTypeInvList = new List<IDNameLoadable>();

                info = new IDNameLoadable(0, "None");
                MeleeTypeInvList.Add(info);
               info = new IDNameLoadable(41, "TwoHanded");
               MeleeTypeInvList.Add(info);
               info = new IDNameLoadable(44, "Heavy");
               MeleeTypeInvList.Add(info);
               info = new IDNameLoadable(45, "Light");
               MeleeTypeInvList.Add(info);
               info = new IDNameLoadable(46, "Finesse");
               MeleeTypeInvList.Add(info);

               foreach(IDNameLoadable item in MeleeTypeInvList)
               {
               		IDName idn = new IDName();
               		idn.name = item.name;
               		idn.ID = item.ID;
               		nDataTable.MeleeTypeInvList.Add(idn);
               }
            }
            catch (Exception ex) { LogError(ex); }
        }
Exemplo n.º 13
0
        private void CreateRatingTable()
        {
            try
            {
                IDName idn  = new IDName();
                idn.ID = (int)ALongValueKeys.Crit;
                idn.name = "Crit";
                nDataTable.RatingList.Add(idn);
                idn = new IDName();
                idn.ID = (int)ALongValueKeys.CritResist;
                idn.name = "Crit Resist";
                nDataTable.RatingList.Add(idn);
                idn = new IDName();
                idn.ID = (int)ALongValueKeys.CritDam;
                idn.name = "Crit Dam";
                nDataTable.RatingList.Add(idn);
                idn = new IDName();
                idn.ID = (int)ALongValueKeys.CritDamResist;
                idn.name = "Crit Dam Resist";
                nDataTable.RatingList.Add(idn);
                idn = new IDName();
                idn.ID = (int)ALongValueKeys.Dam;
                idn.name = "Dam";
                nDataTable.RatingList.Add(idn);
                idn = new IDName();
                idn.ID = (int)ALongValueKeys.DamResist;
                idn.name = "Dam Resist";
                nDataTable.RatingList.Add(idn);

            }catch(Exception ex){LogError(ex);}
        }
Exemplo n.º 14
0
        private void CreateMaterialInvList()
        {
            List<IDNameLoadable> MaterialInvList = new List<IDNameLoadable>();
            var materials = from mat in nDataTable.MaterialIndex
                           orderby mat.name
                           select mat;
            IDNameLoadable info = new IDNameLoadable(0, "None");
            MaterialInvList.Add(info);
            foreach (var material in materials)
            {
                info = new IDNameLoadable(material.ID, material.name);
                MaterialInvList.Add(info);
            }

            foreach(IDNameLoadable idl in MaterialInvList)
            {
                IDName idn = new IDName();
                idn.ID = idl.ID;
                idn.name = idl.name;
                nDataTable.MaterialInvList.Add(idn);
            }
        }
Exemplo n.º 15
0
        private void CreateMasteryIndex()
        {
            List<IDNameLoadable> TempList = new List<IDNameLoadable>();

            string[] loadme = {"None", "Unarmed", "Sword", "Axe", "Mace", "Spear", "Dagger", "Staff", "Bow", "Crossbow", "Thrown", "TwoHanded", "Magical Spells", "Naturalist", "Primalist", "Necromancer"};
            //Nat 13, Prim 14, Necro 15
            int i = 0;
            foreach(string load in loadme)
            {
                IDNameLoadable info = new IDNameLoadable(i++, load);
                TempList.Add(info);
            }

                foreach(IDNameLoadable idl in TempList.OrderBy(x => x.ID))
                {
                    IDName id = new IDName();
                    id.name = idl.name;
                    id.ID = idl.ID;
                    nDataTable.MasteryIndex.Add(id);
                }

                TempList.Clear();
        }
Exemplo n.º 16
0
        private void CreateKeyLists()
        {
            try
            {
                List<IDNameLoadable> TempList = new List<IDNameLoadable>();

                IDNameLoadable info;
                info = new IDNameLoadable(0, "None");
                TempList.Add(info);
                info = new IDNameLoadable((int)LongValueKey.ActivationReqSkillId, "ActivationReqSkillId");
                TempList.Add(info);
                info = new IDNameLoadable((int)LongValueKey.ActiveSpellCount, "ActiveSpellCount");
                TempList.Add(info);
                info = new IDNameLoadable((int)LongValueKey.ArmorLevel, "ArmorLevel");
                TempList.Add(info);
                info = new IDNameLoadable((int)LongValueKey.CleaveType, "CleaveType");
                TempList.Add(info);
                info = new IDNameLoadable((int)ALongValueKeys.Crit, "Crit");
                TempList.Add(info);
                info = new IDNameLoadable((int)ALongValueKeys.CritDam, "CritDam");
                TempList.Add(info);
                info = new IDNameLoadable((int)ALongValueKeys.CritDamResist, "CritDamResist");
                TempList.Add(info);
                info = new IDNameLoadable((int)ALongValueKeys.CritResist, "CritResist");
                TempList.Add(info);
                info = new IDNameLoadable((int)ALongValueKeys.Dam, "Dam");
                TempList.Add(info);
                info = new IDNameLoadable((int)ALongValueKeys.DamageAbsorb, "DamAbsorb");
                TempList.Add(info);
                info = new IDNameLoadable((int)ALongValueKeys.DamResist, "DamResist");
                TempList.Add(info);
                info = new IDNameLoadable((int)LongValueKey.ElementalDmgBonus, "ElementalDmgBonus");
                TempList.Add(info);
                info = new IDNameLoadable((int)LongValueKey.Heritage, "Heritage");
                TempList.Add(info);
                info = new IDNameLoadable((int)LongValueKey.MagicDef, "MagicDef");
                TempList.Add(info);
                info = new IDNameLoadable((int)LongValueKey.MaxDamage, "MaxDamage");
                TempList.Add(info);
                info = new IDNameLoadable((int)ALongValueKeys.MaxItemLevel, "MaxItemLevel");
                TempList.Add(info);
                info = new IDNameLoadable((int)LongValueKey.MissileType, "MissileType");
                TempList.Add(info);
                info = new IDNameLoadable((int)LongValueKey.RankRequirement, "RankRequirement");
                TempList.Add(info);
                info = new IDNameLoadable((int)ALongValueKeys.SummoningSkill, "SummoningSkill");
                TempList.Add(info);
                info = new IDNameLoadable((int)LongValueKey.Unenchantable, "Unenchantable");
                TempList.Add(info);
                info = new IDNameLoadable((int)LongValueKey.WandElemDmgType, "WandElemDmgType");
                TempList.Add(info);
                info = new IDNameLoadable((int)ALongValueKeys.WeaponMastery, "WeaponMastery");
                TempList.Add(info);
                info = new IDNameLoadable((int)LongValueKey.WeapSpeed, "WeapSpeed");
                TempList.Add(info);
                info = new IDNameLoadable((int)LongValueKey.WieldReqAttribute, "WieldReqAttribute");
                TempList.Add(info);
                info = new IDNameLoadable((int)LongValueKey.WieldReqValue, "WieldReqValue");
                TempList.Add(info);
                info = new IDNameLoadable((int)ALongValueKeys.WieldReqAttribute2, "WieldReqAttribute2");
                TempList.Add(info);
                info = new IDNameLoadable((int)ALongValueKeys.WieldReqValue2, "WieldReqValue2");
                TempList.Add(info);

                nDataTable.LongKeyList.Clear();

                foreach(IDNameLoadable idl in TempList)
                {
                    IDName id = new IDName();
                    id.name = idl.name;
                    id.ID = idl.ID;
                    nDataTable.LongKeyList.Add(id);
                }

                TempList.Clear();

                info = new IDNameLoadable(0, "None");
                TempList.Add(info);
                info = new IDNameLoadable((int)DoubleValueKey.AttackBonus, "AttackBonus");
                TempList.Add(info);
                info = new IDNameLoadable((int)DoubleValueKey.DamageBonus, "DamageBonus");
                TempList.Add(info);
                info = new IDNameLoadable((int)DoubleValueKey.ElementalDamageVersusMonsters, "ElementalDamVsMonsters");
                TempList.Add(info);
                info = new IDNameLoadable((int)DoubleValueKey.MagicDBonus, "MagicDBonus");
                TempList.Add(info);
                info = new IDNameLoadable((int)DoubleValueKey.ManaCBonus, "ManaCBonus");
                TempList.Add(info);
                info = new IDNameLoadable((int)DoubleValueKey.MeleeDefenseBonus, "MeleeDBonus");
                TempList.Add(info);
                info = new IDNameLoadable((int)DoubleValueKey.MissileDBonus, "MissileDBonus");
                TempList.Add(info);
                info = new IDNameLoadable((int)DoubleValueKey.Variance, "Variance");
                TempList.Add(info);

                nDataTable.DoubleKeyList.Clear();
                foreach(IDNameLoadable idl in TempList)
                {
                    IDName id = new IDName();
                    id.name = idl.name;
                    id.ID = idl.ID;
                    nDataTable.DoubleKeyList.Add(id);
                }

            }catch(Exception ex){LogError(ex);}
        }
Exemplo n.º 17
0
        private void createTitlesList()
        {
            List<IDNameLoadable> TempList = new List<IDNameLoadable>();

            //            IDNameLoadable info;

            Titles = new List<IDName>();
            IDName id = new IDName();
            id.name = "None";
            id.ID = 0;
            Titles.Add(id);
            //foreach (IDNameLoadable idl in TempList.OrderBy(x => x.name)) ;

            //List<IDName> temp = new List<IDName>();
            //foreach (IDNameLoadable idl in TempList)
            //{
            //    id = new IDName();
            //    id.name = idl.name;
            //    id.ID = idl.ID;
            //    temp.Add(id);
            //}

            //Titles.AddRange(temp);
        }
Exemplo n.º 18
0
        private void CreateSetsIndex()
        {
            List<IDNameLoadable> TempList = new List<IDNameLoadable>();

            string[] loadme = {"Unknown Set 0", "Unknown Set 1", "Unknown Set 2", "Unknown Set 3", "Unknown Set 4", "Noble Relic Set", "Ancient Relic Set",
                                "Relic Alduressa Set", "Shou-jen Set", "Empyrean Rings Set", "Arm, Mind, Heart Set", "Coat of the Perfect Light Set",
                                "Leggings of Perfect Light Set", "Soldier's Set", "Adept's Set", "Archer's Set", "Defender's Set", "Tinker's Set", "Crafter's Set",
                                "Hearty Set", "Dexterous Set", "Wise Set", "Swift Set", "Hardenend Set", "Reinforced Set", "Interlocking Set", "Flame Proof Set",
                                "Acid Proof Set", "Cold Proof Set", "Lightning Proof Set", "Dedication Set", "Gladiatorial Clothing Set", "Protective Clothing Set",
                                "Unknown Set 33", "Unknown Set 34", "Sigil of Defense", "Sigil of Destruction", "Sigil of Fury", "Sigil of Growth", "Sigil of Vigor",
                                "Heroic Protector Set", "Heroic Destroyer Set", "Unknown Set 42", "Unknown Set 43", "Unknown Set 44", "Unknown Set 45", "Unknown Set 46",
                                "Unknown Set 47", "Unknown Set 48", "Weave of Alchemy", "Weave of Arcane Lore", "Weave of Armor Tinkering", "Weave of Assess Person",
                                "Weave of Light Weapons", "Weave of Missile Weapons", "Weave of Cooking", "Weave of Creature Enchantment", "Weave of Missile Weapons",
                                "Weave of Finesee Weapons", "Weave of Deception", "Weave of Fletching", "Weave of Healing", "Weave of Item Enchantment",
                                "Weave of Item Tinkering", "Weave of Leadership", "Weave of Life Magic", "Weave of Loyalty", "Weave of Light Weapons", "Weave of Magic Defense",
                                "Weave of Magic Item Tinkering", "Weave of Mana Conversion", "Weave of Melee Defense", "Weave of Missile Defense", "Weave of Salvaging",
                                "Weave of Light Weapons", "Weave of Light Weapons", "Weave of Heavy Weapons", "Weave of Missile Weapons", "Weave of Two Handed Combat",
                                "Weave of Light Weapons", "Weave of Void Magic", "Weave of War Magic", "Weave of Weapon Tinkering", "Weave of Assess Creature",
                                "Weave of Dirty Fighting", "Weave of Dual Wield", "Weave of Recklessness", "Weave of Shield", "Weave of Sneak Attack",
                                "Unknown Set 89","Weave of Summoning"
            };

            for(int i = 0; i < 200; i++)
            {
                if(i < loadme.Length) TempList.Add(new IDNameLoadable(i, loadme[i]));
                else TempList.Add(new IDNameLoadable(i, "Unknown Set " + i.ToString()));
            }

            TempList[139].name = "Paragon Set";

                foreach(IDNameLoadable idl in TempList)
                {
                    IDName id = new IDName();
                    id.name = idl.name;
                    id.ID = idl.ID;
                    nDataTable.SetsIndex.Add(id);
                }

                TempList.Clear();
        }
Exemplo n.º 19
0
        public string BuildSelectQuery(MySqlCommand cmd)
        {
            StringBuilder SelectBuilder = new StringBuilder("select * from `gaminginv`.`owner` where ");
            List <int>    PlaceHolder   = new List <int>();

            if (!IDName.Equals(string.Empty))
            {
                PlaceHolder.Add(1);
            }
            if (!PhoneNumber.Equals(string.Empty))
            {
                PlaceHolder.Add(2);
            }
            if (!EmailAddress.Equals(string.Empty))
            {
                PlaceHolder.Add(3);
            }
            if (!BadgeName.Equals(string.Empty))
            {
                PlaceHolder.Add(4);
            }
            if (OwnerID > 0)
            {
                PlaceHolder.Add(5);
            }
            for (int i = 0; i < PlaceHolder.Count - 1; i++)
            {
                switch (PlaceHolder.ElementAt(i))
                {
                case 1:
                    SelectBuilder.Append("`Name` like %" + "@NameParam" + "% + and ");
                    cmd.Parameters.AddWithValue("@NameParam", IDName.ToLower());
                    break;

                case 2:
                    SelectBuilder.Append("`Phone` = @PhoneParam and ");
                    cmd.Parameters.AddWithValue("@PhoneParam", PhoneNumber);
                    break;

                case 3:
                    SelectBuilder.Append("`Email` like %" + "@EmailParam" + "% and ");
                    cmd.Parameters.AddWithValue("@EmailParam", EmailAddress.ToLower());
                    break;

                case 4:
                    SelectBuilder.Append("`BadgeName` like %" + "@BadgeParam" + "% and ");
                    cmd.Parameters.AddWithValue("@BadgeParam", BadgeName.ToLower());
                    break;

                case 5:
                    SelectBuilder.Append("`ID` = @IDParam and ");
                    cmd.Parameters.AddWithValue("@IDParam", OwnerID);
                    break;
                }
            }
            switch (PlaceHolder.Last())
            {
            case 1:
                SelectBuilder.Append("`Name` like %" + "@NameParam" + '%');
                cmd.Parameters.AddWithValue("@NameParam", IDName.ToLower());
                break;

            case 2:
                SelectBuilder.Append("`Phone` = @PhoneParam");
                cmd.Parameters.AddWithValue("@PhoneParam", PhoneNumber);
                break;

            case 3:
                SelectBuilder.Append("`Email` like %" + "@EmailParam" + '%');
                cmd.Parameters.AddWithValue("@EmailParam", EmailAddress.ToLower());
                break;

            case 4:
                SelectBuilder.Append("`BadgeName` = @BadgeParam");
                cmd.Parameters.AddWithValue("@BadgeParam", BadgeName.ToLower());
                break;

            case 5:
                SelectBuilder.Append("`ID` = @IDParam");
                cmd.Parameters.AddWithValue("@IDParam", OwnerID);
                break;
            }
            SelectBuilder.Append(';');
            return(SelectBuilder.ToString());
        }
Exemplo n.º 20
0
        private void CreateSkillIndex()
        {
            int loopcounter = 0;
            for(int i = 0; i < fs.SkillTable.Length; i++)
            {
                if(fs.SkillTable[i].Id > loopcounter) {loopcounter = fs.SkillTable[i].Id;}
            }

            for(int i = 0; i <= loopcounter; i++)
            {
                IDName info = new IDName();
                info.ID = i;
                try
                {
                    info.name = (fs.SkillTable.GetById(i)).Name;
                }
                catch
                {
                    info.name = "NoSkill";
                }
                nDataTable.SkillIndex.Add(info);
            }
        }
Exemplo n.º 21
0
        private void CreateArmorSetsList()
        {
            List<IDName> armors = (from sets in nDataTable.SetsIndex
                where !sets.name.Contains("Unknown")
                orderby sets.name
                select sets).ToList();
            IDName idn = new IDName();
            idn.ID = 0;
            idn.name = "None";

            armors.Insert(0, idn);

            foreach(var armorsets in armors)
            {
                nDataTable.ArmorSetsList.Add(armorsets);
            }
        }
Exemplo n.º 22
0
        private void CreateSpeciesIndex()
        {
            try
            {
                IDName info;
                for(int i = 0; i < fs.SpeciesTable.Length; i++)
                {
                    info = new IDName();
                    info.ID = i;
                    try
                    {
                        info.name = (fs.SpeciesTable.GetById(i)).Name;
                    }
                    catch
                    {
                        info.name = "NoSpecies";
                    }
                    nDataTable.SpeciesIndex.Add(info);
                }

            }catch(Exception ex){LogError(ex);}
        }
Exemplo n.º 23
0
        private void CreateClassInvList()
        {
            string[] loadme = {"None","Armor","Clothing","Jewelry","WandStaffOrb","MeleeWeapon", "MissileWeapon",
                                  "Salvage","Scroll","HealingKit","Food" ,"Gem", "CraftedFletching", "BaseCooking",
                                  "CraftedAlchemy", "SpellComponent", "Key", "Misc", "ManaStone", "BooksPaper","TradeNote"};

            int i = 0;
            foreach (string load in loadme)
            {
                IDName info = new IDName();
                info.ID = i++;
                info.name = load;

                nDataTable.ClassInvList.Add(info);
            }
        }
Exemplo n.º 24
0
        private void CreateValetSlotList()
        {
            List<IDNameLoadable> TempList = new List<IDNameLoadable>();

            IDNameLoadable info;

            info = new IDNameLoadable(0x1 ,"Head");
            TempList.Add(info);
            info = new IDNameLoadable(0x2 ,"Shirt");
            TempList.Add(info);
            info = new IDNameLoadable(0x40 ,"Pants");
            TempList.Add(info);
            info = new IDNameLoadable(0x20 ,"Hands");
            TempList.Add(info);
            info = new IDNameLoadable(0x100 ,"Feet");
            TempList.Add(info);
            info = new IDNameLoadable(0x200 ,"Breast Plate");
            TempList.Add(info);
            info = new IDNameLoadable(0x400 ,"Girth");
            TempList.Add(info);
            info = new IDNameLoadable(0x800 ,"Pauldrons");
            TempList.Add(info);
            info = new IDNameLoadable(0x1000 ,"Bracers");
            TempList.Add(info);
            info = new IDNameLoadable(0x2000 ,"Tassets");
            TempList.Add(info);
            info = new IDNameLoadable(0x4000 ,"Greaves");
            TempList.Add(info);
            info = new IDNameLoadable(0x8000 ,"Necklace");
            TempList.Add(info);
            info = new IDNameLoadable(0x10000 ,"Right Bracelet");
            TempList.Add(info);
            info = new IDNameLoadable(0x20000 ,"Left Bracelet");
            TempList.Add(info);
            info = new IDNameLoadable(0x40000 ,"Right Ring");
            TempList.Add(info);
            info = new IDNameLoadable(0x80000 ,"Left Ring");
            TempList.Add(info);
            //			info = new IDNameLoadable(0x100000 ,"Melee Weapon");
            //			TempList.Add(info);
            //			info = new IDNameLoadable(0x200000 ,"Shield");
            //			TempList.Add(info);
            //			info = new IDNameLoadable(0x400000 ,"MissileWeapon");
            //			TempList.Add(info);
            //			info = new IDNameLoadable(0x800000 ,"Ammunition");
            //			TempList.Add(info);
            //			info = new IDNameLoadable(0x1000000 ,"Caster");
            //			TempList.Add(info);
            //			info = new IDNameLoadable(0x2000000 ,"TwoHanded");
            //			TempList.Add(info);
            info = new IDNameLoadable(0x4000000 ,"Trinket");
            TempList.Add(info);
            info = new IDNameLoadable(0x8000000 ,"Cloak");
            TempList.Add(info);
            info = new IDNameLoadable(0x10000000 ,"Blue Aetheria");
            TempList.Add(info);
            info = new IDNameLoadable(0x20000000 ,"Yellow Aetheria");
            TempList.Add(info);
            info = new IDNameLoadable(0x40000000 ,"Red Aetheria");
            TempList.Add(info);

            foreach(IDNameLoadable idl in TempList.OrderBy(x => x.name))
            {
                IDName id = new IDName();
                id.name = idl.name;
                id.ID = idl.ID;
                nDataTable.SwapSlotList.Add(id);
            }

            TempList.Clear();
        }
Exemplo n.º 25
0
        private void CreateCoverageInvList()
        {
            try
            {
                List<IDNameLoadable> CoverageInvList = new List<IDNameLoadable>();
                IDNameLoadable info;
                info = new IDNameLoadable(0, "None");
                CoverageInvList.Add(info);
                info = new IDNameLoadable(256, "Upper_Leg");
                CoverageInvList.Add(info);
                info = new IDNameLoadable(512, "Lower_Leg");
                CoverageInvList.Add(info);
                info = new IDNameLoadable(1024, "Chest");
                CoverageInvList.Add(info);
                info = new IDNameLoadable(2048, "Abdomen");
                CoverageInvList.Add(info);
                info = new IDNameLoadable(4096, "Upper_Arm");
                CoverageInvList.Add(info);
                info = new IDNameLoadable(8192, "Lower_Arm");
                CoverageInvList.Add(info);
                info = new IDNameLoadable(16384, "Head");
                CoverageInvList.Add(info);
                info = new IDNameLoadable(32768, "Hands");
                CoverageInvList.Add(info);
                info = new IDNameLoadable(65536, "Feet");
                CoverageInvList.Add(info);
                info = new IDNameLoadable(768, "Upper_Lower_Legs");
                CoverageInvList.Add(info);
                info = new IDNameLoadable(2304, "Abdomen_Upper_Legs");
                CoverageInvList.Add(info);
                info = new IDNameLoadable(2816, "Abdomen_Upper_Lower_Legs");
                CoverageInvList.Add(info);
                info = new IDNameLoadable(12288, "Upper_Lower_Arms");
                CoverageInvList.Add(info);
                info = new IDNameLoadable(3072, "Chest_Abdomen");
                CoverageInvList.Add(info);
                info = new IDNameLoadable(5120, "Chest_Upper_Arms");
                CoverageInvList.Add(info);
                info = new IDNameLoadable(7168, "Chest_Abdomen_Upper_Arm");
                CoverageInvList.Add(info);
                info = new IDNameLoadable(13312, "Chest_Upper_Lower_Arms");
                CoverageInvList.Add(info);
                info = new IDNameLoadable(15360, "Chest_Abdomen_Upper_Lower_Arms");
                CoverageInvList.Add(info);
                info = new IDNameLoadable(8, "Underwear_Chest");
                CoverageInvList.Add(info);
                info = new IDNameLoadable(19, "Underwear_Abdomen_Upper_Legs");
                CoverageInvList.Add(info);
                info = new IDNameLoadable(22, "Underwear_Abdomen_Upper_Lower_Legs");
                CoverageInvList.Add(info);
                info = new IDNameLoadable(40, "Underwear_Chest_UpperArm");
                CoverageInvList.Add(info);
                info = new IDNameLoadable(104, "Underwear_Chest_Upper_LowerArms");
                CoverageInvList.Add(info);
                info = new IDNameLoadable(131072, "Cloak");
                CoverageInvList.Add(info);

                foreach(IDNameLoadable idl in CoverageInvList)
                {
                    IDName idn = new IDName();
                    idn.ID = idl.ID;
                    idn.name = idl.name;
                    nDataTable.CoverageInvList.Add(idn);

                }

                 }
            catch (Exception ex) { LogError(ex); }
        }
Exemplo n.º 26
0
        private void CreateWeaponTypeList()
        {
            try
            {
                List<IDNameLoadable> TempList = new List<IDNameLoadable>();

                IDNameLoadable info;
                TempList.Clear();
                info = new IDNameLoadable(0, "None");
                TempList.Add(info);
                info = new IDNameLoadable(47, "Missile");
                TempList.Add(info);
                info = new IDNameLoadable(41, "TwoHanded");
                TempList.Add(info);
                info = new IDNameLoadable(44, "Heavy");
                TempList.Add(info);
                info = new IDNameLoadable(45, "Light");
                TempList.Add(info);
                info = new IDNameLoadable(46, "Finesse");
                TempList.Add(info);
                info = new IDNameLoadable(34, "War Magic");
                TempList.Add(info);
                info = new IDNameLoadable(43, "Void Magic");
                TempList.Add(info);
                info = new IDNameLoadable(54, "Summoning");
                TempList.Add(info);

                foreach(IDNameLoadable idl in TempList.OrderBy(x => x.name))
                {
                    IDName id = new IDName();
                    id.name = idl.name;
                    id.ID = idl.ID;
                    nDataTable.WeaponTypeList.Add(id);
                }

                TempList.Clear();

            }
            catch (Exception ex) { LogError(ex); }
        }
Exemplo n.º 27
0
        private void CreateElementalList()
        {
            List<IDNameLoadable> TempList = new List<IDNameLoadable>();

            IDNameLoadable info;

            info = new IDNameLoadable(0, "None");
            TempList.Add(info);
            info = new IDNameLoadable(32, "Acid");
            TempList.Add(info);
            info = new IDNameLoadable(4, "Bludgeoning");
            TempList.Add(info);
            info = new IDNameLoadable(8, "Cold");
            TempList.Add(info);
            info = new IDNameLoadable(64, "Electric");
            TempList.Add(info);
             			info = new IDNameLoadable(16, "Fire");
            TempList.Add(info);
            info = new IDNameLoadable(2, "Piercing");
            TempList.Add(info);
              			info = new IDNameLoadable(1, "Slashing");
            TempList.Add(info);

             			info = new IDNameLoadable(1024, "Void");
            TempList.Add(info);

                foreach(IDNameLoadable idl in TempList)
                {
                    IDName id = new IDName();
                    id.name = idl.name;
                    id.ID = idl.ID;
                    nDataTable.ElementalList.Add(id);
                }

                TempList.Clear();
        }
Exemplo n.º 28
0
 public int CompareTo(object obj)
 {
     return(IDName.CompareTo(obj));
 }
Exemplo n.º 29
0
 public void Add(IDName idName)
 {
     l.Add(idName);
 }
Exemplo n.º 30
0
        private void createPortalsList()
        {
            List<IDNameLoadable> TempList = new List<IDNameLoadable>();

            IDNameLoadable info;

            info = new IDNameLoadable(2645,"Portal Recall");
            TempList.Add(info);
            info = new IDNameLoadable(2644,"Lifestone Tie");
            TempList.Add(info);
            info = new IDNameLoadable(1635,"Lifestone Recall");
            TempList.Add(info);
            info = new IDNameLoadable(47,"Primary Portal Tie");
            TempList.Add(info);
            info = new IDNameLoadable(48,"Recall Primary Portal");
            TempList.Add(info);
            info = new IDNameLoadable(157,"Summon Primary Portal");
            TempList.Add(info);
            info = new IDNameLoadable(2646,"Secondary Portal Tie");
            TempList.Add(info);
            info = new IDNameLoadable(2647,"Secondary Portal Recall");
            TempList.Add(info);
            info = new IDNameLoadable(2648,"Summon Secondary Portal");
            TempList.Add(info);
            info = new IDNameLoadable(2023,"Sanctuary Recall");
            TempList.Add(info);
            info = new IDNameLoadable(2931,"Recall Aphus Lassel");
            TempList.Add(info);
            info = new IDNameLoadable(4213,"Colosseum Recall");
            TempList.Add(info);
            info = new IDNameLoadable(2041,"Aerlinthe Recall");
            TempList.Add(info);
            info = new IDNameLoadable(2943,"Recall to the Singularity Caul");
            TempList.Add(info);
            info = new IDNameLoadable(4084,"Bur Recall");
            TempList.Add(info);
            info = new IDNameLoadable(4198,"Paradox-touched Olthoi Infested Area Recall");
            TempList.Add(info);
            info = new IDNameLoadable(5175,"Facility Hub Recall");
            TempList.Add(info);
            info = new IDNameLoadable(2931,"Recall Aphus Lassel");
            TempList.Add(info);
            info = new IDNameLoadable(5330,"Gear Knight Invasion Area Camp Recall");
            TempList.Add(info);
            info = new IDNameLoadable(5541,"Lost City of Neftet Recall");
            TempList.Add(info);
            info = new IDNameLoadable(6150,"Rynthid Recall");
            TempList.Add(info);
            info = new IDNameLoadable(4128,"Call of the Mhoire Forge");
            TempList.Add(info);
            info = new IDNameLoadable(3865,"Glenden Wood Recall");
            TempList.Add(info);
            info = new IDNameLoadable(2941,"Ulgrim's");
            TempList.Add(info);
            info = new IDNameLoadable(4214,"Return to the Keep");
            TempList.Add(info);

            Portals = new List<IDName>();
            IDName id = new IDName();
            id.name = "None";
            id.ID = 0;
            Portals.Add(id);
            foreach(IDNameLoadable idl in TempList.OrderBy(x => x.name));

            List<IDName> temp = new List<IDName>();
            foreach(IDNameLoadable idl in TempList)
                {
                    id = new IDName();
                    id.name = idl.name;
                    id.ID = idl.ID;
                    temp.Add(id);
                }

            Portals.AddRange(temp);
        }
Exemplo n.º 31
0
        private void CreateWeaponWieldInvList()
        {
            try
            {
             List<IDNameLoadable> WeaponWieldInvList = new List<IDNameLoadable>();
            string[] loadme = {"None","No Wield","50","80","100","125","150","180","200","250","270","290","300", "310",
                                  "315","325","330","335" ,"350", "355", "360",
                                  "370", "375", "385", "400", "420","430"};

            int i = 0;
            foreach (string load in loadme)
            {
                IDNameLoadable info = new IDNameLoadable(i++, load);
                WeaponWieldInvList.Add(info);
            }

            foreach(IDNameLoadable idl in WeaponWieldInvList)
            {
                IDName idn = new IDName();
                idn.ID = idl.ID;
                idn.name = idl.name;
                nDataTable.WeaponWieldInvList.Add(idn);
            }

            }
            catch (Exception ex) { LogError(ex); }
        }
Exemplo n.º 32
0
        private void CreateHeritageIndex()
        {
            try
            {
                for(int i = 0; i < fs.HeritageTable.Length; i++)
                {
                    IDName info = new IDName();
                    info.ID = i;
                    try
                    {
                        info.name = (fs.HeritageTable.GetById(i)).Name;
                    }
                    catch
                    {
                        info.name = "NoHeritage";
                    }
                    nDataTable.HeritageIndex.Add(info);
                }

            }catch(Exception ex){LogError(ex);}
        }
Exemplo n.º 33
0
 public bool Equals(string other)
 {
     return(IDName.Equals(other));
 }
Exemplo n.º 34
0
        private void CreateAppliesToList()
        {
            try
            {
                List<IDNameLoadable> TempList = new List<IDNameLoadable>();

                IDNameLoadable info;

                info = new IDNameLoadable(0x1, "Melee Weapons");
                TempList.Add(info);
                info = new IDNameLoadable(0x2, "Armor");
                TempList.Add(info);
                info = new IDNameLoadable(0x4, "Clothing");
                TempList.Add(info);
                info = new IDNameLoadable(0x8, "Jewelry");
                TempList.Add(info);
                info = new IDNameLoadable(0x80, "Essences");
                TempList.Add(info);
                info = new IDNameLoadable(0x100, "Missile Weapons");
                TempList.Add(info);
                info = new IDNameLoadable(0x800, "Aetheria");
                TempList.Add(info);
                info = new IDNameLoadable(0x8000, "Casters");
                TempList.Add(info);

                nDataTable.AppliesToList.Clear();
                foreach(IDNameLoadable idl in TempList.OrderBy(x => x.name))
                {
                    IDName id = new IDName();
                    id.name = idl.name;
                    id.ID = idl.ID;
                    nDataTable.AppliesToList.Add(id);
                }

                TempList.Clear();
            }
            catch (Exception ex) { LogError(ex); }
        }
Exemplo n.º 35
0
        private void createSpecificLevelList()
        {
            List<IDNameLoadable> TempList = new List<IDNameLoadable>();

            IDNameLoadable info;
            info = new IDNameLoadable(70, "70");
            TempList.Add(info);
            info = new IDNameLoadable(80, "80");
            TempList.Add(info);
            info = new IDNameLoadable(90, "90");
            TempList.Add(info);
            info = new IDNameLoadable(100, "100");
            TempList.Add(info);
            info = new IDNameLoadable(150, "150");
            TempList.Add(info);
            info = new IDNameLoadable(180, "180");
            TempList.Add(info);
            info = new IDNameLoadable(200, "200");
            TempList.Add(info);

            SpecificLevels = new List<IDName>();
            IDName id = new IDName();
            id.name = "None";
            id.ID = 0;
            SpecificLevels.Add(id);
            //foreach (IDNameLoadable idl in TempList.OrderBy(x => x.name)) ;

            List<IDName> temp = new List<IDName>();
            foreach (IDNameLoadable idl in TempList)
            {
                id = new IDName();
                id.name = idl.name;
                id.ID = idl.ID;
                temp.Add(id);
            }

            SpecificLevels.AddRange(temp);
        }
Exemplo n.º 36
0
        private void CreateArmorIndex()
        {
            List<IDNameLoadable> TempList = new List<IDNameLoadable>();

            string[] loadme = {"Alduressa", "Amuli", "Celdon", "Chainmail", "Chiran", "Covenant", "Diforsa", "Haebrean", "Knorr",
                                    "Koujia", "Leather", "Lorica", "Nariyid", "Olthoi Alduressa", "Olthoi Amuli", "Olthoi Celdon",  "Olthoi Koujia",
                                    "Olthoi", "Over-robe", "Platemail", "Scalemail", "Sedgemail", "Studded", "Tenassa", "Yoroi", "Other"};
            int i = 0;
            foreach(string load in loadme)
            {
                IDNameLoadable info = new IDNameLoadable(i++, load);
                TempList.Add(info);
            }

                foreach(IDNameLoadable idl in TempList.OrderBy(x => x.name))
                {
                    IDName id = new IDName();
                    id.name = idl.name;
                    id.ID = idl.ID;
                    nDataTable.ArmorIndex.Add(id);
                }

                TempList.Clear();
        }
Exemplo n.º 37
0
        private void CreateArmorLevelInvList()
        {
            try
            {
                List<IDNameLoadable> ArmorLevelInvList = new List<IDNameLoadable>();
                IDNameLoadable info;
                info = new IDNameLoadable(0, "None");
                ArmorLevelInvList.Add(info);
               info = new IDNameLoadable(1, "No Wield");
               ArmorLevelInvList.Add(info);
               info = new IDNameLoadable(2, "60");
               ArmorLevelInvList.Add(info);
               info = new IDNameLoadable(3, "90");
               ArmorLevelInvList.Add(info);
               info = new IDNameLoadable(4, "100");
               ArmorLevelInvList.Add(info);
               info = new IDNameLoadable(5, "150");
               ArmorLevelInvList.Add(info);
               info = new IDNameLoadable(6, "180");
               ArmorLevelInvList.Add(info);
               info = new IDNameLoadable(7, "225");
               ArmorLevelInvList.Add(info);

               foreach(IDNameLoadable idl in ArmorLevelInvList)
               {
               		IDName idn = new IDName();
               		idn.ID = idl.ID;
               		idn.name = idl.name;
               		nDataTable.ArmorLevelInvList.Add(idn);
               }

            }
            catch (Exception ex) { LogError(ex); }
        }
Exemplo n.º 38
0
        public string BuildUpdateQuery(MySqlCommand cmd)
        {
            StringBuilder UpdateBuilder = new StringBuilder("update `gaminginv`.`owner` set ");
            List <int>    PlaceHolder   = new List <int>();

            if (!IDName.Equals(string.Empty))
            {
                PlaceHolder.Add(1);
            }
            if (!PhoneNumber.Equals(string.Empty))
            {
                PlaceHolder.Add(2);
            }
            if (!EmailAddress.Equals(string.Empty))
            {
                PlaceHolder.Add(3);
            }
            if (!BadgeName.Equals(string.Empty))
            {
                PlaceHolder.Add(4);
            }
            for (int i = 0; i < PlaceHolder.Count - 1; i++)
            {
                switch (PlaceHolder.ElementAt(i))
                {
                case 1:
                    UpdateBuilder.Append("`Name` = @NameParam" + ',');
                    cmd.Parameters.AddWithValue("@NameParam", IDName);
                    break;

                case 2:
                    UpdateBuilder.Append("`Phone` = @PhoneParam" + ',');
                    cmd.Parameters.AddWithValue("@PhoneParam", PhoneNumber);
                    break;

                case 3:
                    UpdateBuilder.Append("`Email` = @EmailParam" + ',');
                    cmd.Parameters.AddWithValue("@EmailParam", EmailAddress);
                    break;

                case 4:
                    UpdateBuilder.Append("`BadgeName` =  @BadgeParam" + ',');
                    cmd.Parameters.AddWithValue("@BadgeParam", BadgeName);
                    break;
                }
            }
            switch (PlaceHolder.Last())
            {
            case 1:
                UpdateBuilder.Append("`Name` = @NameParam");
                cmd.Parameters.AddWithValue("@NameParam", IDName);
                break;

            case 2:
                UpdateBuilder.Append("`Phone` = @PhoneParam");
                cmd.Parameters.AddWithValue("@PhoneParam", PhoneNumber);
                break;

            case 3:
                UpdateBuilder.Append("`Email` = @EmailParam");
                cmd.Parameters.AddWithValue("@EmailParam", EmailAddress);
                break;

            case 4:
                UpdateBuilder.Append("`BadgeName` = @BadgeParam");
                cmd.Parameters.AddWithValue("@BadgeParam", BadgeName);
                break;
            }
            //UpdateBuilder.AppendFormat(" where `ID` = {0} or `Name` = \'{1}\' or `Phone` = \'{2}\' or `Email` = \'{3}\' or `BadgeName` = \'{4}\';", OwnerID, NameStr, PhoneNum, EmailAddr, Badge);
            UpdateBuilder.Append(" where `ID` = @FinalIDParam" + ';');
            cmd.Parameters.AddWithValue("@FinalIDParam", OwnerID);
            return(UpdateBuilder.ToString());
        }