Ejemplo n.º 1
0
    /// <summary>
    /// 切换武器
    /// </summary>
    /// <param name="idx"></param>
    /// <returns></returns>
    bool SwitchWeapon(int idx)
    {
        if (idx < 0 || idx >= weaponAmount)
        {
            return(false);
        }

        //移除当前使用武器的属性
        if (_weapons[curWeaponIdx] != null)
        {
            WeaponProperties weaponProp = EquipTable.GetWeaponProp(_weapons[curWeaponIdx].Type.weaponId);
            if (weaponProp != null)
            {
                RemoveWeaponProp(bindPlayer, weaponProp);
            }
        }

        //添加要使用的武器的属性
        if (Weapons[idx] != null)
        {
            WeaponProperties weaponProp = EquipTable.GetWeaponProp(_weapons[idx].Type.weaponId);
            if (weaponProp != null)
            {
                AddWeaponProp(bindPlayer, weaponProp);
            }
        }

        curWeaponIdx = idx;

        return(true);
    }
Ejemplo n.º 2
0
    //护甲格子点击回调
    void OnArmorSlotClick(UIItemSlot slot, PointerEventData eventData)
    {
        LocalPlayer localPlayer = Helper.FindLocalPlayer();

        if (localPlayer != null && bindEquipment != null)
        {
            MouseItem mouseItem = localPlayer.bag.mouseItem;
            if (mouseItem.hasItem)
            { //鼠标有物品,则尝试装备
                if (mouseItem.item.Type.IsArmor)
                {
                    ArmorProperties armorProp = EquipTable.GetArmorProp(mouseItem.item.Type.armorId);
                    if (armorProp != null && armorProp.armorType == PlayerEquipment.armorTypes[slot.index])
                    {                                                                             //护甲有效,护甲类型匹配,则装备
                        Item preArmor = null;
                        bindEquipment.PutOnArmor(mouseItem.TakeItem(), slot.index, out preArmor); //穿上护甲
                        mouseItem.PutItem(preArmor);                                              //鼠标放入之前格子里的护甲
                    }
                }
                else
                { //鼠标上的不是护甲,什么都不用做
                }
            }
            else
            {   //鼠标没物品,尝试取下武器,如果没武器,则会得到null
                mouseItem.PutItem(bindEquipment.TakeOffArmor(slot.index));
            }
            Helper.ShowTips(bindEquipment.Armors[slot.index]);
        }
        Helper.MoveWndToFront(transform);
    }
Ejemplo n.º 3
0
    //穿上装备,如果之前格子里有装备,会移除掉
    public bool PutOnArmor(Item armor, int idx, out Item preArmor)
    {
        preArmor = null;
        if (armor == null || !armor.Type.IsArmor)
        {
            return(false);
        }
        ArmorProperties armorProp = EquipTable.GetArmorProp(armor.Type.armorId);

        if (armorProp != null && armorProp.armorType == armorTypes[idx])
        {                        //存在装备配置,且类型相同
            preArmor    = Armors[idx];
            Armors[idx] = armor; //加入已装备护甲列表

            if (preArmor != null)
            {
                ArmorProperties preProp = EquipTable.GetArmorProp(preArmor.Type.armorId);
                if (preProp != null)
                {
                    RemoveArmorProp(bindPlayer, preProp);
                }
            }
            AddArmorProp(bindPlayer, armorProp);
            RaiseEquipChanged();
        }
        return(true);
    }
Ejemplo n.º 4
0
        private void FillPlayerData(Character ch)
        {
            _curCharacter = ch;

            foreach (var b in GetAll(tabPage2, typeof(Button)))
            {
                b.Enabled = true;
            }
            tabPage5.Enabled = true;
            //TODO: background
            DBiFace.AccDB.LoginDB.IPDataReady.Add((sender, e) => olvIP.SetObjects((List <IPData>)sender));
            DBiFace.AccDB.LoginDB.GetIPByAccID(_curCharacter.AccountID);
            DBiFace.AccDB.LoginDB.IDDataReady.Add((sender, e) => olvID.SetObjects((List <IDData>)sender));
            DBiFace.AccDB.LoginDB.GetIDByAccID(_curCharacter.AccountID);

            //olvIP.SetObjects();
            textBoxName.Text  = _curCharacter.Name;
            textBoxMoney.Text = _curCharacter.Money.ToString(CultureInfo.InvariantCulture);
            //comboBoxSystem.SelectedValue = _curCharacter.System.ToLowerInvariant();
            comboBoxShip.SelectedValue = _curCharacter.ShipArch;
            checkBanned.Checked        = ch.IsBanned;
            checkBanned2.Checked       = checkBanned.Checked;
            rtbBanReason.Text          = DBiFace.AccDB.Bans.GetAccBanReason(_curCharacter.AccountID);

            textAccID.Text       = ch.AccountID;
            textAdminRights.Text = ch.AdminRights;

            FillLocationBox(ch.System, ch.Base);



            var ship = Universe.Gis.Ships.FindByHash(_curCharacter.ShipArch);

            if (ship != null)
            {
                labelHoldSize.Text = String.Format("Hold size: {0}", ship.HoldSize);
            }
            RefreshCargoSpace();

            dateLastOnline.MaxDate = DateTime.Now;
            dateLastOnline.Value   = _curCharacter.LastOnline;
            olvRep.SetObjects(_curCharacter.Reputation.ToList());
            olvCargo.SetObjects(null);
            olvCargo.SetObjects(_curCharacter.Cargo);


            var eqList = EquipTable.GetTable(_curCharacter, _log);

            dlvEquipment.DataSource = eqList;
            if (DBiFace.IsHookAvailable())
            {
                checkIsOnline.Checked = DBiFace.HookTransport.IsOnServer(_curCharacter.Name);
            }

            textCreatedAt.Text = _curCharacter.Created.ToLongDateString();
        }
Ejemplo n.º 5
0
 //根据类型穿装备,饰品就放在第一个格子里
 public bool PutOnArmor(Item armor, out Item preArmor)
 {
     preArmor = null;
     if (armor != null && armor.Type.IsArmor)
     {
         ArmorProperties armorProp = EquipTable.GetArmorProp(armor.Type.armorId);
         for (int i = 0; i < armorTypes.Length; i++)
         {
             if (armorProp.armorType == armorTypes[i])
             {
                 PutOnArmor(armor, i, out preArmor);
                 return(true);
             }
         }
     }
     return(false);
 }
Ejemplo n.º 6
0
    //脱下装备
    public Item TakeOffArmor(int idx)
    {
        Item preArmor = Armors[idx];

        Armors[idx] = null; //从已装备列表中移除

        //修改属性
        if (preArmor != null)
        {
            ArmorProperties preProp = EquipTable.GetArmorProp(preArmor.Type.armorId);
            if (preProp != null)
            {
                RemoveArmorProp(bindPlayer, preProp);
            }
        }
        RaiseEquipChanged();
        return(preArmor);
    }
Ejemplo n.º 7
0
 //重新计算数值
 public void RecalcProperties()
 {
     if (bindPlayer != null)
     {
         bindPlayer.ResetProperties();
         foreach (Item armor in Armors)
         {
             if (armor != null)
             {
                 ArmorProperties armorProp = EquipTable.GetArmorProp(armor.Type.armorId);
                 AddArmorProp(bindPlayer, armorProp);
             }
         }
         Item curWeapon = CurWeapon;
         if (curWeapon != null)
         {
             WeaponProperties weaponProp = EquipTable.GetWeaponProp(curWeapon.Type.weaponId);
             AddWeaponProp(bindPlayer, weaponProp);
         }
     }
 }
Ejemplo n.º 8
0
        private void FillArchivedPlayerData(Metadata md)
        {
            foreach (var b in GetAll(tabPage2, typeof(Button)))
            {
                b.Enabled = false;
            }
            buttonGetAccChars.Enabled = true;
            tabPage5.Enabled          = false;

            DBiFace.AccDB.LoginDB.IPDataReady.Add((sender, e) => olvIP.SetObjects((List <IPData>)sender));
            DBiFace.AccDB.LoginDB.GetIPByAccID(md.AccountID);

            DBiFace.AccDB.LoginDB.IDDataReady.Add((sender, e) => olvID.SetObjects((List <IDData>)sender));
            DBiFace.AccDB.LoginDB.GetIDByAccID(md.AccountID);

            textBoxName.Text  = md.Name;
            textBoxMoney.Text = md.Money.ToString(CultureInfo.InvariantCulture);

            comboBoxShip.SelectedValue = md.ShipArch;
            checkBanned.Checked        = md.IsBanned;
            checkBanned2.Checked       = checkBanned.Checked;
            rtbBanReason.Text          = Resources.MainForm_Archived_account;

            textAccID.Text       = md.AccountID;
            textAdminRights.Text = Resources.MainForm_Archived_account;


            FillLocationBox(md.System, md.Base);

            labelHoldSize.Text    = "";
            labelHoldCurrent.Text = Resources.MainForm_Archived_account;

            dateLastOnline.MaxDate = md.LastOnline;
            dateLastOnline.Value   = md.LastOnline;
            olvRep.Clear();
            dlvEquipment.Clear();
            olvCargo.SetObjects(EquipTable.GetTableFallback(md.Equipment));

            checkIsOnline.Checked = false;
        }
Ejemplo n.º 9
0
    /// <summary>
    /// 取下武器
    /// </summary>
    /// <param name="idx"></param>
    /// <returns></returns>
    public Item TakeOffWeapon(int idx)
    {
        if (idx < 0 || idx >= weaponAmount)
        {
            return(null);
        }

        Item preWeapon = Weapons[idx]; //之前装备的武器

        Weapons[idx] = null;           //从已装武器列表中移除
        if (idx == curWeaponIdx && preWeapon != null)
        {
            WeaponProperties weaponProp = EquipTable.GetWeaponProp(preWeapon.Type.weaponId);
            if (weaponProp != null)
            {
                RemoveWeaponProp(bindPlayer, weaponProp);
            }
        }

        RaiseEquipChanged();
        return(preWeapon);
    }
Ejemplo n.º 10
0
    /// <summary>
    /// 装备武器
    /// </summary>
    /// <param name="weapon"></param>
    /// <param name="idx"></param>
    /// <param name="preWeapon"></param>
    /// <returns></returns>
    public bool PutOnWeapon(Item weapon, int idx, out Item preWeapon)
    {
        preWeapon = null;
        if (idx < 0 || idx >= weaponAmount || weapon == null || !weapon.Type.IsWeapon)
        {
            return(false);
        }

        WeaponProperties weaponProp = EquipTable.GetWeaponProp(weapon.Type.weaponId);

        if (weaponProp != null)
        {
            //记下原来的武器
            if (_weapons[idx] != null)
            {
                preWeapon = _weapons[idx];
            }

            //装备新武器
            _weapons[idx] = weapon;

            if (idx == curWeaponIdx) //如果切换的是当前使用武器,则要计算属性
            {
                if (preWeapon != null)
                {//之前格子里有武器,则移除属性
                    WeaponProperties preProp = EquipTable.GetWeaponProp(preWeapon.Type.weaponId);
                    if (preProp != null)
                    {
                        RemoveWeaponProp(bindPlayer, preProp);
                    }
                }
                //加上新武器的属性
                AddWeaponProp(bindPlayer, weaponProp);
            }

            RaiseEquipChanged();
        }
        return(true);
    }
Ejemplo n.º 11
0
        private void SaveChar()
        {
            if (_curCharacter == null)
            {
                return;
            }


            _curCharacter.Cargo = new List <WTuple <uint, uint> >();
            _curCharacter.Cargo.AddRange((IEnumerable <WTuple <uint, uint> >)olvCargo.Objects);


            _curCharacter.EquipmentList = EquipTable.GetEquipmentList((uiTables.ShipEquipDataTable)dlvEquipment.DataSource);

            _curCharacter.SaveCharacter(Properties.Settings.Default.FLDBPath, _log);
            ((Metadata)fastObjectListView1.SelectedObject).Money      = _curCharacter.Money;
            ((Metadata)fastObjectListView1.SelectedObject).Name       = _curCharacter.Name;
            ((Metadata)fastObjectListView1.SelectedObject).Base       = _curCharacter.Base;
            ((Metadata)fastObjectListView1.SelectedObject).Rank       = _curCharacter.Rank;
            ((Metadata)fastObjectListView1.SelectedObject).ShipArch   = _curCharacter.ShipArch;
            ((Metadata)fastObjectListView1.SelectedObject).LastOnline = _curCharacter.LastOnline;
            fastObjectListView1.RefreshObject(_curCharacter);
            DBiFace.AccDB.Scan.LoadAccountDirectory(Properties.Settings.Default.FLDBPath + "/" + _curCharacter.AccountID);
        }
Ejemplo n.º 12
0
    void GenTips(Item item, ShowPrice showPrice = ShowPrice.None)
    {
        //name
        StringBuilder build = new StringBuilder();

        switch (item.Type.quality)
        {
        case ItemQuality.White:
            build.Append("<color=white>" + item.Type.itemName);
            break;

        case ItemQuality.Green:
            build.Append("<color=green>" + item.Type.itemName);
            break;

        case ItemQuality.Blue:
            build.Append("<color=blue>" + item.Type.itemName);
            break;

        case ItemQuality.Golden:
            build.Append("<color=orange>" + item.Type.itemName);
            break;

        case ItemQuality.Red:
            build.Append("<color=red>" + item.Type.itemName);
            break;

        case ItemQuality.Purple:
            build.Append("<color=purple>" + item.Type.itemName);
            break;

        default:
            build.Append("<color=white>" + item.Type.itemName);     //默认用白色
            break;
        }


        //叠加数量
        if (item.Type.CanStack)
        {
            build.Append(" (" + item.amount + ")");
        }
        build.Append("</color>");
        build.Append("\n");

        //这里附加装备信息
        if (item.Type.IsWeapon)
        {
            WeaponProperties weaponProp = EquipTable.GetWeaponProp(item.Type.weaponId);
            if (weaponProp == null)
            {
            }
            else
            {
                build.Append("<color=white>");
                //攻击
                build.Append(string.Format(TextResources.atkFormat, weaponProp.minAtkBonus, weaponProp.maxAtkBonus));
                //攻击速率,为间隔的倒数
                build.Append(string.Format(TextResources.atkInvervalFormat, 1 / weaponProp.atkInterval));
                if (weaponProp.crtlChanceBonus != 0)
                { //暴击率
                    build.Append(string.Format(TextResources.crtlChanceFormat, Mathf.Round(weaponProp.crtlChanceBonus * 100)));
                }
                if (weaponProp.crtlRateBonus != 0)
                {  //暴击伤害
                    build.Append(string.Format(TextResources.crtlRateFormat, Mathf.Round(weaponProp.crtlRateBonus * 100)));
                }
                if (weaponProp.rcrBonus != 0)
                {   //rcr
                    build.Append(string.Format(TextResources.rcrFormat, Mathf.Round(weaponProp.rcrBonus * 100)));
                }
                build.Append("</color>");
            }
        }
        else if (item.Type.IsArmor)
        {
            ArmorProperties armorProp = EquipTable.GetArmorProp(item.Type.armorId);
            if (armorProp == null)
            {
            }
            else
            {
                build.Append("<color=white>");
                //防御
                build.Append(string.Format(TextResources.defFormat, armorProp.defBonus));
                if (armorProp.hpBonus != 0)
                {   //血量
                    build.Append(string.Format(TextResources.hpFormat, armorProp.hpBonus));
                }
                if (armorProp.minAtkBonus != 0 || armorProp.maxAtkBonus != 0)
                {   //攻击
                    build.Append(string.Format(TextResources.atkFormat, armorProp.minAtkBonus, armorProp.maxAtkBonus));
                }
                if (armorProp.atkSpdBonus != 0)
                {   //攻速
                    build.Append(string.Format(TextResources.atkSpdFormat, Mathf.Round((armorProp.atkSpdBonus * 100))));
                }
                if (armorProp.spdScaleBonus != 0)
                {   //速度
                    build.Append(string.Format(TextResources.spdFormat, Mathf.Round(armorProp.spdScaleBonus * 100)));
                }
                if (armorProp.jmpScaleBonus != 0)
                {   //跳跃
                    build.Append(string.Format(TextResources.jmpFormat, Mathf.Round(armorProp.jmpScaleBonus * 100)));
                }
                if (armorProp.crtlChanceBonus != 0)
                {   //暴击率
                    build.Append(string.Format(TextResources.crtlChanceFormat, Mathf.Round(armorProp.crtlChanceBonus * 100)));
                }
                if (armorProp.crtlRateBonus != 0)
                {   //暴击伤害
                    build.Append(string.Format(TextResources.crtlRateFormat, Mathf.Round(armorProp.crtlRateBonus * 100)));
                }
                if (armorProp.rcrBonus != 0)
                {   //rcr
                    build.Append(string.Format(TextResources.rcrFormat, Mathf.Round(armorProp.rcrBonus * 100)));
                }
                build.Append("</color>");
            }
        }

        //附魔属性

        //comment
        build.Append(item.Type.comment);
        build.Append("\n");

        //usability
        if (item.Type.IsEquipment)
        {
            build.Append("equipment");
        }

        if (item.Type.IsConsumable)
        {
            build.Append("&consumable");
        }

        //if (item.Type.IsMaterial)
        //{
        //    build.Append("&material");
        //}

        //价格显示
        switch (showPrice)
        {
        case ShowPrice.None:
            break;

        case ShowPrice.Buy:
            build.Append("\n");
            build.Append("<color=yellow>");
            build.Append("买价: " + item.buyPrice);
            build.Append("</color>");
            break;

        case ShowPrice.Sell:
            build.Append("\n");
            build.Append("<color=white>");
            build.Append("卖价: " + item.sellPrice);
            build.Append("</color>");
            break;
        }

        txt.text = build.ToString();
    }
Ejemplo n.º 13
0
    static public void LoadTable()
    {
        if (null == QTESequenceTableAsset)
        {
            TextAsset asset = GameData.LoadConfig <TextAsset>("QTESequenceTable");
            QTESequenceTableAsset = new QTESequenceTable();
            QTESequenceTableAsset.Load(asset.bytes);
        }
        if (null == FlyingItemTableAsset)
        {
            TextAsset asset = GameData.LoadConfig <TextAsset>("FlyingObjBehaviorTable");
            FlyingItemTableAsset = new FlyingItemTable();
            FlyingItemTableAsset.Load(asset.bytes);
        }
        if (null == StageTableAsset)
        {
            TextAsset asset = GameData.LoadConfig <TextAsset>("StageTable");
            StageTableAsset = new StageTable();
            StageTableAsset.Load(asset.bytes);
        }
        if (null == RoomAttrTableAsset)
        {
            TextAsset asset = GameData.LoadConfig <TextAsset>("RoomAttrTable");
            RoomAttrTableAsset = new RoomAttrTable();
            RoomAttrTableAsset.Load(asset.bytes);
        }
        if (null == SkillTableAsset)
        {
            TextAsset asset = GameData.LoadConfig <TextAsset>("SkillTable");
            SkillTableAsset = new SkillTable();
            SkillTableAsset.Load(asset.bytes);
        }
        if (null == VocationTableAsset)
        {
            TextAsset asset = GameData.LoadConfig <TextAsset>("VocationTable");
            VocationTableAsset = new VocationTable();
            VocationTableAsset.Load(asset.bytes);
        }
        if (null == NPCInfoTableAsset)
        {
            TextAsset asset = GameData.LoadConfig <TextAsset>("NPCInfoTable");
            NPCInfoTableAsset = new NPCInfoTable();
            NPCInfoTableAsset.Load(asset.bytes);
        }
        if (null == TrapInfoTableAsset)
        {
            TextAsset asset = GameData.LoadConfig <TextAsset>("TrapInfoTable");
            TrapInfoTableAsset = new TrapInfoTable();
            TrapInfoTableAsset.Load(asset.bytes);
        }

        if (null == HeroInfoTableAsset)
        {
            TextAsset asset = GameData.LoadConfig <TextAsset>("HeroInfoTable");
            HeroInfoTableAsset = new HeroInfoTable();
            HeroInfoTableAsset.Load(asset.bytes);
        }
        //if (null == AnimWeightTableAsset)
        //{
        //    TextAsset asset = GameData.LoadConfig<TextAsset>("AnimWeight");
        //    AnimWeightTableAsset = new AnimWeightTable();
        //    AnimWeightTableAsset.Load(asset.bytes);
        //}
        if (null == SceneInfoTableAsset)
        {
            TextAsset asset = GameData.LoadConfig <TextAsset>("SceneInfoTable");
            SceneInfoTableAsset = new SceneInfoTable();
            SceneInfoTableAsset.Load(asset.bytes);
        }
        //if (null == DungeonInfoTableAsset)
        //{
        //    TextAsset asset = GameData.LoadConfig<TextAsset>("DungeonInfoTable");
        //    DungeonInfoTableAsset = new DungeonInfoTable();
        //    DungeonInfoTableAsset.Load(asset.bytes);
        //}
        if (null == SkillResultTableAsset)
        {
            TextAsset asset = GameData.LoadConfig <TextAsset>("SkillResultTable");
            SkillResultTableAsset = new SkillResultTable();
            SkillResultTableAsset.Load(asset.bytes);
        }
        if (null == AnimationTownAsset)
        {
            TextAsset asset = GameData.LoadConfig <TextAsset>("AnimationTown");
            AnimationTownAsset = new AnimationTable();
            AnimationTownAsset.Load(asset.bytes);
        }
        if (null == AnimationFightAsset)
        {
            TextAsset asset = GameData.LoadConfig <TextAsset>("AnimationFight");
            AnimationFightAsset = new AnimationTable();
            AnimationFightAsset.Load(asset.bytes);
        }
        AnimationTableAsset = AnimationFightAsset;
        if (null == ActionRelationTableAsset)
        {
            TextAsset asset = GameData.LoadConfig <TextAsset>("ActionRelation");
            ActionRelationTableAsset = new ActionRelationTable();
            ActionRelationTableAsset.Load(asset.bytes);
        }
        if (null == EquipTableAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("EquipBaseData");
            EquipTableAsset = new EquipTable();
            EquipTableAsset.Load(obj.bytes);
        }
        if (null == ModelInfoTableAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("ModelInfoTable");
            ModelInfoTableAsset = new ModelInfoTable();
            ModelInfoTableAsset.Load(obj.bytes);
        }
        if (null == WeaponInfoTableAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("WeaponInfoTable");
            WeaponInfoTableAsset = new WeaponInfoTable();
            WeaponInfoTableAsset.Load(obj.bytes);
        }
        if (null == UILoadInfoTableAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("UILoadInfoTable");
            UILoadInfoTableAsset = new UILoadInfoTable();
            UILoadInfoTableAsset.Load(obj.bytes);
        }
        if (null == IconTableAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("IconTable");
            IconTableAsset = new IconTable();
            IconTableAsset.Load(obj.bytes);
        }
        if (null == BuffTableAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("Buff");
            BuffTableAsset = new BuffTable();
            BuffTableAsset.Load(obj.bytes);
        }
        if (null == BuffRelationTableAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("BuffReplaceRelation");
            BuffRelationTableAsset = new BuffRelationTable();
            BuffRelationTableAsset.Load(obj.bytes);
        }
        if (null == BuffEffectTableAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("BuffEffect");
            BuffEffectTableAsset = new BuffEffectTable();
            BuffEffectTableAsset.Load(obj.bytes);
        }
        //if (null == CheckInfoTableAsset)
        //{
        //    TextAsset obj = GameData.LoadConfig<TextAsset>("Checkinfo");
        //    CheckInfoTableAsset = new CheckInfoTable();
        //    CheckInfoTableAsset.Load(obj.bytes);
        //}
        //if (null == NpcSayTableAsset)
        //{
        //    TextAsset obj = GameData.LoadConfig<TextAsset>("NpcSay");
        //    NpcSayTableAsset = new NpcSayTable();
        //    NpcSayTableAsset.Load(obj.bytes);
        //}

        //if (null == ShopTableAsset)
        //{
        //    TextAsset obj = GameData.LoadConfig<TextAsset>("NpcShop");
        //    ShopTableAsset = new ShopTable();
        //    ShopTableAsset.Load(obj.bytes);
        //}

        if (null == MissionTableAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("Task");
            MissionTableAsset = new MissionTable();
            MissionTableAsset.Load(obj.bytes);
        }

        if (null == AptitudeTableAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("Aptitude");
            AptitudeTableAsset = new AptitudeTable();
            AptitudeTableAsset.Load(obj.bytes);
        }

        if (null == StringTableAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("StringTable");
            StringTableAsset = new StringTable();
            StringTableAsset.Load(obj.bytes);
        }


        if (null == WorldParamTableAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("WorldParamTable");
            WorldParamTableAsset = new WorldParamTable();
            WorldParamTableAsset.Load(obj.bytes);
        }
        if (null == CDTableAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("CDTable");
            CDTableAsset = new CDTable();
            CDTableAsset.Load(obj.bytes);
        }
        //if (null == ServerTableAsset)
        //{
        //    TextAsset obj = GameData.LoadConfig<TextAsset>("Servers");
        //    ServerTableAsset = new ServerTable();
        //    ServerTableAsset.Load(obj.bytes);
        //}
        //if (null == SceneMapNumericTableAsset)
        //{
        //    TextAsset obj = GameData.LoadConfig<TextAsset>("Coordinate");
        //    SceneMapNumericTableAsset = new SceneMapNumericTable();
        //    SceneMapNumericTableAsset.Load(obj.bytes);
        //}
        //if (null == EquipExpMoneyTableAsset)
        //{
        //    TextAsset obj = GameData.LoadConfig<TextAsset>("EquipExpMoney");
        //    EquipExpMoneyTableAsset = new EquipExpMoneyTable();
        //    EquipExpMoneyTableAsset.Load(obj.bytes);
        //}
        //if (null == ShakeTableAsset)
        //{
        //    TextAsset obj = GameData.LoadConfig<TextAsset>("Shake");
        //    ShakeTableAsset = new ShakeTable();
        //    ShakeTableAsset.Load(obj.bytes);
        //}
        //if (null == PlayerGuideTableAsset)
        //{
        //    TextAsset obj = GameData.LoadConfig<TextAsset>("PlayerGuide");
        //    PlayerGuideTableAsset = new PlayerGuideTable();
        //    PlayerGuideTableAsset.Load(obj.bytes);
        //}
        //if (null == IllumeTableAsset)
        //{
        //     TextAsset obj = GameData.LoadConfig<TextAsset>("Illume");
        //     IllumeTableAsset = new IllumeTable();
        //     IllumeTableAsset.Load(obj.bytes);
        //}
        //if (null == BossTableAsset)
        //{
        //     TextAsset obj = GameData.LoadConfig<TextAsset>("BOSS");
        //     BossTableAsset = new BossTable();
        //     BossTableAsset.Load(obj.bytes);
        //}
        //if (null == SandTableInfoTableAsset)
        //{
        //    TextAsset obj = GameData.LoadConfig<TextAsset>("SandTableInfoTable");
        //     SandTableInfoTableAsset = new SandTableInfoTable();
        //     SandTableInfoTableAsset.Load(obj.bytes);
        //}

        if (null == LevelUpTableAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("LvUpExp");
            LevelUpTableAsset = new LevelUpTable();
            LevelUpTableAsset.Load(obj.bytes);
        }

        //if (null == DungeonEventTableAsset)
        //{
        //    TextAsset obj = GameData.LoadConfig<TextAsset>("DungeonEvent");
        //    DungeonEventTableAsset = new DungeonEventTable();
        //    DungeonEventTableAsset.Load(obj.bytes);
        //}

        //if (null == DungeonEventResultTableAsset)
        //{
        //    TextAsset obj = GameData.LoadConfig<TextAsset>("DungeonEventResult");
        //    DungeonEventResultTableAsset = new DungeonEventResultTable();
        //    DungeonEventResultTableAsset.Load(obj.bytes);
        //}

        //if (null == DungeonFilesAsset)
        //{
        //    TextAsset obj = GameData.LoadConfig<TextAsset>("DungeonFiles");
        //    DungeonFilesAsset = new DungeonFiles();
        //    DungeonFilesAsset.Load(obj.bytes);
        //}
        if (null == RarityRelativeAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("RarityRelative");
            RarityRelativeAsset = new RarityRelativeTable();
            RarityRelativeAsset.Load(obj.bytes);
        }
        if (null == OccupationInfoAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("OccupationInfoTable");
            OccupationInfoAsset = new OccupationInfoTable();
            OccupationInfoAsset.Load(obj.bytes);
        }

        if (null == PlayerRandomNameAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("PlayerRandomName");
            PlayerRandomNameAsset = new PlayerRandomNameTable();
            PlayerRandomNameAsset.Load(obj.bytes);
        }

        if (null == ZoneInfoTableAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("ZoneInfo");
            ZoneInfoTableAsset = new ZoneInfoTable();
            ZoneInfoTableAsset.Load(obj.bytes);
        }

        if (null == StageInfoTableAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("StageInfo");
            StageInfoTableAsset = new StageInfoTable();
            StageInfoTableAsset.Load(obj.bytes);
        }

        if (null == FloorInfoTableAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("FloorInfo");
            FloorInfoTableAsset = new FloorInfoTable();
            FloorInfoTableAsset.Load(obj.bytes);
        }

        if (null == ItemTableAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("Item");
            ItemTableAsset = new ItemTable();
            ItemTableAsset.Load(obj.bytes);
        }

        if (null == floorRankTableAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("FloorRankTable");
            floorRankTableAsset = new FloorRankTable();
            floorRankTableAsset.Load(obj.bytes);
        }

        if (null == ScoreParamTableAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("ScoreParamTable");
            ScoreParamTableAsset = new ScoreParamTable();
            ScoreParamTableAsset.Load(obj.bytes);
        }

        if (null == BagTableAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("BagTable");
            BagTableAsset = new BagTable();
            BagTableAsset.Load(obj.bytes);
        }

        if (null == RaceInfoTableAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("RaceInfoTable");
            RaceInfoTableAsset = new RaceInfoTable();
            RaceInfoTableAsset.Load(obj.bytes);
        }

        if (null == EquipmentTableAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("Equipment");
            EquipmentTableAsset = new EquipmentTable();
            EquipmentTableAsset.Load(obj.bytes);
        }

        if (null == playerAttrTableAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("PlayerAttrTable");
            playerAttrTableAsset = new PlayerAttrTable();
            playerAttrTableAsset.Load(obj.bytes);
        }
        if (null == loadingTipsAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("LoadingTips");
            loadingTipsAsset = new LoadingTipsTable();
            loadingTipsAsset.Load(obj.bytes);
        }

        if (null == MagicStoneTableAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("MagicStonePrice");
            MagicStoneTableAsset = new MagicStoneTable();
            MagicStoneTableAsset.Load(obj.bytes);
        }

        if (null == RingExchangeTableAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("RingExchangeTable");
            RingExchangeTableAsset = new RingExchangeTable();
            RingExchangeTableAsset.Load(obj.bytes);
        }

//         if (null == SceneRoomTableAsset)
//         {
//             TextAsset obj = GameData.LoadConfig<TextAsset>("SceneRoomTable");
//             SceneRoomTableAsset = new SceneRoomTable();
//             SceneRoomTableAsset.Load(obj.bytes);
//         }
//         if (null == SceneBridgeTableAsset)
//         {
//             TextAsset obj = GameData.LoadConfig<TextAsset>("SceneBridgeTable");
//             SceneBridgeTableAsset = new SceneBridgeTable();
//             SceneBridgeTableAsset.Load(obj.bytes);
//         }
//         if (null == SceneGateTableAsset)
//         {
//             TextAsset obj = GameData.LoadConfig<TextAsset>("SceneGateTable");
//             SceneGateTableAsset = new SceneGateTable();
//             SceneGateTableAsset.Load(obj.bytes);
//         }
//         if (null == SceneTeleportTableAsset)
//         {
//             TextAsset obj = GameData.LoadConfig<TextAsset>("SceneTeleportTable");
//             SceneTeleportTableAsset = new SceneTeleportTable();
//             SceneTeleportTableAsset.Load(obj.bytes);
//         }
        if (null == MessageRespondTableAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("MessageRespondTable");
            MessageRespondTableAsset = new MessageRespondTable();
            MessageRespondTableAsset.Load(obj.bytes);
        }

        if (null == IconInfoTableAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("Icon");
            IconInfoTableAsset = new IconInfoTable();
            IconInfoTableAsset.Load(obj.bytes);
        }

        if (null == attrRatioTableAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("AttrRatioTable");
            attrRatioTableAsset = new AttrRatioTable();
            attrRatioTableAsset.Load(obj.bytes);
        }

        if (null == ComboSwordSoulAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("ComboSwordSoulTable");
            ComboSwordSoulAsset = new ComboSwordSoulTable();
            ComboSwordSoulAsset.Load(obj.bytes);
        }

        if (null == eventItemAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("EventItem");
            eventItemAsset = new EventItemTable();
            eventItemAsset.Load(obj.bytes);
        }

        if (null == gradeUpRequireAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("GradeUpRequireTable");
            gradeUpRequireAsset = new GradeUpRequireTable();
            gradeUpRequireAsset.Load(obj.bytes);
        }

        if (null == qualityRelativeAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("QualityRelativeTable");
            qualityRelativeAsset = new QualityRelativeTable();
            qualityRelativeAsset.Load(obj.bytes);
        }


        if (null == cardTypeVariationAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("CardTypeVariationTable");
            cardTypeVariationAsset = new CardTypeVariationTable();
            cardTypeVariationAsset.Load(obj.bytes);
        }

        if (null == cardLevelVariationAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("CardLevelupVariationTable");
            cardLevelVariationAsset = new CardLevelVariationTable();
            cardLevelVariationAsset.Load(obj.bytes);
        }

        if (null == yellowPointParamAsset)
        {
            TextAsset obj = GameData.LoadConfig <TextAsset>("YellowPointParam");
            yellowPointParamAsset = new YellowPointParamTable();
            yellowPointParamAsset.Load(obj.bytes);
        }
        //加载随机地图相关表数据
        LoadRandMapTableData();

        int id        = 70;
        int level     = 12;
        int yellow    = 3;
        int hp        = BattleFormula.GetHp(id, level, yellow);
        int phyAttack = BattleFormula.GetPhyAttack(id, level, yellow);
        int magAttack = BattleFormula.GetMagAttack(id, level, yellow);
        int magDefend = BattleFormula.GetMagDefend(id, level, yellow);
        int phyDEFEND = BattleFormula.GetPhyDefend(id, level, yellow);

        Debug.Log("magDefend:" + magDefend);
        Debug.Log("magAttack:" + magAttack);
        Debug.Log("phyDEFEND:" + phyDEFEND);
        Debug.Log("phyAttack:" + phyAttack);
        Debug.Log("hp:" + hp);
    }