From eedeb8a020fce13e0e63ad7c57adfdff7578e875 Mon Sep 17 00:00:00 2001
From: client_linchunjie <461730578@qq.com>
Date: 星期四, 14 三月 2019 21:05:23 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
---
System/FriendSystem/MailPanel.cs | 4
System/Compose/New/ComposeWingsWin.cs | 2
System/CrossServerOneVsOne/SeasonRewardCell.cs | 4
System/Dungeon/DungeonSweepResultWin.cs | 2
System/Welfare/ConsumeRebateCell.cs | 4
System/Chat/ChatExtentWin.cs | 4
System/Dungeon/DungeonAssistPlayerWin.cs | 21
System/OpenServerActivity/AutoTreasureAwardsRow.cs | 4
System/FindPrecious/BossHomeWin.cs | 2
System/OpenServerActivity/BestLuckyTreasureItemWin.cs | 4
System/OpenServerActivity/FlashSaleItemCell.cs | 4
System/KnapSack/Logic/PlayerStarNumWin.cs | 57
System/MainInterfacePanel/MainButtonMisc.cs | 2
System/Dungeon/DungeonEnterInfo.cs | 2
System/Strengthening/GodBeastChildNodes.cs | 4
System/ItemTip/EquipTipUtility.cs | 6
System/KnapSack/New/ItemCell.cs | 21
System/Strengthening/StrengthenModel.cs | 4
System/HappyXB/HappyXBGetItemWin.cs | 4
System/KnapSack/New/RoleEquipStrengthTips.cs | 45
System/Strengthening/MasterCell.cs | 4
System/NewYearFairylandCeremony/NewYearToHiAwardCell.cs | 4
System/Dungeon/AchieveTargetBehaviour.cs | 6
System/JadeDynastyBoss/JadeDynastyBossWin.cs | 4
System/OpenServerActivity/SuperValueGiftBehaviour.cs | 2
System/FairylandCeremony/CeremonyRechargeGiftWin.cs | 4
System/Strengthening/GodBeastEntry.cs | 2
System/KnapSack/Logic/MakeDrugCell.cs | 20
System/Vip/LimitedTimePackageWin.cs | 4
System/MainInterfacePanel/InformationTipsWin.cs | 29
System/Strengthening/GodBeastSlidingList.cs | 2
System/JadeDynastyKnapSack/JadeDynastySuitAttrBeh.cs | 48
System/Strengthening/GodBeastReinforcementWin.cs | 2
System/KnapSack/Logic/ItemOperateUtility.cs | 2
System/OpenServerActivity/LuckyTreasureWin.cs | 4
System/Strengthening/WingsBouncedWin.cs | 4
System/FashionDress/FashionAttrBeh.cs | 4
System/NewYearFairylandCeremony/NewYearCeremonyRechargeGiftWin.cs | 4
System/CrossServerOneVsOne/CrossSeverOneVsOneBuyMatchTimesWin.cs | 29
System/Vip/FirstChargeTrialWin.cs | 4
Fight/MapTransferUtility.cs | 7
System/FairyAu/FairyAuTaskWin.cs | 8
System/Strengthening/GodBeastAttributes.cs | 12
System/KnapSack/Logic/BoxGetItemModel.cs | 101 +-
System/KnapSack/Logic/PackModel.cs | 2
System/OpenServerActivity/WishingGetItemWin.cs | 4
System/OpenServerActivity/WishItemCell.cs | 4
System/Welfare/LevelGiftWin.cs | 8
System/OpenServerActivity/PoolItemCell.cs | 4
System/FairylandCeremony/CeremonyOutOfPrintWin.cs | 4
System/KnapSack/New/CommonItemBaisc.cs | 147 +--
System/MainInterfacePanel/StoryTask.cs | 4
System/OpenServerActivity/FlashSaleBehaviour.cs | 4
System/MainInterfacePanel/BuffListWin.cs | 50 -
System/FairylandCeremony/CeremonyFirepartyWin.cs | 6
System/Vip/RechargeBoxWin.cs | 2
System/CrossServerOneVsOne/SegmentRewardCell.cs | 2
Fight/Stage/MapEditor/Game/TransferGroup.cs | 3
System/Compose/New/ComposeWinModel.cs | 2
System/CrossServerOneVsOne/CrossSeverOneVsOneDayAwardCell.cs | 4
Lua/Gen/BlastFurnaceModelWrap.cs | 29
System/Compose/New/ComposeMatCell.cs | 8
Utility/CalculateSkillGetAttrHurtUtility.cs | 4
System/Treasure/TreasureSoulPattern4.cs | 4
System/KnapSack/Logic/TreasureEffectModel.cs | 57 -
System/BlastFurnace/LingDanTips.cs | 12
System/OpenServerActivity/EntryInformationCell.cs | 2
System/Strengthening/WingsRedDotModel.cs | 2
System/OpenServerActivity/LuckyAwardsGroup.cs | 4
System/Vip/VipInvest/VipInvestWin.cs | 6
System/KnapSack/Logic/EquipDecomMailWin.cs | 4
System/Role/RoleRenameWin.cs | 4
System/Vip/RechargeWin.cs | 2
System/MainInterfacePanel/DungeonGuardCheckBehaviour.cs | 4
System/Dungeon/DungeonUseLiquidWin.cs | 8
System/BlastFurnace/BlastFurnaceModel.cs | 18
System/Dungeon/DungeonRewardItem.cs | 4
System/Compose/New/GuardComposeConfirmWin.cs | 2
System/DailyQuest/ResourcesBackBoxBack.cs | 11
System/Dungeon/TrialSweepResultWin.cs | 2
System/FairyAu/KingFairyCtnRewardCell.cs | 4
System/Dungeon/DungeonSuppliesLackWin.cs | 22
System/KnapSack/New/RoleEquipStarTips.cs | 35
System/OpenServerActivity/RewardInformation.cs | 4
System/Mount/AutoTrainTipsWin.cs | 2
Core/GameEngine/Model/Player/PlayerDatas.cs | 1
System/HappyXB/XBItemCell.cs | 4
System/KnapSack/New/KingTreasureShowModel.cs | 19
System/MainInterfacePanel/TaskBoxBGMWin.cs | 6
System/MainInterfacePanel/SideMission.cs | 4
System/Dogz/DogzModel.cs | 4
System/Dogz/SelectCell.cs | 6
System/Dogz/DogzItemCell.cs | 10
System/Dungeon/DungeonBuyTimesWin.cs | 21
System/Vip/FirstRechargeWin.cs | 2
System/Dungeon/DungeonAncientKingWin.cs | 4
System/Dungeon/TrialExchangeBehaviour.cs | 4
System/FairyAu/FairyGrabBossWin.cs | 4
System/PlayerDead/PlayerDeadModel.cs | 20
System/Role/MagicianWin.cs | 2
System/OpenServerActivity/OSGiftBehaviour.cs | 2
System/Vip/FairyJadeInvestmentWin.cs | 2
System/Tip/IconConfirmWin.cs | 4
System/FairyAu/FairyBoss.cs | 2
System/JadeDynastyKnapSack/JadeDynastyStoneSuitAttrBeh.cs | 26
System/FairyAu/KingTempleWin.cs | 4
System/JadeDynastyKnapSack/JadeDynastyItemBeh.cs | 4
System/KnapSack/Logic/BoxGetItemWin.cs | 4
System/Store/BagStoreWin.cs | 42
Lua/Gen/SnxxzUIItemTipsModelWrap.cs | 41
System/RoleParticulars/ViewPetHorseStoneCell.cs | 4
System/OpenServerActivity/WishGroupCell.cs | 4
System/Vip/NeedForWhiteInvestment.cs | 12
System/Activity/ActivitySettleWin.cs | 8
System/BlastFurnace/PrayDrugCell.cs | 4
System/KnapSack/New/OneKeySellWin.cs | 4
System/FairylandCeremony/ToHiAwardCell.cs | 4
System/HeavenBattle/XMZZCampVicRewardWin.cs | 8
System/OpenServerActivity/SpringFestivalCell.cs | 2
System/MainInterfacePanel/FlyShoseConfirmwin.cs | 2
System/MainInterfacePanel/CoinTaskWin.cs | 6
System/HappyXB/XBGridCell.cs | 4
System/KnapSack/New/RoleEquipWin.cs | 2
System/FairyAu/FairyCreateWin.cs | 37
System/MainInterfacePanel/FlyingShoesTask.cs | 2
System/KnapSack/New/BagWin.cs | 2
System/OpenServerActivity/OpenServiceAchievementCell.cs | 2
System/Team/TeamDungeonTicketLackWin.cs | 6
System/OpenServerActivity/InSevenDayBehavior.cs | 4
System/KnapSack/New/EquipPlaceCell.cs | 2
System/NewYearFairylandCeremony/NewYearCeremonyOutOfPrintWin.cs | 4
System/Dungeon/IceCrystalVeinWin.cs | 10
System/FindPrecious/FindPreciousBossRebornBehaviour.cs | 2
System/Dungeon/DungeonSweepWin.cs | 2
System/Treasure/TreasureSoulPattern3.cs | 4
System/JadeDynastyKnapSack/JadeDynastyDecomposeLineBeh.cs | 4
System/Welfare/ExchangeGetItemWin.cs | 4
Core/GameEngine/Model/Player/Character/PlayerBaseData.cs | 3
System/KnapSack/Logic/EquipTip.cs | 1
System/OpenServerActivity/MysticalPurchaseSaleItem.cs | 4
Fight/Stage/MapEditor/Game/ClientSceneManager.cs | 5
System/KnapSack/Logic/ItemLogicUtility.cs | 49
System/KnapSack/New/EquipWin.cs | 23
System/KnapSack/PreciousItemGetBehaviour.cs | 2
System/Dogz/DogzPackWin.cs | 8
System/RuneTower/RuneTowerSweepBuyWin.cs | 27
System/KnapSack/Logic/DevourGridCell.cs | 4
System/GatheringSoul/GatherSoulGenerateBossWin.cs | 23
System/NewYearFairylandCeremony/NewYearCeremonyFirepartyWin.cs | 6
System/OpenServerActivity/AccumulateRechargeWin.cs | 4
System/Compose/New/ComposeEquipWin.cs | 2
System/OpenServerActivity/ImpactRankWin.cs | 4
System/Strengthening/WingsRefined.cs | 20
System/KnapSack/Logic/PlayerStrengtheningLVWin.cs | 57 -
System/Equip/EquipModel.cs | 2
System/BlastFurnace/RecycleDrugCell.cs | 4
System/Treasure/TreasureSoulWin.cs | 4
System/FashionDress/FashionDecomposeLineBeh.cs | 4
System/Compose/New/ComposeSelectItemCell.cs | 2
System/Vip/VipInvest/WheelOfFortuneWin.cs | 11
Lua/Gen/SnxxzUITreasureEffectModelWrap.cs | 34
System/BlastFurnace/PrayforDrugGetItemWin.cs | 4
Utility/UIHelper.cs | 4
System/Dogz/DogzEquip.cs | 10
System/FashionDress/FashionSumAttrWin.cs | 44
System/FairyAu/FairyChangeTipWin.cs | 3
System/KnapSack/Logic/ItemTipsModel.cs | 201 ----
System/Dungeon/DungeonInspireWin.cs | 16
System/JadeDynastyKnapSack/JadeDynastyEquipBeh.cs | 4
System/Strengthening/GodBeastModel.cs | 16
System/DailyQuest/FindNumberWin.cs | 60 -
System/Vip/VipWin.cs | 4
/dev/null | 12
System/Dungeon/AssistPlayerCell.cs | 2
System/KnapSack/Logic/DecomposeGetItemWin.cs | 4
System/JadeDynastyKnapSack/JadeDynastyDecomposeGetItemWin.cs | 4
System/KnapSack/Logic/ItemModel.cs | 16
System/BetterItemGet/BetterEquipGetModel.cs | 4
System/RoleParticulars/RoleParticularsWin.cs | 2
System/BlastFurnace/FurnaceFireChooseWin.cs | 4
System/Vip/VipInvest/RotatePointer.cs | 10
System/DailyQuest/ResourcesBackPanel.cs | 46 -
System/KnapSack/New/ExtendWin.cs | 4
System/Strengthening/ActiveAttrCell.cs | 28
184 files changed, 747 insertions(+), 1,463 deletions(-)
diff --git a/Core/GameEngine/Model/Player/Character/PlayerBaseData.cs b/Core/GameEngine/Model/Player/Character/PlayerBaseData.cs
index 158f973..cc8d27d 100644
--- a/Core/GameEngine/Model/Player/Character/PlayerBaseData.cs
+++ b/Core/GameEngine/Model/Player/Character/PlayerBaseData.cs
@@ -13,7 +13,6 @@
public uint FamilyId; //瀹舵棌
public string FamilyName; //瀹舵棌鍚嶇О
public uint diamond; //浠欑帀
- public uint bindDiamond; //缁戠帀
public uint copper; //閾滈挶
public ulong allCopper { get { return (ulong)copper + (ulong)copperExtend * 100000000; } }
public uint FightPoint; //鎴樻枟鍊�
@@ -80,7 +79,6 @@
FamilyId = _serverInfo.Family;
FamilyName = _serverInfo.FamilyName.Trim().Replace(" ", "");
diamond = _serverInfo.Gold;
- bindDiamond = _serverInfo.GoldPaper;
copper = _serverInfo.Silver;
MapID = _serverInfo.MapID;
mainServerMapIdRecord = MapID;
@@ -170,7 +168,6 @@
FamilyId = serverInfo.Family;
FamilyName = serverInfo.FamilyName.Trim().Replace(" ", "");
diamond = serverInfo.Gold;
- bindDiamond = serverInfo.GoldPaper;
copper = serverInfo.Silver;
MapID = serverInfo.MapID;
if (serverInfo.socketType == ServerType.Main)
diff --git a/Core/GameEngine/Model/Player/PlayerDatas.cs b/Core/GameEngine/Model/Player/PlayerDatas.cs
index 478a251..324d873 100644
--- a/Core/GameEngine/Model/Player/PlayerDatas.cs
+++ b/Core/GameEngine/Model/Player/PlayerDatas.cs
@@ -283,7 +283,6 @@
baseData.diamond = value;
break;
case PlayerDataType.GoldPaper:
- baseData.bindDiamond = value;
break;
case PlayerDataType.Silver:
baseData.copper = value;
diff --git a/Fight/MapTransferUtility.cs b/Fight/MapTransferUtility.cs
index c8c4128..a0058a0 100644
--- a/Fight/MapTransferUtility.cs
+++ b/Fight/MapTransferUtility.cs
@@ -228,8 +228,13 @@
GActor _npc = GAMgr.Instance.GetCloserNPC(_hero.Pos, npcID);
if (_npc != null)
{
- //Debug.LogFormat(" |-- 鍦ㄨ閲庡唴");
_destPostion = _npc.Pos;
+
+ NpcID = npcID;
+ MapTransferDoType = E_MapTransferDoType.Npc;
+
+ _hero.MoveToPosition(_destPostion);
+ yield break;
}
}
else
diff --git a/Fight/Stage/MapEditor/Game/ClientSceneManager.cs b/Fight/Stage/MapEditor/Game/ClientSceneManager.cs
index 0dc9d5e..cac547e 100644
--- a/Fight/Stage/MapEditor/Game/ClientSceneManager.cs
+++ b/Fight/Stage/MapEditor/Game/ClientSceneManager.cs
@@ -344,7 +344,10 @@
{
var _refreshEvent = new EventRefreshNPCHandler();
_refreshEvent.Init(_event as Evt_RefreshMonster);
- m_EventHandlerDict.Add(_refreshEvent.GetEventID(), _refreshEvent);
+ if (!m_EventHandlerDict.ContainsKey(_refreshEvent.GetEventID()))
+ {
+ m_EventHandlerDict.Add(_refreshEvent.GetEventID(), _refreshEvent);
+ }
}
}
diff --git a/Fight/Stage/MapEditor/Game/TransferGroup.cs b/Fight/Stage/MapEditor/Game/TransferGroup.cs
index 81a74d4..2c4a7eb 100644
--- a/Fight/Stage/MapEditor/Game/TransferGroup.cs
+++ b/Fight/Stage/MapEditor/Game/TransferGroup.cs
@@ -142,7 +142,8 @@
float _y = 0;
if (m_StartPos.y > _p.position.y)
{
- _y = Constants.hurtAniCurve.animationCurve.Evaluate(m_InCreaseTime) * (m_StartPos.y - _p.position.y) + (1 - m_InCreaseTime) * (m_StartPos.y - _p.position.y);
+ var _offset = m_StartPos.y - _p.position.y;
+ _y = Constants.hurtAniCurve.animationCurve.Evaluate(m_InCreaseTime) * _offset + (1 - m_InCreaseTime) * _offset;
}
else
{
diff --git a/Lua/Gen/BlastFurnaceModelWrap.cs b/Lua/Gen/BlastFurnaceModelWrap.cs
index 1299ba0..f96f15c 100644
--- a/Lua/Gen/BlastFurnaceModelWrap.cs
+++ b/Lua/Gen/BlastFurnaceModelWrap.cs
@@ -756,31 +756,14 @@
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _m_GetProValueTypeStr(RealStatePtr L)
{
- try {
-
- ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
-
-
- BlastFurnaceModel gen_to_be_invoked = (BlastFurnaceModel)translator.FastGetCSObj(L, 1);
-
-
-
- {
- int _isPercentage = LuaAPI.xlua_tointeger(L, 2);
- int _value = LuaAPI.xlua_tointeger(L, 3);
-
- string gen_ret = gen_to_be_invoked.GetProValueTypeStr( _isPercentage, _value );
- LuaAPI.lua_pushstring(L, gen_ret);
-
-
-
- return 1;
- }
-
- } catch(System.Exception gen_e) {
+ try
+ {
+ return 1;
+ }
+ catch (System.Exception gen_e)
+ {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
-
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
diff --git a/Lua/Gen/SnxxzUIItemTipsModelWrap.cs b/Lua/Gen/SnxxzUIItemTipsModelWrap.cs
index 570cd3e..dadf0af 100644
--- a/Lua/Gen/SnxxzUIItemTipsModelWrap.cs
+++ b/Lua/Gen/SnxxzUIItemTipsModelWrap.cs
@@ -1008,10 +1008,6 @@
System.Collections.Generic.List<int> _valuelist = (System.Collections.Generic.List<int>)translator.GetObject(L, 3, typeof(System.Collections.Generic.List<int>));
ItemConfig _itemConfig = (ItemConfig)translator.GetObject(L, 4, typeof(ItemConfig));
- string gen_ret = gen_to_be_invoked.GetLegendAttr( _idlist, _valuelist, _itemConfig );
- LuaAPI.lua_pushstring(L, gen_ret);
-
-
return 1;
}
@@ -1153,14 +1149,6 @@
{
- System.Collections.Generic.List<int> _idlist = (System.Collections.Generic.List<int>)translator.GetObject(L, 2, typeof(System.Collections.Generic.List<int>));
- System.Collections.Generic.List<int> _valuelist = (System.Collections.Generic.List<int>)translator.GetObject(L, 3, typeof(System.Collections.Generic.List<int>));
- ItemConfig _itemConfig = (ItemConfig)translator.GetObject(L, 4, typeof(ItemConfig));
- bool _isCustom = LuaAPI.lua_toboolean(L, 5);
-
- string gen_ret = gen_to_be_invoked.GetPreviewLegendAttr( _idlist, _valuelist, _itemConfig, _isCustom );
- LuaAPI.lua_pushstring(L, gen_ret);
-
return 1;
@@ -1291,31 +1279,14 @@
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _m_GetProValueTypeStr(RealStatePtr L)
{
- try {
-
- ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
-
-
- Snxxz.UI.ItemTipsModel gen_to_be_invoked = (Snxxz.UI.ItemTipsModel)translator.FastGetCSObj(L, 1);
-
-
-
- {
- PlayerPropertyConfig _playerproModel = (PlayerPropertyConfig)translator.GetObject(L, 2, typeof(PlayerPropertyConfig));
- int _value = LuaAPI.xlua_tointeger(L, 3);
-
- string gen_ret = gen_to_be_invoked.GetProValueTypeStr( _playerproModel, _value );
- LuaAPI.lua_pushstring(L, gen_ret);
-
-
-
- return 1;
- }
-
- } catch(System.Exception gen_e) {
+ try
+ {
+ return 1;
+ }
+ catch (System.Exception gen_e)
+ {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
-
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
diff --git a/Lua/Gen/SnxxzUITreasureEffectModelWrap.cs b/Lua/Gen/SnxxzUITreasureEffectModelWrap.cs
index 4e817d5..0e3662e 100644
--- a/Lua/Gen/SnxxzUITreasureEffectModelWrap.cs
+++ b/Lua/Gen/SnxxzUITreasureEffectModelWrap.cs
@@ -332,33 +332,17 @@
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _m_GetProValueTypeStr(RealStatePtr L)
{
- try {
-
- ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
-
-
- Snxxz.UI.TreasureEffectModel gen_to_be_invoked = (Snxxz.UI.TreasureEffectModel)translator.FastGetCSObj(L, 1);
-
-
-
- {
- PlayerPropertyConfig _playerproModel = (PlayerPropertyConfig)translator.GetObject(L, 2, typeof(PlayerPropertyConfig));
- int _value = LuaAPI.xlua_tointeger(L, 3);
-
- string gen_ret = gen_to_be_invoked.GetProValueTypeStr( _playerproModel, _value );
- LuaAPI.lua_pushstring(L, gen_ret);
-
-
-
- return 1;
- }
-
- } catch(System.Exception gen_e) {
+ try
+ {
+ return 1;
+ }
+ catch (System.Exception gen_e)
+ {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
-
+
}
-
+
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _m_GetTreasureFight(RealStatePtr L)
{
@@ -368,8 +352,6 @@
Snxxz.UI.TreasureEffectModel gen_to_be_invoked = (Snxxz.UI.TreasureEffectModel)translator.FastGetCSObj(L, 1);
-
-
{
diff --git a/System/Activity/ActivitySettleWin.cs b/System/Activity/ActivitySettleWin.cs
index b15dd33..796feed 100644
--- a/System/Activity/ActivitySettleWin.cs
+++ b/System/Activity/ActivitySettleWin.cs
@@ -98,8 +98,8 @@
ItemCellModel cellModel = new ItemCellModel(serverItem.ItemID, false, (ulong)serverItem.Count
, "", PackType.Deleted, false, ConfigParse.Analysis(serverItem.UserData));
itemCell.Init(cellModel);
- itemCell.cellBtn.RemoveAllListeners();
- itemCell.cellBtn.AddListener(() =>
+ itemCell.button.RemoveAllListeners();
+ itemCell.button.AddListener(() =>
{
ShowItemDetails(serverItem);
});
@@ -123,8 +123,8 @@
ItemCellModel cellModel = new ItemCellModel(serverItem.ItemID, false, (ulong)serverItem.Count,
"", PackType.Deleted, false, ConfigParse.Analysis(serverItem.UserData));
itemCell.Init(cellModel);
- itemCell.cellBtn.RemoveAllListeners();
- itemCell.cellBtn.AddListener(() =>
+ itemCell.button.RemoveAllListeners();
+ itemCell.button.AddListener(() =>
{
ShowItemDetails(serverItem);
});
diff --git a/System/BetterItemGet/BetterEquipGetModel.cs b/System/BetterItemGet/BetterEquipGetModel.cs
index d01ec1a..9dcb2f0 100644
--- a/System/BetterItemGet/BetterEquipGetModel.cs
+++ b/System/BetterItemGet/BetterEquipGetModel.cs
@@ -155,7 +155,7 @@
{
if (!string.IsNullOrEmpty(guid))
{
- var sourcelist = betterModel.GetUseDataModel((int)ItemUseDataKey.source);
+ var sourcelist = betterModel.GetUseData((int)ItemUseDataKey.source);
if (sourcelist != null && sourcelist[0] == 4)
{
SnxxzGame.Instance.StartCoroutine(Co_DelayRefreshBetterEquip(guid));
@@ -229,7 +229,7 @@
if (!string.IsNullOrEmpty(tempGuid))
{
var itemModel = playerPack.GetItemByGuid(tempGuid);
- var sourcelist = itemModel.GetUseDataModel((int)ItemUseDataKey.source);
+ var sourcelist = itemModel.GetUseData((int)ItemUseDataKey.source);
if (sourcelist != null && sourcelist[0] == 4)
{
SnxxzGame.Instance.StartCoroutine(Co_DelayRefreshBetterEquip(tempGuid));
diff --git a/System/BlastFurnace/BlastFurnaceModel.cs b/System/BlastFurnace/BlastFurnaceModel.cs
index 6ba88a9..6f05d0b 100644
--- a/System/BlastFurnace/BlastFurnaceModel.cs
+++ b/System/BlastFurnace/BlastFurnaceModel.cs
@@ -517,24 +517,6 @@
}
#endregion
- public string GetProValueTypeStr(int isPercentage, int value)
- {
- string s = "";
- if (isPercentage == 0)
- {
- s = value.ToString();
- }
- else if (isPercentage == 1)
- {
- s = (float)Math.Round(value / 100f, 1) + "%";
- }
- else if (isPercentage == 2)
- {
- s = ((float)Math.Round(value / 100f, 1)).ToString();
- }
- return s;
- }
-
#region 鍙戦�佽姹�
public void SendMakerDrugQuest(ushort drugId, uint specConfigID)
{
diff --git a/System/BlastFurnace/FurnaceFireChooseWin.cs b/System/BlastFurnace/FurnaceFireChooseWin.cs
index 4500637..7d20c77 100644
--- a/System/BlastFurnace/FurnaceFireChooseWin.cs
+++ b/System/BlastFurnace/FurnaceFireChooseWin.cs
@@ -153,8 +153,8 @@
fireChooseCell.itemCell.countText.gameObject.SetActive(true);
fireChooseCell.nameText.text = chinItemModel.ItemName;
fireChooseCell.addSuccessRateText.text = effectStr;
- fireChooseCell.itemCell.cellBtn.RemoveAllListeners();
- fireChooseCell.itemCell.cellBtn.AddListener(() =>
+ fireChooseCell.itemCell.button.RemoveAllListeners();
+ fireChooseCell.itemCell.button.AddListener(() =>
{
itemPathModel.SetChinItemModel(matId);
});
diff --git a/System/BlastFurnace/LingDanTips.cs b/System/BlastFurnace/LingDanTips.cs
index 372b90b..7d4810e 100644
--- a/System/BlastFurnace/LingDanTips.cs
+++ b/System/BlastFurnace/LingDanTips.cs
@@ -342,8 +342,8 @@
itemCell.countText.text = UIHelper.AppendColor(TextColType.Red, haveMaterCount.ToString()) + "/" + materialNum;
}
- itemCell.cellBtn.RemoveAllListeners();
- itemCell.cellBtn.AddListener(() =>
+ itemCell.button.RemoveAllListeners();
+ itemCell.button.AddListener(() =>
{
itemPathModel.SetChinItemModel(materialId);
});
@@ -422,9 +422,7 @@
}
_addSpecMatItemCell.reducebtn.gameObject.SetActive(true);
- _addSpecMatItemCell.reducebtn.RemoveAllListeners();
-
- _addSpecMatItemCell.reducebtn.AddListener(() => { OnClickReduceBtn(); });
+ _addSpecMatItemCell.reducebtn.SetListener(() => { OnClickReduceBtn(); });
_addSpecMatBtn.onClick.AddListener(() => { ChooseWin.gameObject.SetActive(true); });
CreateRandomLineCell();
@@ -507,8 +505,8 @@
fullImg.SetActive(false);
}
- itemCell.cellBtn.RemoveAllListeners();
- itemCell.cellBtn.AddListener(() =>
+ itemCell.button.RemoveAllListeners();
+ itemCell.button.AddListener(() =>
{
ItemAttrData attrData = new ItemAttrData(itemId);
itemTipsModel.SetItemTipsModel(attrData);
diff --git a/System/BlastFurnace/PrayDrugCell.cs b/System/BlastFurnace/PrayDrugCell.cs
index 05e5879..f5a3fd5 100644
--- a/System/BlastFurnace/PrayDrugCell.cs
+++ b/System/BlastFurnace/PrayDrugCell.cs
@@ -43,8 +43,8 @@
itemBaisc.gameObject.SetActive(true);
ItemCellModel cellModel = new ItemCellModel(itemId,false,0);
itemBaisc.Init(cellModel);
- itemBaisc.cellBtn.RemoveAllListeners();
- itemBaisc.cellBtn.AddListener(()=>
+ itemBaisc.button.RemoveAllListeners();
+ itemBaisc.button.AddListener(()=>
{
ItemAttrData attrData = new ItemAttrData(itemId,false,0);
tipsModel.SetItemTipsModel(attrData);
diff --git a/System/BlastFurnace/PrayforDrugGetItemWin.cs b/System/BlastFurnace/PrayforDrugGetItemWin.cs
index ba839d8..2778a2d 100644
--- a/System/BlastFurnace/PrayforDrugGetItemWin.cs
+++ b/System/BlastFurnace/PrayforDrugGetItemWin.cs
@@ -43,8 +43,8 @@
{
ItemCellModel cellModel = new ItemCellModel(prayModel.itemId,false,1);
itemBaisc.Init(cellModel);
- itemBaisc.cellBtn.RemoveAllListeners();
- itemBaisc.cellBtn.AddListener(()=>
+ itemBaisc.button.RemoveAllListeners();
+ itemBaisc.button.AddListener(()=>
{
ItemAttrData attrData = new ItemAttrData(prayModel.itemId,false,1);
tipsModel.SetItemTipsModel(attrData);
diff --git a/System/BlastFurnace/RecycleDrugCell.cs b/System/BlastFurnace/RecycleDrugCell.cs
index 217f008..d9e163a 100644
--- a/System/BlastFurnace/RecycleDrugCell.cs
+++ b/System/BlastFurnace/RecycleDrugCell.cs
@@ -37,8 +37,8 @@
}
ItemCellModel cellModel = new ItemCellModel(itemModel.itemId,false,(ulong)itemCount);
itemCell.Init(cellModel);
- itemCell.cellBtn.RemoveAllListeners();
- itemCell.cellBtn.AddListener(() =>
+ itemCell.button.RemoveAllListeners();
+ itemCell.button.AddListener(() =>
{
if (selectImg.activeInHierarchy)
{
diff --git a/System/Chat/ChatExtentWin.cs b/System/Chat/ChatExtentWin.cs
index a432958..0f77833 100644
--- a/System/Chat/ChatExtentWin.cs
+++ b/System/Chat/ChatExtentWin.cs
@@ -97,8 +97,8 @@
ItemConfig itemCfg = ItemConfig.Get((int)_item.itemId);
_itemCell.items[i].Init(_item);
_itemCell.itemEquips[i].gameObject.SetActive(_item.packType == PackType.Equip);
- _itemCell.items[i].cellBtn.onClick.RemoveAllListeners();
- _itemCell.items[i].cellBtn.onClick.AddListener(() =>
+ _itemCell.items[i].button.onClick.RemoveAllListeners();
+ _itemCell.items[i].button.onClick.AddListener(() =>
{
OnItemClick(_item);
});
diff --git a/System/Compose/New/ComposeEquipWin.cs b/System/Compose/New/ComposeEquipWin.cs
index 566d873..3a94998 100644
--- a/System/Compose/New/ComposeEquipWin.cs
+++ b/System/Compose/New/ComposeEquipWin.cs
@@ -667,7 +667,7 @@
bool isShow = model.config.ExpireTime > 0;
if (isShow)
{
- List<int> itemEffectTime = model.GetUseDataModel((int)ItemUseDataKey.createTime);
+ List<int> itemEffectTime = model.GetUseData((int)ItemUseDataKey.createTime);
seconds = model.config.ExpireTime;
if (itemEffectTime != null && itemEffectTime[0] != 0 && model.guid != "")
{
diff --git a/System/Compose/New/ComposeMatCell.cs b/System/Compose/New/ComposeMatCell.cs
index 10b235f..a5f3617 100644
--- a/System/Compose/New/ComposeMatCell.cs
+++ b/System/Compose/New/ComposeMatCell.cs
@@ -63,21 +63,19 @@
{
bool isShowMat = itemId != 0 || itemModel != null ? true : false;
itemCell.gameObject.SetActive(isShowMat);
- itemCell.cellBtn.RemoveAllListeners();
- itemCell.reducebtn.RemoveAllListeners();
if (isShowMat)
{
if (itemModel != null)
{
itemCell.Init(itemModel);
- itemCell.cellBtn.AddListener(ClickItemCell);
+ itemCell.button.SetListener(ClickItemCell);
}
else
{
ItemCellModel cellModel = new ItemCellModel(itemId);
itemCell.Init(cellModel);
- itemCell.cellBtn.AddListener(ClickItemCell);
+ itemCell.button.SetListener(ClickItemCell);
}
switch(matType)
@@ -85,7 +83,7 @@
case NeedMatType.unfixedItem:
case NeedMatType.addItem:
itemCell.reducebtn.gameObject.SetActive(true);
- itemCell.reducebtn.AddListener(ClickReduce);
+ itemCell.reducebtn.SetListener(ClickReduce);
break;
}
}
diff --git a/System/Compose/New/ComposeSelectItemCell.cs b/System/Compose/New/ComposeSelectItemCell.cs
index fc2b574..bf14944 100644
--- a/System/Compose/New/ComposeSelectItemCell.cs
+++ b/System/Compose/New/ComposeSelectItemCell.cs
@@ -62,7 +62,7 @@
remainTimeText.gameObject.SetActive(isShow);
if (isShow)
{
- List<int> itemEffectTime = itemModel.GetUseDataModel((int)ItemUseDataKey.createTime);
+ List<int> itemEffectTime = itemModel.GetUseData((int)ItemUseDataKey.createTime);
double remianTime = itemModel.config.ExpireTime;
if (itemEffectTime != null && itemEffectTime[0] != 0 && itemModel.guid != "")
{
diff --git a/System/Compose/New/ComposeWinModel.cs b/System/Compose/New/ComposeWinModel.cs
index b3f3941..cf6f8d2 100644
--- a/System/Compose/New/ComposeWinModel.cs
+++ b/System/Compose/New/ComposeWinModel.cs
@@ -897,7 +897,7 @@
bool isRefineMat = false;
foreach (var model in unfixedDic.Values)
{
- if (model.GetUseDataModel((int)ItemUseDataKey.wingMaterialItemID) != null)
+ if (model.GetUseData((int)ItemUseDataKey.wingMaterialItemID) != null)
{
isRefineMat = true;
break;
diff --git a/System/Compose/New/ComposeWingsWin.cs b/System/Compose/New/ComposeWingsWin.cs
index d612cc0..3f35273 100644
--- a/System/Compose/New/ComposeWingsWin.cs
+++ b/System/Compose/New/ComposeWingsWin.cs
@@ -503,7 +503,7 @@
{
var matCell = fixedAndUnfixeds[fixedDisplay - 1];
int fixedId = fixedIds[i];
- var bindIcon = matCell.itemCell.bindIcon;
+ var bindIcon = matCell.itemCell.auctionIcon;
bindIcon.gameObject.SetActive(false);
//if (isBind)
//{
diff --git a/System/Compose/New/GuardComposeConfirmWin.cs b/System/Compose/New/GuardComposeConfirmWin.cs
index ca3b6f6..baa7757 100644
--- a/System/Compose/New/GuardComposeConfirmWin.cs
+++ b/System/Compose/New/GuardComposeConfirmWin.cs
@@ -124,7 +124,7 @@
bool isShow = model.config.ExpireTime > 0;
if (isShow)
{
- List<int> itemEffectTime = model.GetUseDataModel((int)ItemUseDataKey.createTime);
+ List<int> itemEffectTime = model.GetUseData((int)ItemUseDataKey.createTime);
seconds = model.config.ExpireTime;
if (itemEffectTime != null && itemEffectTime[0] != 0 && model.guid != "")
{
diff --git a/System/CrossServerOneVsOne/CrossSeverOneVsOneBuyMatchTimesWin.cs b/System/CrossServerOneVsOne/CrossSeverOneVsOneBuyMatchTimesWin.cs
index 68cb716..8dcce6b 100644
--- a/System/CrossServerOneVsOne/CrossSeverOneVsOneBuyMatchTimesWin.cs
+++ b/System/CrossServerOneVsOne/CrossSeverOneVsOneBuyMatchTimesWin.cs
@@ -32,7 +32,7 @@
}
protected override void OnAfterOpen()
{
-
+
}
protected override void OnPreClose()
@@ -49,12 +49,12 @@
{
int remainBuyTimes = CrossServerOneVsOnePlayerInfo.Instance.GetDayRemainBuyNum();
price = (ulong)CrossServerOneVsOnePlayerInfo.Instance.GetBuyMatchNumPrice();
- m_CostRemind.text = Language.Get("TimesBuyLanguage3",price);
+ m_CostRemind.text = Language.Get("TimesBuyLanguage3", price);
m_ContainerBuylimit.gameObject.SetActive(remainBuyTimes <= 0);
m_BuyTimes.gameObject.SetActive(remainBuyTimes > 0);
- if(remainBuyTimes > 0)
+ if (remainBuyTimes > 0)
{
- m_TodayBuyTimes.text = Language.Get("TimesBuyLanguage1",UIHelper.AppendColor(TextColType.Green,remainBuyTimes.ToString()), crossServerModel.buyMaxMatchNum);
+ m_TodayBuyTimes.text = Language.Get("TimesBuyLanguage1", UIHelper.AppendColor(TextColType.Green, remainBuyTimes.ToString()), crossServerModel.buyMaxMatchNum);
}
else
{
@@ -66,27 +66,10 @@
{
if (!crossServerModel.TryGetBuyMatchTimes("CrossMatching21")) return;
- ulong gold = UIHelper.GetMoneyCnt(1);
- ulong bindGold = UIHelper.GetMoneyCnt(2);
- ulong sumGold = gold + bindGold;
+ ulong sumGold = UIHelper.GetMoneyCnt(1);
if (sumGold >= price)
{
- if (bindGold < price)
- {
- ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("FairyLand_Func13",
- PlayerDatas.Instance.baseData.bindDiamond, price, price - bindGold), (bool isOk) =>
- {
- if (isOk)
- {
- SendBuyTimes();
- }
- });
- return;
- }
- else
- {
- SendBuyTimes();
- }
+ SendBuyTimes();
}
else
{
diff --git a/System/CrossServerOneVsOne/CrossSeverOneVsOneDayAwardCell.cs b/System/CrossServerOneVsOne/CrossSeverOneVsOneDayAwardCell.cs
index 81cacd0..4fee9dc 100644
--- a/System/CrossServerOneVsOne/CrossSeverOneVsOneDayAwardCell.cs
+++ b/System/CrossServerOneVsOne/CrossSeverOneVsOneDayAwardCell.cs
@@ -69,8 +69,8 @@
var awardItem = awardItems[i];
ItemCellModel cellModel = new ItemCellModel(awardItem.itemId, true, (ulong)awardItem.itemCount);
itemBasic.Init(cellModel);
- itemBasic.cellBtn.RemoveAllListeners();
- itemBasic.cellBtn.AddListener(() =>
+ itemBasic.button.RemoveAllListeners();
+ itemBasic.button.AddListener(() =>
{
ItemAttrData attrData = new ItemAttrData(awardItem.itemId, true, (ulong)awardItem.itemCount);
tipsModel.SetItemTipsModel(attrData);
diff --git a/System/CrossServerOneVsOne/SeasonRewardCell.cs b/System/CrossServerOneVsOne/SeasonRewardCell.cs
index b207fae..b02c3c7 100644
--- a/System/CrossServerOneVsOne/SeasonRewardCell.cs
+++ b/System/CrossServerOneVsOne/SeasonRewardCell.cs
@@ -167,7 +167,7 @@
ItemCellModel cellModel = new ItemCellModel(List[i].id, true, (ulong)List[i].count);
_ItemCell.Init(cellModel);
int type = i;
- _ItemCell.cellBtn.SetListener(() =>
+ _ItemCell.button.SetListener(() =>
{
ItemAttrData attrData = new ItemAttrData(List[type].id, false, (ulong)List[type].count);
itemTipsModel.SetItemTipsModel(attrData);
@@ -283,7 +283,7 @@
ItemCellModel cellModel = new ItemCellModel(List[i].ItemId, true, (ulong)List[i].ItemNumber);
_ItemCell.Init(cellModel);
int type = i;
- _ItemCell.cellBtn.SetListener(() =>
+ _ItemCell.button.SetListener(() =>
{
ItemAttrData attrData = new ItemAttrData(List[type].ItemId, false, (ulong)List[type].ItemNumber);
itemTipsModel.SetItemTipsModel(attrData);
diff --git a/System/CrossServerOneVsOne/SegmentRewardCell.cs b/System/CrossServerOneVsOne/SegmentRewardCell.cs
index c9e7c4a..326319a 100644
--- a/System/CrossServerOneVsOne/SegmentRewardCell.cs
+++ b/System/CrossServerOneVsOne/SegmentRewardCell.cs
@@ -94,7 +94,7 @@
ItemCell _ItemCell = ObjChild.GetComponent<ItemCell>();
ItemCellModel cellModel = new ItemCellModel(itemClass.ItemId, true, (ulong)itemClass.ItemNumber);
_ItemCell.Init(cellModel);
- _ItemCell.cellBtn.SetListener(() =>
+ _ItemCell.button.SetListener(() =>
{
ItemAttrData attrData = new ItemAttrData(itemClass.ItemId, false, (ulong)itemClass.ItemNumber);
itemTipsModel.SetItemTipsModel(attrData);
diff --git a/System/DailyQuest/FindNumberWin.cs b/System/DailyQuest/FindNumberWin.cs
index bd830a6..82d5ed5 100644
--- a/System/DailyQuest/FindNumberWin.cs
+++ b/System/DailyQuest/FindNumberWin.cs
@@ -66,8 +66,7 @@
}
#endregion
GetItemPathModel _GetItemPath;
- GetItemPathModel GetItemPath
- {
+ GetItemPathModel GetItemPath {
get { return _GetItemPath ?? (_GetItemPath = ModelCenter.Instance.GetModel<GetItemPathModel>()); }
}
ResourcesBackModel m_ResourcesBackModel;
@@ -80,45 +79,26 @@
{
Close();
}
+
void OnClickConfirmButton()
{
if (_isBool)
- {
- int getCostJade = (int)UIHelper.GetMoneyCnt(2);
- if (getCostJade >= NeedCostJade)
- {
- CMRecoverGain(0, resourcesBackModel.ResourcesBackId, number);
- Close();
- }
- else
- {
- RegardsFairyJadeBack();
- }
+ {
+ RegardsFairyJadeBack();
}
else
{
CMRecoverGain(1, resourcesBackModel.ResourcesBackId, number);
Close();
- //int copperCash = (int)UIHelper.GetMoneyCnt(3); ;
- //if (copperCash >= NeedCostCopper)
- //{
- // CMRecoverGain(1, resourcesBackModel.ResourcesBackId, number);
- // Close();
- //}
- //else
- //{
- // GetItemPath.SetChinItemModel(2100);
- //}
}
}
- void RegardsFairyJadeBack( )
+ void RegardsFairyJadeBack()
{
- int getCostJade = (int)UIHelper.GetMoneyCnt(2);//鎷ユ湁鐨勭粦鐜�
- int getJade= (int)UIHelper.GetMoneyCnt(1);//鎷ユ湁鐨勪粰鐜�
- int CostJade = NeedCostJade - getCostJade;
- string strLanguage = string.Format(Language.Get("FairyLand_Func13"), getCostJade, NeedCostJade, CostJade);
+ int getJade = (int)UIHelper.GetMoneyCnt(1);//鎷ユ湁鐨勪粰鐜�
+ int CostJade = NeedCostJade;
+ string strLanguage = string.Format(Language.Get("FairyLand_Func13"), NeedCostJade, CostJade);
ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), strLanguage, (bool isOk) =>
{
if (isOk)
@@ -138,9 +118,9 @@
WindowCenter.Instance.Open<RechargeTipWin>();
}
}
- });
-
-
+ });
+
+
}
void OnClickReduceButton()
@@ -184,9 +164,9 @@
else
{
m_ResourceName.text = resourcesBackClass.NameOfActivity + string.Format(Language.Get("ResourceBack_NormalTimes"), resourcesBackClass.RecoverCnt);
- }
-
-
+ }
+
+
m_Slider.minValue = minNumber;
m_Slider.maxValue = maxNumber;
number = Mathf.CeilToInt(m_Slider.value);
@@ -215,8 +195,8 @@
else
{
m_RequiredPrice.text = string.Format(Language.Get("ResourceBack_JadeCost"), needFairyJade, resourcesBackClass.NormalCostJade);
- }
-
+ }
+
NeedCostJade = needFairyJade;
}
private void CopperCashFind(int resourcesBackID)
@@ -226,8 +206,8 @@
m_Slider.wholeNumbers = true;
int minNumber = 1;
int maxNumber = 0;
- maxNumber = resourcesBackClass.RecoverCnt;
-
+ maxNumber = resourcesBackClass.RecoverCnt;
+
m_ResourceName.text = resourcesBackClass.NameOfActivity + string.Format(Language.Get("ResourceBack_NormalTimes"), maxNumber);
number = Mathf.CeilToInt(m_Slider.value);
m_UpToNumberTxt.text = number.ToString();
@@ -240,8 +220,8 @@
IsOpenBool = false;
}
needCostCopper = (Mathf.CeilToInt(m_Slider.value)) * resourcesBackClass.CostCopper;
- m_RequiredPrice.gameObject.SetActive(false);
- // m_RequiredPrice.text = string.Format(Language.Get("ResourceBack_CopperCost"), needCostCopper);
+ m_RequiredPrice.gameObject.SetActive(false);
+ // m_RequiredPrice.text = string.Format(Language.Get("ResourceBack_CopperCost"), needCostCopper);
NeedCostCopper = needCostCopper;
}
diff --git a/System/DailyQuest/ResourcesBackBoxBack.cs b/System/DailyQuest/ResourcesBackBoxBack.cs
index 210f335..efb315a 100644
--- a/System/DailyQuest/ResourcesBackBoxBack.cs
+++ b/System/DailyQuest/ResourcesBackBoxBack.cs
@@ -48,7 +48,6 @@
ResourcesBackClass resourcesBackClass = resourcesBackModel.ResourcesBackDic[_resourcesBackID];
resourcesBackModel.ResourcesBackId = _resourcesBackID;
int costCopper = (int)UIHelper.GetMoneyCnt(3);//閾滈挶
- int CostJade = (int)UIHelper.GetMoneyCnt(2);//缁戠帀
if (isBool)
{
int costJadeNumber = 0;
@@ -72,14 +71,6 @@
else
{
RecoverGain(1, _resourcesBackID, 1);
- //if (costCopper >= resourcesBackClass.CostCopper)
- //{
- // RecoverGain(1, _resourcesBackID, 1);
- //}
- //else
- //{
- // GetItemPath.SetChinItemModel(2100);
- //}
}
}
}
@@ -385,7 +376,7 @@
private void RegardsFairyJadeBack(ResourcesBackClass resourcesBackClass)//鍏充簬浠欑帀鎵惧洖
{
- int CostJade = (int)UIHelper.GetMoneyCnt(2);//缁戠帀
+ int CostJade = (int)UIHelper.GetMoneyCnt(1);
if (resourcesBackClass.RecoverCnt != 0)
{
if (CostJade >= resourcesBackClass.NormalCostJade)
diff --git a/System/DailyQuest/ResourcesBackPanel.cs b/System/DailyQuest/ResourcesBackPanel.cs
index 0c8c62d..c3177fc 100644
--- a/System/DailyQuest/ResourcesBackPanel.cs
+++ b/System/DailyQuest/ResourcesBackPanel.cs
@@ -29,8 +29,7 @@
ResourcesBackModel m_ResourcesBackModel;
ResourcesBackModel resourcesBackModel { get { return m_ResourcesBackModel ?? (m_ResourcesBackModel = ModelCenter.Instance.GetModel<ResourcesBackModel>()); } }
GetItemPathModel _GetItemPath;
- GetItemPathModel GetItemPath
- {
+ GetItemPathModel GetItemPath {
get { return _GetItemPath ?? (_GetItemPath = ModelCenter.Instance.GetModel<GetItemPathModel>()); }
}
public static event Action IsAccordingRedPoint;
@@ -45,7 +44,7 @@
}
private void OnEnable()
{
-
+
m_ScrollerController.OnRefreshCell += OnRefreshGridCell;
ResourcesBackModel.ResourcesBackUpdateEvent += OnResourcesBackUpdate;
IsFindOneKey();
@@ -178,7 +177,7 @@
NeedFairyJade += ResourcesBack.RecoverCnt * ResourcesBack.NormalCostJade;
}
}
- int CostJade = (int)UIHelper.GetMoneyCnt(2);//缁戠帀
+ int CostJade = (int)UIHelper.GetMoneyCnt(1);
string strLanguage = string.Empty;
if (CostJade >= NeedFairyJade)
{
@@ -193,7 +192,7 @@
{
if (isOk)
{
- if ((int)UIHelper.GetMoneyCnt(2) + (int)UIHelper.GetMoneyCnt(1) >= NeedFairyJade)
+ if ((int)UIHelper.GetMoneyCnt(1) >= NeedFairyJade)
{
RecoverGain(2);
m_ScrollerController.m_Scorller.RefreshActiveCellViews();//鍒锋柊鍙
@@ -210,6 +209,7 @@
}
});
}
+
private void FindAKeyFairyJade()//涓�閿壘浠欑帀
{
int NeedFairyJade = 0;
@@ -225,7 +225,7 @@
NeedFairyJade += ResourcesBack.ExtraCnt * ResourcesBack.VipCostJade;
}
}
- int CostJade = (int)UIHelper.GetMoneyCnt(2);//缁戠帀
+ int CostJade = (int)UIHelper.GetMoneyCnt(1);
string strLanguage = string.Empty;
if (CostJade >= NeedFairyJade)
{
@@ -240,7 +240,7 @@
{
if (isOk)
{
- if ((int)UIHelper.GetMoneyCnt(2) + (int)UIHelper.GetMoneyCnt(1) >= NeedFairyJade)
+ if ((int)UIHelper.GetMoneyCnt(1) >= NeedFairyJade)
{
RecoverGain(0);
m_ScrollerController.m_Scorller.RefreshActiveCellViews();//鍒锋柊鍙
@@ -257,36 +257,11 @@
}
});
}
+
private void FindAKeyCoins()//涓�閿壘閾滈挶
{
RecoverGain(1);//鍏嶈垂鎵惧洖
m_ScrollerController.m_Scorller.RefreshActiveCellViews();//鍒锋柊鍙
- //int NeedCoinsNumber = 0;
- //foreach (int key in resourcesBackModel.ResourcesBackDic.Keys)
- //{
- // var ResourcesBack = resourcesBackModel.ResourcesBackDic[key];
- // if (ResourcesBack.RecoverCnt > 0)
- // {
- // NeedCoinsNumber += ResourcesBack.RecoverCnt * ResourcesBack.CostCopper;
- // }
- //}
- //int costCopper = (int)UIHelper.GetMoneyCnt(3); ;//閾滈挶
- //string strLanguage = string.Format(Language.Get("NewResourceBack2"), packItemLogicUtility.Instance.OnChangeCoinsUnit((ulong)NeedCoinsNumber));
- //ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), strLanguage, (bool isOk) =>
- //{
- // if (isOk)
- // {
- // if (costCopper >= NeedCoinsNumber)
- // {
- // RecoverGain(1);
- // m_ScrollerController.m_Scorller.RefreshActiveCellViews();//鍒锋柊鍙
- // }
- // else
- // {
- // GetItemPath.SetChinItemModel(2100);
- // }
- // }
- //});
}
List<byte> indexList = new List<byte>();
@@ -393,10 +368,7 @@
if (havex.CompareTo(havey) != 0) return -havex.CompareTo(havey);
if (xPack.ID.CompareTo(yPack.ID) != 0) return xPack.ID.CompareTo(yPack.ID);
-
return 1;
-
-
}
int Compare(ResourcesBackClass x, ResourcesBackClass y)//閾滈挶鏁扮粍鎺掑垪
@@ -456,7 +428,7 @@
private void ToggleSelected()//Toggle閫変腑
{
- if (resourcesBackModel.ResourcesBackDic.Count <=0)
+ if (resourcesBackModel.ResourcesBackDic.Count <= 0)
{
return;
}
diff --git a/System/Dogz/DogzEquip.cs b/System/Dogz/DogzEquip.cs
index 57aeb6a..6509c5f 100644
--- a/System/Dogz/DogzEquip.cs
+++ b/System/Dogz/DogzEquip.cs
@@ -15,11 +15,11 @@
public void Display(ItemModel model)
{
itemBaisc.Init(model);
- itemBaisc.bindIcon.gameObject.SetActive(false);
+ itemBaisc.auctionIcon.gameObject.SetActive(false);
int strenLv = 0;
- if(model.GetUseDataModel((int)ItemUseDataKey.dogzEquipPlus) != null)
+ if(model.GetUseData((int)ItemUseDataKey.dogzEquipPlus) != null)
{
- strenLv = model.GetUseDataModel((int)ItemUseDataKey.dogzEquipPlus)[0];
+ strenLv = model.GetUseData((int)ItemUseDataKey.dogzEquipPlus)[0];
}
if (strenLv > 0)
{
@@ -30,8 +30,8 @@
{
strengLvTxt.gameObject.SetActive(false);
}
- itemBaisc.cellBtn.RemoveAllListeners();
- itemBaisc.cellBtn.AddListener(()=>
+ itemBaisc.button.RemoveAllListeners();
+ itemBaisc.button.AddListener(()=>
{
tipsModel.SetItemTipsModel(model.packType,model.guid,false,false);
tipsModel.SetDogzEquipBtn(tipsModel.curAttrData);
diff --git a/System/Dogz/DogzItemCell.cs b/System/Dogz/DogzItemCell.cs
index 8a79aed..72e14a8 100644
--- a/System/Dogz/DogzItemCell.cs
+++ b/System/Dogz/DogzItemCell.cs
@@ -28,9 +28,9 @@
}
DebugEx.Log("model:"+ model.itemId);
int strenLv = 0;
- if (model.GetUseDataModel((int)ItemUseDataKey.dogzEquipPlus) != null)
+ if (model.GetUseData((int)ItemUseDataKey.dogzEquipPlus) != null)
{
- strenLv = model.GetUseDataModel((int)ItemUseDataKey.dogzEquipPlus)[0];
+ strenLv = model.GetUseData((int)ItemUseDataKey.dogzEquipPlus)[0];
}
if (strenLv > 0)
{
@@ -50,9 +50,9 @@
itemBaisc.stateIcon.gameObject.SetActive(false);
}
- itemBaisc.bindIcon.gameObject.SetActive(false);
- itemBaisc.cellBtn.RemoveAllListeners();
- itemBaisc.cellBtn.AddListener(()=>
+ itemBaisc.auctionIcon.gameObject.SetActive(false);
+ itemBaisc.button.RemoveAllListeners();
+ itemBaisc.button.AddListener(()=>
{
tipsModel.SetItemTipsModel(model.packType, model.guid, false, true);
tipsModel.SetDogzItemBtn(tipsModel.curAttrData);
diff --git a/System/Dogz/DogzModel.cs b/System/Dogz/DogzModel.cs
index ea98029..9576d4e 100644
--- a/System/Dogz/DogzModel.cs
+++ b/System/Dogz/DogzModel.cs
@@ -812,9 +812,9 @@
y = end.equipScore;
if (x.CompareTo(y) != 0) return -x.CompareTo(y);
- List<int> strenglist = start.GetUseDataModel((int)ItemUseDataKey.dogzEquipPlus);
+ List<int> strenglist = start.GetUseData((int)ItemUseDataKey.dogzEquipPlus);
x = strenglist != null ? strenglist[0] : 0;
- strenglist = end.GetUseDataModel((int)ItemUseDataKey.dogzEquipPlus);
+ strenglist = end.GetUseData((int)ItemUseDataKey.dogzEquipPlus);
y = strenglist != null ? strenglist[0] : 0;
if (x.CompareTo(y) != 0) return -x.CompareTo(y);
diff --git a/System/Dogz/DogzPackWin.cs b/System/Dogz/DogzPackWin.cs
index bca2ad7..623ef18 100644
--- a/System/Dogz/DogzPackWin.cs
+++ b/System/Dogz/DogzPackWin.cs
@@ -277,15 +277,15 @@
else
{
int putStrenLv = 0;
- if (itemModel.GetUseDataModel((int)ItemUseDataKey.dogzEquipPlus) != null)
+ if (itemModel.GetUseData((int)ItemUseDataKey.dogzEquipPlus) != null)
{
- putStrenLv = itemModel.GetUseDataModel((int)ItemUseDataKey.dogzEquipPlus)[0];
+ putStrenLv = itemModel.GetUseData((int)ItemUseDataKey.dogzEquipPlus)[0];
}
int selectStrenLv = 0;
- if (selectModel.GetUseDataModel((int)ItemUseDataKey.dogzEquipPlus) != null)
+ if (selectModel.GetUseData((int)ItemUseDataKey.dogzEquipPlus) != null)
{
- selectStrenLv = selectModel.GetUseDataModel((int)ItemUseDataKey.dogzEquipPlus)[0];
+ selectStrenLv = selectModel.GetUseData((int)ItemUseDataKey.dogzEquipPlus)[0];
}
if (itemModel.config.ItemColor < selectModel.config.ItemColor
diff --git a/System/Dogz/SelectCell.cs b/System/Dogz/SelectCell.cs
index 097e58e..ce8bdbf 100644
--- a/System/Dogz/SelectCell.cs
+++ b/System/Dogz/SelectCell.cs
@@ -22,11 +22,11 @@
nameTex.text = model.config.ItemName;
nameTex.color = UIHelper.GetUIColor(model.config.ItemColor,true);
itemBaisc.Init(model);
- itemBaisc.bindIcon.gameObject.SetActive(false);
+ itemBaisc.auctionIcon.gameObject.SetActive(false);
int strenLv = 0;
- if (model.GetUseDataModel((int)ItemUseDataKey.dogzEquipPlus) != null)
+ if (model.GetUseData((int)ItemUseDataKey.dogzEquipPlus) != null)
{
- strenLv = model.GetUseDataModel((int)ItemUseDataKey.dogzEquipPlus)[0];
+ strenLv = model.GetUseData((int)ItemUseDataKey.dogzEquipPlus)[0];
}
if (strenLv > 0)
{
diff --git a/System/Dungeon/AchieveTargetBehaviour.cs b/System/Dungeon/AchieveTargetBehaviour.cs
index 871d69f..1399b5b 100644
--- a/System/Dungeon/AchieveTargetBehaviour.cs
+++ b/System/Dungeon/AchieveTargetBehaviour.cs
@@ -98,8 +98,8 @@
_achievement.m_ItemCell.gameObject.SetActive(true);
ItemCellModel _itemCellModel = new ItemCellModel(presentAchieve.rewardItem[0].id, false, (ulong)presentAchieve.rewardItem[0].count);
_achievement.m_ItemCell.Init(_itemCellModel);
- _achievement.m_ItemCell.cellBtn.RemoveAllListeners();
- _achievement.m_ItemCell.cellBtn.onClick.AddListener(() =>
+ _achievement.m_ItemCell.button.RemoveAllListeners();
+ _achievement.m_ItemCell.button.onClick.AddListener(() =>
{
if (presentAchieve.rewardItem != null && presentAchieve.rewardItem.Length > 0)
{
@@ -118,7 +118,7 @@
{
_achievement.m_ContainerUnComplete.gameObject.SetActive(false);
_achievement.m_ContainerComplete.gameObject.SetActive(true);
- _achievement.m_ItemCell.cellBtn.RemoveAllListeners();
+ _achievement.m_ItemCell.button.RemoveAllListeners();
}
}
diff --git a/System/Dungeon/AssistPlayerCell.cs b/System/Dungeon/AssistPlayerCell.cs
index fbb744a..b3c9c67 100644
--- a/System/Dungeon/AssistPlayerCell.cs
+++ b/System/Dungeon/AssistPlayerCell.cs
@@ -155,7 +155,7 @@
private void ClickGoldHelp()
{
- ulong haveMoney = UIHelper.GetMoneyCnt(1) + UIHelper.GetMoneyCnt(2);
+ ulong haveMoney = UIHelper.GetMoneyCnt(1);
ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"),Language.Get("DungeonAssist131",assistModel.goldAssistPlayer),
(bool isOk)=>
{
diff --git a/System/Dungeon/DungeonAncientKingWin.cs b/System/Dungeon/DungeonAncientKingWin.cs
index 9c42fd6..61d5458 100644
--- a/System/Dungeon/DungeonAncientKingWin.cs
+++ b/System/Dungeon/DungeonAncientKingWin.cs
@@ -56,14 +56,14 @@
var awards = GeneralDefine.ancientKingAwards;
for (int i = 0; i < m_Items.Length; i++)
{
- m_Items[i].cellBtn.RemoveAllListeners();
+ m_Items[i].button.RemoveAllListeners();
if (i < awards.Count)
{
var award = awards[i];
m_Items[i].gameObject.SetActive(true);
ItemCellModel itemCellModel = new ItemCellModel(award.id, true, (ulong)award.count);
m_Items[i].Init(itemCellModel);
- m_Items[i].cellBtn.AddListener(() =>
+ m_Items[i].button.AddListener(() =>
{
ItemAttrData itemAttrData = new ItemAttrData(award.id, true, (ulong)award.count);
ModelCenter.Instance.GetModel<ItemTipsModel>().SetItemTipsModel(itemAttrData);
diff --git a/System/Dungeon/DungeonAssistPlayerWin.cs b/System/Dungeon/DungeonAssistPlayerWin.cs
index 2a2dbd2..6841175 100644
--- a/System/Dungeon/DungeonAssistPlayerWin.cs
+++ b/System/Dungeon/DungeonAssistPlayerWin.cs
@@ -172,25 +172,10 @@
{
if (remainNum > 0)
{
- ulong haveBindGold = UIHelper.GetMoneyCnt(2);
- if (haveBindGold < (ulong)assistModel.refreshCostMoney)
+ ulong money = UIHelper.GetMoneyCnt(1);
+ if (money < (ulong)assistModel.refreshCostMoney)
{
- ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("DungeonAssist130", assistModel.refreshCostMoney),
- (bool isOk) =>
- {
- if (isOk)
- {
- ulong haveGold = UIHelper.GetMoneyCnt(1);
- if (haveGold >= (ulong)assistModel.refreshCostMoney)
- {
- assistModel.SendAssistRefresh();
- }
- else
- {
- WindowCenter.Instance.Open<RechargeTipWin>();
- }
- }
- });
+ WindowCenter.Instance.Open<RechargeTipWin>();
}
else
{
diff --git a/System/Dungeon/DungeonBuyTimesWin.cs b/System/Dungeon/DungeonBuyTimesWin.cs
index e6cf9bb..4c3d364 100644
--- a/System/Dungeon/DungeonBuyTimesWin.cs
+++ b/System/Dungeon/DungeonBuyTimesWin.cs
@@ -145,24 +145,9 @@
Equation.Instance.AddKeyValue("hasBuyCnt", dungeonRecord.buyTimes);
model.TryGetBuyCountCost(model.currentDungeon.mapId, out costFormula);
int _cost = Equation.Instance.Eval<int>(costFormula);
- if (PlayerDatas.Instance.baseData.bindDiamond + PlayerDatas.Instance.baseData.diamond >= _cost)
+ if (PlayerDatas.Instance.baseData.diamond >= _cost)
{
- if (PlayerDatas.Instance.baseData.bindDiamond < _cost)
- {
- ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("FairyLand_Func13",
- PlayerDatas.Instance.baseData.bindDiamond, _cost, _cost - PlayerDatas.Instance.baseData.bindDiamond), (bool isOk) =>
- {
- if (isOk)
- {
- model.RequestBuyEnterCount(model.currentDungeon.mapId);
- }
- });
- return;
- }
- else
- {
- model.RequestBuyEnterCount(model.currentDungeon.mapId);
- }
+ model.RequestBuyEnterCount(model.currentDungeon.mapId);
}
else
{
@@ -171,9 +156,9 @@
SysNotifyMgr.Instance.ShowTip("GoldErr");
return;
}
+
WindowCenter.Instance.Open<RechargeTipWin>();
}
- //CloseImmediately();
}
private bool CheckSpecialDungeon()
diff --git a/System/Dungeon/DungeonEnterInfo.cs b/System/Dungeon/DungeonEnterInfo.cs
index 0a78482..503d8c1 100644
--- a/System/Dungeon/DungeonEnterInfo.cs
+++ b/System/Dungeon/DungeonEnterInfo.cs
@@ -43,7 +43,7 @@
{
if (isOk)
{
- if (PlayerDatas.Instance.baseData.bindDiamond + PlayerDatas.Instance.baseData.diamond >= dungeonEnter.clearCoolDownCost)
+ if ( PlayerDatas.Instance.baseData.diamond >= dungeonEnter.clearCoolDownCost)
{
model.RequestClearEnterCD(dungeonEnter.mapId);
}
diff --git a/System/Dungeon/DungeonInspireWin.cs b/System/Dungeon/DungeonInspireWin.cs
index 3dd2eb3..6575bd1 100644
--- a/System/Dungeon/DungeonInspireWin.cs
+++ b/System/Dungeon/DungeonInspireWin.cs
@@ -162,13 +162,8 @@
switch (fairyInspireConfig.InspireType)
{
case 1:
- money += PlayerDatas.Instance.baseData.diamond;
- break;
- case 2:
- money += PlayerDatas.Instance.baseData.bindDiamond;
- break;
case 5:
- money = PlayerDatas.Instance.baseData.bindDiamond + PlayerDatas.Instance.baseData.diamond;
+ money += PlayerDatas.Instance.baseData.diamond;
break;
}
var cost = model.GetDungeonInspireCost(fairyInspireConfig);
@@ -181,15 +176,16 @@
var dataMapId = model.GetDataMapIdByMapId(PlayerDatas.Instance.baseData.MapID);
var isDouble = dataMapId == DemonJarModel.DEMONJAR_MAPID && demonJarModel.isDoubleAward;
- bool mix = fairyInspireConfig.InspireType == 5 && PlayerDatas.Instance.baseData.bindDiamond < cost
- && PlayerDatas.Instance.baseData.bindDiamond > 0;
- var fairyCost = fairyInspireConfig.InspireType == 5 ? cost - PlayerDatas.Instance.baseData.bindDiamond : cost;
+ bool mix = fairyInspireConfig.InspireType == 5 && PlayerDatas.Instance.baseData.diamond < cost
+ && PlayerDatas.Instance.baseData.diamond > 0;
+
+ var fairyCost = fairyInspireConfig.InspireType == 5 ? cost - PlayerDatas.Instance.baseData.diamond : cost;
fairyCost *= isDouble ? 2 : 1;
if (fairyCost > 0 && (!model.inspireRemindEffective || !model.inspireNoRemind))
{
ConfirmCancel.ToggleConfirmCancel(Language.Get("Mail101"),
- mix ? Language.Get("InspireRemind1", fairyCost, PlayerDatas.Instance.baseData.bindDiamond)
+ mix ? Language.Get("InspireRemind1", fairyCost, PlayerDatas.Instance.baseData.diamond)
: Language.Get("InspireRemind2", fairyCost),
Language.Get("InspireNoMention"), (bool isOk, bool toggle) =>
{
diff --git a/System/Dungeon/DungeonRewardItem.cs b/System/Dungeon/DungeonRewardItem.cs
index 713c452..f35d0bd 100644
--- a/System/Dungeon/DungeonRewardItem.cs
+++ b/System/Dungeon/DungeonRewardItem.cs
@@ -19,13 +19,13 @@
private void OnEnable()
{
- cellBtn.AddListener(ShowItemTip);
+ button.AddListener(ShowItemTip);
RequestSfx();
}
private void OnDisable()
{
- cellBtn.RemoveAllListeners();
+ button.RemoveAllListeners();
RecycleSfx();
}
diff --git a/System/Dungeon/DungeonSuppliesLackWin.cs b/System/Dungeon/DungeonSuppliesLackWin.cs
index fd57b47..6db39cb 100644
--- a/System/Dungeon/DungeonSuppliesLackWin.cs
+++ b/System/Dungeon/DungeonSuppliesLackWin.cs
@@ -88,7 +88,7 @@
if (own < lackItem.count)
{
var moneyNeed = GetUnitPrice(lackType) * (lackItem.count - own);
- var moneyOwn = PlayerDatas.Instance.baseData.diamond + PlayerDatas.Instance.baseData.bindDiamond;
+ var moneyOwn = PlayerDatas.Instance.baseData.diamond;
if (moneyOwn < moneyNeed)
{
if (VersionConfig.Get().isBanShu)
@@ -96,28 +96,12 @@
SysNotifyMgr.Instance.ShowTip("GoldErr");
return;
}
+
WindowCenter.Instance.Open<RechargeTipWin>();
}
else
{
- if (PlayerDatas.Instance.baseData.bindDiamond < moneyNeed)
- {
- ConfirmCancel.ShowPopConfirm(
- Language.Get("Mail101"),
- GetBindJadeLackTip(lackType, moneyNeed, (int)PlayerDatas.Instance.baseData.bindDiamond),
- (bool _ok) =>
- {
- if (_ok)
- {
- ConfirmTodo(lackType);
- }
- }
- );
- }
- else
- {
- ConfirmTodo(lackType);
- }
+ ConfirmTodo(lackType);
}
}
else
diff --git a/System/Dungeon/DungeonSweepResultWin.cs b/System/Dungeon/DungeonSweepResultWin.cs
index 2fc1625..74bf061 100644
--- a/System/Dungeon/DungeonSweepResultWin.cs
+++ b/System/Dungeon/DungeonSweepResultWin.cs
@@ -201,7 +201,7 @@
{
if (_ok)
{
- var moneyOwn = PlayerDatas.Instance.baseData.diamond + PlayerDatas.Instance.baseData.bindDiamond;
+ var moneyOwn = PlayerDatas.Instance.baseData.diamond ;
if (moneyNeed > moneyOwn)
{
WindowCenter.Instance.Open<RechargeTipWin>();
diff --git a/System/Dungeon/DungeonSweepWin.cs b/System/Dungeon/DungeonSweepWin.cs
index c632f75..8ee68e5 100644
--- a/System/Dungeon/DungeonSweepWin.cs
+++ b/System/Dungeon/DungeonSweepWin.cs
@@ -105,7 +105,7 @@
{
if (_ok)
{
- var moneyOwn = PlayerDatas.Instance.baseData.diamond + PlayerDatas.Instance.baseData.bindDiamond;
+ var moneyOwn = PlayerDatas.Instance.baseData.diamond ;
if (moneyNeed > moneyOwn)
{
WindowCenter.Instance.Open<RechargeTipWin>();
diff --git a/System/Dungeon/DungeonUseLiquidWin.cs b/System/Dungeon/DungeonUseLiquidWin.cs
index 02184df..1653f6f 100644
--- a/System/Dungeon/DungeonUseLiquidWin.cs
+++ b/System/Dungeon/DungeonUseLiquidWin.cs
@@ -142,13 +142,7 @@
{
foreach (var _key in _dict.Keys)
{
- if (_key == 2
- && PlayerDatas.Instance.baseData.bindDiamond >= _dict[_key].MoneyNumber)
- {
- model.liquidStoreConfigs.Add(_dict[_key]);
- break;
- }
- else if (_key == 1)
+ if (_key == 1)
{
model.liquidStoreConfigs.Add(_dict[_key]);
break;
diff --git a/System/Dungeon/IceCrystalVeinWin.cs b/System/Dungeon/IceCrystalVeinWin.cs
index 5e4388b..910f701 100644
--- a/System/Dungeon/IceCrystalVeinWin.cs
+++ b/System/Dungeon/IceCrystalVeinWin.cs
@@ -160,7 +160,7 @@
{
if (isOk)
{
- int Money = (int)UIHelper.GetMoneyCnt(1) + (int)UIHelper.GetMoneyCnt(2);
+ int Money = (int)UIHelper.GetMoneyCnt(1) ;
if (Money >= iceCrystalVeinModel.SweepingNeedMoney)
{
model.RequestSweep(model.selectedKylinDungeon);
@@ -192,8 +192,8 @@
{
if (isOk)
{
- int GoldPaper = (int)UIHelper.GetMoneyCnt(2)+ (int)UIHelper.GetMoneyCnt(1);
- if (GoldPaper >= iceCrystalVeinModel.Cost)
+ int diamond = (int)UIHelper.GetMoneyCnt(1);
+ if (diamond >= iceCrystalVeinModel.Cost)
{
EnterTheCopy();
}
@@ -268,7 +268,7 @@
ItemCell _ItemCell = ObjChild.GetComponent<ItemCell>();
ItemCellModel cellModel = new ItemCellModel(key, true, (ulong)IceCrystalVeinMiddleDic[key]);
_ItemCell.Init(cellModel);
- _ItemCell.cellBtn.SetListener(() =>
+ _ItemCell.button.SetListener(() =>
{
ItemAttrData attrData = new ItemAttrData(key, false, (ulong)IceCrystalVeinMiddleDic[key]);
itemTipsModel.SetItemTipsModel(attrData);
@@ -314,7 +314,7 @@
ItemCellModel cellModel = new ItemCellModel(IceLode.ItemID, true, (ulong)IceLode.ItemCount);
_ItemCell.Init(cellModel);
int type = i;
- _ItemCell.cellBtn.SetListener(() =>
+ _ItemCell.button.SetListener(() =>
{
if (StarAll >= IceLode.Star && !_bool)
{
diff --git a/System/Dungeon/TrialExchangeBehaviour.cs b/System/Dungeon/TrialExchangeBehaviour.cs
index c3ad3de..4128154 100644
--- a/System/Dungeon/TrialExchangeBehaviour.cs
+++ b/System/Dungeon/TrialExchangeBehaviour.cs
@@ -93,11 +93,11 @@
trialExchangeId = 0;
return;
}
- m_Item.cellBtn.RemoveAllListeners();
+ m_Item.button.RemoveAllListeners();
m_Item.gameObject.SetActive(true);
ItemCellModel cellModel = new ItemCellModel(model.GetExchangeItemByJob(config), true, (ulong)config.exchangeItemCount);
m_Item.Init(cellModel);
- m_Item.cellBtn.AddListener(() =>
+ m_Item.button.AddListener(() =>
{
ItemAttrData itemAttrData = new ItemAttrData(model.GetExchangeItemByJob(config), true, (ulong)config.exchangeItemCount, -1, true);
ModelCenter.Instance.GetModel<ItemTipsModel>().SetItemTipsModel(itemAttrData);
diff --git a/System/Dungeon/TrialSweepResultWin.cs b/System/Dungeon/TrialSweepResultWin.cs
index 533d58c..4d79220 100644
--- a/System/Dungeon/TrialSweepResultWin.cs
+++ b/System/Dungeon/TrialSweepResultWin.cs
@@ -211,7 +211,7 @@
{
if (_ok)
{
- var moneyOwn = PlayerDatas.Instance.baseData.diamond + PlayerDatas.Instance.baseData.bindDiamond;
+ var moneyOwn = PlayerDatas.Instance.baseData.diamond;
if (moneyNeed > moneyOwn)
{
WindowCenter.Instance.Open<RechargeTipWin>();
diff --git a/System/Equip/EquipModel.cs b/System/Equip/EquipModel.cs
index c9a3952..0ea4355 100644
--- a/System/Equip/EquipModel.cs
+++ b/System/Equip/EquipModel.cs
@@ -115,7 +115,7 @@
{
foreach (var item in items)
{
- if (item.isBind == 0)
+ if (!item.isAuction)
{
candidateEquips.Add(new CandidateEquip(item.guid));
}
diff --git a/System/FairyAu/FairyAuTaskWin.cs b/System/FairyAu/FairyAuTaskWin.cs
index 26d6893..ce999a7 100644
--- a/System/FairyAu/FairyAuTaskWin.cs
+++ b/System/FairyAu/FairyAuTaskWin.cs
@@ -187,7 +187,7 @@
private void AccomplishTask()
{
- if ((int)UIHelper.GetMoneyCnt(1) >= _requireNumber || (int)UIHelper.GetMoneyCnt(2) >= _requireNumber)
+ if ((int)UIHelper.GetMoneyCnt(1) >= _requireNumber )
{
taskmodel.CompletionOfTask(TaskID);
taskmodel.FairyAuBool = true;
@@ -379,9 +379,9 @@
Button _button = go.transform.GetComponent<Button>();
ItemCellModel cellModel = new ItemCellModel(rewardList[i].itemCfg.ID, true, (ulong)rewardList[i].num);
itemcell.Init(cellModel);
- itemcell.cellBtn.RemoveAllListeners();
+ itemcell.button.RemoveAllListeners();
int tab = i;
- itemcell.cellBtn.AddListener(() =>
+ itemcell.button.AddListener(() =>
{
ItemAttrData attrData = new ItemAttrData(rewardList[tab].itemCfg.ID, false, (ulong)rewardList[tab].num);
itemTipsModel.SetItemTipsModel(attrData);
@@ -422,7 +422,7 @@
ItemCellModel cellModel = new ItemCellModel(AwardItemList[i].id, true, Number);
itemCell.Init(cellModel);
int tab = i;
- itemCell.cellBtn.SetListener(()=>
+ itemCell.button.SetListener(()=>
{
ItemAttrData attrData = new ItemAttrData(AwardItemList[tab].id, false, Number);
itemTipsModel.SetItemTipsModel(attrData);
diff --git a/System/FairyAu/FairyBoss.cs b/System/FairyAu/FairyBoss.cs
index 8be6537..7eaa627 100644
--- a/System/FairyAu/FairyBoss.cs
+++ b/System/FairyAu/FairyBoss.cs
@@ -293,7 +293,7 @@
beginBtn.onClick.AddListener(OnBeginBtn);
m_GetWayBtn.onClick.AddListener(OnFoodGetWay);
m_HandIn.onClick.AddListener(HandIn);
- m_FairyFood.cellBtn.AddListener(OnFoodGetWay);
+ m_FairyFood.button.AddListener(OnFoodGetWay);
}
protected override void OnPreOpen()
diff --git a/System/FairyAu/FairyChangeTipWin.cs b/System/FairyAu/FairyChangeTipWin.cs
index 72d18dd..d36ff25 100644
--- a/System/FairyAu/FairyChangeTipWin.cs
+++ b/System/FairyAu/FairyChangeTipWin.cs
@@ -34,8 +34,7 @@
int freeCnt = Mathf.Max(0, model.freeNotifyCount - (int)PlayerDatas.Instance.fairyData.fairy.Extra3);
if (freeCnt < 1)
{
- if (PlayerDatas.Instance.baseData.diamond < model.changeNotifyCost
- && PlayerDatas.Instance.baseData.bindDiamond < model.changeNotifyCost)
+ if (PlayerDatas.Instance.baseData.diamond < model.changeNotifyCost)
{
if (VersionConfig.Get().isBanShu)
{
diff --git a/System/FairyAu/FairyCreateWin.cs b/System/FairyAu/FairyCreateWin.cs
index 2d1007e..a189e0c 100644
--- a/System/FairyAu/FairyCreateWin.cs
+++ b/System/FairyAu/FairyCreateWin.cs
@@ -22,10 +22,8 @@
[SerializeField] Button creationConfirm;
private FairyModel m_Model;
- private FairyModel model
- {
- get
- {
+ private FairyModel model {
+ get {
return m_Model ?? (m_Model = ModelCenter.Instance.GetModel<FairyModel>());
}
}
@@ -70,41 +68,26 @@
ServerTipDetails.DisplayNormalTip(Language.Get("L1005"));
return;
}
+
if (string.IsNullOrEmpty(creationInput.text))
{
ServerTipDetails.DisplayNormalTip(Language.Get("L1015"));
return;
}
+
if (DirtyWordConfig.IsDirtWord(creationInput.text) || UIHelper.HasSpecialCharac(creationInput.text)
|| DirtyNameConfig.IsDirtName(creationInput.text))
{
SysNotifyMgr.Instance.ShowTip("FamilyNameChangeUnlegal");
return;
}
- if (PlayerDatas.Instance.baseData.bindDiamond + PlayerDatas.Instance.baseData.diamond >= model.createFairyCost)
+
+ if (PlayerDatas.Instance.baseData.diamond >= model.createFairyCost)
{
- if (PlayerDatas.Instance.baseData.bindDiamond < model.createFairyCost)
- {
- ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("FairyLand_Func36",
- PlayerDatas.Instance.baseData.bindDiamond, model.createFairyCost, model.createFairyCost - PlayerDatas.Instance.baseData.bindDiamond), (bool isOk) =>
- {
- if (isOk)
- {
- CA404_tagCGPyCreatFamily creatPack = new CA404_tagCGPyCreatFamily();
- creatPack.Name = creationInput.text;
- creatPack.FakeID = 0;
- GameNetSystem.Instance.SendInfo(creatPack);
- }
- });
- return;
- }
- else
- {
- CA404_tagCGPyCreatFamily creatPack = new CA404_tagCGPyCreatFamily();
- creatPack.Name = creationInput.text;
- creatPack.FakeID = 0;
- GameNetSystem.Instance.SendInfo(creatPack);
- }
+ CA404_tagCGPyCreatFamily creatPack = new CA404_tagCGPyCreatFamily();
+ creatPack.Name = creationInput.text;
+ creatPack.FakeID = 0;
+ GameNetSystem.Instance.SendInfo(creatPack);
}
else
{
diff --git a/System/FairyAu/FairyGrabBossWin.cs b/System/FairyAu/FairyGrabBossWin.cs
index 4ede3a4..a7b9261 100644
--- a/System/FairyAu/FairyGrabBossWin.cs
+++ b/System/FairyAu/FairyGrabBossWin.cs
@@ -135,14 +135,14 @@
model.TryGetDropItems(model.selectBoss, out dropItems);
for (int i = 0; i < m_DropItems.Length; i++)
{
- m_DropItems[i].cellBtn.RemoveAllListeners();
+ m_DropItems[i].button.RemoveAllListeners();
if (dropItems != null && i < dropItems.Count)
{
m_DropItems[i].gameObject.SetActive(true);
var item = dropItems[i];
ItemCellModel itemCellModel = new ItemCellModel(item.id, true, (ulong)item.count);
m_DropItems[i].Init(itemCellModel);
- m_DropItems[i].cellBtn.AddListener(() =>
+ m_DropItems[i].button.AddListener(() =>
{
ItemAttrData itemAttrData = new ItemAttrData(item.id, true, (ulong)item.count);
ModelCenter.Instance.GetModel<ItemTipsModel>().SetItemTipsModel(itemAttrData);
diff --git a/System/FairyAu/KingFairyCtnRewardCell.cs b/System/FairyAu/KingFairyCtnRewardCell.cs
index ff498b8..c849faf 100644
--- a/System/FairyAu/KingFairyCtnRewardCell.cs
+++ b/System/FairyAu/KingFairyCtnRewardCell.cs
@@ -33,8 +33,8 @@
itemList[i].gameObject.SetActive(true);
ItemCellModel cellModel = new ItemCellModel(_itemArray[0], false, (ulong)_itemArray[1]);
itemList[i].Init(cellModel);
- itemList[i].cellBtn.onClick.RemoveAllListeners();
- itemList[i].cellBtn.onClick.AddListener(() =>
+ itemList[i].button.onClick.RemoveAllListeners();
+ itemList[i].button.onClick.AddListener(() =>
{
model.ViewKingFairyChest(_itemArray[0], _itemArray[1], _itemArray[2]);
//ItemAttrData itemAttrData = new ItemAttrData(_itemArray[0], false, (ulong)_itemArray[1], -1, _itemArray[2]);
diff --git a/System/FairyAu/KingTempleWin.cs b/System/FairyAu/KingTempleWin.cs
index 8c86a44..b3ac0e5 100644
--- a/System/FairyAu/KingTempleWin.cs
+++ b/System/FairyAu/KingTempleWin.cs
@@ -57,11 +57,11 @@
m_FinalityBtn.onClick.AddListener(OnFinalityBtn);
m_GuideBtn.onClick.AddListener(OnGuideBtn);
m_SalaryBtn.onClick.AddListener(OnSalaryBtn);
- m_PrivilegeItem.cellBtn.onClick.AddListener(OnPrivilegeItem);
+ m_PrivilegeItem.button.onClick.AddListener(OnPrivilegeItem);
for (int i = 0; i < m_SalaryItemList.Count; i++)
{
var _index = i;
- m_SalaryItemList[i].cellBtn.onClick.AddListener(()=>
+ m_SalaryItemList[i].button.onClick.AddListener(()=>
{
OnSalaryItem(_index);
});
diff --git a/System/FairylandCeremony/CeremonyFirepartyWin.cs b/System/FairylandCeremony/CeremonyFirepartyWin.cs
index cb2f2c4..d9a6896 100644
--- a/System/FairylandCeremony/CeremonyFirepartyWin.cs
+++ b/System/FairylandCeremony/CeremonyFirepartyWin.cs
@@ -60,7 +60,7 @@
buyPriceText.text = storeConfig.MoneyNumber.ToString();
ItemCellModel fireModel = new ItemCellModel(storeConfig.ItemID,true,(ulong)storeConfig.ItemCnt);
fireItem.Init(fireModel);
- fireItem.cellBtn.AddListener(() =>
+ fireItem.button.AddListener(() =>
{
ItemAttrData attrData = new ItemAttrData(storeConfig.ItemID,true, (ulong)storeConfig.ItemCnt);
tipsModel.SetItemTipsModel(attrData);
@@ -76,8 +76,8 @@
FairylandCeremonyModel.AwardItem itemData = itemlist[i];
ItemCellModel cellModel = new ItemCellModel(itemData.itemId, true,(ulong)itemData.itemCount);
itemBaiscs[i].Init(cellModel);
- itemBaiscs[i].cellBtn.RemoveAllListeners();
- itemBaiscs[i].cellBtn.AddListener(() =>
+ itemBaiscs[i].button.RemoveAllListeners();
+ itemBaiscs[i].button.AddListener(() =>
{
ItemAttrData attrData = new ItemAttrData(itemData.itemId, true, (ulong)itemData.itemCount);
tipsModel.SetItemTipsModel(attrData);
diff --git a/System/FairylandCeremony/CeremonyOutOfPrintWin.cs b/System/FairylandCeremony/CeremonyOutOfPrintWin.cs
index 180065e3..713779b 100644
--- a/System/FairylandCeremony/CeremonyOutOfPrintWin.cs
+++ b/System/FairylandCeremony/CeremonyOutOfPrintWin.cs
@@ -147,8 +147,8 @@
FairylandCeremonyModel.AwardItem itemData = list[i];
ItemCellModel cellModel = new ItemCellModel(itemData.itemId, true,(ulong)itemData.itemCount);
baiscs[i].Init(cellModel);
- baiscs[i].cellBtn.RemoveAllListeners();
- baiscs[i].cellBtn.AddListener(() =>
+ baiscs[i].button.RemoveAllListeners();
+ baiscs[i].button.AddListener(() =>
{
switch(itemData.itemId)
{
diff --git a/System/FairylandCeremony/CeremonyRechargeGiftWin.cs b/System/FairylandCeremony/CeremonyRechargeGiftWin.cs
index e9e46df..126e57c 100644
--- a/System/FairylandCeremony/CeremonyRechargeGiftWin.cs
+++ b/System/FairylandCeremony/CeremonyRechargeGiftWin.cs
@@ -67,8 +67,8 @@
FairylandCeremonyModel.AwardItem itemData = itemlist[i];
ItemCellModel cellModel = new ItemCellModel(itemData.itemId,true, (ulong)itemData.itemCount);
itemBaiscs[i].Init(cellModel);
- itemBaiscs[i].cellBtn.RemoveAllListeners();
- itemBaiscs[i].cellBtn.AddListener(()=>
+ itemBaiscs[i].button.RemoveAllListeners();
+ itemBaiscs[i].button.AddListener(()=>
{
ItemAttrData attrData = new ItemAttrData(itemData.itemId, true, (ulong)itemData.itemCount);
tipsModel.SetItemTipsModel(attrData);
diff --git a/System/FairylandCeremony/ToHiAwardCell.cs b/System/FairylandCeremony/ToHiAwardCell.cs
index 7b3497c..fca99ca 100644
--- a/System/FairylandCeremony/ToHiAwardCell.cs
+++ b/System/FairylandCeremony/ToHiAwardCell.cs
@@ -44,8 +44,8 @@
FairylandCeremonyModel.AwardItem itemData = itemlist[i];
ItemCellModel cellModel = new ItemCellModel(itemData.itemId, true,(ulong)itemData.itemCount);
itemBaiscs[i].Init(cellModel);
- itemBaiscs[i].cellBtn.RemoveAllListeners();
- itemBaiscs[i].cellBtn.AddListener(() =>
+ itemBaiscs[i].button.RemoveAllListeners();
+ itemBaiscs[i].button.AddListener(() =>
{
ItemAttrData attrData = new ItemAttrData(itemData.itemId, true, (ulong)itemData.itemCount);
tipsModel.SetItemTipsModel(attrData);
diff --git a/System/FashionDress/FashionAttrBeh.cs b/System/FashionDress/FashionAttrBeh.cs
index 87b2e08..5436d2d 100644
--- a/System/FashionDress/FashionAttrBeh.cs
+++ b/System/FashionDress/FashionAttrBeh.cs
@@ -65,11 +65,11 @@
string attrSB = string.Empty;
if (attrConfig.Name.Contains("%s"))
{
- attrSB = attrConfig.Name.Replace("%s", tipsModel.GetProValueTypeStr(attrConfig, attrValue));
+ attrSB = attrConfig.Name.Replace("%s", PlayerPropertyConfig.GetPropertyDescription(attrId, attrValue));
}
else
{
- attrSB = StringUtility.Contact(attrConfig.Name, "+", tipsModel.GetProValueTypeStr(attrConfig, attrValue));
+ attrSB = StringUtility.Contact(attrConfig.Name, "+", PlayerPropertyConfig.GetPropertyDescription(attrId, attrValue));
}
attrText.text = attrSB;
}
diff --git a/System/FashionDress/FashionDecomposeLineBeh.cs b/System/FashionDress/FashionDecomposeLineBeh.cs
index d0059c2..a299a03 100644
--- a/System/FashionDress/FashionDecomposeLineBeh.cs
+++ b/System/FashionDress/FashionDecomposeLineBeh.cs
@@ -55,8 +55,8 @@
selectObj.SetActive(_isSelect);
var decomposeModel = FashionDecomposeModel.Instance;
itemBaisc.Init(itemModel);
- itemBaisc.cellBtn.RemoveAllListeners();
- itemBaisc.cellBtn.AddListener(()=>
+ itemBaisc.button.RemoveAllListeners();
+ itemBaisc.button.AddListener(()=>
{
decomposeModel.UpdateDecomposeItem(itemModel.guid, !selectObj.activeInHierarchy);
selectObj.SetActive(!selectObj.activeInHierarchy);
diff --git a/System/FashionDress/FashionSumAttrWin.cs b/System/FashionDress/FashionSumAttrWin.cs
index bef5151..79c8cfd 100644
--- a/System/FashionDress/FashionSumAttrWin.cs
+++ b/System/FashionDress/FashionSumAttrWin.cs
@@ -32,7 +32,7 @@
}
protected override void AddListeners()
{
-
+
}
protected override void OnPreOpen()
{
@@ -45,12 +45,12 @@
}
protected override void OnAfterOpen()
{
-
+
}
protected override void OnPreClose()
{
-
+
}
protected override void OnAfterClose()
{
@@ -73,39 +73,39 @@
int sumNum = fashionModel.fashoinDressCount;
int activateNum = activateIds.Count;
string actvivateNumSB = string.Empty;
- if(activateNum > 0)
+ if (activateNum > 0)
{
- actvivateNumSB = UIHelper.AppendColor(TextColType.Green,activateNum.ToString());
+ actvivateNumSB = UIHelper.AppendColor(TextColType.Green, activateNum.ToString());
}
else
{
actvivateNumSB = UIHelper.AppendColor(TextColType.Red, activateNum.ToString());
}
- activateNumText.text = StringUtility.Contact(actvivateNumSB, "/",sumNum);
+ activateNumText.text = StringUtility.Contact(actvivateNumSB, "/", sumNum);
Dictionary<int, int> attrDict = GetActivateAttr();
- if(attrDict != null && attrDict.Count > 0)
+ if (attrDict != null && attrDict.Count > 0)
{
noneActivate.SetActive(false);
List<int> attrIds = attrDict.Keys.ToList();
- for(int i = 0; i < activateAttrObjs.Count; i++)
+ for (int i = 0; i < activateAttrObjs.Count; i++)
{
var attrObj = activateAttrObjs[i];
attrObj.SetActive(i < attrIds.Count);
- if(i < attrIds.Count)
+ if (i < attrIds.Count)
{
var attrText = activateAttrs[i];
int attrId = attrIds[i];
int attrValue = attrDict[attrId];
var attrConfig = PlayerPropertyConfig.Get(attrId);
string attrSB = string.Empty;
- string attrValueSB = UIHelper.AppendColor(TextColType.Green, tipsModel.GetProValueTypeStr(attrConfig, attrValue));
+ string attrValueSB = UIHelper.AppendColor(TextColType.Green, PlayerPropertyConfig.GetPropertyDescription(attrId, attrValue));
if (attrConfig.Name.Contains("%s"))
{
- attrSB = attrConfig.Name.Replace("%s",attrValueSB);
+ attrSB = attrConfig.Name.Replace("%s", attrValueSB);
}
else
{
- attrSB = StringUtility.Contact(attrConfig.Name, "+",attrValueSB);
+ attrSB = StringUtility.Contact(attrConfig.Name, "+", attrValueSB);
}
attrText.text = attrSB;
}
@@ -122,26 +122,26 @@
}
}
- private Dictionary<int,int> GetActivateAttr()
+ private Dictionary<int, int> GetActivateAttr()
{
var sumAttrDict = new Dictionary<int, int>();
List<int> fashionIds = null;
bool isActivate = fashionModel.TryGetActiveFashionDress(out fashionIds);
- if(isActivate)
+ if (isActivate)
{
- foreach(var id in fashionIds)
+ foreach (var id in fashionIds)
{
int fashionLevel = fashionModel.GetFashionDressLevel(id);
Dictionary<int, int> attrDict = null;
- bool isAttr = fashionModel.TryGetFashionDressProperty(id,fashionLevel,out attrDict);
- if(isAttr)
+ bool isAttr = fashionModel.TryGetFashionDressProperty(id, fashionLevel, out attrDict);
+ if (isAttr)
{
- foreach(var attrId in attrDict.Keys)
+ foreach (var attrId in attrDict.Keys)
{
var attrValue = attrDict[attrId];
- if(!sumAttrDict.ContainsKey(attrId))
+ if (!sumAttrDict.ContainsKey(attrId))
{
- sumAttrDict.Add(attrId,attrValue);
+ sumAttrDict.Add(attrId, attrValue);
}
else
{
@@ -166,7 +166,7 @@
{
wardrobeLevelSB = UIHelper.AppendColor(TextColType.Red, wardrobeLevel.ToString());
}
- wardrobeLvText.text = Language.Get("FashionDress106",wardrobeLevelSB);
+ wardrobeLvText.text = Language.Get("FashionDress106", wardrobeLevelSB);
Dictionary<int, int> attrDict = null;
fashionModel.TryGetCabinetProperty(fashionModel.cabinetLevel, out attrDict);
if (attrDict != null && attrDict.Count > 0)
@@ -184,7 +184,7 @@
int attrValue = attrDict[attrId];
var attrConfig = PlayerPropertyConfig.Get(attrId);
string attrSB = string.Empty;
- string attrValueSB = UIHelper.AppendColor(TextColType.Green, tipsModel.GetProValueTypeStr(attrConfig, attrValue));
+ string attrValueSB = UIHelper.AppendColor(TextColType.Green, PlayerPropertyConfig.GetPropertyDescription(attrId, attrValue));
if (attrConfig.Name.Contains("%s"))
{
attrSB = attrConfig.Name.Replace("%s", attrValueSB);
diff --git a/System/FindPrecious/BossHomeWin.cs b/System/FindPrecious/BossHomeWin.cs
index a782f82..4562285 100644
--- a/System/FindPrecious/BossHomeWin.cs
+++ b/System/FindPrecious/BossHomeWin.cs
@@ -321,7 +321,7 @@
{
if (_ok)
{
- var moneyOwn = PlayerDatas.Instance.baseData.diamond + PlayerDatas.Instance.baseData.bindDiamond;
+ var moneyOwn = PlayerDatas.Instance.baseData.diamond;
if (moneyOwn < moneyNeed)
{
if (VersionConfig.Get().isBanShu)
diff --git a/System/FindPrecious/FindPreciousBossRebornBehaviour.cs b/System/FindPrecious/FindPreciousBossRebornBehaviour.cs
index 10e00ff..911d58a 100644
--- a/System/FindPrecious/FindPreciousBossRebornBehaviour.cs
+++ b/System/FindPrecious/FindPreciousBossRebornBehaviour.cs
@@ -410,7 +410,7 @@
{
if (_ok)
{
- var moneyOwn = PlayerDatas.Instance.baseData.diamond + PlayerDatas.Instance.baseData.bindDiamond;
+ var moneyOwn = PlayerDatas.Instance.baseData.diamond ;
if (moneyOwn < moneyNeed)
{
if (VersionConfig.Get().isBanShu)
diff --git a/System/FriendSystem/MailPanel.cs b/System/FriendSystem/MailPanel.cs
index 55c700b..7ad4c3d 100644
--- a/System/FriendSystem/MailPanel.cs
+++ b/System/FriendSystem/MailPanel.cs
@@ -336,8 +336,8 @@
ItemCellModel cellModel = new ItemCellModel((int)itemModel.ItemID, false, (ulong)itemModel.Count,
"", PackType.Deleted, false, ConfigParse.Analysis(itemModel.UserData));
itemCell.Init(cellModel);
- itemCell.cellBtn.onClick.RemoveAllListeners();
- itemCell.cellBtn.onClick.AddListener(() =>
+ itemCell.button.onClick.RemoveAllListeners();
+ itemCell.button.onClick.AddListener(() =>
{
ItemAttrData attrData = new ItemAttrData((int)itemModel.ItemID, false, (ulong)itemModel.Count, -1, true, PackType.Deleted, "", ConfigParse.Analysis(itemModel.UserData));
itemTipsModel.SetItemTipsModel(attrData);
diff --git a/System/GatheringSoul/GatherSoulGenerateBossWin.cs b/System/GatheringSoul/GatherSoulGenerateBossWin.cs
index 3fedc56..1d6198e 100644
--- a/System/GatheringSoul/GatherSoulGenerateBossWin.cs
+++ b/System/GatheringSoul/GatherSoulGenerateBossWin.cs
@@ -20,8 +20,7 @@
[SerializeField] Button m_Cancel;
[SerializeField] Button m_Close;
- GatherSoulDungeonModel model
- {
+ GatherSoulDungeonModel model {
get { return ModelCenter.Instance.GetModel<GatherSoulDungeonModel>(); }
}
@@ -80,7 +79,7 @@
private void Confirm()
{
- var mission=model.mission;
+ var mission = model.mission;
if (mission.hasRefreshBoss == 1)
{
if (m_AutoGenerate.isOn == (mission.isAuto == 1))
@@ -121,11 +120,10 @@
}
if (m_AutoGenerate.isOn)
{
- if (UIHelper.GetMoneyCnt(1) + UIHelper.GetMoneyCnt(2) >= (ulong)model.generateBossCost)
+ if (UIHelper.GetMoneyCnt(1) >= (ulong)model.generateBossCost)
{
ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"),
- Language.Get("GathetSoulAotuRemind",
- UIHelper.GetMoneyCnt(2), UIHelper.GetMoneyCnt(1), model.generateBossCost),
+ Language.Get("GathetSoulAotuRemind", UIHelper.GetMoneyCnt(1), model.generateBossCost),
(bool isOk) =>
{
if (isOk)
@@ -146,19 +144,10 @@
}
else
{
- if (UIHelper.GetMoneyCnt(2) >= (ulong)cost)
- {
- CA508_tagCMDoFBAction pak = new CA508_tagCMDoFBAction();
- pak.ActionType = 2;
- pak.ActionInfo = m_AutoGenerate.isOn ? (uint)1 : 0;
- GameNetSystem.Instance.SendInfo(pak);
- CloseClick();
- }
- else if (UIHelper.GetMoneyCnt(1) + UIHelper.GetMoneyCnt(2) >= (ulong)cost)
+ if (UIHelper.GetMoneyCnt(1) >= (ulong)cost)
{
ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"),
- Language.Get("GenerateBossCostConfirm",
- cost, UIHelper.GetMoneyCnt(2), (ulong)cost - UIHelper.GetMoneyCnt(2)),
+ Language.Get("GenerateBossCostConfirm", cost, (ulong)cost),
(bool isOk) =>
{
if (isOk)
diff --git a/System/HappyXB/HappyXBGetItemWin.cs b/System/HappyXB/HappyXBGetItemWin.cs
index 9145309..07a4d59 100644
--- a/System/HappyXB/HappyXBGetItemWin.cs
+++ b/System/HappyXB/HappyXBGetItemWin.cs
@@ -243,8 +243,8 @@
XBGetItemCell itemBasic = item.transform.Find("CommonItemCell").GetComponent<XBGetItemCell>();
ItemCellModel cellModel = new ItemCellModel(xbItem.itemId, false, (ulong)xbItem.count);
itemBasic.Init(cellModel);
- itemBasic.cellBtn.RemoveAllListeners();
- itemBasic.cellBtn.AddListener(() =>
+ itemBasic.button.RemoveAllListeners();
+ itemBasic.button.AddListener(() =>
{
ItemAttrData attrData = new ItemAttrData(xbItem.itemId, false, (ulong)xbItem.count);
itemTipsModel.SetItemTipsModel(attrData);
diff --git a/System/HappyXB/XBGridCell.cs b/System/HappyXB/XBGridCell.cs
index 960ac96..a195e04 100644
--- a/System/HappyXB/XBGridCell.cs
+++ b/System/HappyXB/XBGridCell.cs
@@ -29,8 +29,8 @@
{
itemCell.gameObject.SetActive(true);
itemCell.Init(itemModel);
- itemCell.cellBtn.RemoveAllListeners();
- itemCell.cellBtn.AddListener(() => { ClickItemCell(itemModel); });
+ itemCell.button.RemoveAllListeners();
+ itemCell.button.AddListener(() => { ClickItemCell(itemModel); });
}
else
{
diff --git a/System/HappyXB/XBItemCell.cs b/System/HappyXB/XBItemCell.cs
index 24b0441..0963105 100644
--- a/System/HappyXB/XBItemCell.cs
+++ b/System/HappyXB/XBItemCell.cs
@@ -27,8 +27,8 @@
nameText.text = itemConfig.ItemName;
nameText.color = UIHelper.GetUIColor(itemConfig.ItemColor,false);
}
- itemCell.cellBtn.RemoveAllListeners();
- itemCell.cellBtn.AddListener(()=>
+ itemCell.button.RemoveAllListeners();
+ itemCell.button.AddListener(()=>
{
ItemAttrData attrData = new ItemAttrData(itemId,true,(ulong)count);
itemTips.SetItemTipsModel(attrData);
diff --git a/System/HeavenBattle/XMZZCampVicRewardWin.cs b/System/HeavenBattle/XMZZCampVicRewardWin.cs
index e17e36a..551bfe9 100644
--- a/System/HeavenBattle/XMZZCampVicRewardWin.cs
+++ b/System/HeavenBattle/XMZZCampVicRewardWin.cs
@@ -76,8 +76,8 @@
item.gameObject.SetActive(true);
item.InitModel(heavenModel.campVicRewardDict[id], id);
GetList.Add(item);
- item.cellBtn.RemoveAllListeners();
- item.cellBtn.AddListener(() =>
+ item.button.RemoveAllListeners();
+ item.button.AddListener(() =>
{
ClickRewardCell(itemId);
});
@@ -94,8 +94,8 @@
item.gameObject.SetActive(true);
item.InitModel(heavenModel.campFailRewardDict[id], id);
GetList.Add(item);
- item.cellBtn.RemoveAllListeners();
- item.cellBtn.AddListener(() =>
+ item.button.RemoveAllListeners();
+ item.button.AddListener(() =>
{
ClickRewardCell(itemId);
});
diff --git a/System/ItemTip/EquipTipUtility.cs b/System/ItemTip/EquipTipUtility.cs
index 0a33fee..66cfb66 100644
--- a/System/ItemTip/EquipTipUtility.cs
+++ b/System/ItemTip/EquipTipUtility.cs
@@ -207,7 +207,7 @@
var baseInfo = new BaseInfo()
{
itemId = item.itemId,
- isAuction = item.isBind == 1,
+ isAuction = item.isAuction ,
isEquiped = equipModel.GetEquip(item.config.LV, item.config.EquipPlace) == guid,
score = item.equipScore,
auctionSurplusTime = item.auctionSurplusTime,
@@ -292,8 +292,8 @@
var data = new LegendProperty();
data.isPreview = false;
- var ids = item.GetUseDataModel(17);
- var values = item.GetUseDataModel(19);
+ var ids = item.GetUseData(17);
+ var values = item.GetUseData(19);
if (!ids.IsNullOrEmpty() && values.IsNullOrEmpty())
{
var properties = new List<Int2>();
diff --git a/System/JadeDynastyBoss/JadeDynastyBossWin.cs b/System/JadeDynastyBoss/JadeDynastyBossWin.cs
index a85021e..4be1706 100644
--- a/System/JadeDynastyBoss/JadeDynastyBossWin.cs
+++ b/System/JadeDynastyBoss/JadeDynastyBossWin.cs
@@ -184,14 +184,14 @@
model.TryGetDropItems(model.selectBossId, out dropItems);
for (int i = 0; i < m_Items.Length; i++)
{
- m_Items[i].cellBtn.RemoveAllListeners();
+ m_Items[i].button.RemoveAllListeners();
if (dropItems != null && i < dropItems.Count)
{
m_Items[i].gameObject.SetActive(true);
var item = dropItems[i];
ItemCellModel itemCellModel = new ItemCellModel(item.id, true, (ulong)item.count);
m_Items[i].Init(itemCellModel);
- m_Items[i].cellBtn.AddListener(() =>
+ m_Items[i].button.AddListener(() =>
{
ItemAttrData itemAttrData = new ItemAttrData(item.id, true, (ulong)item.count);
ModelCenter.Instance.GetModel<ItemTipsModel>().SetItemTipsModel(itemAttrData);
diff --git a/System/JadeDynastyKnapSack/JadeDynastyDecomposeGetItemWin.cs b/System/JadeDynastyKnapSack/JadeDynastyDecomposeGetItemWin.cs
index 725abfa..07f9994 100644
--- a/System/JadeDynastyKnapSack/JadeDynastyDecomposeGetItemWin.cs
+++ b/System/JadeDynastyKnapSack/JadeDynastyDecomposeGetItemWin.cs
@@ -61,8 +61,8 @@
CommonItemBaisc itemBasic = item.transform.Find("CommonItemCell").GetComponent<CommonItemBaisc>();
ItemCellModel cellModel = new ItemCellModel(matInfo.itemId, false, (ulong)matInfo.itemCount);
itemBasic.Init(cellModel);
- itemBasic.cellBtn.RemoveAllListeners();
- itemBasic.cellBtn.AddListener(() =>
+ itemBasic.button.RemoveAllListeners();
+ itemBasic.button.AddListener(() =>
{
ItemAttrData attrData = new ItemAttrData(matInfo.itemId, false, (ulong)matInfo.itemCount);
tipsModel.SetItemTipsModel(attrData);
diff --git a/System/JadeDynastyKnapSack/JadeDynastyDecomposeLineBeh.cs b/System/JadeDynastyKnapSack/JadeDynastyDecomposeLineBeh.cs
index 06a8940..0435425 100644
--- a/System/JadeDynastyKnapSack/JadeDynastyDecomposeLineBeh.cs
+++ b/System/JadeDynastyKnapSack/JadeDynastyDecomposeLineBeh.cs
@@ -48,7 +48,7 @@
public void SetDisplay(ItemModel itemModel,List<string> selectGuids)
{
- itemBaisc.cellBtn.RemoveAllListeners();
+ itemBaisc.button.RemoveAllListeners();
equipLvObj.SetActive(false);
if (itemModel == null || selectGuids == null)
{
@@ -66,7 +66,7 @@
string equipLvSB = Language.Get(StringUtility.Contact("Num_CHS_", itemModel.config.LV));
equipLvText.text = Language.Get("L1091", equipLvSB);
}
- itemBaisc.cellBtn.AddListener(()=>
+ itemBaisc.button.AddListener(()=>
{
if (selectObj.activeInHierarchy)
{
diff --git a/System/JadeDynastyKnapSack/JadeDynastyEquipBeh.cs b/System/JadeDynastyKnapSack/JadeDynastyEquipBeh.cs
index b3b14be..97979e6 100644
--- a/System/JadeDynastyKnapSack/JadeDynastyEquipBeh.cs
+++ b/System/JadeDynastyKnapSack/JadeDynastyEquipBeh.cs
@@ -43,7 +43,7 @@
lockText.gameObject.SetActive(false);
lockObj.SetActive(islock);
equipBtn.RemoveAllListeners();
- itemCell.cellBtn.RemoveAllListeners();
+ itemCell.button.RemoveAllListeners();
equipLvObj.SetActive(false);
composeImg.SetActive(false);
if(islock)
@@ -60,7 +60,7 @@
equipLvObj.SetActive(true);
nameText.gameObject.SetActive(false);
itemCell.Init(itemModel);
- itemCell.cellBtn.AddListener(() => { ClickItemCell(itemModel); });
+ itemCell.button.AddListener(() => { ClickItemCell(itemModel); });
string equipLvSB = Language.Get(StringUtility.Contact("Num_CHS_", itemModel.config.LV));
equipLvText.text = Language.Get("L1091",equipLvSB);
}
diff --git a/System/JadeDynastyKnapSack/JadeDynastyItemBeh.cs b/System/JadeDynastyKnapSack/JadeDynastyItemBeh.cs
index 2d219eb..76b07a5 100644
--- a/System/JadeDynastyKnapSack/JadeDynastyItemBeh.cs
+++ b/System/JadeDynastyKnapSack/JadeDynastyItemBeh.cs
@@ -36,8 +36,8 @@
equipLvText.text = Language.Get("L1091", equipLvSB);
}
- itemCell.cellBtn.RemoveAllListeners();
- itemCell.cellBtn.AddListener(()=>
+ itemCell.button.RemoveAllListeners();
+ itemCell.button.AddListener(()=>
{
equipModel.ClearLookItemModel();
tipsModel.SetItemTipsModel(itemModel.packType,itemModel.guid,false,true);
diff --git a/System/JadeDynastyKnapSack/JadeDynastyStoneSuitAttrBeh.cs b/System/JadeDynastyKnapSack/JadeDynastyStoneSuitAttrBeh.cs
index 61f5012..633e19a 100644
--- a/System/JadeDynastyKnapSack/JadeDynastyStoneSuitAttrBeh.cs
+++ b/System/JadeDynastyKnapSack/JadeDynastyStoneSuitAttrBeh.cs
@@ -44,7 +44,7 @@
int suitType = suitTypes[i];
JadeDynastyEquipModel.JadeDynastyStoneSuitAttrData curAttrData = null;
JadeDynastyEquipModel.JadeDynastyStoneSuitAttrData nextAttrData = null;
- equipModel.TryGetStoneSumSuitAttr(suitType,out curAttrData, out nextAttrData);
+ equipModel.TryGetStoneSumSuitAttr(suitType, out curAttrData, out nextAttrData);
if (isNext)
{
if (nextAttrData != null)
@@ -59,7 +59,7 @@
isNoneActive = false;
}
}
- suitAttr.SetDisplay(suitType,isNext);
+ suitAttr.SetDisplay(suitType, isNext);
}
else
{
@@ -97,14 +97,14 @@
ItemTipsModel tipsModel { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } }
JadeDynastyEquipModel equipModel { get { return ModelCenter.Instance.GetModel<JadeDynastyEquipModel>(); } }
- public void SetDisplay(int suitType,bool isNext)
+ public void SetDisplay(int suitType, bool isNext)
{
JadeDynastyEquipModel.JadeDynastyStoneSuitAttrData curAttrData = null;
JadeDynastyEquipModel.JadeDynastyStoneSuitAttrData nextAttrData = null;
JadeDynastyEquipModel.JadeDynastyStoneSuitAttrData suitAttrData = null;
- equipModel.TryGetStoneSumSuitAttr(suitType,out curAttrData,out nextAttrData);
+ equipModel.TryGetStoneSumSuitAttr(suitType, out curAttrData, out nextAttrData);
suitAttrData = isNext ? nextAttrData : curAttrData;
- if(suitAttrData == null)
+ if (suitAttrData == null)
{
attrTypeObj.SetActive(false);
return;
@@ -113,19 +113,19 @@
{
attrTypeObj.SetActive(true);
string suitName = Language.Get(StringUtility.Contact("JadeDynastyEquipStoneSuit_", suitType));
- suitTypeText.text = StringUtility.Contact(suitName,"Lv." + suitAttrData.suitLv);
+ suitTypeText.text = StringUtility.Contact(suitName, "Lv." + suitAttrData.suitLv);
}
int[] ids = suitAttrData.suitAttrConfig.attrIDList;
int[] values = suitAttrData.suitAttrConfig.attrValueList;
var equipPlaces = equipModel.suitTypeDict[suitType];
int activeStoneNum = 0;
- bool isActive = equipModel.TryGetIsActiveStoneSuit(suitType,suitAttrData.suitLv,out activeStoneNum);
+ bool isActive = equipModel.TryGetIsActiveStoneSuit(suitType, suitAttrData.suitLv, out activeStoneNum);
bool isShowActiveObj = !isActive;
activeObj.SetActive(isShowActiveObj);
- if(isShowActiveObj)
+ if (isShowActiveObj)
{
string equipsName = string.Empty;
- for(int i = 0; i < equipPlaces.Count; i++)
+ for (int i = 0; i < equipPlaces.Count; i++)
{
var place = equipPlaces[i];
string equipName = Language.Get(((RoleEquipType)place).ToString());
@@ -139,7 +139,7 @@
}
}
string activeGemNum = string.Empty;
- if(activeStoneNum > 0)
+ if (activeStoneNum > 0)
{
activeGemNum = StringUtility.Contact(UIHelper.AppendColor(TextColType.Green, activeStoneNum.ToString()), "/", equipModel.gemResonanceNum);
}
@@ -147,21 +147,21 @@
{
activeGemNum = StringUtility.Contact(activeStoneNum, "/", equipModel.gemResonanceNum);
}
- string conditionSB = Language.Get("JadeDynastyEquip7", equipsName,equipModel.gemResonanceNum,suitAttrData.suitLv,activeGemNum);
+ string conditionSB = Language.Get("JadeDynastyEquip7", equipsName, equipModel.gemResonanceNum, suitAttrData.suitLv, activeGemNum);
activeText.text = conditionSB;
}
for (int i = 0; i < attrObjlist.Count; i++)
{
var attrObj = attrObjlist[i];
attrObj.SetActive(i < ids.Length);
- if(i < ids.Length)
+ if (i < ids.Length)
{
var attrId = ids[i];
var attrValue = values[i];
var attrText = attrTextlist[i];
var attrConfig = PlayerPropertyConfig.Get(attrId);
string attrSB = string.Empty;
- string attrValueSB = tipsModel.GetProValueTypeStr(attrConfig, attrValue);
+ string attrValueSB = PlayerPropertyConfig.GetPropertyDescription(attrId, attrValue);
if (attrConfig.Name.Contains("%s"))
{
attrSB = attrConfig.Name.Replace("%s", attrValueSB);
diff --git a/System/JadeDynastyKnapSack/JadeDynastySuitAttrBeh.cs b/System/JadeDynastyKnapSack/JadeDynastySuitAttrBeh.cs
index e1b4ea7..f1d4229 100644
--- a/System/JadeDynastyKnapSack/JadeDynastySuitAttrBeh.cs
+++ b/System/JadeDynastyKnapSack/JadeDynastySuitAttrBeh.cs
@@ -16,29 +16,29 @@
JadeDynastyEquipModel equipModel { get { return ModelCenter.Instance.GetModel<JadeDynastyEquipModel>(); } }
int itemId = 0;
- public void SetDisplay(PackType type,bool isNext = false,int equipPlace = 0,int _itemId = 0)
+ public void SetDisplay(PackType type, bool isNext = false, int equipPlace = 0, int _itemId = 0)
{
this.itemId = _itemId;
- if(equipPlace == 0)
+ if (equipPlace == 0)
{
UpdateSumSuitAttr(type, isNext);
}
- else
+ else
{
- UpdateEquipSuitAttr(type,isNext,equipPlace);
+ UpdateEquipSuitAttr(type, isNext, equipPlace);
}
}
- private void UpdateEquipSuitAttr(PackType type,bool isNext,int equipPlace)
+ private void UpdateEquipSuitAttr(PackType type, bool isNext, int equipPlace)
{
bool isNoneActive = true;
bool isMaxSuitLv = true;
int suitType = 0;
- bool isSuit = equipModel.TryGetSuitType(equipPlace,out suitType);
- for(int i = 0; i < suitAttrs.Count; i++)
+ bool isSuit = equipModel.TryGetSuitType(equipPlace, out suitType);
+ for (int i = 0; i < suitAttrs.Count; i++)
{
var suitAttr = suitAttrs[i];
- if(i > 0)
+ if (i > 0)
{
suitAttr.attrTypeObj.SetActive(false);
}
@@ -47,7 +47,7 @@
suitAttr.attrTypeObj.SetActive(true);
JadeDynastyEquipModel.JadeDynastySuitAttrData curAttrData = null;
JadeDynastyEquipModel.JadeDynastySuitAttrData nextAttrData = null;
- equipModel.TryGetSumSuitAttr(suitType, type, out curAttrData, out nextAttrData,itemId);
+ equipModel.TryGetSumSuitAttr(suitType, type, out curAttrData, out nextAttrData, itemId);
if (isNext)
{
if (nextAttrData != null)
@@ -62,7 +62,7 @@
isNoneActive = false;
}
}
- suitAttr.SetDisplay(suitType, type, isNext,itemId);
+ suitAttr.SetDisplay(suitType, type, isNext, itemId);
}
}
@@ -83,7 +83,7 @@
}
}
- private void UpdateSumSuitAttr(PackType type,bool isNext)
+ private void UpdateSumSuitAttr(PackType type, bool isNext)
{
if (!isNext)
{
@@ -106,7 +106,7 @@
int suitType = suitTypes[i];
JadeDynastyEquipModel.JadeDynastySuitAttrData curAttrData = null;
JadeDynastyEquipModel.JadeDynastySuitAttrData nextAttrData = null;
- equipModel.TryGetSumSuitAttr(suitType, type, out curAttrData, out nextAttrData,this.itemId);
+ equipModel.TryGetSumSuitAttr(suitType, type, out curAttrData, out nextAttrData, this.itemId);
if (isNext)
{
if (nextAttrData != null)
@@ -121,7 +121,7 @@
isNoneActive = false;
}
}
- suitAttr.SetDisplay(suitType, type, isNext,itemId);
+ suitAttr.SetDisplay(suitType, type, isNext, itemId);
}
else
{
@@ -159,14 +159,14 @@
ItemTipsModel tipsModel { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } }
JadeDynastyEquipModel equipModel { get { return ModelCenter.Instance.GetModel<JadeDynastyEquipModel>(); } }
- public void SetDisplay(int suitType,PackType type,bool isNext,int itemId)
+ public void SetDisplay(int suitType, PackType type, bool isNext, int itemId)
{
JadeDynastyEquipModel.JadeDynastySuitAttrData curAttrData = null;
JadeDynastyEquipModel.JadeDynastySuitAttrData nextAttrData = null;
JadeDynastyEquipModel.JadeDynastySuitAttrData suitAttrData = null;
- equipModel.TryGetSumSuitAttr(suitType,type,out curAttrData,out nextAttrData,itemId);
+ equipModel.TryGetSumSuitAttr(suitType, type, out curAttrData, out nextAttrData, itemId);
suitAttrData = isNext ? nextAttrData : curAttrData;
- if(suitAttrData == null)
+ if (suitAttrData == null)
{
attrTypeObj.SetActive(false);
return;
@@ -175,26 +175,26 @@
{
attrTypeObj.SetActive(true);
string suitName = Language.Get(StringUtility.Contact("JadeDynastyEquipSuit_", suitType));
- suitTypeText.text = StringUtility.Contact(suitName,"Lv." + suitAttrData.suitLv);
+ suitTypeText.text = StringUtility.Contact(suitName, "Lv." + suitAttrData.suitLv);
}
int[] ids = suitAttrData.suitAttrConfig.attrIDList;
int[] values = suitAttrData.suitAttrConfig.attrValueList;
var equipPlaces = equipModel.suitTypeDict[suitType];
int equipPlace = equipPlaces[0];
List<int> activeEquips = null;
- bool isActive = equipModel.TryGetIsActiveSuit(equipPlace,suitAttrData.suitLv,out activeEquips);
+ bool isActive = equipModel.TryGetIsActiveSuit(equipPlace, suitAttrData.suitLv, out activeEquips);
bool isShowActiveObj = !isActive || type == PackType.JadeDynastyItem;
activeObj.SetActive(isShowActiveObj);
- if(isShowActiveObj)
+ if (isShowActiveObj)
{
string equipsName = string.Empty;
- for(int i = 0; i < equipPlaces.Count; i++)
+ for (int i = 0; i < equipPlaces.Count; i++)
{
var place = equipPlaces[i];
string equipName = Language.Get(((RoleEquipType)place).ToString());
if (activeEquips.Contains(place) && type == PackType.JadeDynastyEquip)
{
- equipName = UIHelper.AppendColor(TextColType.Green,equipName);
+ equipName = UIHelper.AppendColor(TextColType.Green, equipName);
}
if (i == 0)
{
@@ -205,21 +205,21 @@
equipsName = StringUtility.Contact(equipsName, " ", equipName);
}
}
- string conditionSB = Language.Get("JadeDynastyEquip1",equipsName,suitAttrData.suitLv);
+ string conditionSB = Language.Get("JadeDynastyEquip1", equipsName, suitAttrData.suitLv);
activeText.text = conditionSB;
}
for (int i = 0; i < attrObjlist.Count; i++)
{
var attrObj = attrObjlist[i];
attrObj.SetActive(i < ids.Length);
- if(i < ids.Length)
+ if (i < ids.Length)
{
var attrId = ids[i];
var attrValue = values[i];
var attrText = attrTextlist[i];
var attrConfig = PlayerPropertyConfig.Get(attrId);
string attrSB = string.Empty;
- string attrValueSB = tipsModel.GetProValueTypeStr(attrConfig, attrValue); ;
+ string attrValueSB = PlayerPropertyConfig.GetPropertyDescription(attrId, attrValue); ;
if (attrConfig.Name.Contains("%s"))
{
attrSB = attrConfig.Name.Replace("%s", attrValueSB);
diff --git a/System/KnapSack/Logic/BoxGetItemModel.cs b/System/KnapSack/Logic/BoxGetItemModel.cs
index 5037fd4..81fb614 100644
--- a/System/KnapSack/Logic/BoxGetItemModel.cs
+++ b/System/KnapSack/Logic/BoxGetItemModel.cs
@@ -6,16 +6,13 @@
namespace Snxxz.UI
{
[XLua.LuaCallCSharp]
- public class BoxGetItemModel : Model,IBeforePlayerDataInitialize
+ public class BoxGetItemModel : Model, IBeforePlayerDataInitialize
{
public string guid { get; private set; }
- public int itemId { get; private set;}
+ public int itemId { get; private set; }
public BoxShowType showType { get; private set; }
- PackModel _playerPack;
- PackModel playerPack
- {
- get { return _playerPack ?? (_playerPack = ModelCenter.Instance.GetModel<PackModel>()); }
- }
+
+ PackModel playerPack { get { return ModelCenter.Instance.GetModel<PackModel>(); } }
public Dictionary<int, int> selectDict;
@@ -36,16 +33,16 @@
#region 澶勭悊鏈嶅姟鍣ㄦ暟鎹�
- public BoxGetItemInfo[] getItems { get; private set;}
+ public BoxGetItemInfo[] getItems { get; private set; }
public int getCoinsType { get; private set; }
public long getCoinsCnt { get; private set; }
- public event Action<int,int,BoxGetItemInfo[]> RefreshGetItemAct;
+ public event Action<int, int, BoxGetItemInfo[]> RefreshGetItemAct;
public void SetGetBoxItemInfo(HA810_tagMCNotifyUseItemGetItem boxItemInfo)
{
getItems = JsonMapper.ToObject<BoxGetItemInfo[]>(boxItemInfo.GetItemData);
getCoinsType = boxItemInfo.MoneyType;
getCoinsCnt = boxItemInfo.MoneyCount;
- if(!NewBieCenter.Instance.inGuiding)
+ if (!NewBieCenter.Instance.inGuiding)
{
switch (showType)
{
@@ -63,10 +60,10 @@
break;
}
}
-
+
if (RefreshGetItemAct != null)
{
- RefreshGetItemAct((int)boxItemInfo.UseItemID,(int)boxItemInfo.UseCount,getItems);
+ RefreshGetItemAct((int)boxItemInfo.UseItemID, (int)boxItemInfo.UseCount, getItems);
}
@@ -79,7 +76,7 @@
#endregion
- public void SetModel(string guid,int itemId)
+ public void SetModel(string guid, int itemId)
{
ChestsConfig chestsConfig = ChestsConfig.Get(itemId);
this.guid = guid;
@@ -87,16 +84,16 @@
if (guid == "" || chestsConfig == null) return;
ItemConfig boxConfig = ItemConfig.Get(itemId);
- if(PlayerDatas.Instance.baseData.LV < boxConfig.UseLV)
+ if (PlayerDatas.Instance.baseData.LV < boxConfig.UseLV)
{
- ServerTipDetails.DisplayNormalTip(Language.Get("MakeUseItem101",boxConfig.UseLV));
+ ServerTipDetails.DisplayNormalTip(Language.Get("MakeUseItem101", boxConfig.UseLV));
return;
}
CheckBoxShowType(chestsConfig.OpenShow, guid);
}
- public void CheckOpenBoxCondi(string guid, int itemId,int useCnt = 1)
+ public void CheckOpenBoxCondi(string guid, int itemId, int useCnt = 1)
{
ChestsConfig chestsConfig = ChestsConfig.Get(itemId);
if (chestsConfig == null) return;
@@ -110,27 +107,27 @@
{
if (isOk)
{
- if (!IsEnoughTools(chestsConfig.ExpendItemID, chestsConfig.ExpendCount*useCnt))
+ if (!IsEnoughTools(chestsConfig.ExpendItemID, chestsConfig.ExpendCount * useCnt))
{
SysNotifyMgr.Instance.ShowTip("OpenBoxToolNoEnough", itemConfig.ItemName);
return;
}
else
{
- CheckOpenMoney(chestsConfig, boxConfig,useCnt);
+ CheckOpenMoney(chestsConfig, boxConfig, useCnt);
}
}
});
}
else
{
- CheckOpenMoney(chestsConfig, boxConfig,useCnt);
+ CheckOpenMoney(chestsConfig, boxConfig, useCnt);
}
}
- public void CheckOpenMoney(ChestsConfig chestsConfig, ItemConfig boxConfig,int useCnt)
+ public void CheckOpenMoney(ChestsConfig chestsConfig, ItemConfig boxConfig, int useCnt)
{
- if (!IsEnoughMoney(chestsConfig.OpenMoney*useCnt))
+ if (!IsEnoughMoney(chestsConfig.OpenMoney * useCnt))
{
SysNotifyMgr.Instance.ShowTip("BoxOpenCostMoney", 1);
return;
@@ -139,22 +136,22 @@
{
if (chestsConfig.OpenMoney > 0)
{
- ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("OpenBoxGold", chestsConfig.OpenMoney*useCnt), (bool isOk) =>
- {
- if (isOk)
- {
- CheckOtherCondi(chestsConfig,boxConfig,useCnt);
- }
- });
+ ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("OpenBoxGold", chestsConfig.OpenMoney * useCnt), (bool isOk) =>
+ {
+ if (isOk)
+ {
+ CheckOtherCondi(chestsConfig, boxConfig, useCnt);
+ }
+ });
}
else
{
- CheckOtherCondi(chestsConfig, boxConfig,useCnt);
+ CheckOtherCondi(chestsConfig, boxConfig, useCnt);
}
}
}
- public void CheckOtherCondi(ChestsConfig chestsConfig,ItemConfig boxConfig,int useCnt)
+ public void CheckOtherCondi(ChestsConfig chestsConfig, ItemConfig boxConfig, int useCnt)
{
if (boxConfig.MaxSkillCnt > 0 && GetUseCntByID(itemId) >= boxConfig.MaxSkillCnt)
@@ -177,11 +174,11 @@
ItemModel itemModel = playerPack.GetItemByGuid(guid);
if (itemModel != null)
{
- ItemOperateUtility.Instance.UseItem(itemModel.gridIndex,useCnt);
+ ItemOperateUtility.Instance.UseItem(itemModel.gridIndex, useCnt);
}
}
- public bool CheckOpenBoxCondition(int itemId,out bool isBox)
+ public bool CheckOpenBoxCondition(int itemId, out bool isBox)
{
isBox = false;
ChestsConfig chestsConfig = ChestsConfig.Get(itemId);
@@ -225,7 +222,7 @@
{
ulong haveMoney = UIHelper.GetMoneyCnt(1);
DebugEx.Log("IsEnoughMoney" + haveMoney);
- if(haveMoney >= (ulong)moneyCnt)
+ if (haveMoney >= (ulong)moneyCnt)
{
return true;
}
@@ -235,10 +232,10 @@
}
}
- private bool IsEnoughTools(int itemId,int toolCnt)
+ private bool IsEnoughTools(int itemId, int toolCnt)
{
- int count = playerPack.GetItemCountByID(PackType.Item,itemId);
- if(count >= toolCnt)
+ int count = playerPack.GetItemCountByID(PackType.Item, itemId);
+ if (count >= toolCnt)
{
return true;
}
@@ -251,28 +248,28 @@
#region 寰楀埌瀹濈閫夋嫨鐨勭墿鍝�
Dictionary<int, List<int>> jobReplaceDic = new Dictionary<int, List<int>>();
Dictionary<int, int> selectlistDict = null;
- public bool IsSelectItemByID(int boxId,out Dictionary<int,int> selectDict)
+ public bool IsSelectItemByID(int boxId, out Dictionary<int, int> selectDict)
{
selectDict = new Dictionary<int, int>();
jobReplaceDic.Clear();
ChestsAwardConfig awardConfig = ChestsAwardConfig.GetChestsAwardByID(boxId);
- if(string.IsNullOrEmpty(awardConfig.SelectList))
+ if (string.IsNullOrEmpty(awardConfig.SelectList))
{
return false;
}
else
{
- selectlistDict = ConfigParse.GetDic<int, int>(awardConfig.SelectList);
+ selectlistDict = ConfigParse.GetDic<int, int>(awardConfig.SelectList);
JsonData jsonData = JsonMapper.ToObject(awardConfig.JobItem);
- if(jsonData.IsArray)
+ if (jsonData.IsArray)
{
- for(int i = 0; i < jsonData.Count; i++)
+ for (int i = 0; i < jsonData.Count; i++)
{
List<int> idlist = new List<int>();
- jobReplaceDic.Add(i,idlist);
- if(jsonData[i].IsArray)
+ jobReplaceDic.Add(i, idlist);
+ if (jsonData[i].IsArray)
{
- for(int j = 0;j < jsonData[i].Count; j++)
+ for (int j = 0; j < jsonData[i].Count; j++)
{
int itemId = int.Parse(jsonData[i][j].ToString());
idlist.Add(itemId);
@@ -280,20 +277,20 @@
}
}
}
-
- foreach(var itemId in selectlistDict.Keys)
+
+ foreach (var itemId in selectlistDict.Keys)
{
- int id = itemId;
- foreach(var index in jobReplaceDic.Keys)
+ int id = itemId;
+ foreach (var index in jobReplaceDic.Keys)
{
- if(jobReplaceDic[index].Contains(itemId))
+ if (jobReplaceDic[index].Contains(itemId))
{
int replaceIndex = PlayerDatas.Instance.baseData.Job - 1;
id = jobReplaceDic[index][replaceIndex];
break;
}
}
- selectDict.Add(id,selectlistDict[itemId]);
+ selectDict.Add(id, selectlistDict[itemId]);
}
return true;
@@ -302,7 +299,7 @@
}
#endregion
- private void CheckBoxShowType(int openShow,string guid)
+ private void CheckBoxShowType(int openShow, string guid)
{
ItemModel itemModel = playerPack.GetItemByGuid(guid);
if (itemModel == null) return;
@@ -333,7 +330,7 @@
public override void UnInit()
{
-
+
}
}
diff --git a/System/KnapSack/Logic/BoxGetItemWin.cs b/System/KnapSack/Logic/BoxGetItemWin.cs
index 3794dca..e37c9e4 100644
--- a/System/KnapSack/Logic/BoxGetItemWin.cs
+++ b/System/KnapSack/Logic/BoxGetItemWin.cs
@@ -215,8 +215,8 @@
ItemCellModel cellModel = new ItemCellModel(itemInfo.ItemID, false, (ulong)itemInfo.Count,
"", type, false, ConfigParse.Analysis(itemInfo.UserData));
itemBasic.Init(cellModel);
- itemBasic.cellBtn.RemoveAllListeners();
- itemBasic.cellBtn.AddListener(() =>
+ itemBasic.button.RemoveAllListeners();
+ itemBasic.button.AddListener(() =>
{
ItemAttrData attrData = new ItemAttrData(itemInfo.ItemID, false, (ulong)itemInfo.Count, -1,
false, type, "", ConfigParse.Analysis(itemInfo.UserData));
diff --git a/System/KnapSack/Logic/DecomposeGetItemWin.cs b/System/KnapSack/Logic/DecomposeGetItemWin.cs
index 5216a72..4f0b067 100644
--- a/System/KnapSack/Logic/DecomposeGetItemWin.cs
+++ b/System/KnapSack/Logic/DecomposeGetItemWin.cs
@@ -61,8 +61,8 @@
ItemCellModel cellModel = new ItemCellModel(matInfo.ItemID, false, (ulong)matInfo.Count,
"", PackType.Deleted, false, ConfigParse.Analysis(matInfo.UserData));
itemBasic.Init(cellModel);
- itemBasic.cellBtn.RemoveAllListeners();
- itemBasic.cellBtn.AddListener(() =>
+ itemBasic.button.RemoveAllListeners();
+ itemBasic.button.AddListener(() =>
{
ItemAttrData attrData = new ItemAttrData(matInfo.ItemID, false, (ulong)matInfo.Count, -1,
false, PackType.Deleted, "", ConfigParse.Analysis(matInfo.UserData));
diff --git a/System/KnapSack/Logic/DevourGridCell.cs b/System/KnapSack/Logic/DevourGridCell.cs
index 1ac8b85..47d304a 100644
--- a/System/KnapSack/Logic/DevourGridCell.cs
+++ b/System/KnapSack/Logic/DevourGridCell.cs
@@ -20,8 +20,8 @@
{
itemBaisc.gameObject.SetActive(true);
itemBaisc.Init(model,true);
- itemBaisc.cellBtn.RemoveAllListeners();
- itemBaisc.cellBtn.AddListener(()=>ClickItem(model));
+ itemBaisc.button.RemoveAllListeners();
+ itemBaisc.button.AddListener(()=>ClickItem(model));
if (playerPack.selectDevourlist.Contains(model))
{
selectImg.SetActive(true);
diff --git a/System/KnapSack/Logic/EquipDecomMailWin.cs b/System/KnapSack/Logic/EquipDecomMailWin.cs
index 692e7a6..9b0554e 100644
--- a/System/KnapSack/Logic/EquipDecomMailWin.cs
+++ b/System/KnapSack/Logic/EquipDecomMailWin.cs
@@ -64,8 +64,8 @@
ItemCellModel cellModel = new ItemCellModel(matInfo.ItemID, false, (ulong)matInfo.Count,
"", PackType.Deleted, false, ConfigParse.Analysis(matInfo.UserData));
getMatlist[i].Init(cellModel);
- getMatlist[i].cellBtn.RemoveAllListeners();
- getMatlist[i].cellBtn.AddListener(() =>
+ getMatlist[i].button.RemoveAllListeners();
+ getMatlist[i].button.AddListener(() =>
{
ItemAttrData attrData = new ItemAttrData(matInfo.ItemID, false, (ulong)matInfo.Count,-1,
false, PackType.Deleted, "", ConfigParse.Analysis(matInfo.UserData));
diff --git a/System/KnapSack/Logic/EquipTip.cs b/System/KnapSack/Logic/EquipTip.cs
index 28d7a47..801e001 100644
--- a/System/KnapSack/Logic/EquipTip.cs
+++ b/System/KnapSack/Logic/EquipTip.cs
@@ -156,7 +156,6 @@
{
bottomPart.gameObject.SetActive(false);
StartCoroutine(SetScrollSize());
- DebugEx.Log("鍒嗘敮娴嬭瘯");
}
IEnumerator SetScrollSize()
diff --git a/System/KnapSack/Logic/ItemLogicUtility.cs b/System/KnapSack/Logic/ItemLogicUtility.cs
index 29ba77d..1218ce1 100644
--- a/System/KnapSack/Logic/ItemLogicUtility.cs
+++ b/System/KnapSack/Logic/ItemLogicUtility.cs
@@ -765,12 +765,17 @@
private void SetGetBetterEquipEvent(ItemModel model)
{
- List<int> itemEffectTime = model.GetUseDataModel((int)ItemUseDataKey.createTime);
- if (itemEffectTime != null)
+ if (model.isAuction)
+ {
+ return;
+ }
+
+ var itemEffectTime = model.GetUseData((int)ItemUseDataKey.createTime);
+ if (!itemEffectTime.IsNullOrEmpty() && itemEffectTime.Count > 0)
{
if (itemEffectTime[0] != 0)
{
- ItemCDCool cool = KnapsackTimeCDMgr.Instance.GetItemCoolById(model.guid);
+ var cool = KnapsackTimeCDMgr.Instance.GetItemCoolById(model.guid);
double remainTime = 0;
if (cool != null)
{
@@ -785,36 +790,14 @@
}
int isFightUp = IsFightUp(model.itemId, model.equipScore);
- int equipPlace = model.config.EquipPlace;
- if (isFightUp == 1)
- {
- switch (equipPlace)
- {
- case 9:
- break;
- default:
- if (model.packType == PackType.Item)
- {
- var equipItemModel = playerPack.GetItemByIndex(PackType.Equip, model.config.EquipPlace);
- if (PlayerDatas.Instance.baseData.LV >= 200)
- {
- if (model.config.EquipPlace > (int)RoleEquipType.Weapon2 && model.config.EquipPlace < (int)RoleEquipType.Neck)
- {
- if (equipItemModel != null && equipItemModel.config.ItemColor > model.config.ItemColor)
- {
- return;
- }
- }
- }
- }
- break;
- }
+ if (isFightUp != 1)
+ {
+ return;
+ }
- if (GetBetterEquipEvent != null)
- {
- GetBetterEquipEvent(model.guid);
- }
-
+ if (GetBetterEquipEvent != null)
+ {
+ GetBetterEquipEvent(model.guid);
}
}
@@ -1309,7 +1292,7 @@
return false;
}
- var putOnlimitList = item.GetUseDataModel((int)ItemUseDataKey.cancelUseLimit);
+ var putOnlimitList = item.GetUseData((int)ItemUseDataKey.cancelUseLimit);
if (!putOnlimitList.IsNullOrEmpty())
{
if (putOnlimitList[0] == 1)
diff --git a/System/KnapSack/Logic/ItemModel.cs b/System/KnapSack/Logic/ItemModel.cs
index 21cb1c8..0971a1e 100644
--- a/System/KnapSack/Logic/ItemModel.cs
+++ b/System/KnapSack/Logic/ItemModel.cs
@@ -31,7 +31,7 @@
public int itemId { get { return itemInfo == null ? 0 : itemInfo.itemId; } }
public int count { get { return itemInfo == null ? 0 : itemInfo.count; } }
public int gridIndex { get { return itemInfo == null ? 0 : itemInfo.index; } }
- public int isBind { get { return itemInfo == null ? 0 : itemInfo.isBind; } }
+ public bool isAuction { get { return itemInfo == null ? false : itemInfo.isAuction == 1; } }
public int preItemCount { get; private set; }
public int auctionSurplusTime {
get {
@@ -68,12 +68,12 @@
}
this.equipScore = ItemLogicUtility.Instance.GetEquipScore(packType, itemId, useDataDict);
- if (GetUseDataModel((int)ItemUseDataKey.itemCount) != null)
+ if (GetUseData((int)ItemUseDataKey.itemCount) != null)
{
- itemInfo.count = GetUseDataModel((int)ItemUseDataKey.itemCount)[0];
+ itemInfo.count = GetUseData((int)ItemUseDataKey.itemCount)[0];
}
- var itemEffectTime = GetUseDataModel((int)ItemUseDataKey.createTime);
+ var itemEffectTime = GetUseData((int)ItemUseDataKey.createTime);
if (config.ExpireTime > 0 && !itemEffectTime.IsNullOrEmpty() && itemEffectTime[0] != 0)
{
switch ((EquipReduceType)config.EndureReduceType)
@@ -99,7 +99,7 @@
itemInfo.count = count;
}
- public List<int> GetUseDataModel(int key)
+ public List<int> GetUseData(int key)
{
List<int> list = null;
if (useDataDict != null)
@@ -119,7 +119,7 @@
public int count; //鐗╁搧鏁伴噺
- public int isBind;//鏄惁缁戝畾
+ public int isAuction;//鏄惁鎷嶅搧
public int remainHour; //鍓╀綑鏃堕棿(灏忔椂)
@@ -140,7 +140,7 @@
remainHour = (int)serverItem.RemainHour;
userData = serverItem.UserData;
guid = serverItem.ItemGUID;
- isBind = serverItem.IsBind;
+ isAuction = serverItem.IsBind;
}
public ItemInfo(H0704_tagRolePackRefresh serverItem)
@@ -151,7 +151,7 @@
remainHour = (int)serverItem.RemainHour;
userData = serverItem.UserData;
guid = serverItem.ItemGUID;
- isBind = serverItem.IsBind;
+ isAuction = serverItem.IsBind;
}
}
diff --git a/System/KnapSack/Logic/ItemOperateUtility.cs b/System/KnapSack/Logic/ItemOperateUtility.cs
index 0b96352..1ab8eac 100644
--- a/System/KnapSack/Logic/ItemOperateUtility.cs
+++ b/System/KnapSack/Logic/ItemOperateUtility.cs
@@ -39,7 +39,7 @@
return;
}
- var putOnLimits = selectedItem.GetUseDataModel((int)ItemUseDataKey.cancelUseLimit);
+ var putOnLimits = selectedItem.GetUseData((int)ItemUseDataKey.cancelUseLimit);
if (putOnLimits != null && putOnLimits[0] == 1)
{
PutOnEquip(selectedItem.equipPlace, selectedItem.guid);
diff --git a/System/KnapSack/Logic/ItemTipsModel.cs b/System/KnapSack/Logic/ItemTipsModel.cs
index c1d557e..c49f041 100644
--- a/System/KnapSack/Logic/ItemTipsModel.cs
+++ b/System/KnapSack/Logic/ItemTipsModel.cs
@@ -1084,17 +1084,17 @@
if (key == (int)AttrEnum.MinAtk)
{
playerProModel = PlayerPropertyConfig.Get((int)AttrEnum.ATK);
- atkStr = StringUtility.Contact(playerProModel.Name, ":", GetProValueTypeStr(playerProModel, itemEffectDict[key]));
+ atkStr = StringUtility.Contact(playerProModel.Name, ":", PlayerPropertyConfig.GetPropertyDescription(key, itemEffectDict[key]));
}
else if (key == (int)AttrEnum.MaxAtk)
{
playerProModel = PlayerPropertyConfig.Get((int)AttrEnum.ATK);
- atkStr = StringUtility.Contact(atkStr, "-", GetProValueTypeStr(playerProModel, itemEffectDict[key]));
+ atkStr = StringUtility.Contact(atkStr, "-", PlayerPropertyConfig.GetPropertyDescription(key, itemEffectDict[key]));
if (attrData.strengthDataDict != null)
{
if (attrData.strengthDataDict.ContainsKey((int)AttrEnum.ATK))
{
- atkStr = StringUtility.Contact(atkStr, Language.Get("KnapS116", GetProValueTypeStr(playerProModel, attrData.strengthDataDict[(int)AttrEnum.ATK])));
+ atkStr = StringUtility.Contact(atkStr, Language.Get("KnapS116", PlayerPropertyConfig.GetPropertyDescription(key, attrData.strengthDataDict[(int)AttrEnum.ATK])));
}
}
if (attrSB.Length <= 0)
@@ -1109,12 +1109,12 @@
}
else
{
- otherStr = StringUtility.Contact(playerProModel.Name, ":", GetProValueTypeStr(playerProModel, itemEffectDict[key]));
+ otherStr = StringUtility.Contact(playerProModel.Name, ":", PlayerPropertyConfig.GetPropertyDescription(key, itemEffectDict[key]));
if (attrData.strengthDataDict != null)
{
if (attrData.strengthDataDict.ContainsKey(key))
{
- otherStr = StringUtility.Contact(otherStr, Language.Get("KnapS116", GetProValueTypeStr(playerProModel, attrData.strengthDataDict[key])));
+ otherStr = StringUtility.Contact(otherStr, Language.Get("KnapS116", PlayerPropertyConfig.GetPropertyDescription(key, attrData.strengthDataDict[key])));
}
}
@@ -1162,7 +1162,7 @@
string rangeStr = "";
if (key == 23)
{
- rangeStr = playerProModel.Name + "+" + GetProValueTypeStr(playerProModel, itemEffectDict[key]);
+ rangeStr = playerProModel.Name + "+" + PlayerPropertyConfig.GetPropertyDescription(key, itemEffectDict[key]);
}
else if (key == 6)
{
@@ -1180,7 +1180,10 @@
curHp = itemEffectDict[key];
}
- rangeStr = playerProModel.Name + "+" + GetProValueTypeStr(playerProModel, curHp) + "[" + GetProValueTypeStr(playerProModel, itemEffectDict[key]) + "-" + GetProValueTypeStr(playerProModel, maxHp) + "]";
+ rangeStr = playerProModel.Name + "+"
+ + PlayerPropertyConfig.GetPropertyDescription(key, curHp) + "["
+ + PlayerPropertyConfig.GetPropertyDescription(key, itemEffectDict[key]) + "-"
+ + PlayerPropertyConfig.GetPropertyDescription(key, maxHp) + "]";
}
else if (key == 19)
{
@@ -1197,7 +1200,10 @@
{
curHurt = itemEffectDict[key];
}
- rangeStr = playerProModel.Name + "+" + GetProValueTypeStr(playerProModel, curHurt) + "[" + GetProValueTypeStr(playerProModel, itemEffectDict[key]) + "-" + GetProValueTypeStr(playerProModel, maxHurt) + "]";
+ rangeStr = playerProModel.Name + "+"
+ + PlayerPropertyConfig.GetPropertyDescription(key, curHurt) + "["
+ + PlayerPropertyConfig.GetPropertyDescription(key, itemEffectDict[key]) + "-"
+ + PlayerPropertyConfig.GetPropertyDescription(key, maxHurt) + "]";
}
if (rangeStr != "")
@@ -1357,18 +1363,6 @@
return description;
}
- //鍗冲皢涓㈠純
- public string GetLegendAttr(List<int> idlist, List<int> valuelist, ItemConfig itemConfig)
- {
- return SetLegendAttr(idlist, valuelist, itemConfig);
- }
-
- //鍗冲皢涓㈠純
- public string GetPreviewLegendAttr(List<int> idlist, List<int> valuelist, ItemConfig itemConfig, bool isCustom)
- {
- return SetLegendAttr(idlist, valuelist, itemConfig, true, isCustom);
- }
-
private string SetLegendAttr(List<int> idlist, List<int> valuelist, ItemConfig itemConfig, bool isPreview = false, bool isCustom = false)
{
if (idlist == null)
@@ -1433,145 +1427,10 @@
SetJadeDynastyLengend(itemConfig, attrId);
break;
default:
- SetNormalPackLengend(itemConfig, attrId, isCustom, isPreview);
break;
}
}
return attrSB.ToString();
- }
-
- private void SetNormalPackLengend(ItemConfig itemConfig, int attrId, bool isCustom, bool isPreview)
- {
- playerProModel = PlayerPropertyConfig.Get(attrId);
- if (playerProModel != null)
- {
- string s = "";
- if (playerProModel.Name.Contains("%s"))
- {
- if (!isPreview)
- {
- s = playerProModel.Name.Replace("%s", GetProValueTypeStr(playerProModel, attrDict[attrId]));
- }
- else
- {
- if (itemConfig.EquipPlace != (int)RoleEquipType.Wing)
- {
- if (isCustom || itemConfig.StarLevel >= 3)
- {
- s = StringUtility.Contact(Language.Get("LegendAttPreview_Must"), playerProModel.Name.Replace("%s", GetProValueTypeStr(playerProModel, attrDict[attrId])));
- }
- else
- {
- s = StringUtility.Contact(Language.Get("LegendAttPreview_Might"), playerProModel.Name.Replace("%s", GetProValueTypeStr(playerProModel, attrDict[attrId])));
- }
- }
- else
- {
- if (isCustom)
- {
- s = StringUtility.Contact(Language.Get("LegendAttPreview_Must"), playerProModel.Name.Replace("%s", GetProValueTypeStr(playerProModel, attrDict[attrId])));
- }
- else
- {
- var count = LegendPropertyUtility.GetWingPropertyCount(itemConfig.LV);
- if (count > 0)
- {
- int minValue = LegendPropertyUtility.GetWingPropertyMinValue(itemConfig.LV, attrId);
- int maxValue = LegendPropertyUtility.GetWingPropertyMaxValue(itemConfig.LV, attrId);
- var minDescription = GetProValueTypeStr(playerProModel, minValue);
- var maxDescription = GetProValueTypeStr(playerProModel, maxValue);
- var description = StringUtility.Contact("[", minDescription, "~", maxDescription, "]");
- if (count > 1)
- {
- s = StringUtility.Contact(Language.Get("LegendAttPreview_Must"), playerProModel.Name.Replace("%s", description));
- }
- else
- {
- s = StringUtility.Contact(Language.Get("LegendAttPreview_Might"), playerProModel.Name.Replace("%s", description));
- }
- }
- }
- }
-
- }
-
- }
- else
- {
- if (!isPreview)
- {
- s = playerProModel.Name + "+" + GetProValueTypeStr(playerProModel, attrDict[attrId]);
- }
- else
- {
- if (itemConfig.EquipPlace != (int)RoleEquipType.Wing)
- {
- if (isCustom || itemConfig.StarLevel >= 3)
- {
- s = StringUtility.Contact(Language.Get("LegendAttPreview_Must"), playerProModel.Name, "+", GetProValueTypeStr(playerProModel, attrDict[attrId]));
- }
- else
- {
- s = StringUtility.Contact(Language.Get("LegendAttPreview_Might"), playerProModel.Name, "+", GetProValueTypeStr(playerProModel, attrDict[attrId]));
- }
- }
- else
- {
- if (isCustom)
- {
- s = StringUtility.Contact(Language.Get("LegendAttPreview_Must"), playerProModel.Name, "+", GetProValueTypeStr(playerProModel, attrDict[attrId]));
- }
- else
- {
- var count = LegendPropertyUtility.GetWingPropertyCount(itemConfig.LV);
- if (count > 0)
- {
- int minValue = LegendPropertyUtility.GetWingPropertyMinValue(itemConfig.LV, attrId);
- int maxValue = LegendPropertyUtility.GetWingPropertyMaxValue(itemConfig.LV, attrId);
- var minDescription = GetProValueTypeStr(playerProModel, minValue);
- var maxDescription = GetProValueTypeStr(playerProModel, maxValue);
- var description = StringUtility.Contact("[+", minDescription, "~", maxDescription, "]");
- if (count > 1)
- {
- s = StringUtility.Contact(Language.Get("LegendAttPreview_Must"), playerProModel.Name, description);
- }
- else
- {
- s = StringUtility.Contact(Language.Get("LegendAttPreview_Might"), playerProModel.Name, description);
- }
- }
- }
-
- }
-
- }
-
- }
-
- switch (itemConfig.EquipPlace)
- {
- case 11:
- s = string.Format("<color=#{0}>{1}</color>", LegendPropertyUtility.GetWingPropertyColor(attrId, attrDict[attrId]), s);
- break;
- case 101:
- case 102:
- case 103:
- case 104:
- case 105:
- s = GetTextColorByLegendType(GetDogzLegendType(attrId), s);
- break;
- }
-
- if (attrSB.Length <= 0)
- {
- attrSB.Append(s);
- }
- else
- {
- attrSB.Append("\n" + s);
- }
-
- }
}
private void SetJadeDynastyLengend(ItemConfig itemConfig, int attrId)
@@ -1582,11 +1441,11 @@
string s = "";
if (playerProModel.Name.Contains("%s"))
{
- s = playerProModel.Name.Replace("%s", GetProValueTypeStr(playerProModel, attrDict[attrId]));
+ s = playerProModel.Name.Replace("%s", PlayerPropertyConfig.GetPropertyDescription(attrId, attrDict[attrId]));
}
else
{
- s = playerProModel.Name + "+" + GetProValueTypeStr(playerProModel, attrDict[attrId]);
+ s = playerProModel.Name + "+" + PlayerPropertyConfig.GetPropertyDescription(attrId, attrDict[attrId]);
}
int colorType = 0;
TryGetJadeDyanastyLegendColorType(attrId, attrDict[attrId], out colorType);
@@ -1697,11 +1556,11 @@
string s = "";
if (playerProModel.Name.Contains("%s"))
{
- s = playerProModel.Name.Replace("%s", GetProValueTypeStr(playerProModel, attrData.washDataDict[attr]));
+ s = playerProModel.Name.Replace("%s", PlayerPropertyConfig.GetPropertyDescription(attr, attrData.washDataDict[attr]));
}
else
{
- s = StringUtility.Contact(playerProModel.Name, "+", GetProValueTypeStr(playerProModel, attrData.washDataDict[attr]));
+ s = StringUtility.Contact(playerProModel.Name, "+", PlayerPropertyConfig.GetPropertyDescription(attr, attrData.washDataDict[attr]));
}
if (attrSB.Length <= 0)
@@ -1784,24 +1643,6 @@
return maxLv;
}
#endregion
-
- public string GetProValueTypeStr(PlayerPropertyConfig playerproModel, int value)
- {
- string s = "";
- if (playerproModel.ISPercentage == 0)
- {
- s = value.ToString();
- }
- else if (playerproModel.ISPercentage == 1)
- {
- s = (float)Math.Round(value / 100f, 1) + "%";
- }
- else if (playerproModel.ISPercentage == 2)
- {
- s = ((float)Math.Round(value / 100f, 1)).ToString();
- }
- return s;
- }
Dictionary<int, int> GetItemEffectDict(ItemConfig config)
{
@@ -1981,11 +1822,11 @@
attrName = playerProModel.Name;
if (contanctStr == "")
{
- attrValueStr = GetProValueTypeStr(playerProModel, attrValue);
+ attrValueStr = PlayerPropertyConfig.GetPropertyDescription(attrId, attrValue);
}
else
{
- attrValueStr = StringUtility.Contact(contanctStr, "-", GetProValueTypeStr(playerProModel, attrValue));
+ attrValueStr = StringUtility.Contact(contanctStr, "-", PlayerPropertyConfig.GetPropertyDescription(attrId, attrValue));
}
}
}
@@ -2742,7 +2583,6 @@
}
}
-
private void SetWingsRefineMat(List<int> ids, List<int> nums)
{
wingsRefineMatDict = null;
@@ -2868,7 +2708,6 @@
}
SetLegendData(legendIdlist, legendValuelist);
SetExhaustedData(exhaustedIdlist, exhaustedValuelist);
- //SetSuitData(appointItemConfig.SuiteLv);
}
#endregion
diff --git a/System/KnapSack/Logic/MakeDrugCell.cs b/System/KnapSack/Logic/MakeDrugCell.cs
index aaa8263..214cdf8 100644
--- a/System/KnapSack/Logic/MakeDrugCell.cs
+++ b/System/KnapSack/Logic/MakeDrugCell.cs
@@ -115,7 +115,7 @@
if (attrConfig != null)
{
int value = attrDict[id] * useNum;
- string valueStr = StringUtility.Contact("+", UIHelper.AppendColor(TextColType.Green, GetProValueTypeStr(attrConfig, value), true));
+ string valueStr = StringUtility.Contact("+", UIHelper.AppendColor(TextColType.Green, PlayerPropertyConfig.GetPropertyDescription(id, value), true));
string attrStr = StringUtility.Contact(attrConfig.Name, valueStr);
if (attrSB.Length != 0)
{
@@ -171,24 +171,6 @@
{
if (type != PackType.Item || id != itemId) return;
RefreshUI();
- }
-
- public string GetProValueTypeStr(PlayerPropertyConfig playerproModel, int value)
- {
- string s = "";
- if (playerproModel.ISPercentage == 0)
- {
- s = value.ToString();
- }
- else if (playerproModel.ISPercentage == 1)
- {
- s = (float)Math.Round(value / 100f, 1) + "%";
- }
- else if (playerproModel.ISPercentage == 2)
- {
- s = ((float)Math.Round(value / 100f, 1)).ToString();
- }
- return s;
}
private void ClickMakeUseBtn()
diff --git a/System/KnapSack/Logic/PackModel.cs b/System/KnapSack/Logic/PackModel.cs
index a26efca..673bd6f 100644
--- a/System/KnapSack/Logic/PackModel.cs
+++ b/System/KnapSack/Logic/PackModel.cs
@@ -692,7 +692,7 @@
switch ((EquipReduceType)itemModel.config.EndureReduceType)
{
case EquipReduceType.Def_EquipReduceType_Time:
- List<int> itemEffectTime = itemModel.GetUseDataModel((int)ItemUseDataKey.createTime);
+ List<int> itemEffectTime = itemModel.GetUseData((int)ItemUseDataKey.createTime);
if (itemEffectTime != null && itemEffectTime[0] != 0)
{
if (cool == null || cool.GetRemainTime() <= 0)
diff --git a/System/KnapSack/Logic/PlayerStarNumWin.cs b/System/KnapSack/Logic/PlayerStarNumWin.cs
index 689b213..0f7892a 100644
--- a/System/KnapSack/Logic/PlayerStarNumWin.cs
+++ b/System/KnapSack/Logic/PlayerStarNumWin.cs
@@ -33,8 +33,7 @@
private int nextActiveCnt = 0;
PackModel _playerPack;
- PackModel playerPack
- {
+ PackModel playerPack {
get { return _playerPack ?? (_playerPack = ModelCenter.Instance.GetModel<PackModel>()); }
}
@@ -45,7 +44,7 @@
protected override void BindController()
{
-
+
}
protected override void OnPreOpen()
@@ -61,7 +60,7 @@
protected override void OnAfterOpen()
{
-
+
}
protected override void OnPreClose()
@@ -94,14 +93,14 @@
attrStr.Length = 0;
nowNoActObj.SetActive(false);
nowActObj.SetActive(true);
- nowStarNumText.text = Language.Get("KnapS123").Replace("{0}",activeStarsConfig.countNeed.ToString());
+ nowStarNumText.text = Language.Get("KnapS123").Replace("{0}", activeStarsConfig.countNeed.ToString());
int i = 0;
for (i = 0; i < activeStarsConfig.attType.Length; i++)
{
_playerProModel = PlayerPropertyConfig.Get(activeStarsConfig.attType[i]);
if (_playerProModel != null)
{
- attrStr.Append(SetIsPercentShow(_playerProModel, activeStarsConfig.attValue[i]) + "\n");
+ attrStr.Append(GetValueDescription(_playerProModel, activeStarsConfig.attValue[i]) + "\n");
}
}
@@ -113,7 +112,7 @@
nowActObj.SetActive(false);
}
- if(nextActiveStarsConfig != null)
+ if (nextActiveStarsConfig != null)
{
nextActObj.SetActive(true);
nextNoActObj.SetActive(false);
@@ -125,12 +124,12 @@
_playerProModel = PlayerPropertyConfig.Get(nextActiveStarsConfig.attType[i]);
if (_playerProModel != null)
{
- attrStr.Append(SetIsPercentShow(_playerProModel, nextActiveStarsConfig.attValue[i]) + "\n");
+ attrStr.Append(GetValueDescription(_playerProModel, nextActiveStarsConfig.attValue[i]) + "\n");
}
}
nextAttrText.text = attrStr.ToString();
- if(nextActiveStarsConfig.countNeed <= serverActiveCnt)
+ if (nextActiveStarsConfig.countNeed <= serverActiveCnt)
{
RefreshActiveBtnUI(false);
nextEffectText.text = Language.Get("BagWin_NextText_1", Language.Get("KnapS143"));
@@ -157,20 +156,20 @@
}
int addAttrStarsNum = 0;
- List<int> addIdlist = playerPack.GetAddAttrIdByStars(_curStarsCount,out addAttrStarsNum);
- if(addIdlist.Count > 0)
+ List<int> addIdlist = playerPack.GetAddAttrIdByStars(_curStarsCount, out addAttrStarsNum);
+ if (addIdlist.Count > 0)
{
addAttrText.gameObject.SetActive(true);
string addAttr = "";
- for(int i = 0; i < addIdlist.Count; i++)
+ for (int i = 0; i < addIdlist.Count; i++)
{
PlayerPropertyConfig propertyConfig = PlayerPropertyConfig.Get(addIdlist[i]);
- if(propertyConfig != null)
+ if (propertyConfig != null)
{
addAttr = StringUtility.Contact(addAttr, propertyConfig.Name);
}
}
- addAttrText.text = Language.Get("KnapS148",addAttrStarsNum,addAttr);
+ addAttrText.text = Language.Get("KnapS148", addAttrStarsNum, addAttr);
}
else
{
@@ -195,7 +194,7 @@
private void ClickActivityBtn()
{
- playerPack.SendActiveAttrQuest(1,nextActiveCnt);
+ playerPack.SendActiveAttrQuest(1, nextActiveCnt);
successEffect.Play();
}
@@ -208,7 +207,7 @@
if (starslist == null || starslist.Count < 1) return serverActiveCnt;
int realActiveStars = _curStarsCount > serverActiveCnt ? serverActiveCnt : _curStarsCount;
- for (int i = starslist.Count - 1; i > -1 ; i--)
+ for (int i = starslist.Count - 1; i > -1; i--)
{
if (i == 0 && starslist[i] > realActiveStars)
{
@@ -228,12 +227,12 @@
activeStarsConfig = null;
nextActiveStarsConfig = RoleEquipStarsConfig.GetEquipStarsModel(starslist[0]);
}
- else
+ else
{
int nextActiveStars = 0;
for (int i = 0; i < starslist.Count; i++)
{
- if(starslist[i] > realActiveStars)
+ if (starslist[i] > realActiveStars)
{
nextActiveStars = starslist[i];
break;
@@ -254,31 +253,17 @@
return realActiveStars;
}
- //鍒ゆ柇灞炴�ф槸鍚︾櫨鍒嗘瘮鏄剧ず
- public string SetIsPercentShow(PlayerPropertyConfig _playerProModel, int proValue)
+ string GetValueDescription(PlayerPropertyConfig _playerProModel, int proValue)
{
string strPro = "";
+ var valueDescription = PlayerPropertyConfig.GetPropertyDescription(_playerProModel.ID, proValue);
if (!_playerProModel.Name.Contains("%s"))
{
- if (_playerProModel.ISPercentage == 0)
- {
- strPro = _playerProModel.Name + "<color=#109D06FF>" + " +" + proValue + "</color>";
- }
- else if (_playerProModel.ISPercentage == 1)
- {
- strPro = _playerProModel.Name + "<color=#109D06FF>" + " +" + (float)Math.Round(proValue / 100f, 1) + "%" + "</color>";
- }
+ strPro = _playerProModel.Name + "<color=#109D06FF>" + " +" + valueDescription + "</color>";
}
else
{
- if (_playerProModel.ISPercentage == 0)
- {
- strPro = _playerProModel.Name.Replace("%s", proValue.ToString());
- }
- else if (_playerProModel.ISPercentage == 1)
- {
- strPro = _playerProModel.Name.Replace("%s", (float)Math.Round(proValue / 100f, 1) + "%");
- }
+ strPro = _playerProModel.Name.Replace("%s", valueDescription);
}
return strPro;
diff --git a/System/KnapSack/Logic/PlayerStrengtheningLVWin.cs b/System/KnapSack/Logic/PlayerStrengtheningLVWin.cs
index fac95f7..41b6b34 100644
--- a/System/KnapSack/Logic/PlayerStrengtheningLVWin.cs
+++ b/System/KnapSack/Logic/PlayerStrengtheningLVWin.cs
@@ -33,20 +33,8 @@
private ItemPlusSumAttrConfig nextActiveSTRConfig = null;
private int nextActiveCnt = 0;
- StrengthenModel m_StrengthengModel;
- StrengthenModel strengthengmodel
- {
- get
- {
- return m_StrengthengModel ?? (m_StrengthengModel = ModelCenter.Instance.GetModel<StrengthenModel>());
- }
- }
-
- PackModel _playerPack;
- PackModel playerPack
- {
- get { return _playerPack ?? (_playerPack = ModelCenter.Instance.GetModel<PackModel>()); }
- }
+ StrengthenModel strengthengmodel { get { return ModelCenter.Instance.GetModel<StrengthenModel>(); } }
+ PackModel playerPack { get { return ModelCenter.Instance.GetModel<PackModel>(); } }
protected override void AddListeners()
{
@@ -56,7 +44,7 @@
protected override void BindController()
{
-
+
}
protected override void OnPreOpen()
@@ -68,7 +56,7 @@
protected override void OnAfterOpen()
{
-
+
}
protected override void OnPreClose()
@@ -87,8 +75,8 @@
_curStrengthLv = 0;
foreach (var value in _haveStrengthInfoDict.Values)
{
- ItemModel itemModel = playerPack.GetItemByIndex(PackType.Equip,value.EquipIndex);
- if(itemModel != null)
+ ItemModel itemModel = playerPack.GetItemByIndex(PackType.Equip, value.EquipIndex);
+ if (itemModel != null)
{
_curStrengthLv += value.EquipPartStarLV;
}
@@ -106,7 +94,7 @@
int i = 0;
for (i = 0; i < activeSTRConfig.attType.Length; i++)
{
- attrStr.Append(SetIsPercentShow(activeSTRConfig.attType[i], activeSTRConfig.attValue[i]) + "\n");
+ attrStr.Append(GetValueDescription(activeSTRConfig.attType[i], activeSTRConfig.attValue[i]) + "\n");
}
nowAttrText.text = attrStr.ToString();
}
@@ -125,7 +113,7 @@
int i = 0;
for (i = 0; i < nextActiveSTRConfig.attType.Length; i++)
{
- attrStr.Append(SetIsPercentShow(nextActiveSTRConfig.attType[i], nextActiveSTRConfig.attValue[i]) + "\n");
+ attrStr.Append(GetValueDescription(nextActiveSTRConfig.attType[i], nextActiveSTRConfig.attValue[i]) + "\n");
}
nextAttrText.text = attrStr.ToString();
nextEffectText.text = Language.Get("BagWin_NextText_1", Language.Get("KnapS144"));
@@ -144,7 +132,7 @@
else
{
RefreshActiveBtnUI(false);
-
+
}
}
}
@@ -192,7 +180,7 @@
for (int i = strenlist.Count - 1; i > -1; i--)
{
- if(i == 0 && int.Parse(strenlist[i]) > _curStrengthLv)
+ if (i == 0 && int.Parse(strenlist[i]) > _curStrengthLv)
{
activeCnt = 0;
break;
@@ -202,7 +190,7 @@
activeCnt = int.Parse(strenlist[i]);
break;
}
-
+
}
}
@@ -217,7 +205,7 @@
int nextActiveSTR = 0;
for (int i = 0; i < strenlist.Count; i++)
{
- if ( int.Parse(strenlist[i]) == activeCnt)
+ if (int.Parse(strenlist[i]) == activeCnt)
{
if (i < strenlist.Count - 1)
{
@@ -242,7 +230,7 @@
}
//鍒ゆ柇灞炴�ф槸鍚︾櫨鍒嗘瘮鏄剧ず
- public string SetIsPercentShow(int proId, int proValue)
+ string GetValueDescription(int proId, int proValue)
{
_playerProModel = PlayerPropertyConfig.Get(proId);
string strPro = "";
@@ -252,27 +240,14 @@
return "";
}
+ var valueDescription = PlayerPropertyConfig.GetPropertyDescription(_playerProModel.ID, proValue);
if (!_playerProModel.Name.Contains("%s"))
{
- if (_playerProModel.ISPercentage == 0)
- {
- strPro = _playerProModel.Name + "<color=#109D06FF>" + " +" + proValue + "</color>";
- }
- else if (_playerProModel.ISPercentage == 1)
- {
- strPro = _playerProModel.Name + "<color=#109D06FF>" + " +" + (float)Math.Round(proValue / 100f, 1) + "%" + "</color>";
- }
+ strPro = _playerProModel.Name + "<color=#109D06FF>" + " +" + valueDescription + "</color>";
}
else
{
- if (_playerProModel.ISPercentage == 0)
- {
- strPro = _playerProModel.Name.Replace("%s", proValue.ToString());
- }
- else if (_playerProModel.ISPercentage == 1)
- {
- strPro = _playerProModel.Name.Replace("%s", (float)Math.Round(proValue / 100f, 1) + "%");
- }
+ strPro = _playerProModel.Name.Replace("%s", valueDescription);
}
return strPro;
diff --git a/System/KnapSack/Logic/TreasureEffectModel.cs b/System/KnapSack/Logic/TreasureEffectModel.cs
index 370cb1b..e61d490 100644
--- a/System/KnapSack/Logic/TreasureEffectModel.cs
+++ b/System/KnapSack/Logic/TreasureEffectModel.cs
@@ -8,14 +8,13 @@
namespace Snxxz.UI
{
[XLua.LuaCallCSharp]
- public class TreasureEffectModel : Model,IBeforePlayerDataInitialize,IAfterPlayerDataInitialize,IPlayerLoginOk
+ public class TreasureEffectModel : Model, IBeforePlayerDataInitialize, IAfterPlayerDataInitialize, IPlayerLoginOk
{
public List<int> treasureAddAtklist { get; private set; }
public List<string> treasureIdlist { get; private set; }
public Dictionary<int, Dictionary<int, int>> treasureSignDict { get; private set; }
TreasureModel m_Model;
- TreasureModel model
- {
+ TreasureModel model {
get { return m_Model ?? (m_Model = ModelCenter.Instance.GetModel<TreasureModel>()); }
}
@@ -26,7 +25,7 @@
FuncConfigConfig addExp = FuncConfigConfig.Get("VIPAddAtkEXP");
int[] addExpIds = ConfigParse.GetMultipleStr<int>(addExp.Numerical2);
treasureAddAtklist = new List<int>();
- for(int i = 0; i < addExpIds.Length;i++)
+ for (int i = 0; i < addExpIds.Length; i++)
{
treasureAddAtklist.Add(addExpIds[i]);
}
@@ -36,12 +35,12 @@
JsonData signAttrData = JsonMapper.ToObject(MWSignDayAttr.Numerical1);
treasureSignDict = new Dictionary<int, Dictionary<int, int>>();
Dictionary<int, int> attrDict = new Dictionary<int, int>();
- treasureSignDict.Add(treasureId,attrDict);
+ treasureSignDict.Add(treasureId, attrDict);
foreach (var id in signAttrData.Keys)
{
- attrDict.Add(int.Parse(id),int.Parse(signAttrData[id].ToString()));
+ attrDict.Add(int.Parse(id), int.Parse(signAttrData[id].ToString()));
}
-
+
treasureIdlist = TreasureConfig.GetKeys();
}
@@ -61,12 +60,12 @@
public void OnPlayerLoginOk()
{
-
+
}
public override void UnInit()
{
-
+
}
public bool CheckIsTreasure(int id)
{
@@ -78,12 +77,12 @@
return false;
}
- public int treasureId { get; private set;}
- public int vipLv { get; private set;}
+ public int treasureId { get; private set; }
+ public int vipLv { get; private set; }
public StringBuilder effectDesSB = new StringBuilder();
public int killNpcAtk { get; private set; }
public int showType;
-
+
public void SetTreasureID(int id, int vipLv = 0)
{
this.treasureId = id;
@@ -113,12 +112,12 @@
{
killNpcAtk = killConfig.MaxAtk;
}
- string des = treasureConfig.Verse[0].Replace("{0}",killNpcAtk.ToString());
+ string des = treasureConfig.Verse[0].Replace("{0}", killNpcAtk.ToString());
effectDesSB.Append(des);
return;
}
- if(treasureSignDict.ContainsKey(treasureId))
+ if (treasureSignDict.ContainsKey(treasureId))
{
Dictionary<int, int> attrDict = treasureSignDict[treasureId];
Treasure treasure;
@@ -134,7 +133,7 @@
foreach (var id in attrDict.Keys)
{
PlayerPropertyConfig propertyConfig = PlayerPropertyConfig.Get(id);
- string des = string.Format(treasureConfig.Verse[0], GetProValueTypeStr(propertyConfig, attrDict[id]), propertyConfig.Name);
+ string des = string.Format(treasureConfig.Verse[0], PlayerPropertyConfig.GetPropertyDescription(id, attrDict[id]), propertyConfig.Name);
effectDesSB.Append(des);
if (signInModel.totalSignInCount > 0)
{
@@ -143,11 +142,11 @@
int addAtk = signInModel.totalSignInCount * attrDict[id];
if (isHaveTreasure)
{
- des = string.Format(treasureConfig.Verse[2], Language.Get("TreasureEffect105", GetProValueTypeStr(propertyConfig, addAtk)));
+ des = string.Format(treasureConfig.Verse[2], Language.Get("TreasureEffect105", PlayerPropertyConfig.GetPropertyDescription(id, addAtk)));
}
else
{
- des = string.Format(treasureConfig.Verse[2], Language.Get("TreasureEffect104", GetProValueTypeStr(propertyConfig, addAtk)));
+ des = string.Format(treasureConfig.Verse[2], Language.Get("TreasureEffect104", PlayerPropertyConfig.GetPropertyDescription(id, addAtk)));
}
effectDesSB.Append(StringUtility.Contact("\n", des));
}
@@ -155,30 +154,12 @@
return;
}
- if(effectDesSB.Length <= 0)
+ if (effectDesSB.Length <= 0)
{
type = 3;
effectDesSB.Append(treasureConfig.Verse[0]);
}
-
- }
- public string GetProValueTypeStr(PlayerPropertyConfig playerproModel, int value)
- {
- string s = "";
- if (playerproModel.ISPercentage == 0)
- {
- s = value.ToString();
- }
- else if (playerproModel.ISPercentage == 1)
- {
- s = (float)Math.Round(value / 100f, 1) + "%";
- }
- else if (playerproModel.ISPercentage == 2)
- {
- s = ((float)Math.Round(value / 100f, 1)).ToString();
- }
- return s;
}
Dictionary<int, int> atkDict = new Dictionary<int, int>();
@@ -192,8 +173,8 @@
if (killConfig != null)
{
atkDict.Clear();
- atkDict.Add(67,killConfig.MinAtk);
- atkDict.Add(68,killConfig.MaxAtk);
+ atkDict.Add(67, killConfig.MinAtk);
+ atkDict.Add(68, killConfig.MaxAtk);
fight += UIHelper.GetFightPower(atkDict);
}
break;
diff --git a/System/KnapSack/Logic/UnionWarehouseEquipTip.cs b/System/KnapSack/Logic/UnionWarehouseEquipTip.cs
deleted file mode 100644
index 9241628..0000000
--- a/System/KnapSack/Logic/UnionWarehouseEquipTip.cs
+++ /dev/null
@@ -1,665 +0,0 @@
-锘縰sing Snxxz.UI;
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Linq;
-
-using UnityEngine;
-using UnityEngine.UI;
-
-namespace Snxxz.UI
-{
- public class UnionWarehouseEquipTip : MonoBehaviour
- {
- #region TopUI
- [SerializeField]
- Button closeBtn;
- [SerializeField]
- Text titleText;
- [SerializeField]
- Text equipScoreDes;
- [SerializeField]
- Text equipScoreValue;
- [SerializeField]
- Text needLvDes;
- [SerializeField]
- Text needLvValue;
- [SerializeField]
- List<Text> needPointTextlist = new List<Text>();
- [SerializeField]
- List<Text> needPointNumlist = new List<Text>();
- [SerializeField]
- Text dateText;
- [SerializeField]
- ItemCell itemCell;
-
- [SerializeField]
- Text realmTitleText;
- [SerializeField] Image realmImg;
- [SerializeField] GameObject container_FightPower;
- [SerializeField] Text fightPowerText;
- #endregion
-
- #region MidUI
- [SerializeField]
- RectTransform attrContent;
- [SerializeField]
- ScrollRect scrollRect;
- [SerializeField]
- LayoutElement scrollLayout;
-
- [SerializeField]
- GameObject basicAttr;
- [SerializeField]
- Text basicTitleText;
- [SerializeField]
- Text basicAttrDes;
-
- [SerializeField]
- GameObject exhaustedAttr;
- [SerializeField]
- Text exhaustedTitleText;
- [SerializeField]
- Text exhaustedAttrDes;
-
- [SerializeField]
- GameObject legendAttr;
- [SerializeField]
- Text legendTitleText;
- [SerializeField]
- Text legendCntPreview;
- [SerializeField]
- Text legendAttrDes;
-
- [SerializeField]
- GameObject washAttr;
- [SerializeField]
- Text washTitleText;
- [SerializeField]
- Text washAttrDes;
-
- [SerializeField]
- GameObject gemAttr;
- [SerializeField]
- Text gemTitleText;
- [SerializeField]
- List<GemElementObj> gemObjlist = new List<GemElementObj>();
-
- [SerializeField]
- GameObject suitAttr;
- [SerializeField]
- Text suitTitleText;
- [SerializeField]
- ScrollerController suirAttrCtrl;
- [SerializeField] List<GameObject> attrCutLinelist = new List<GameObject>();
- #endregion
-
- #region BottomUI
- [SerializeField]
- GameObject bottomPart;
- [SerializeField]
- EquipSource equipSource;
- [SerializeField]
- Text nameText;
- [SerializeField]
- Text valueText;
- #endregion
-
- [SerializeField]
- RectTransform btnGroup;
-
- [SerializeField]
- GameObject operateBtn;
-
- [SerializeField]
- CanvasGroup tipAlpha;
-
- Dictionary<AttrEnum, int> needPointDict = new Dictionary<AttrEnum, int>();
-
- ItemTipsModel _itemTipsModel;
- ItemTipsModel itemTipsModel
- {
- get
- {
- return _itemTipsModel ?? (_itemTipsModel = ModelCenter.Instance.GetModel<ItemTipsModel>());
- }
- }
-
- ItemAttrData itemAttrData;
- Color32 conditionColor = new Color32(255, 244, 205, 255);
- private int curAttrTypeNum = 0;
- public void InitModel(ItemAttrData attrData)
- {
- curAttrTypeNum = 0;
- KnapsackTimeCDMgr.Instance.RefreshItemOverdueTimeAct += RefreshRemainTime;
- itemAttrData = attrData;
- InitUI();
- closeBtn.AddListener(OnClickCloseBtn);
- }
-
- private void OnEnable()
- {
- bottomPart.gameObject.SetActive(false);
- StartCoroutine(SetScrollSize());
- }
-
- IEnumerator SetScrollSize()
- {
- yield return null;
- yield return null;
- attrContent.anchoredPosition3D = new Vector3(attrContent.anchoredPosition3D.x, 0, 0);
- SetMidUIHeight(attrContent.rect.height);
- StartCoroutine(ShowBottomPart());
- }
-
- IEnumerator ShowBottomPart()
- {
- yield return null;
- bottomPart.gameObject.SetActive(true);
- SetBottomUI();
- StartCoroutine(SetPanelScale());
- }
-
- IEnumerator SetPanelScale()
- {
- yield return null;
- itemTipsModel.SetCurTips(this.GetComponent<RectTransform>());
- //this.transform.localScale = Vector3.one;
- tipAlpha.alpha = 1;
- }
-
- private void InitUI()
- {
- #region 璁剧疆TopUI
- titleText.text = itemTipsModel.GetItemTipsTitle(itemAttrData);
- titleText.color = UIHelper.GetUIColor(itemAttrData.itemConfig.ItemColor);
- ItemCellModel cellModel = new ItemCellModel(itemAttrData.itemId,itemAttrData.isPreview, (ulong)itemAttrData.count,
- itemAttrData.guid,itemAttrData.packType,itemAttrData.isCompare, itemAttrData.useDataDict);
- itemCell.Init(cellModel);
- equipScoreDes.text = Language.Get("EquipWin_EquipPointText_1");
- equipScoreValue.text = itemAttrData.score.ToString();
- container_FightPower.SetActive(itemTipsModel.IsPeerlessEquip(itemAttrData.itemId));
- fightPowerText.text = itemTipsModel.GetEquipFightPower(itemAttrData.score).ToString();
- CheckUselimit();
- RefreshRemainTime(itemAttrData.guid);
- #endregion
-
- #region 璁剧疆MidUI
- SetBasicAttrUI();
- SetExhaustedAttrUI();
- SetLegendAttrUI();
- SetWashAttrUI();
- SetGemAttrUI();
- for (int i = 0; i < attrCutLinelist.Count; i++)
- {
- if (i == curAttrTypeNum - 1)
- {
- attrCutLinelist[curAttrTypeNum - 1].SetActive(false);
- }
- else
- {
- attrCutLinelist[i].SetActive(true);
- }
- }
- #endregion
-
- #region 璁剧疆鍔熻兘鎸夐挳
- operateBtn.SetActive(false);
-
- if (itemAttrData.isCompare)
- {
- if(itemAttrData.packType != PackType.Equip)
- {
- CreateFuncBtn();
- }
- }
- else
- {
- CreateFuncBtn();
- }
- #endregion
- }
-
- private void OnDisable()
- {
- KnapsackTimeCDMgr.Instance.RefreshItemOverdueTimeAct -= RefreshRemainTime;
- }
-
- private void CheckUselimit()
- {
- int[] uselimits = itemAttrData.itemConfig.UseCondiType;
- if (uselimits == null) return;
-
- needLvValue.gameObject.SetActive(false);
- needLvDes.gameObject.SetActive(false);
- realmTitleText.gameObject.SetActive(false);
- realmImg.gameObject.SetActive(false);
- for (int i = 0; i < needPointTextlist.Count; i++)
- {
- needPointTextlist[i].gameObject.SetActive(false);
- needPointNumlist[i].gameObject.SetActive(false);
- }
- for (int i = 0; i < uselimits.Length; i++)
- {
- switch (uselimits[i])
- {
- case 0:
- if (itemAttrData.itemConfig.UseLV > 1)
- {
- needLvValue.gameObject.SetActive(true);
- needLvDes.gameObject.SetActive(true);
- }
- needLvDes.text = Language.Get("KnapS110");
- if (itemAttrData.isHavePutLimit)
- {
- needLvValue.text = itemAttrData.itemConfig.UseLV.ToString();
- if (PlayerDatas.Instance.baseData.LV >= itemAttrData.itemConfig.UseLV)
- {
- needLvValue.color = conditionColor;
- needLvDes.color = conditionColor;
- }
- else
- {
- needLvValue.color = UIHelper.GetUIColor(TextColType.Red);
- needLvDes.color = UIHelper.GetUIColor(TextColType.Red);
- }
- }
- else
- {
- needLvValue.text = 1.ToString();
- needLvDes.color = conditionColor;
- needLvValue.color = conditionColor;
- }
-
- break;
- case 1:
- if(itemAttrData.isHavePutLimit)
- {
- realmTitleText.gameObject.SetActive(true);
- realmImg.gameObject.SetActive(true);
- realmTitleText.text = Language.Get("RealmLimit1");
- RealmConfig realmConfig = RealmConfig.Get(itemAttrData.itemConfig.RealmLimit);
- if (itemAttrData.itemConfig.RealmLimit <= 0)
- {
- realmImg.SetSprite("NoRealm");
- }
- else
- {
- if (realmConfig != null)
- {
- realmImg.SetSprite(realmConfig.Img);
- }
- }
- realmImg.SetNativeSize();
- if (PlayerDatas.Instance.baseData.realmLevel >= itemAttrData.itemConfig.RealmLimit)
- {
- realmTitleText.color = conditionColor;
- }
- else
- {
- realmTitleText.color = UIHelper.GetUIColor(TextColType.Red);
- }
- }
-
- break;
- case 2:
- RefreshNeedPointUI();
- break;
- }
- }
-
- }
-
- private void RefreshRemainTime(string guid)
- {
- if (guid != itemAttrData.guid)
- {
- DebugEx.Log("鍒锋柊锛�" + guid + "褰撳墠锛�" + itemAttrData.guid);
- return;
- }
-
- double remainTime = 0;
- bool isRemain = itemAttrData.TryGetItemRemainTime(out remainTime);
- dateText.gameObject.SetActive(isRemain);
- if (isRemain)
- {
- SetDateLimitUI(remainTime);
- }
- }
-
- private void SetDateLimitUI(double time)
- {
- dateText.gameObject.SetActive(true);
- TimeSpan t = TimeSpan.FromSeconds(time);
- if (t.TotalDays > 1)
- {
- dateText.text = Language.Get("EquipInfo_OverdueDay", (int)t.TotalDays);
- }
- else if (t.TotalHours > 1)
- {
- dateText.text = Language.Get("EquipInfo_OverdueHour", (int)t.TotalHours);
- }
- else if (t.TotalMinutes > 1)
- {
- dateText.text = Language.Get("EquipInfo_OverdueMin", (int)t.TotalMinutes);
- }
- else if (t.TotalMinutes > 0)
- {
- dateText.text = Language.Get("EquipInfo_OverdueMin", 1);
- }
- else if (t.TotalSeconds <= 0)
- {
- dateText.text = Language.Get("EquipInfo_Overdued");
- }
- }
-
- private void RefreshNeedPointUI()
- {
- needPointDict.Clear();
- if (itemAttrData.itemConfig.LimitSTR > 0)
- {
- needPointDict.Add(AttrEnum.POWER, itemAttrData.itemConfig.LimitSTR);
- }
-
- if (itemAttrData.itemConfig.LimitPHY > 0)
- {
- needPointDict.Add(AttrEnum.AGILITY, itemAttrData.itemConfig.LimitPHY);
- }
-
- if (itemAttrData.itemConfig.LimitPNE > 0)
- {
- needPointDict.Add(AttrEnum.MENTALITY, itemAttrData.itemConfig.LimitPNE);
- }
-
- List<AttrEnum> needlist = needPointDict.Keys.ToList();
-
- int i = 0;
- float offset = 0;
- for (i = 0; i < needPointTextlist.Count; i++)
- {
- if (i < needlist.Count)
- {
- needPointTextlist[i].gameObject.SetActive(true);
- needPointNumlist[i].gameObject.SetActive(true);
- offset = needPointDict[needlist[i]] - UIHelper.GetPropertyMapPlayerData(needlist[i]);
- switch (needlist[i])
- {
- case AttrEnum.POWER:
- if (itemAttrData.isHavePutLimit)
- {
- SetNeedPointUI(needPointDict[needlist[i]], offset, needPointTextlist[i], needPointNumlist[i], Language.Get("KnapS113"));
- }
- else
- {
- SetNeedPointUI(1, 0, needPointTextlist[i], needPointNumlist[i], Language.Get("KnapS113"));
- }
- break;
- case AttrEnum.AGILITY:
- if (itemAttrData.isHavePutLimit)
- {
- SetNeedPointUI(needPointDict[needlist[i]], offset, needPointTextlist[i], needPointNumlist[i], Language.Get("KnapS112"));
- }
- else
- {
- SetNeedPointUI(1, 0, needPointTextlist[i], needPointNumlist[i], Language.Get("KnapS112"));
- }
-
- break;
- case AttrEnum.MENTALITY:
- if (itemAttrData.isHavePutLimit)
- {
- SetNeedPointUI(needPointDict[needlist[i]], offset, needPointTextlist[i], needPointNumlist[i], Language.Get("KnapS111"));
- }
- else
- {
- SetNeedPointUI(1, 0, needPointTextlist[i], needPointNumlist[i], Language.Get("KnapS111"));
- }
- break;
- }
-
- }
- else
- {
- needPointTextlist[i].gameObject.SetActive(false);
- needPointNumlist[i].gameObject.SetActive(false);
- }
- }
-
- }
-
- private void SetNeedPointUI(float needPoint, float offset, Text needPoinText, Text needPoinNum, string msg)
- {
- if (offset > 0)
- {
- needPoinNum.text = UIHelper.AppendColor(TextColType.Red, StringUtility.Contact(needPoint, Language.Get("KnapS118", offset)));
- needPoinText.text = UIHelper.AppendColor(TextColType.Red, msg);
- }
- else
- {
- needPoinNum.color = conditionColor;
- needPoinText.color = conditionColor;
- needPoinNum.text = needPoint.ToString();
- needPoinText.text = msg;
-
- }
- }
-
- #region 璁剧疆灞炴�I
- private void SetBasicAttrUI()
- {
- curAttrTypeNum = 1;
- basicAttr.SetActive(true);
- basicTitleText.text = Language.Get("RolePanel_BaseAttrText_1");
- basicAttrDes.text = itemTipsModel.GetBasicAttr(itemAttrData);
- }
-
- private void SetExhaustedAttrUI()
- {
- if(itemAttrData.exhaustedMaxDataDict == null)
- {
- exhaustedAttr.SetActive(false);
- return;
- }
- curAttrTypeNum = 2;
- exhaustedAttr.SetActive(true);
- exhaustedTitleText.text = Language.Get("EquipWin_ExtinctPropObj_Text_1");
- exhaustedAttrDes.text = itemTipsModel.GetExhaustedAtrr(itemAttrData);
- }
-
- private void SetLegendAttrUI()
- {
- if(itemAttrData.legendDataDict == null)
- {
- legendAttr.SetActive(false);
- return;
- }
- curAttrTypeNum = 3;
- legendAttr.SetActive(true);
- legendTitleText.text = Language.Get("EquipWin_LegendPropObj_Text_1");
- legendAttrDes.text = itemTipsModel.GetLegendAttr(itemAttrData);
-
- if (itemAttrData.isPreview)
- {
- legendCntPreview.gameObject.SetActive(true);
- legendCntPreview.text = itemTipsModel.GetEquipLegendAttrCntPreview(itemAttrData);
- }
- else
- {
- legendCntPreview.gameObject.SetActive(false);
- }
- }
-
- private void SetWashAttrUI()
- {
- if(itemAttrData.washDataDict == null)
- {
- washAttr.SetActive(false);
- return;
- }
- curAttrTypeNum = 4;
- washAttr.SetActive(true);
- washTitleText.text = Language.Get("EquipWin_WashPropObj_Text_1");
- washAttrDes.text = itemTipsModel.GetWashAttr(itemAttrData);
- }
-
- private void SetGemAttrUI()
- {
- var packType = GeneralDefine.GetPackTypeByItemType(itemAttrData.itemConfig.Type);
- int[] gemOpenLvs = packType == PackType.JadeDynastyItem ? itemTipsModel.jadeDynastyGemOpenLvs : itemTipsModel.gemOpenLvs;
-
- if (itemAttrData.itemConfig.LV < gemOpenLvs[0])
- {
- gemAttr.SetActive(false);
- return;
- }
- curAttrTypeNum = 5;
- gemAttr.SetActive(true);
- gemTitleText.text = Language.Get("EquipWin_GemPropObj_Text_1");
- int cnt = 0;
- int vipCnt = 0;
- if (itemAttrData.itemConfig.LV >= gemOpenLvs[0])
- {
- cnt++;
- }
-
- if (itemAttrData.itemConfig.LV >= gemOpenLvs[1])
- {
- cnt++;
- }
-
- if (itemAttrData.itemConfig.LV >= gemOpenLvs[2])
- {
- cnt++;
- }
-
- if (PlayerDatas.Instance.baseData.VIPLv >= itemTipsModel.gemOpenVipLv)
- {
- vipCnt++;
- }
-
- int i = 0;
- for (i = 0; i < gemObjlist.Count; i++)
- {
- int stoneId = 0;
- if (itemAttrData.stones != null)
- {
- if(i < itemAttrData.stones.Length)
- {
- stoneId = (int)itemAttrData.stones[i];
- }
- }
-
- if(i < gemObjlist.Count - 1)
- {
- if (i < cnt)
- {
- gemObjlist[i].gameObject.SetActive(true);
- gemObjlist[i].InitModel(stoneId, i, itemAttrData.itemConfig.EquipPlace, false);
- }
- else
- {
- gemObjlist[i].InitModel(stoneId, i, itemAttrData.itemConfig.EquipPlace, true);
- gemObjlist[i].gameObject.SetActive(false);
- }
-
- }
- else
- {
- if (vipCnt != 0)
- {
- gemObjlist[i].InitModel(stoneId, i, itemAttrData.itemConfig.EquipPlace, false);
- }
- else
- {
- gemObjlist[i].InitModel(stoneId, i, itemAttrData.itemConfig.EquipPlace,true);
- }
- }
- }
- }
-
- private void SetMidUIHeight(float midHeight)
- {
- scrollRect.enabled = false;
-
- if (midHeight < itemTipsModel.equipMidHeights[0])
- {
- scrollLayout.preferredHeight = itemTipsModel.equipMidHeights[0];
- }
- else if (midHeight > itemTipsModel.equipMidHeights[1])
- {
- scrollRect.enabled = true;
- scrollLayout.preferredHeight = itemTipsModel.equipMidHeights[1];
- }
- else
- {
- scrollLayout.preferredHeight = midHeight;
- }
- }
- #endregion
-
- private void SetBottomUI()
- {
- SetBottomText(equipSource);
- switch (itemAttrData.ChildType)
- {
- case ItemTipChildType.UnionWarehouseDonation:
- nameText.text = Language.Get("Z1801");
- break;
- case ItemTipChildType.UnionWarehouseExchange:
- nameText.text = Language.Get("Z1080");
- break;
- }
- valueText.text = itemAttrData.unionWarehouseScore.ToString();
-
- }
-
- private void SetBottomText(EquipSource source)
- {
- source.jobTitleText.text = Language.Get("EquipWin_JobTitleText_1");
- source.jobText.text = itemTipsModel.GetEquipJobName(itemAttrData);
- source.partTitleText.text = Language.Get("EquipWin_PartTitleText_1");
- source.partText.text = StringUtility.Contact(FuncConfigConfig.GetEquipTipsAreaName(itemAttrData.itemConfig.EquipPlace) + itemAttrData.itemConfig.LV,Language.Get("L1047"));
- }
-
- private void CreateFuncBtn()
- {
- btnGroup.anchoredPosition3D = Vector3.zero;
- if (itemAttrData.tipsFuncBtnDic.Count > 0)
- {
- foreach (ItemOperateType key in itemAttrData.tipsFuncBtnDic.Keys)
- {
- Button btn = OnGUIButton(btnGroup.gameObject, operateBtn, key.ToString(), Language.Get(StringUtility.Contact("ItemHandle_", key.ToString())));
- btn.RemoveAllListeners();
- btn.onClick.AddListener(() => {
- OnClickCloseBtn();
- itemAttrData.tipsFuncBtnDic[key](key,"");
-
- });
- }
- }
- }
-
- private Button OnGUIButton(GameObject parent, GameObject sourceBtn, string btnName, string textName)
- {
- GameObject go = Instantiate(sourceBtn);
- go.name = btnName;
- go.transform.SetParent(parent.transform);
- go.transform.Find("BtnText").GetComponent<Text>().text = textName;
- go.transform.localPosition = Vector3.zero;
- go.transform.localScale = Vector3.one;
- Button btn = go.GetComponent<Button>();
- go.SetActive(true);
- KnapSackEventMgr.Instance.SetEquipWinTempObj(go);
- return btn;
- }
-
- private void OnClickCloseBtn()
- {
- closeBtn.onClick.RemoveAllListeners();
- KnapSackEventMgr.Instance.HideItemPopWin();
- }
-
- }
-}
-
-
diff --git a/System/KnapSack/Logic/UnionWarehouseEquipTip.cs.meta b/System/KnapSack/Logic/UnionWarehouseEquipTip.cs.meta
deleted file mode 100644
index e0c281e..0000000
--- a/System/KnapSack/Logic/UnionWarehouseEquipTip.cs.meta
+++ /dev/null
@@ -1,12 +0,0 @@
-fileFormatVersion: 2
-guid: 583a486e8d5755c4bb82e11cdce22b63
-timeCreated: 1515747398
-licenseType: Pro
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/System/KnapSack/New/BagWin.cs b/System/KnapSack/New/BagWin.cs
index bc6e460..e34c84c 100644
--- a/System/KnapSack/New/BagWin.cs
+++ b/System/KnapSack/New/BagWin.cs
@@ -279,7 +279,7 @@
{
gridCell.itemCellBtn.OnOneParaClick = (int info) =>
{
- if (itemModel.itemInfo.isBind== 1)
+ if (itemModel.itemInfo.isAuction== 1)
{
AuctionHelpModel auctionHelpModel = ModelCenter.Instance.GetModel<AuctionHelpModel>();
auctionHelpModel.ItemModel = itemModel;
diff --git a/System/KnapSack/New/CommonItemBaisc.cs b/System/KnapSack/New/CommonItemBaisc.cs
index af9ce34..0d511c9 100644
--- a/System/KnapSack/New/CommonItemBaisc.cs
+++ b/System/KnapSack/New/CommonItemBaisc.cs
@@ -6,84 +6,69 @@
{
public class CommonItemBaisc : MonoBehaviour
{
- Image _bgIcon;
+ Image m_BgIcon;
public Image bgIcon {
get {
- if (_bgIcon == null)
+ if (m_BgIcon == null)
{
- var _trans = transform.Find("EquipBG");
- _bgIcon = _trans != null ? _trans.GetComponent<Image>() : null;
+ m_BgIcon = this.transform.GetComponent<Image>("EquipBG");
}
- return _bgIcon;
+ return m_BgIcon;
}
}
- Image _itemIcon;
+ Image m_ItemIcon;
public Image itemIcon {
get {
- if (_itemIcon == null)
+ if (m_ItemIcon == null)
{
- var _trans = transform.Find("ItemIcon");
- _itemIcon = _trans != null ? _trans.GetComponent<Image>() : null;
+ m_ItemIcon = this.transform.GetComponent<Image>("ItemIcon");
}
- return _itemIcon;
+ return m_ItemIcon;
}
}
- Image _bindIcon;
- public Image bindIcon {
+ Image m_AuctionIcon;
+ public Image auctionIcon {
get {
- if (_bindIcon == null)
+ if (m_AuctionIcon == null)
{
- var _trans = transform.Find("BindBG");
- _bindIcon = _trans != null ? _trans.GetComponent<Image>() : null;
+ m_AuctionIcon = this.transform.GetComponent<Image>("BindBG");
}
- return _bindIcon;
+ return m_AuctionIcon;
}
}
- Image _stateIcon;
+ Image m_StateIcon;
public Image stateIcon {
get {
- if (_stateIcon == null)
+ if (m_StateIcon == null)
{
- var _trans = transform.Find("stateIcon");
- _stateIcon = _trans != null ? _trans.GetComponent<Image>() : null;
+ m_StateIcon = this.transform.GetComponent<Image>("stateIcon");
}
- return _stateIcon;
+ return m_StateIcon;
}
}
- Text _countText;
+ Text m_CountText;
public Text countText {
get {
- if (_countText == null)
+ if (m_CountText == null)
{
- var _trans = transform.Find("CountText");
- _countText = _trans != null ? _trans.GetComponent<Text>() : null;
+ m_CountText = this.transform.GetComponent<Text>("CountText");
}
- return _countText;
+ return m_CountText;
}
}
- GameObject _starlist;
- public GameObject starlist {
+ Button m_Button;
+ public Button button {
get {
- if (_starlist == null)
+ if (m_Button == null)
{
- var _trans = transform.Find("StarList");
- _starlist = _trans != null ? _trans.gameObject : null;
+ m_Button = this.GetComponent<Button>();
}
- return _starlist;
- }
- }
-
- Button _cellBtn;
- public Button cellBtn {
- get {
- if (_cellBtn == null)
- _cellBtn = this.GetComponent<Button>();
- return _cellBtn;
+ return m_Button;
}
}
@@ -100,7 +85,7 @@
public virtual void Init(ItemModel model, bool isCompare = false, int compareScore = 0)
{
itemConfig = model.config;
- InitUI(model.guid, model.itemId, (ulong)model.count, model.equipScore, model.isBind, model.packType, isCompare, model.useDataDict, compareScore);
+ InitUI(model.guid, model.itemId, (ulong)model.count, model.equipScore, model.isAuction, model.packType, isCompare, model.useDataDict, compareScore);
}
/// <summary>
@@ -110,10 +95,10 @@
public virtual void Init(ItemCellModel model, int compareScore = 0)
{
itemConfig = model.itemConfig;
- InitUI(model.guid, model.itemId, model.count, model.score, 0, model.packType, model.isCompare, model.useDataDic, compareScore);
+ InitUI(model.guid, model.itemId, model.count, model.score, false, model.packType, model.isCompare, model.useDataDic, compareScore);
}
- private void InitUI(string guid, int itemId, ulong count, int score, int bind, PackType type, bool isCompare, Dictionary<int, List<int>> useDataDic, int compareScore = 0)
+ private void InitUI(string guid, int itemId, ulong count, int score, bool isAuction, PackType type, bool isCompare, Dictionary<int, List<int>> useDataDic, int compareScore = 0)
{
if (itemConfig == null) return;
@@ -122,24 +107,12 @@
itemIcon.SetSprite(itemConfig.IconKey);
bgIcon.SetItemBackGround(ItemLogicUtility.Instance.GetItemQuality(itemId, useDataDic));
- int i = 0;
- for (i = 0; i < starlist.transform.childCount; i++)
- {
- Image starIcon = starlist.transform.GetChild(i).GetComponent<Image>();
- starIcon.SetSprite("Stars_a");
- starIcon.gameObject.SetActive(false);
- }
+ auctionIcon.gameObject.SetActive(isAuction);
- bindIcon.gameObject.SetActive(bind == 1);
-
- countText.text = UIHelper.ReplaceLargeNum((double)count);
+ countText.gameObject.SetActive(count > 1);
if (count > 1)
{
- countText.gameObject.SetActive(true);
- }
- else
- {
- countText.gameObject.SetActive(false);
+ countText.text = UIHelper.ReplaceLargeNum((double)count);
}
int compareReslut = Compare(type, itemId, score, isCompare, compareScore, guid);
@@ -263,40 +236,58 @@
public ulong count { get; private set; }
public int score { get; private set; }
public bool isCompare { get; private set; }
- public ItemConfig itemConfig { get; private set; }
+ public ItemConfig itemConfig { get { return ItemConfig.Get(itemId); } }
public PackType packType { get; private set; }
public Dictionary<int, List<int>> useDataDic { get; private set; }
- public Dictionary<int, int> specAttrDic { get; private set; }
-
public ItemCellModel(int itemId, bool isPreview = false, ulong count = 0, string guid = "", PackType type = PackType.Deleted, bool isCompare = false, Dictionary<int, List<int>> useDataDic = null)
{
- specAttrDic = new Dictionary<int, int>();
+ this.itemId = AdjustItemId(itemId);
this.guid = guid;
- this.itemId = itemId;
this.count = count;
- this.itemConfig = ItemConfig.Get(itemId);
this.isCompare = isCompare;
this.useDataDic = useDataDic;
this.packType = type;
- if (CheckIsCustomItem())
- {
- this.itemId = itemConfig.EffectValueA1;
- this.itemConfig = ItemConfig.Get(this.itemId);
- }
+
this.score = ItemLogicUtility.Instance.GetEquipScore(type, itemId, useDataDic, isPreview);
}
- public bool CheckIsCustomItem()
+ public ItemCellModel(int itemId)
{
- if (itemConfig == null) return false;
-
- if (itemConfig.Effect1 == 220)
- {
- return true;
- }
- return false;
+ this.itemId = AdjustItemId(itemId);
+ this.guid = "";
+ this.count = 0;
+ this.isCompare = false;
+ this.useDataDic = null;
+ this.packType = PackType.Deleted;
+ this.score = 0;
}
+
+ public ItemCellModel(int itemId, bool isPreview, ulong count)
+ {
+ this.itemId = AdjustItemId(itemId);
+ this.guid = "";
+ this.count = count;
+ this.isCompare = false;
+ this.useDataDic = null;
+ this.packType = PackType.Deleted;
+
+ this.score = ItemLogicUtility.Instance.GetEquipScore(PackType.Deleted, itemId, null, isPreview);
+ }
+
+ int AdjustItemId(int itemId)
+ {
+ var config = ItemConfig.Get(itemId);
+ if (config != null && config.Effect1 == 220)
+ {
+ return config.EffectValueA1;
+ }
+ else
+ {
+ return itemId;
+ }
+ }
+
}
diff --git a/System/KnapSack/New/EquipPlaceCell.cs b/System/KnapSack/New/EquipPlaceCell.cs
index a05a9f4..af9542f 100644
--- a/System/KnapSack/New/EquipPlaceCell.cs
+++ b/System/KnapSack/New/EquipPlaceCell.cs
@@ -36,7 +36,7 @@
m_AddEquip.gameObject.SetActive(false);
m_ItemCell.gameObject.SetActive(true);
m_ItemCell.Init(item);
- m_ItemCell.cellBtn.SetListener(ShowEquipTip);
+ m_ItemCell.button.SetListener(ShowEquipTip);
}
}
diff --git a/System/KnapSack/New/EquipWin.cs b/System/KnapSack/New/EquipWin.cs
index 10b2f98..0dacdf0 100644
--- a/System/KnapSack/New/EquipWin.cs
+++ b/System/KnapSack/New/EquipWin.cs
@@ -19,8 +19,6 @@
EquipTip equipTip;
[SerializeField]
BuyEquipTip buyTip;
- [SerializeField]
- UnionWarehouseEquipTip unionTip;
[SerializeField] GetEquipPathTips getEquipPathTip;
[SerializeField]
CanvasGroup equipTipAlpha;
@@ -78,7 +76,6 @@
}
equipTip.gameObject.SetActive(false);
buyTip.gameObject.SetActive(false);
- unionTip.gameObject.SetActive(false);
getEquipPathTip.gameObject.SetActive(false);
TempCreatelist.Clear();
}
@@ -103,14 +100,6 @@
case ItemTipChildType.Buy:
buyTip.InitModel(itemTipsModel.curAttrData);
buyTip.gameObject.SetActive(true);
- break;
- case ItemTipChildType.UnionWarehouseDonation:
- unionTip.InitModel(itemTipsModel.curAttrData);
- unionTip.gameObject.SetActive(true);
- break;
- case ItemTipChildType.UnionWarehouseExchange:
- unionTip.InitModel(itemTipsModel.curAttrData);
- unionTip.gameObject.SetActive(true);
break;
case ItemTipChildType.GetEquipPath:
getEquipPathTip.InitModel(itemTipsModel.curAttrData);
@@ -139,18 +128,6 @@
buyTip.InitModel(itemTipsModel.curAttrData);
equipTip.InitModel(itemTipsModel.compareAttrData);
buyTip.gameObject.SetActive(true);
- equipTip.gameObject.SetActive(true);
- break;
- case ItemTipChildType.UnionWarehouseDonation:
- unionTip.InitModel(itemTipsModel.curAttrData);
- equipTip.InitModel(itemTipsModel.compareAttrData);
- unionTip.gameObject.SetActive(true);
- equipTip.gameObject.SetActive(true);
- break;
- case ItemTipChildType.UnionWarehouseExchange:
- unionTip.InitModel(itemTipsModel.curAttrData);
- equipTip.InitModel(itemTipsModel.compareAttrData);
- unionTip.gameObject.SetActive(true);
equipTip.gameObject.SetActive(true);
break;
case ItemTipChildType.GetEquipPath:
diff --git a/System/KnapSack/New/ExtendWin.cs b/System/KnapSack/New/ExtendWin.cs
index e53a880..d14b2f1 100644
--- a/System/KnapSack/New/ExtendWin.cs
+++ b/System/KnapSack/New/ExtendWin.cs
@@ -97,8 +97,8 @@
//pdr ToDo
ItemCellModel cellModel = new ItemCellModel(_chinItemModel.ID);
_itemCell.Init(cellModel);
- _itemCell.cellBtn.RemoveAllListeners();
- _itemCell.cellBtn.onClick.AddListener(()=>
+ _itemCell.button.RemoveAllListeners();
+ _itemCell.button.onClick.AddListener(()=>
{
ItemAttrData attrData = new ItemAttrData(_chinItemModel.ID);
itemTipsModel.SetItemTipsModel(attrData);
diff --git a/System/KnapSack/New/ItemCell.cs b/System/KnapSack/New/ItemCell.cs
index bf9aab8..5a31058 100644
--- a/System/KnapSack/New/ItemCell.cs
+++ b/System/KnapSack/New/ItemCell.cs
@@ -9,29 +9,26 @@
{
public class ItemCell : CommonItemBaisc
{
- private Button _reducebtn;
- public Button reducebtn
- {
- get
- {
- if (_reducebtn == null)
+ private Button m_Reducebtn;
+ public Button reducebtn {
+ get {
+ if (m_Reducebtn == null)
{
- var _trans = transform.Find("Reducebtn");
- _reducebtn = _trans != null ? _trans.GetComponent<Button>() : null;
+ m_Reducebtn = this.transform.GetComponent<Button>("Reducebtn");
}
- return _reducebtn;
+ return m_Reducebtn;
}
}
- public override void Init(ItemModel model,bool isCompare = false, int compareScore = 0)
+ public override void Init(ItemModel model, bool isCompare = false, int compareScore = 0)
{
- base.Init(model, isCompare,compareScore);
+ base.Init(model, isCompare, compareScore);
reducebtn.gameObject.SetActive(false);
}
public override void Init(ItemCellModel model, int compareScore = 0)
{
- base.Init(model,compareScore);
+ base.Init(model, compareScore);
reducebtn.gameObject.SetActive(false);
}
}
diff --git a/System/KnapSack/New/KingTreasureShowModel.cs b/System/KnapSack/New/KingTreasureShowModel.cs
index 32ef27c..dbb00af 100644
--- a/System/KnapSack/New/KingTreasureShowModel.cs
+++ b/System/KnapSack/New/KingTreasureShowModel.cs
@@ -63,7 +63,7 @@
var propertyConfig = PlayerPropertyConfig.Get(key);
if (propertyConfig != null)
{
- string attrDes = StringUtility.Contact(propertyConfig.Name, "+", GetProValueTypeStr(propertyConfig, attrValue));
+ string attrDes = StringUtility.Contact(propertyConfig.Name, "+", PlayerPropertyConfig.GetPropertyDescription(key, attrValue));
switch(propertyConfig.type)
{
case 2:
@@ -85,22 +85,5 @@
}
}
- private string GetProValueTypeStr(PlayerPropertyConfig playerproModel, int value)
- {
- string s = "";
- if (playerproModel.ISPercentage == 0)
- {
- s = value.ToString();
- }
- else if (playerproModel.ISPercentage == 1)
- {
- s = (float)Math.Round(value / 100f, 1) + "%";
- }
- else if (playerproModel.ISPercentage == 2)
- {
- s = ((float)Math.Round(value / 100f, 1)).ToString();
- }
- return s;
- }
}
}
diff --git a/System/KnapSack/New/OneKeySellWin.cs b/System/KnapSack/New/OneKeySellWin.cs
index a8c147b..a73c7ad 100644
--- a/System/KnapSack/New/OneKeySellWin.cs
+++ b/System/KnapSack/New/OneKeySellWin.cs
@@ -138,8 +138,8 @@
itemCell.gameObject.SetActive(true);
ItemModel itemModel = _oneKeySelllist[cellCount - 1];
itemCell.Init(itemModel,true);
- itemCell.cellBtn.onClick.RemoveAllListeners();
- itemCell.cellBtn.onClick.AddListener(()=> { OnSingleClickItemCell(itemModel,itemCell.gameObject); });
+ itemCell.button.onClick.RemoveAllListeners();
+ itemCell.button.onClick.AddListener(()=> { OnSingleClickItemCell(itemModel,itemCell.gameObject); });
}
}
diff --git a/System/KnapSack/New/RoleEquipStarTips.cs b/System/KnapSack/New/RoleEquipStarTips.cs
index 06b0b45..0e95173 100644
--- a/System/KnapSack/New/RoleEquipStarTips.cs
+++ b/System/KnapSack/New/RoleEquipStarTips.cs
@@ -35,8 +35,7 @@
private List<RoleEquipStarsConfig> _tagEquipStarsModellist;
PackModel _playerPack;
- PackModel playerPack
- {
+ PackModel playerPack {
get { return _playerPack ?? (_playerPack = ModelCenter.Instance.GetModel<PackModel>()); }
}
@@ -103,7 +102,7 @@
_playerProModel = PlayerPropertyConfig.Get(_tagEquipStarsModel.attType[i]);
if (_playerProModel != null)
{
- attrStr.Append(SetIsPercentShow(_playerProModel, _tagEquipStarsModel.attValue[i]) + "\n");
+ attrStr.Append(GetValueDescription(_playerProModel, _tagEquipStarsModel.attValue[i]) + "\n");
}
}
@@ -129,7 +128,7 @@
_playerProModel = PlayerPropertyConfig.Get(_tagEquipStarsModel.attType[i]);
if (_playerProModel != null)
{
- attrStr.Append(SetIsPercentShow(_playerProModel, _tagEquipStarsModel.attValue[i]) + "\n");
+ attrStr.Append(GetValueDescription(_playerProModel, _tagEquipStarsModel.attValue[i]) + "\n");
}
}
@@ -228,36 +227,20 @@
}
-
- //鍒ゆ柇灞炴�ф槸鍚︾櫨鍒嗘瘮鏄剧ず
- public string SetIsPercentShow(PlayerPropertyConfig _playerProModel, int proValue)
+ string GetValueDescription(PlayerPropertyConfig _playerProModel, int proValue)
{
-
- string strPro = "";
+ string description = "";
+ var valueDescription = PlayerPropertyConfig.GetPropertyDescription(_playerProModel.ID, proValue);
if (!_playerProModel.Name.Contains("%s"))
{
- if (_playerProModel.ISPercentage == 0)
- {
- strPro = _playerProModel.Name + "+" + proValue;
- }
- else if (_playerProModel.ISPercentage == 1)
- {
- strPro = _playerProModel.Name + "+" + (float)Math.Round(proValue / 100f, 1) + "%";
- }
+ description = _playerProModel.Name + "<color=#109D06FF>" + " +" + valueDescription + "</color>";
}
else
{
- if (_playerProModel.ISPercentage == 0)
- {
- strPro = _playerProModel.Name.Replace("%s", proValue.ToString());
- }
- else if (_playerProModel.ISPercentage == 1)
- {
- strPro = _playerProModel.Name.Replace("%s", (float)Math.Round(proValue / 100f, 1) + "%");
- }
+ description = _playerProModel.Name.Replace("%s", valueDescription);
}
- return strPro;
+ return description;
}
}
\ No newline at end of file
diff --git a/System/KnapSack/New/RoleEquipStrengthTips.cs b/System/KnapSack/New/RoleEquipStrengthTips.cs
index db8ff3f..71cbb2a 100644
--- a/System/KnapSack/New/RoleEquipStrengthTips.cs
+++ b/System/KnapSack/New/RoleEquipStrengthTips.cs
@@ -8,7 +8,7 @@
using Snxxz.UI;
using System.Collections;
-public class RoleEquipStrengthTips : MonoBehaviour
+public class RoleEquipStrengthTips : MonoBehaviour
{
#region 鎴愬憳鍙橀噺
[SerializeField]
@@ -39,13 +39,11 @@
_nextStrengthText = transform.Find("NextStrength/TargetNextText").GetComponent<Text>();
_nextAttrValueText = transform.Find("NextStrength/ActNextText").GetComponent<Text>();
_noOpenText = transform.Find("CurrentStrength/NoOpenText").GetComponent<Text>();
-
+
}
StrengthenModel m_StrengthengModel;
- StrengthenModel strengthengmodel
- {
- get
- {
+ StrengthenModel strengthengmodel {
+ get {
return m_StrengthengModel ?? (m_StrengthengModel = ModelCenter.Instance.GetModel<StrengthenModel>());
}
}
@@ -65,15 +63,15 @@
if (_roleStrengthInfoDict.Count < 2)
return;
List<int> strengthLvs = _roleStrengthInfoDict.Keys.ToList();
- _curStrengthText.text = Language.Get("KnapS121").Replace("{0}",strengthLvs[0].ToString());
+ _curStrengthText.text = Language.Get("KnapS121").Replace("{0}", strengthLvs[0].ToString());
StringBuilder curAttrStr = new StringBuilder();
RectTransform size = _haveStrengthText.GetComponent<RectTransform>();
foreach (int pro in _roleStrengthInfoDict[strengthLvs[0]].Keys)
{
- curAttrStr.Append(SetIsPercentShow(pro, _roleStrengthInfoDict[strengthLvs[0]][pro]) + "\n");
+ curAttrStr.Append(GetValueDescription(pro, _roleStrengthInfoDict[strengthLvs[0]][pro]) + "\n");
}
-
- if(curAttrStr.Length < 1)
+
+ if (curAttrStr.Length < 1)
{
_noOpenText.gameObject.SetActive(true);
_curStrengthText.gameObject.SetActive(false);
@@ -89,17 +87,17 @@
StringBuilder nextAttrStr = new StringBuilder();
foreach (int pro in _roleStrengthInfoDict[strengthLvs[1]].Keys)
{
- nextAttrStr.Append(SetIsPercentShow(pro, _roleStrengthInfoDict[strengthLvs[1]][pro]) + "\n");
+ nextAttrStr.Append(GetValueDescription(pro, _roleStrengthInfoDict[strengthLvs[1]][pro]) + "\n");
}
_nextStrengthText.text = Language.Get("KnapS121").Replace("{0}", _roleStrengthInfoDict.Keys.ToList()[1].ToString());
_nextAttrValueText.text = nextAttrStr.ToString();
_curStrengthLv = 0;
- foreach(var value in _haveStrengthInfoDict.Values)
+ foreach (var value in _haveStrengthInfoDict.Values)
{
_curStrengthLv += value.EquipPartStarLV;
}
- _haveStrengthText.text = Language.Get("KnapS122").Replace("{0}",_curStrengthLv.ToString());
+ _haveStrengthText.text = Language.Get("KnapS122").Replace("{0}", _curStrengthLv.ToString());
}
@@ -125,7 +123,7 @@
}
//鍒ゆ柇灞炴�ф槸鍚︾櫨鍒嗘瘮鏄剧ず
- public string SetIsPercentShow(int proId, int proValue)
+ string GetValueDescription(int proId, int proValue)
{
_playerProModel = PlayerPropertyConfig.Get(proId);
string strPro = "";
@@ -135,27 +133,14 @@
return "";
}
+ var valueDescription = PlayerPropertyConfig.GetPropertyDescription(_playerProModel.ID, proValue);
if (!_playerProModel.Name.Contains("%s"))
{
- if (_playerProModel.ISPercentage == 0)
- {
- strPro = _playerProModel.Name + "+" + proValue;
- }
- else if (_playerProModel.ISPercentage == 1)
- {
- strPro = _playerProModel.Name + "+" + (float)Math.Round(proValue / 100f, 1) + "%";
- }
+ strPro = _playerProModel.Name + "<color=#109D06FF>" + " +" + valueDescription + "</color>";
}
else
{
- if (_playerProModel.ISPercentage == 0)
- {
- strPro = _playerProModel.Name.Replace("%s", proValue.ToString());
- }
- else if (_playerProModel.ISPercentage == 1)
- {
- strPro = _playerProModel.Name.Replace("%s", (float)Math.Round(proValue / 100f, 1) + "%");
- }
+ strPro = _playerProModel.Name.Replace("%s", valueDescription);
}
return strPro;
diff --git a/System/KnapSack/New/RoleEquipWin.cs b/System/KnapSack/New/RoleEquipWin.cs
index 12788ca..f482714 100644
--- a/System/KnapSack/New/RoleEquipWin.cs
+++ b/System/KnapSack/New/RoleEquipWin.cs
@@ -26,7 +26,6 @@
[SerializeField] private Image m_SortImage;
[SerializeField] private Text m_TimeCountDown;
[SerializeField] private Text m_Copper;
- [SerializeField] private Text m_BindDiamond;
[SerializeField] private Text m_Diamond;
#endregion
@@ -197,7 +196,6 @@
void UpdateMoney()
{
m_Copper.text = PlayerDatas.Instance.baseData.diamond.ToString();
- m_BindDiamond.text = PlayerDatas.Instance.baseData.bindDiamond.ToString();
m_Diamond.text = ItemLogicUtility.Instance.OnChangeCoinsUnit(PlayerDatas.Instance.baseData.allCopper);
}
diff --git a/System/KnapSack/PreciousItemGetBehaviour.cs b/System/KnapSack/PreciousItemGetBehaviour.cs
index 05b1b5b..7571da5 100644
--- a/System/KnapSack/PreciousItemGetBehaviour.cs
+++ b/System/KnapSack/PreciousItemGetBehaviour.cs
@@ -49,7 +49,7 @@
if (itemModel != null && itemModel.packType == PackType.Item)
{
DrawItem(itemModel);
- List<int> sourcelist = itemModel.GetUseDataModel((int)ItemUseDataKey.source);
+ List<int> sourcelist = itemModel.GetUseData((int)ItemUseDataKey.source);
if (sourcelist != null
&& sourcelist[0] == 4
&& model.isGetNewItem)
diff --git a/System/MainInterfacePanel/BuffListWin.cs b/System/MainInterfacePanel/BuffListWin.cs
index f9bed9b..9f714a9 100644
--- a/System/MainInterfacePanel/BuffListWin.cs
+++ b/System/MainInterfacePanel/BuffListWin.cs
@@ -7,7 +7,6 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
-
using UnityEngine.UI;
//鍏充簬Buff闈㈡澘鐨勮缃�
namespace Snxxz.UI
@@ -23,14 +22,9 @@
private ScrollRect _ScrollRect;
private Dictionary<int, ObjBuff> objBuffic;
private List<int> _SortList = new List<int>();//鎺掑簭鍒楄〃
- BuffModel m_BuffModel;
- BuffModel Buffmodel
- {
- get
- {
- return m_BuffModel ?? (m_BuffModel = ModelCenter.Instance.GetModel<BuffModel>());
- }
- }
+
+ BuffModel Buffmodel { get { return ModelCenter.Instance.GetModel<BuffModel>(); } }
+
#region Built-in
protected override void BindController()
{
@@ -67,7 +61,6 @@
BuffModel.Even_ObjDelBuff -= DelBuff;
}
#endregion
-
void UpdateControllerPosition()
@@ -189,35 +182,6 @@
{
int Type = 0;
return Type;
- int Use_TheSecond = Mathf.FloorToInt((float)(DateTime.Now - objBuffic[BuffID]._dattTime).TotalSeconds);
- if (objBuffic[BuffID].LastTime - Use_TheSecond > 0)
- {
- float time = objBuffic[BuffID].LastTime - Use_TheSecond;
- if (time >= 86400)//澶�
- {
- return 4;
- }
- else if (time < 86400 && time >= 3600)//鏃�
- {
- return 3;
- }
- else if (time < 3600 && time >= 60)//鍒�
- {
- return 2;
- }
- else if (time < 60 && time > 0)//绉�
- {
- return 1;
- }
- else
- {
- return 0;
- }
- }
- else
- {
- return 0;
- }
}
List<int> Priority()
@@ -232,25 +196,21 @@
return _List;
}
- void AddBuff()//buff鐨勫鍔�
+ void AddBuff()
{
-
objBuffic = Buffmodel._BuffDic;
BuffScheduling();
UpdateControllerPosition();
OnCreateGridLineCell(m_ScrollerController);
}
- void DelBuff()//buff鐨勫垹闄�
+ void DelBuff()
{
-
objBuffic = Buffmodel._BuffDic;
BuffScheduling();
UpdateControllerPosition();
OnCreateGridLineCell(m_ScrollerController);
}
-
-
}
diff --git a/System/MainInterfacePanel/CoinTaskWin.cs b/System/MainInterfacePanel/CoinTaskWin.cs
index 786749a..9171297 100644
--- a/System/MainInterfacePanel/CoinTaskWin.cs
+++ b/System/MainInterfacePanel/CoinTaskWin.cs
@@ -165,7 +165,7 @@
void AccomplishTask()
{
- if ((int)UIHelper.GetMoneyCnt(1) >= _requireNumber || (int)UIHelper.GetMoneyCnt(2) >= _requireNumber)
+ if ((int)UIHelper.GetMoneyCnt(1) >= _requireNumber )
{
taskmodel.CompletionOfTask(TaskID);
taskmodel.BountyMotionBool = true;
@@ -452,9 +452,9 @@
}
ItemCellModel cellModel = new ItemCellModel(rewardList[i].itemCfg.ID, true, (ulong)number);
itemcell.Init(cellModel);
- itemcell.cellBtn.RemoveAllListeners();
+ itemcell.button.RemoveAllListeners();
int tab = i;
- itemcell.cellBtn.AddListener(() =>
+ itemcell.button.AddListener(() =>
{
ItemAttrData attrData = new ItemAttrData(rewardList[tab].itemCfg.ID, false, (ulong)number);
itemTipsModel.SetItemTipsModel(attrData);
diff --git a/System/MainInterfacePanel/DungeonGuardCheckBehaviour.cs b/System/MainInterfacePanel/DungeonGuardCheckBehaviour.cs
index 019b9ca..534db2e 100644
--- a/System/MainInterfacePanel/DungeonGuardCheckBehaviour.cs
+++ b/System/MainInterfacePanel/DungeonGuardCheckBehaviour.cs
@@ -34,8 +34,8 @@
public void Display(ItemModel _itemModel)
{
m_GuardItem.Init(_itemModel, true);
- m_GuardItem.cellBtn.RemoveAllListeners();
- m_GuardItem.cellBtn.AddListener(() =>
+ m_GuardItem.button.RemoveAllListeners();
+ m_GuardItem.button.AddListener(() =>
{
if (_itemModel != null)
{
diff --git a/System/MainInterfacePanel/FlyShoseConfirmwin.cs b/System/MainInterfacePanel/FlyShoseConfirmwin.cs
index 8729594..0a3c3d4 100644
--- a/System/MainInterfacePanel/FlyShoseConfirmwin.cs
+++ b/System/MainInterfacePanel/FlyShoseConfirmwin.cs
@@ -96,7 +96,7 @@
#endregion
private void OnclickOKButton()
{
- int NeedMoney = (int)UIHelper.GetMoneyCnt(1) + (int)UIHelper.GetMoneyCnt(2);
+ int NeedMoney = (int)UIHelper.GetMoneyCnt(1) ;
if (NeedMoney >= 1)
{
switch (useEnvironment)
diff --git a/System/MainInterfacePanel/FlyingShoesTask.cs b/System/MainInterfacePanel/FlyingShoesTask.cs
index feaa830..965a5f9 100644
--- a/System/MainInterfacePanel/FlyingShoesTask.cs
+++ b/System/MainInterfacePanel/FlyingShoesTask.cs
@@ -300,7 +300,7 @@
{
if (mainModel.IsFlyShoseBool)
{
- int NeedMoney = (int)UIHelper.GetMoneyCnt(1) + (int)UIHelper.GetMoneyCnt(2);
+ int NeedMoney = (int)UIHelper.GetMoneyCnt(1);
if (NeedMoney >= 1)
{
HeroAIRecorder.ClearRecord();
diff --git a/System/MainInterfacePanel/InformationTipsWin.cs b/System/MainInterfacePanel/InformationTipsWin.cs
index b77e76c..f906c39 100644
--- a/System/MainInterfacePanel/InformationTipsWin.cs
+++ b/System/MainInterfacePanel/InformationTipsWin.cs
@@ -10,7 +10,8 @@
using UnityEngine;
using UnityEngine.UI;
-namespace Snxxz.UI {
+namespace Snxxz.UI
+{
public class InformationTipsWin : Window
{
@@ -20,16 +21,8 @@
public Toggle _Toggle_Tips;//toggle 鎸夐挳
public Text _Text_Extend;//淇℃伅鏉�
- private int _Gold = 0;//鑾峰彇娴佸姩浠欑帀
- private int _GoldPaper = 0;//鑾峰彇缁戝畾浠欑帀
- TaskModel m_TaskModel;
- TaskModel taskmodel
- {
- get
- {
- return m_TaskModel ?? (m_TaskModel = ModelCenter.Instance.GetModel<TaskModel>());
- }
- }
+ TaskModel taskmodel { get { return ModelCenter.Instance.GetModel<TaskModel>(); } }
+
#region Built-in
protected override void BindController()
{
@@ -40,15 +33,11 @@
_CloseBtn.onClick.AddListener(CloseButton);
_Btn_Cancel.onClick.AddListener(CancelButton);
_Btn_Sure.onClick.AddListener(SureButton);
- _Toggle_Tips.onValueChanged.AddListener(
-
- delegate(bool _bool){ Toggle(); });
+ _Toggle_Tips.onValueChanged.AddListener((bool _bool) => { Toggle(); });
}
protected override void OnPreOpen()
{
- _Gold = (int)PlayerDatas.Instance.baseData.diamond;
- _GoldPaper = (int)PlayerDatas.Instance.baseData.bindDiamond;
DoubleToReceive();
}
@@ -99,15 +88,15 @@
}
- void DoubleToReceive()//鏄惁鑳藉棰嗗彇鍙屽�嶅鍔�
+ void DoubleToReceive()//鏄惁鑳藉棰嗗彇鍙屽�嶅鍔�
{
-
+
string _requireNumberStr = FuncConfigConfig.Get("TaskExpend").Numerical1;
int _requireNumber = int.Parse(_requireNumberStr);
_Text_Extend.text = string.Format(Language.Get("Z1070"), _requireNumberStr);
-
+
return;
-
+
}
#endregion
diff --git a/System/MainInterfacePanel/MainButtonMisc.cs b/System/MainInterfacePanel/MainButtonMisc.cs
index f245d91..4d5aa88 100644
--- a/System/MainInterfacePanel/MainButtonMisc.cs
+++ b/System/MainInterfacePanel/MainButtonMisc.cs
@@ -297,7 +297,7 @@
{
if (fairyGrabBossModel.flyToGrabBossRemind)
{
- var money = (int)UIHelper.GetMoneyCnt(1) + (int)UIHelper.GetMoneyCnt(2);
+ var money = (int)UIHelper.GetMoneyCnt(1) ;
if (money >= 1)
{
FlyShoesUseCallback();
diff --git a/System/MainInterfacePanel/SideMission.cs b/System/MainInterfacePanel/SideMission.cs
index 5c8735d..2a0c65f 100644
--- a/System/MainInterfacePanel/SideMission.cs
+++ b/System/MainInterfacePanel/SideMission.cs
@@ -211,9 +211,9 @@
go.transform.localPosition = pos.SetZ(0);
ItemCellModel cellModel = new ItemCellModel(rewardList[i].itemCfg.ID, true, (ulong)rewardList[i].num);
itemcell.Init(cellModel);
- itemcell.cellBtn.RemoveAllListeners();
+ itemcell.button.RemoveAllListeners();
int tab = i;
- itemcell.cellBtn.AddListener(() =>
+ itemcell.button.AddListener(() =>
{
ItemAttrData attrData = new ItemAttrData(rewardList[tab].itemCfg.ID, true, (ulong)rewardList[tab].num);
itemTipsModel.SetItemTipsModel(attrData);
diff --git a/System/MainInterfacePanel/StoryTask.cs b/System/MainInterfacePanel/StoryTask.cs
index 91817d5..574cbe1 100644
--- a/System/MainInterfacePanel/StoryTask.cs
+++ b/System/MainInterfacePanel/StoryTask.cs
@@ -291,9 +291,9 @@
go.transform.localPosition = pos.SetZ(0);
ItemCellModel cellModel = new ItemCellModel(rewardList[i].itemCfg.ID, true, (ulong)rewardList[i].num);
itemcell.Init(cellModel);
- itemcell.cellBtn.RemoveAllListeners();
+ itemcell.button.RemoveAllListeners();
int tab = i;
- itemcell.cellBtn.AddListener(() =>
+ itemcell.button.AddListener(() =>
{
ItemAttrData attrData = new ItemAttrData(rewardList[tab].itemCfg.ID, true, (ulong)rewardList[tab].num);
itemTipsModel.SetItemTipsModel(attrData);
diff --git a/System/MainInterfacePanel/TaskBoxBGMWin.cs b/System/MainInterfacePanel/TaskBoxBGMWin.cs
index 94390a8..7981a9e 100644
--- a/System/MainInterfacePanel/TaskBoxBGMWin.cs
+++ b/System/MainInterfacePanel/TaskBoxBGMWin.cs
@@ -28,7 +28,6 @@
private int _TaskId = 0;//鑾峰彇浠诲姟ID
private int _NpcID = 0;//鑾峰彇NPCID
private int _Gold = 0;//鑾峰彇娴佸姩浠欑帀
- private int _GoldPaper = 0;//鑾峰彇缁戝畾浠欑帀
private string StrConversa = null;//瀵硅瘽鍐呭鎺ユ敹
Dictionary<int, MissionDetailDates> _AllMissionDict;//浠诲姟鍒濆鍖栨帴鏀跺瓧鍏�
private List<RewardAnalysis.RewardInfo> rewardList = new List<RewardAnalysis.RewardInfo>();
@@ -74,7 +73,6 @@
_TextTaskDescription.text = "";
_Gold = (int)PlayerDatas.Instance.baseData.diamond;
- _GoldPaper = (int)PlayerDatas.Instance.baseData.bindDiamond;
_BtnRewards.gameObject.SetActive(false);
_AllMissionDict = taskmodel.allMissionDict;
_TaskId = taskmodel._TaskNow;
@@ -319,9 +317,9 @@
}
ItemCellModel cellModel = new ItemCellModel(rewardList[i].itemCfg.ID, true, (ulong)number);
itemcell.Init(cellModel);
- itemcell.cellBtn.RemoveAllListeners();
+ itemcell.button.RemoveAllListeners();
int tab = i;
- itemcell.cellBtn.AddListener(() =>
+ itemcell.button.AddListener(() =>
{
ItemAttrData attrData = new ItemAttrData(rewardList[tab].itemCfg.ID, false, (ulong)number);
itemTipsModel.SetItemTipsModel(attrData);
diff --git a/System/Mount/AutoTrainTipsWin.cs b/System/Mount/AutoTrainTipsWin.cs
index 66919bb..cfa6fcb 100644
--- a/System/Mount/AutoTrainTipsWin.cs
+++ b/System/Mount/AutoTrainTipsWin.cs
@@ -145,7 +145,7 @@
{
int NeedFairyJade = DomesticateNumber* 10;
- int gold = (int)UIHelper.GetMoneyCnt(1)+ (int)UIHelper.GetMoneyCnt(2);
+ int gold = (int)UIHelper.GetMoneyCnt(1);
if (NeedFairyJade > 0 && gold >= NeedFairyJade)
{
IsFairy = true;
diff --git a/System/NewYearFairylandCeremony/NewYearCeremonyFirepartyWin.cs b/System/NewYearFairylandCeremony/NewYearCeremonyFirepartyWin.cs
index 8ae03ff..664793f 100644
--- a/System/NewYearFairylandCeremony/NewYearCeremonyFirepartyWin.cs
+++ b/System/NewYearFairylandCeremony/NewYearCeremonyFirepartyWin.cs
@@ -60,7 +60,7 @@
buyPriceText.text = storeConfig.MoneyNumber.ToString();
ItemCellModel fireModel = new ItemCellModel(storeConfig.ItemID,true,(ulong)storeConfig.ItemCnt);
fireItem.Init(fireModel);
- fireItem.cellBtn.AddListener(() =>
+ fireItem.button.AddListener(() =>
{
ItemAttrData attrData = new ItemAttrData(storeConfig.ItemID,true, (ulong)storeConfig.ItemCnt);
tipsModel.SetItemTipsModel(attrData);
@@ -76,8 +76,8 @@
NewYearFairylandCeremonyModel.AwardItem itemData = itemlist[i];
ItemCellModel cellModel = new ItemCellModel(itemData.itemId, true,(ulong)itemData.itemCount);
itemBaiscs[i].Init(cellModel);
- itemBaiscs[i].cellBtn.RemoveAllListeners();
- itemBaiscs[i].cellBtn.AddListener(() =>
+ itemBaiscs[i].button.RemoveAllListeners();
+ itemBaiscs[i].button.AddListener(() =>
{
ItemAttrData attrData = new ItemAttrData(itemData.itemId, true, (ulong)itemData.itemCount);
tipsModel.SetItemTipsModel(attrData);
diff --git a/System/NewYearFairylandCeremony/NewYearCeremonyOutOfPrintWin.cs b/System/NewYearFairylandCeremony/NewYearCeremonyOutOfPrintWin.cs
index 5242d20..87a1e7a 100644
--- a/System/NewYearFairylandCeremony/NewYearCeremonyOutOfPrintWin.cs
+++ b/System/NewYearFairylandCeremony/NewYearCeremonyOutOfPrintWin.cs
@@ -147,8 +147,8 @@
NewYearFairylandCeremonyModel.AwardItem itemData = list[i];
ItemCellModel cellModel = new ItemCellModel(itemData.itemId, true,(ulong)itemData.itemCount);
baiscs[i].Init(cellModel);
- baiscs[i].cellBtn.RemoveAllListeners();
- baiscs[i].cellBtn.AddListener(() =>
+ baiscs[i].button.RemoveAllListeners();
+ baiscs[i].button.AddListener(() =>
{
switch(itemData.itemId)
{
diff --git a/System/NewYearFairylandCeremony/NewYearCeremonyRechargeGiftWin.cs b/System/NewYearFairylandCeremony/NewYearCeremonyRechargeGiftWin.cs
index 66824a4..3df0bb1 100644
--- a/System/NewYearFairylandCeremony/NewYearCeremonyRechargeGiftWin.cs
+++ b/System/NewYearFairylandCeremony/NewYearCeremonyRechargeGiftWin.cs
@@ -67,8 +67,8 @@
NewYearFairylandCeremonyModel.AwardItem itemData = itemlist[i];
ItemCellModel cellModel = new ItemCellModel(itemData.itemId,true, (ulong)itemData.itemCount);
itemBaiscs[i].Init(cellModel);
- itemBaiscs[i].cellBtn.RemoveAllListeners();
- itemBaiscs[i].cellBtn.AddListener(()=>
+ itemBaiscs[i].button.RemoveAllListeners();
+ itemBaiscs[i].button.AddListener(()=>
{
ItemAttrData attrData = new ItemAttrData(itemData.itemId, true, (ulong)itemData.itemCount);
tipsModel.SetItemTipsModel(attrData);
diff --git a/System/NewYearFairylandCeremony/NewYearToHiAwardCell.cs b/System/NewYearFairylandCeremony/NewYearToHiAwardCell.cs
index 066f3f8..c1a5615 100644
--- a/System/NewYearFairylandCeremony/NewYearToHiAwardCell.cs
+++ b/System/NewYearFairylandCeremony/NewYearToHiAwardCell.cs
@@ -44,8 +44,8 @@
NewYearFairylandCeremonyModel.AwardItem itemData = itemlist[i];
ItemCellModel cellModel = new ItemCellModel(itemData.itemId, true,(ulong)itemData.itemCount);
itemBaiscs[i].Init(cellModel);
- itemBaiscs[i].cellBtn.RemoveAllListeners();
- itemBaiscs[i].cellBtn.AddListener(() =>
+ itemBaiscs[i].button.RemoveAllListeners();
+ itemBaiscs[i].button.AddListener(() =>
{
ItemAttrData attrData = new ItemAttrData(itemData.itemId, true, (ulong)itemData.itemCount);
tipsModel.SetItemTipsModel(attrData);
diff --git a/System/OpenServerActivity/AccumulateRechargeWin.cs b/System/OpenServerActivity/AccumulateRechargeWin.cs
index 957b243..03ffa7f 100644
--- a/System/OpenServerActivity/AccumulateRechargeWin.cs
+++ b/System/OpenServerActivity/AccumulateRechargeWin.cs
@@ -183,14 +183,14 @@
}
for (int i = 0; i < m_Items.Length; i++)
{
- m_Items[i].cellBtn.RemoveAllListeners();
+ m_Items[i].button.RemoveAllListeners();
if (recharge != null && i < recharge.items.Count)
{
var item = recharge.items[i];
m_Items[i].gameObject.SetActive(true);
ItemCellModel itemCellModel = new ItemCellModel(item.id, true, (ulong)item.count);
m_Items[i].Init(itemCellModel);
- m_Items[i].cellBtn.AddListener(() =>
+ m_Items[i].button.AddListener(() =>
{
ItemAttrData itemAttrData = new ItemAttrData(item.id, true, (ulong)item.count);
ModelCenter.Instance.GetModel<ItemTipsModel>().SetItemTipsModel(itemAttrData);
diff --git a/System/OpenServerActivity/AutoTreasureAwardsRow.cs b/System/OpenServerActivity/AutoTreasureAwardsRow.cs
index b2aa6fc..ccf3aac 100644
--- a/System/OpenServerActivity/AutoTreasureAwardsRow.cs
+++ b/System/OpenServerActivity/AutoTreasureAwardsRow.cs
@@ -26,8 +26,8 @@
var luckyItem = autoLuckyItems[index];
ItemCellModel itemCellModel = new ItemCellModel(luckyItem.itemId,false,(ulong)luckyItem.itemCount);
awardItem.itemBaisc.Init(itemCellModel);
- awardItem.itemBaisc.cellBtn.RemoveAllListeners();
- awardItem.itemBaisc.cellBtn.AddListener(() =>
+ awardItem.itemBaisc.button.RemoveAllListeners();
+ awardItem.itemBaisc.button.AddListener(() =>
{
ItemAttrData attrData = new ItemAttrData(luckyItem.itemId, false, (ulong)luckyItem.itemCount);
tipsModel.SetItemTipsModel(attrData);
diff --git a/System/OpenServerActivity/BestLuckyTreasureItemWin.cs b/System/OpenServerActivity/BestLuckyTreasureItemWin.cs
index 2151a19..9429756 100644
--- a/System/OpenServerActivity/BestLuckyTreasureItemWin.cs
+++ b/System/OpenServerActivity/BestLuckyTreasureItemWin.cs
@@ -70,8 +70,8 @@
}
ItemCellModel model = new ItemCellModel(luckyItem.itemId,false,(ulong)luckyItem.itemCount);
itemBaisc.Init(model);
- itemBaisc.cellBtn.RemoveAllListeners();
- itemBaisc.cellBtn.AddListener(()=>
+ itemBaisc.button.RemoveAllListeners();
+ itemBaisc.button.AddListener(()=>
{
ItemAttrData attrData = new ItemAttrData(luckyItem.itemId, false, (ulong)luckyItem.itemCount);
tipsModel.SetItemTipsModel(attrData);
diff --git a/System/OpenServerActivity/EntryInformationCell.cs b/System/OpenServerActivity/EntryInformationCell.cs
index 1d92766..f3a2f3b 100644
--- a/System/OpenServerActivity/EntryInformationCell.cs
+++ b/System/OpenServerActivity/EntryInformationCell.cs
@@ -60,7 +60,7 @@
var Item = weekPartyItemClass[0];
ItemCellModel cellModel = new ItemCellModel(Item.ItemID, true, (ulong)Item.ItemCnt);
m_ItemCell.Init(cellModel);
- m_ItemCell.cellBtn.SetListener(() =>
+ m_ItemCell.button.SetListener(() =>
{
ItemAttrData attrData = new ItemAttrData(Item.ItemID, false, (ulong)Item.ItemCnt);
itemTipsModel.SetItemTipsModel(attrData);
diff --git a/System/OpenServerActivity/FlashSaleBehaviour.cs b/System/OpenServerActivity/FlashSaleBehaviour.cs
index b026aa4..17b6f51 100644
--- a/System/OpenServerActivity/FlashSaleBehaviour.cs
+++ b/System/OpenServerActivity/FlashSaleBehaviour.cs
@@ -43,8 +43,8 @@
m_FlashSaleItems[i].gameObject.SetActive(true);
var itemcellmodel = new ItemCellModel(item.itemId, true, (ulong)item.itemCount);
m_FlashSaleItems[i].SetItemRare(itemcellmodel, item.isMainItem);
- m_FlashSaleItems[i].cellBtn.RemoveAllListeners();
- m_FlashSaleItems[i].cellBtn.AddListener(() =>
+ m_FlashSaleItems[i].button.RemoveAllListeners();
+ m_FlashSaleItems[i].button.AddListener(() =>
{
ItemAttrData itemAttrData = new ItemAttrData(item.itemId, true, (ulong)item.itemCount);
ModelCenter.Instance.GetModel<ItemTipsModel>().SetItemTipsModel(itemAttrData);
diff --git a/System/OpenServerActivity/FlashSaleItemCell.cs b/System/OpenServerActivity/FlashSaleItemCell.cs
index f384c4e..1492e8a 100644
--- a/System/OpenServerActivity/FlashSaleItemCell.cs
+++ b/System/OpenServerActivity/FlashSaleItemCell.cs
@@ -55,8 +55,8 @@
code = rushToBuyModel.presentFlashShop.dayIndex * 1000 + rushToBuyModel.presentFlashShop.timeIndex * 100 + index;
ItemCellModel cellModel = new ItemCellModel(saleItem.itemId,true,(ulong)saleItem.itemCount);
itemBaisc.Init(cellModel);
- itemBaisc.cellBtn.RemoveAllListeners();
- itemBaisc.cellBtn.AddListener(()=>
+ itemBaisc.button.RemoveAllListeners();
+ itemBaisc.button.AddListener(()=>
{
ItemAttrData attrData = new ItemAttrData(saleItem.itemId,true, (ulong)saleItem.itemCount);
tipsModel.SetItemTipsModel(attrData);
diff --git a/System/OpenServerActivity/ImpactRankWin.cs b/System/OpenServerActivity/ImpactRankWin.cs
index 6cdbb88..cced03f 100644
--- a/System/OpenServerActivity/ImpactRankWin.cs
+++ b/System/OpenServerActivity/ImpactRankWin.cs
@@ -299,8 +299,8 @@
var _item = _itemList[i];
ItemCellModel _ItemData = new ItemCellModel(_item.id, false, (ulong)_item.count);
_cell.items[i].SetItemRare(_ItemData, 5);
- _cell.items[i].cellBtn.RemoveAllListeners();
- _cell.items[i].cellBtn.AddListener(() =>
+ _cell.items[i].button.RemoveAllListeners();
+ _cell.items[i].button.AddListener(() =>
{
ItemAttrData _itemPropertyData = new ItemAttrData(_item.id, false, (ulong)_item.count);
ModelCenter.Instance.GetModel<ItemTipsModel>().SetItemTipsModel(_itemPropertyData);
diff --git a/System/OpenServerActivity/InSevenDayBehavior.cs b/System/OpenServerActivity/InSevenDayBehavior.cs
index d6e8eb8..ff4b7db 100644
--- a/System/OpenServerActivity/InSevenDayBehavior.cs
+++ b/System/OpenServerActivity/InSevenDayBehavior.cs
@@ -63,8 +63,8 @@
Item item = list[0];
ItemCellModel cellModel = new ItemCellModel(item.id, true, (ulong)item.count);
m_ItemCell.Init(cellModel);
- m_ItemCell.cellBtn.RemoveAllListeners();
- m_ItemCell.cellBtn.AddListener(() =>
+ m_ItemCell.button.RemoveAllListeners();
+ m_ItemCell.button.AddListener(() =>
{
ItemAttrData attrData = new ItemAttrData(item.id, false, (ulong)item.count);
itemTipsModel.SetItemTipsModel(attrData);
diff --git a/System/OpenServerActivity/LuckyAwardsGroup.cs b/System/OpenServerActivity/LuckyAwardsGroup.cs
index 7343757..b3aa387 100644
--- a/System/OpenServerActivity/LuckyAwardsGroup.cs
+++ b/System/OpenServerActivity/LuckyAwardsGroup.cs
@@ -27,8 +27,8 @@
awardCell.itemBaisc.gameObject.SetActive(true);
ItemCellModel itemCellModel = new ItemCellModel(treasureItem.itemId,false,(ulong)treasureItem.itemCount);
awardCell.itemBaisc.Init(itemCellModel);
- awardCell.itemBaisc.cellBtn.RemoveAllListeners();
- awardCell.itemBaisc.cellBtn.AddListener(() =>
+ awardCell.itemBaisc.button.RemoveAllListeners();
+ awardCell.itemBaisc.button.AddListener(() =>
{
ItemAttrData attrData = new ItemAttrData(treasureItem.itemId, false, (ulong)treasureItem.itemCount);
tipsModel.SetItemTipsModel(attrData);
diff --git a/System/OpenServerActivity/LuckyTreasureWin.cs b/System/OpenServerActivity/LuckyTreasureWin.cs
index f5cbcb6..2990569 100644
--- a/System/OpenServerActivity/LuckyTreasureWin.cs
+++ b/System/OpenServerActivity/LuckyTreasureWin.cs
@@ -105,8 +105,8 @@
}
ItemCellModel itemCellModel = new ItemCellModel(luckyItem.itemId);
luckAward_Item.Init(itemCellModel);
- luckAward_Item.cellBtn.RemoveAllListeners();
- luckAward_Item.cellBtn.AddListener(() =>
+ luckAward_Item.button.RemoveAllListeners();
+ luckAward_Item.button.AddListener(() =>
{
ItemAttrData attrData = new ItemAttrData(luckyItem.itemId);
tipsModel.SetItemTipsModel(attrData);
diff --git a/System/OpenServerActivity/MysticalPurchaseSaleItem.cs b/System/OpenServerActivity/MysticalPurchaseSaleItem.cs
index fe78f7d..31a71e6 100644
--- a/System/OpenServerActivity/MysticalPurchaseSaleItem.cs
+++ b/System/OpenServerActivity/MysticalPurchaseSaleItem.cs
@@ -57,8 +57,8 @@
itemBaisc.gameObject.SetActive(true);
ItemCellModel cellModel = new ItemCellModel(itemInfo.itemId,false, (ulong)itemInfo.count);
itemBaisc.Init(cellModel);
- itemBaisc.cellBtn.RemoveAllListeners();
- itemBaisc.cellBtn.AddListener(()=>
+ itemBaisc.button.RemoveAllListeners();
+ itemBaisc.button.AddListener(()=>
{
ItemAttrData attrData = new ItemAttrData(itemInfo.itemId, false, (ulong)itemInfo.count );
tipsModel.SetItemTipsModel(attrData);
diff --git a/System/OpenServerActivity/OSGiftBehaviour.cs b/System/OpenServerActivity/OSGiftBehaviour.cs
index 8a3518b..5c0a5b0 100644
--- a/System/OpenServerActivity/OSGiftBehaviour.cs
+++ b/System/OpenServerActivity/OSGiftBehaviour.cs
@@ -48,7 +48,7 @@
for (int i = 0; i < m_Items.Length; i++)
{
var _index = i;
- m_Items[i].cellBtn.onClick.AddListener(() =>
+ m_Items[i].button.onClick.AddListener(() =>
{
OnItemClick(_index);
});
diff --git a/System/OpenServerActivity/OpenServiceAchievementCell.cs b/System/OpenServerActivity/OpenServiceAchievementCell.cs
index 12b60dd..9979223 100644
--- a/System/OpenServerActivity/OpenServiceAchievementCell.cs
+++ b/System/OpenServerActivity/OpenServiceAchievementCell.cs
@@ -73,7 +73,7 @@
var Item = WeekPartyAction.WeekPartyItem[i];
ItemCellModel cellModel = new ItemCellModel(Item.ItemID, true, (ulong)Item.ItemCnt);
itemCell.Init(cellModel);
- itemCell.cellBtn.SetListener(() =>
+ itemCell.button.SetListener(() =>
{
var attrData = new ItemAttrData(Item.ItemID, false, (ulong)Item.ItemCnt);
itemTipsModel.SetItemTipsModel(attrData);
diff --git a/System/OpenServerActivity/PoolItemCell.cs b/System/OpenServerActivity/PoolItemCell.cs
index aa301d3..827e044 100644
--- a/System/OpenServerActivity/PoolItemCell.cs
+++ b/System/OpenServerActivity/PoolItemCell.cs
@@ -37,8 +37,8 @@
}
ItemCellModel cellModel = new ItemCellModel(wellItem.itemId,false,(ulong)wellItem.itemCount);
itemBaisc.Init(cellModel);
- itemBaisc.cellBtn.RemoveAllListeners();
- itemBaisc.cellBtn.AddListener(()=>
+ itemBaisc.button.RemoveAllListeners();
+ itemBaisc.button.AddListener(()=>
{
ItemAttrData attrData = new ItemAttrData(wellItem.itemId, true, (ulong)wellItem.itemCount);
tipsModel.SetItemTipsModel(attrData);
diff --git a/System/OpenServerActivity/RewardInformation.cs b/System/OpenServerActivity/RewardInformation.cs
index 8616882..97f3a0e 100644
--- a/System/OpenServerActivity/RewardInformation.cs
+++ b/System/OpenServerActivity/RewardInformation.cs
@@ -50,8 +50,8 @@
Item item = list[i];
ItemCellModel cellModel = new ItemCellModel(item.id, true, (ulong)item.count);
itemCell.Init(cellModel);
- itemCell.cellBtn.RemoveAllListeners();
- itemCell.cellBtn.AddListener(() =>
+ itemCell.button.RemoveAllListeners();
+ itemCell.button.AddListener(() =>
{
ItemAttrData attrData = new ItemAttrData(item.id, false, (ulong)item.count);
itemTipsModel.SetItemTipsModel(attrData);
diff --git a/System/OpenServerActivity/SpringFestivalCell.cs b/System/OpenServerActivity/SpringFestivalCell.cs
index 51b2803..27611b5 100644
--- a/System/OpenServerActivity/SpringFestivalCell.cs
+++ b/System/OpenServerActivity/SpringFestivalCell.cs
@@ -73,7 +73,7 @@
var Item = SpringFestival.WeekPartyItem[i];
ItemCellModel cellModel = new ItemCellModel(Item.ItemID, true, (ulong)Item.ItemCnt);
itemCell.Init(cellModel);
- itemCell.cellBtn.SetListener(() =>
+ itemCell.button.SetListener(() =>
{
ItemAttrData attrData = new ItemAttrData(Item.ItemID, false, (ulong)Item.ItemCnt);
itemTipsModel.SetItemTipsModel(attrData);
diff --git a/System/OpenServerActivity/SuperValueGiftBehaviour.cs b/System/OpenServerActivity/SuperValueGiftBehaviour.cs
index 28063b6..2c5c35c 100644
--- a/System/OpenServerActivity/SuperValueGiftBehaviour.cs
+++ b/System/OpenServerActivity/SuperValueGiftBehaviour.cs
@@ -33,7 +33,7 @@
for (int i = 0; i < m_Items.Length; i++)
{
var _index = i;
- m_Items[i].cellBtn.onClick.AddListener(() =>
+ m_Items[i].button.onClick.AddListener(() =>
{
OnItemClick(_index);
});
diff --git a/System/OpenServerActivity/WishGroupCell.cs b/System/OpenServerActivity/WishGroupCell.cs
index d87a0c9..2735cf5 100644
--- a/System/OpenServerActivity/WishGroupCell.cs
+++ b/System/OpenServerActivity/WishGroupCell.cs
@@ -39,8 +39,8 @@
{
poolItem.bestImg.SetSprite(rareIconKey);
}
- poolItem.itemBaisc.cellBtn.RemoveAllListeners();
- poolItem.itemBaisc.cellBtn.AddListener(()=>
+ poolItem.itemBaisc.button.RemoveAllListeners();
+ poolItem.itemBaisc.button.AddListener(()=>
{
var attrData = new ItemAttrData(info.itemId,true, (ulong)info.itemCount);
tipsModel.SetItemTipsModel(attrData);
diff --git a/System/OpenServerActivity/WishItemCell.cs b/System/OpenServerActivity/WishItemCell.cs
index 1e4a965..4633065 100644
--- a/System/OpenServerActivity/WishItemCell.cs
+++ b/System/OpenServerActivity/WishItemCell.cs
@@ -36,8 +36,8 @@
nameText.color = UIHelper.GetUIColor(itemConfig.ItemColor);
ItemCellModel cellModel = new ItemCellModel(wellItem.itemId, false, (ulong)wellItem.itemCount);
itemBaisc.Init(cellModel);
- itemBaisc.cellBtn.RemoveAllListeners();
- itemBaisc.cellBtn.AddListener(() =>
+ itemBaisc.button.RemoveAllListeners();
+ itemBaisc.button.AddListener(() =>
{
ItemAttrData attrData = new ItemAttrData(wellItem.itemId, true, (ulong)wellItem.itemCount);
tipsModel.SetItemTipsModel(attrData);
diff --git a/System/OpenServerActivity/WishingGetItemWin.cs b/System/OpenServerActivity/WishingGetItemWin.cs
index 6512279..beac645 100644
--- a/System/OpenServerActivity/WishingGetItemWin.cs
+++ b/System/OpenServerActivity/WishingGetItemWin.cs
@@ -60,8 +60,8 @@
{
awardItem.bestIcon.SetSprite(rareIconKey);
}
- awardItem.itemBaisc.cellBtn.RemoveAllListeners();
- awardItem.itemBaisc.cellBtn.AddListener(() =>
+ awardItem.itemBaisc.button.RemoveAllListeners();
+ awardItem.itemBaisc.button.AddListener(() =>
{
ItemAttrData attrData = new ItemAttrData((int)wellItem.itemId, true , (ulong)wellItem.itemCount);
tipsModel.SetItemTipsModel(attrData);
diff --git a/System/PlayerDead/PlayerDeadModel.cs b/System/PlayerDead/PlayerDeadModel.cs
index e1fee56..1bc9011 100644
--- a/System/PlayerDead/PlayerDeadModel.cs
+++ b/System/PlayerDead/PlayerDeadModel.cs
@@ -78,21 +78,9 @@
}
}
- DungeonModel _dungeonModel;
- DungeonModel dungeonModel {
- get { return _dungeonModel ?? (_dungeonModel = ModelCenter.Instance.GetModel<DungeonModel>()); }
- }
-
- StoreModel _storeModel;
- StoreModel m_storeModel {
- get { return _storeModel ?? (_storeModel = ModelCenter.Instance.GetModel<StoreModel>()); }
- }
-
- PackModel _playerPack;
- PackModel playerPack {
- get { return _playerPack ?? (_playerPack = ModelCenter.Instance.GetModel<PackModel>()); }
- }
-
+ DungeonModel dungeonModel { get { return ModelCenter.Instance.GetModel<DungeonModel>(); } }
+ StoreModel m_storeModel { get { return ModelCenter.Instance.GetModel<StoreModel>(); } }
+ PackModel playerPack { get { return ModelCenter.Instance.GetModel<PackModel>(); } }
ActivityModel activityModel { get { return ModelCenter.Instance.GetModel<ActivityModel>(); } }
private DungeonOpenTimeConfig _dungeonOpenTimeModel;
@@ -317,7 +305,7 @@
public bool IsCanInplaceReborn(int rebornPrice)
{
- playerCoins = (int)PlayerDatas.Instance.baseData.diamond + (int)PlayerDatas.Instance.baseData.bindDiamond;
+ playerCoins = (int)PlayerDatas.Instance.baseData.diamond;
if (playerCoins >= rebornPrice)
return true;
else
diff --git a/System/Role/MagicianWin.cs b/System/Role/MagicianWin.cs
index 13a9027..4ab3168 100644
--- a/System/Role/MagicianWin.cs
+++ b/System/Role/MagicianWin.cs
@@ -120,7 +120,7 @@
for (int i = 0; i < m_Items.Length; i++)
{
var index = i;
- m_Items[i].cellBtn.onClick.AddListener(() =>
+ m_Items[i].button.onClick.AddListener(() =>
{
OnSelectItem(index);
});
diff --git a/System/Role/RoleRenameWin.cs b/System/Role/RoleRenameWin.cs
index ae3de3e..d1984f4 100644
--- a/System/Role/RoleRenameWin.cs
+++ b/System/Role/RoleRenameWin.cs
@@ -61,8 +61,8 @@
itemCell.countText.text = StringUtility.Contact(UIHelper.AppendColor(TextColType.Red,0.ToString()),
"/", 1);
}
- itemCell.cellBtn.RemoveAllListeners();
- itemCell.cellBtn.AddListener(()=>
+ itemCell.button.RemoveAllListeners();
+ itemCell.button.AddListener(()=>
{
ItemAttrData attrData = new ItemAttrData(renameToolId);
tipsModel.SetItemTipsModel(attrData);
diff --git a/System/RoleParticulars/RoleParticularsWin.cs b/System/RoleParticulars/RoleParticularsWin.cs
index 6bd10f0..3588685 100644
--- a/System/RoleParticulars/RoleParticularsWin.cs
+++ b/System/RoleParticulars/RoleParticularsWin.cs
@@ -45,7 +45,7 @@
for (int i = 0; i < roleEquipList.Count; i++)
{
RoleEquipType roleEquipType = roleEquipList[i].type;
- roleEquipList[i].itemCell.cellBtn.onClick.AddListener(() =>
+ roleEquipList[i].itemCell.button.onClick.AddListener(() =>
{
OnRoleEquipClick(roleEquipType);
});
diff --git a/System/RoleParticulars/ViewPetHorseStoneCell.cs b/System/RoleParticulars/ViewPetHorseStoneCell.cs
index 46df5fc..59bae32 100644
--- a/System/RoleParticulars/ViewPetHorseStoneCell.cs
+++ b/System/RoleParticulars/ViewPetHorseStoneCell.cs
@@ -28,8 +28,8 @@
ItemCellModel cellModel = new ItemCellModel(itemId, true, (ulong)count);
m_Item.Init(cellModel);
- m_Item.cellBtn.RemoveAllListeners();
- m_Item.cellBtn.AddListener(() =>
+ m_Item.button.RemoveAllListeners();
+ m_Item.button.AddListener(() =>
{
ItemAttrData itemAttrData = new ItemAttrData(itemId, true);
ModelCenter.Instance.GetModel<ItemTipsModel>().SetItemTipsModel(itemAttrData);
diff --git a/System/RuneTower/RuneTowerSweepBuyWin.cs b/System/RuneTower/RuneTowerSweepBuyWin.cs
index 7e249a8..10a5cd5 100644
--- a/System/RuneTower/RuneTowerSweepBuyWin.cs
+++ b/System/RuneTower/RuneTowerSweepBuyWin.cs
@@ -84,18 +84,12 @@
private bool TestBuyTime(out int _error)
{
- //1.缁戠帀鍜屼粰鐜変箣鍜屼笉瓒筹紱2.浠欑帀涓嶈冻锛�3.娆℃暟涓嶈冻
+ //1.浠欑帀涓嶈冻;
var moneyNeed = GeneralDefine.runeTowerSweepBuyPrice;
- var moneyOwn = PlayerDatas.Instance.baseData.diamond + PlayerDatas.Instance.baseData.bindDiamond;
+ var moneyOwn = PlayerDatas.Instance.baseData.diamond ;
if (moneyOwn < moneyNeed)
{
_error = 1;
- return false;
- }
-
- if (PlayerDatas.Instance.baseData.bindDiamond < moneyNeed)
- {
- _error = 2;
return false;
}
@@ -110,23 +104,6 @@
case 1:
CloseClick();
WindowCenter.Instance.Open<RechargeTipWin>();
- break;
- case 2:
- var moneyNeed = GeneralDefine.runeTowerSweepBuyPrice;
- var moneyOwn = PlayerDatas.Instance.baseData.bindDiamond;
- var moneyLack = moneyNeed - moneyOwn;
- ConfirmCancel.ShowPopConfirm(
- Language.Get("Mail101"),
- Language.Get("RuneTower21", moneyNeed, moneyOwn, moneyLack),
- (bool _ok) =>
- {
- if (_ok)
- {
- CloseClick();
- dungeonModel.RequestSweep(new Dungeon(RuneTowerModel.RUNETOWER_MAPID, 0));
- }
- }
- );
break;
case 3:
break;
diff --git a/System/Store/BagStoreWin.cs b/System/Store/BagStoreWin.cs
index 37f5587..d660c9b 100644
--- a/System/Store/BagStoreWin.cs
+++ b/System/Store/BagStoreWin.cs
@@ -11,7 +11,8 @@
using Snxxz.UI;
-namespace Snxxz.UI {
+namespace Snxxz.UI
+{
public class BagStoreWin : StoreUIBasic
{
@@ -27,12 +28,10 @@
private Text _sliverText;
#endregion
- StoreModel _storeModel;
- StoreModel m_storeModel
- {
- get { return _storeModel ?? (_storeModel = ModelCenter.Instance.GetModel<StoreModel>()); }
- }
+ StoreModel m_storeModel { get { return ModelCenter.Instance.GetModel<StoreModel>(); } }
+
int shopId = 0;
+
#region Built-in
protected override void BindController()
{
@@ -76,7 +75,7 @@
{
if (AchievementGoto.guideAchievementId != 0)
{
- SuccessConfig successConfig = SuccessConfig.Get(AchievementGoto.guideAchievementId);
+ var successConfig = SuccessConfig.Get(AchievementGoto.guideAchievementId);
if (successConfig.Type == 96)
{
p_shopItemlist = m_storeModel.TryGetStoreDatas(m_storeModel.storeFuncType);
@@ -100,7 +99,7 @@
public void InitModel()
{
- CreateShopItemCell(_shopCtrl,2);
+ CreateShopItemCell(_shopCtrl, 2);
}
protected override void CreateShopItemCell(ScrollerController shopCtrl, int row)
@@ -135,7 +134,7 @@
shopItemCell.stateImage.gameObject.SetActive(false);
}
- ItemConfig chinModel = ItemConfig.Get(m_storeModel.GetReplaceId(shopInfo.ID,shopInfo.ItemID));
+ ItemConfig chinModel = ItemConfig.Get(m_storeModel.GetReplaceId(shopInfo.ID, shopInfo.ItemID));
if (chinModel != null)
{
ItemCellModel cellModel = new ItemCellModel(chinModel.ID, true, 0);
@@ -161,8 +160,8 @@
shopItemCell.vipText.gameObject.SetActive(true);
shopItemCell.vipText.text = Language.Get("StoreWin101", shopInfo.VIPLV[nextVipIndex]);
shopItemCell.sellImage.gameObject.SetActive(false);
- shopItemCell.itemNameText.color = UIHelper.GetUIColor(TextColType.Red,true);
- shopItemCell.vipText.color = UIHelper.GetUIColor(TextColType.Red,true);
+ shopItemCell.itemNameText.color = UIHelper.GetUIColor(TextColType.Red, true);
+ shopItemCell.vipText.color = UIHelper.GetUIColor(TextColType.Red, true);
isShowBuyPrice = false;
}
}
@@ -199,29 +198,31 @@
}
shopItemCell.itemNameText.color = UIHelper.GetUIColor(chinModel.ItemColor, true);
- shopItemCell.vipText.color = UIHelper.GetUIColor(TextColType.Black,true);
+ shopItemCell.vipText.color = UIHelper.GetUIColor(TextColType.Black, true);
}
- shopItemCell.LoadGuidEffectCtrl(shopInfo.ID,shopId);
+ shopItemCell.LoadGuidEffectCtrl(shopInfo.ID, shopId);
}
shopItemCell.ShopCellBtn.RemoveAllListeners();
- shopItemCell.ShopCellBtn.AddListener(() => {
+ shopItemCell.ShopCellBtn.AddListener(() =>
+ {
if (shopInfo.ID == shopId)
{
shopId = 0;
- shopItemCell.LoadGuidEffectCtrl(shopInfo.ID,shopId);
+ shopItemCell.LoadGuidEffectCtrl(shopInfo.ID, shopId);
}
m_storeModel.OnClickShopCell(shopInfo);
});
shopItemCell.buyBtn.RemoveAllListeners();
- shopItemCell.buyBtn.AddListener(()=> {
- if(shopInfo.ID == shopId)
+ shopItemCell.buyBtn.AddListener(() =>
+ {
+ if (shopInfo.ID == shopId)
{
shopId = 0;
- shopItemCell.LoadGuidEffectCtrl(shopInfo.ID,shopId);
+ shopItemCell.LoadGuidEffectCtrl(shopInfo.ID, shopId);
}
- m_storeModel.SendBuyShopItem(shopInfo,1);
+ m_storeModel.SendBuyShopItem(shopInfo, 1);
});
}
else
@@ -230,13 +231,12 @@
}
}
}
-
+
public void OnFrenshMoneyInfo()
{
if (PlayerDatas.Instance.baseData != null)
{
_goldText.text = PlayerDatas.Instance.baseData.diamond.ToString();
- _goldPaperText.text = PlayerDatas.Instance.baseData.bindDiamond.ToString();
_sliverText.text = ItemLogicUtility.Instance.OnChangeCoinsUnit(PlayerDatas.Instance.baseData.allCopper);
}
else
diff --git a/System/Strengthening/ActiveAttrCell.cs b/System/Strengthening/ActiveAttrCell.cs
index 702eef1..f951c13 100644
--- a/System/Strengthening/ActiveAttrCell.cs
+++ b/System/Strengthening/ActiveAttrCell.cs
@@ -12,7 +12,7 @@
[SerializeField] Text nameText;
[SerializeField] Text valueText;
[SerializeField] RectTransform rect;
-
+
private void OnEnable()
{
SetEndMovePos(rect.anchoredPosition3D.y);
@@ -20,35 +20,17 @@
alphaTween.Play();
}
- public void SetModel(int attrId,int attrValue)
+ public void SetModel(int attrId, int attrValue)
{
- PlayerPropertyConfig propertyConfig = PlayerPropertyConfig.Get(attrId);
+ var propertyConfig = PlayerPropertyConfig.Get(attrId);
nameText.text = StringUtility.Contact(propertyConfig.Name, ":");
- valueText.text = StringUtility.Contact("+", GetProValueTypeStr(propertyConfig,attrValue));
+ valueText.text = StringUtility.Contact("+", PlayerPropertyConfig.GetPropertyDescription(attrId, attrValue));
}
private void SetEndMovePos(float posY)
{
- moveTween.from = new Vector3(moveTween.from.x,posY,0);
+ moveTween.from = new Vector3(moveTween.from.x, posY, 0);
moveTween.to = new Vector3(moveTween.to.x, posY, 0);
- }
-
- public string GetProValueTypeStr(PlayerPropertyConfig playerproModel, int value)
- {
- string s = "";
- if (playerproModel.ISPercentage == 0)
- {
- s = value.ToString();
- }
- else if (playerproModel.ISPercentage == 1)
- {
- s = (float)Math.Round(value / 100f, 1) + "%";
- }
- else if (playerproModel.ISPercentage == 2)
- {
- s = ((float)Math.Round(value / 100f, 1)).ToString();
- }
- return s;
}
}
}
diff --git a/System/Strengthening/GodBeastAttributes.cs b/System/Strengthening/GodBeastAttributes.cs
index 099974b..40a3fba 100644
--- a/System/Strengthening/GodBeastAttributes.cs
+++ b/System/Strengthening/GodBeastAttributes.cs
@@ -256,9 +256,9 @@
{
ItemCellModel ItemModel = new ItemCellModel(itemModel[i].itemId, true, 0);//榛樿鏄剧ず涓嶄笂閿�
m_ItemCell.Init(ItemModel);
- m_ItemCell.cellBtn.RemoveAllListeners();
+ m_ItemCell.button.RemoveAllListeners();
int type = i;
- m_ItemCell.cellBtn.AddListener(() =>
+ m_ItemCell.button.AddListener(() =>
{
itemTipsModel.SetItemTipsModel(PackType.DogzEquip, itemModel[type].guid);
});
@@ -304,7 +304,7 @@
}
GainProficiency();//鑾峰彇鐔熺粌搴�
m_BottomBox.SetActive(true);
- var IudetDogzEquipPlus = m_DogZItemModel.GetUseDataModel((int)ItemUseDataKey.dogzEquipPlus);
+ var IudetDogzEquipPlus = m_DogZItemModel.GetUseData((int)ItemUseDataKey.dogzEquipPlus);
if (IudetDogzEquipPlus != null)
{
int lv = godBeastModel.QualityLimit[m_DogZItemModel.config.ItemColor];
@@ -386,7 +386,7 @@
{
if (itemModel.config.Effect1 == 235)
{
- var IudetDogzEquipPlus = itemModel.GetUseDataModel((int)ItemUseDataKey.dogzEquipPlus);
+ var IudetDogzEquipPlus = itemModel.GetUseData((int)ItemUseDataKey.dogzEquipPlus);
SingleProficiency += itemModel.config.EffectValueA1 * DicAb[key];
if (IudetDogzEquipPlus != null)
{
@@ -490,7 +490,7 @@
return DogzLv;
}
int lv = godBeastModel.QualityLimit[m_DogZItemModel.config.ItemColor];
- var IudetDogzEquipPlus = m_DogZItemModel.GetUseDataModel((int)ItemUseDataKey.dogzEquipPlus);
+ var IudetDogzEquipPlus = m_DogZItemModel.GetUseData((int)ItemUseDataKey.dogzEquipPlus);
if (IudetDogzEquipPlus != null && IudetDogzEquipPlus.Count > 1)
{
ToExpTotal += IudetDogzEquipPlus[1];
@@ -533,7 +533,7 @@
return;
}
m_DogZItemModel = ItemModel;
- var IudetDogzEquipPlus = ItemModel.GetUseDataModel((int)ItemUseDataKey.dogzEquipPlus);
+ var IudetDogzEquipPlus = ItemModel.GetUseData((int)ItemUseDataKey.dogzEquipPlus);
if (IudetDogzEquipPlus != null && IudetDogzEquipPlus.Count > 1)
{
DogZLv = IudetDogzEquipPlus[0];
diff --git a/System/Strengthening/GodBeastChildNodes.cs b/System/Strengthening/GodBeastChildNodes.cs
index 59cfe28..9276f0c 100644
--- a/System/Strengthening/GodBeastChildNodes.cs
+++ b/System/Strengthening/GodBeastChildNodes.cs
@@ -47,8 +47,8 @@
ItemModel itemModel = playerPack.GetItemByIndex(PackType.DogzItem, Index);
m_ItemCell.Init(itemModel);
m_ItemCell.countText.gameObject.SetActive(false);
- m_ItemCell.bindIcon.gameObject.SetActive(false);
- var IudetDogzEquipPlus = itemModel.GetUseDataModel((int)ItemUseDataKey.dogzEquipPlus);// 绁炲吔瑁呭寮哄寲淇℃伅鍒楄〃 [寮哄寲绛夌骇, 寮哄寲鐔熺粌搴
+ m_ItemCell.auctionIcon.gameObject.SetActive(false);
+ var IudetDogzEquipPlus = itemModel.GetUseData((int)ItemUseDataKey.dogzEquipPlus);// 绁炲吔瑁呭寮哄寲淇℃伅鍒楄〃 [寮哄寲绛夌骇, 寮哄寲鐔熺粌搴
TextNumber.gameObject.SetActive(false);
if (IudetDogzEquipPlus != null)
{
diff --git a/System/Strengthening/GodBeastEntry.cs b/System/Strengthening/GodBeastEntry.cs
index 767636f..ec80d18 100644
--- a/System/Strengthening/GodBeastEntry.cs
+++ b/System/Strengthening/GodBeastEntry.cs
@@ -54,7 +54,7 @@
}
m_itemCell.Init(ItemModel);
var itemConfig = ItemConfig.Get(itemModel[i].itemId);
- var IudetDogzEquipPlus = itemModel[i].GetUseDataModel((int)ItemUseDataKey.dogzEquipPlus);// 绁炲吔瑁呭寮哄寲淇℃伅鍒楄〃 [寮哄寲绛夌骇, 寮哄寲鐔熺粌搴
+ var IudetDogzEquipPlus = itemModel[i].GetUseData((int)ItemUseDataKey.dogzEquipPlus);// 绁炲吔瑁呭寮哄寲淇℃伅鍒楄〃 [寮哄寲绛夌骇, 寮哄寲鐔熺粌搴
m_Item_Text.color = UIHelper.GetUIColor(itemConfig.ItemColor);
if (IudetDogzEquipPlus != null && IudetDogzEquipPlus[0] > 0)
{
diff --git a/System/Strengthening/GodBeastModel.cs b/System/Strengthening/GodBeastModel.cs
index a952dfc..919ad3f 100644
--- a/System/Strengthening/GodBeastModel.cs
+++ b/System/Strengthening/GodBeastModel.cs
@@ -126,7 +126,7 @@
for (int i = 0; i < itemModel.Count; i++)
{
ItemModel item = itemModel[i];
- var IudetDogzEquipPlus = item.GetUseDataModel((int)ItemUseDataKey.dogzEquipPlus);
+ var IudetDogzEquipPlus = item.GetUseData((int)ItemUseDataKey.dogzEquipPlus);
if (IudetDogzEquipPlus != null)
{
int lv = IudetDogzEquipPlus[0];
@@ -161,7 +161,7 @@
{
return SiteEnhancementAttributeDic;
}
- var IudetDogzEquipPlus = item.GetUseDataModel((int)ItemUseDataKey.dogzEquipPlus);
+ var IudetDogzEquipPlus = item.GetUseData((int)ItemUseDataKey.dogzEquipPlus);
if (IudetDogzEquipPlus != null && IudetDogzEquipPlus[0] > 0)
{
var DogzEquipConfig = DogzEquipPlusConfig.GetEquipplaceAndLevel(item.config.EquipPlace, IudetDogzEquipPlus[0]);
@@ -197,7 +197,7 @@
}
int lv = QualityLimit[itemModel.config.ItemColor];//鑾峰彇鏈�澶у己鍖栫瓑绾�
var DogzEquipMaxConfig = DogzEquipPlusConfig.GetEquipplaceAndLevel(itemModel.config.EquipPlace, lv);
- var IudetDogzEquipPlus = itemModel.GetUseDataModel((int)ItemUseDataKey.dogzEquipPlus);
+ var IudetDogzEquipPlus = itemModel.GetUseData((int)ItemUseDataKey.dogzEquipPlus);
if (IudetDogzEquipPlus != null)
{
@@ -215,7 +215,7 @@
{
if (item_Model.config.Effect1 == 235)
{
- var _IudetDogzEquipPlus = item_Model.GetUseDataModel((int)ItemUseDataKey.dogzEquipPlus);
+ var _IudetDogzEquipPlus = item_Model.GetUseData((int)ItemUseDataKey.dogzEquipPlus);
SingleProficiency += item_Model.config.EffectValueA1 * Absorption_Dic[key];
if (_IudetDogzEquipPlus != null)
{
@@ -316,7 +316,7 @@
private int GetLV(ItemModel _ItemModel)
{
- var IudetDogzEquipPlus = _ItemModel.GetUseDataModel((int)ItemUseDataKey.dogzEquipPlus);
+ var IudetDogzEquipPlus = _ItemModel.GetUseData((int)ItemUseDataKey.dogzEquipPlus);
if (IudetDogzEquipPlus != null)
{
return IudetDogzEquipPlus[0];
@@ -325,7 +325,7 @@
}
private int GetProficiency(ItemModel _ItemModel)
{
- var IudetDogzEquipPlus = _ItemModel.GetUseDataModel((int)ItemUseDataKey.dogzEquipPlus);
+ var IudetDogzEquipPlus = _ItemModel.GetUseData((int)ItemUseDataKey.dogzEquipPlus);
if (IudetDogzEquipPlus != null)
{
return IudetDogzEquipPlus[1];
@@ -361,7 +361,7 @@
{
ItemColor = itemModel[i].config.ItemColor;
}
- var IudetDogzEquipPlus = itemModel[i].GetUseDataModel((int)ItemUseDataKey.dogzEquipPlus);// 绁炲吔瑁呭寮哄寲淇℃伅鍒楄〃 [寮哄寲绛夌骇, 寮哄寲鐔熺粌搴
+ var IudetDogzEquipPlus = itemModel[i].GetUseData((int)ItemUseDataKey.dogzEquipPlus);// 绁炲吔瑁呭寮哄寲淇℃伅鍒楄〃 [寮哄寲绛夌骇, 寮哄寲鐔熺粌搴
if (IudetDogzEquipPlus == null)//鍒ゆ柇鏄惁閮芥弧绾� 婊$骇涓嶅彲浜孩鐐�
{
Istrue = true;
@@ -409,7 +409,7 @@
{
ItemModel _itemModel = playerPack.GetItemByIndex(PackType.DogzEquip, RedPointLIst[i]);
int MaxLv= QualityLimit[_itemModel.config.ItemColor];//鑾峰彇鏈�澶у己鍖栫瓑绾�
- var _IudetDogzEquipPlus = _itemModel.GetUseDataModel((int)ItemUseDataKey.dogzEquipPlus);
+ var _IudetDogzEquipPlus = _itemModel.GetUseData((int)ItemUseDataKey.dogzEquipPlus);
if (_IudetDogzEquipPlus != null)
{
if (_IudetDogzEquipPlus[0]<MaxLv && _IudetDogzEquipPlus[0] < Lv)
diff --git a/System/Strengthening/GodBeastReinforcementWin.cs b/System/Strengthening/GodBeastReinforcementWin.cs
index 848404d..8f1153a 100644
--- a/System/Strengthening/GodBeastReinforcementWin.cs
+++ b/System/Strengthening/GodBeastReinforcementWin.cs
@@ -175,7 +175,7 @@
godBeastClass.EquipScore = itemModel[i].equipScore;
godBeastClass.ItemPlace = itemModel[i].gridIndex;
godBeastClass.GodBeastId = key;
- var IudetDogzEquipPlus = itemModel[i].GetUseDataModel((int)ItemUseDataKey.dogzEquipPlus);// 绁炲吔瑁呭寮哄寲淇℃伅鍒楄〃 [寮哄寲绛夌骇, 寮哄寲鐔熺粌搴
+ var IudetDogzEquipPlus = itemModel[i].GetUseData((int)ItemUseDataKey.dogzEquipPlus);// 绁炲吔瑁呭寮哄寲淇℃伅鍒楄〃 [寮哄寲绛夌骇, 寮哄寲鐔熺粌搴
if (IudetDogzEquipPlus == null)
{
godBeastClass.GodBeastLv = 0;
diff --git a/System/Strengthening/GodBeastSlidingList.cs b/System/Strengthening/GodBeastSlidingList.cs
index 0c43a3a..05cc048 100644
--- a/System/Strengthening/GodBeastSlidingList.cs
+++ b/System/Strengthening/GodBeastSlidingList.cs
@@ -214,7 +214,7 @@
godBeastBagClass.EquipScore = itemModel.equipScore;
godBeastBagClass.Part = itemModel.config.EquipPlace;
godBeastBagClass.Count = itemModel.count;
- var IudetDogzEquipPlus = itemModel.GetUseDataModel((int)ItemUseDataKey.dogzEquipPlus);// 绁炲吔瑁呭寮哄寲淇℃伅鍒楄〃 [寮哄寲绛夌骇, 寮哄寲鐔熺粌搴
+ var IudetDogzEquipPlus = itemModel.GetUseData((int)ItemUseDataKey.dogzEquipPlus);// 绁炲吔瑁呭寮哄寲淇℃伅鍒楄〃 [寮哄寲绛夌骇, 寮哄寲鐔熺粌搴
if (IudetDogzEquipPlus == null)
{
godBeastBagClass.LV = 0;
diff --git a/System/Strengthening/MasterCell.cs b/System/Strengthening/MasterCell.cs
index 50590fb..f28100e 100644
--- a/System/Strengthening/MasterCell.cs
+++ b/System/Strengthening/MasterCell.cs
@@ -28,8 +28,8 @@
{
itemBaisc.gameObject.SetActive(true);
itemBaisc.Init(itemModel);
- itemBaisc.cellBtn.RemoveAllListeners();
- itemBaisc.cellBtn.AddListener(()=>
+ itemBaisc.button.RemoveAllListeners();
+ itemBaisc.button.AddListener(()=>
{
tipsModel.SetItemTipsModel(PackType.Equip,itemModel.guid);
});
diff --git a/System/Strengthening/StrengthenModel.cs b/System/Strengthening/StrengthenModel.cs
index 1f9ca6d..58df0e6 100644
--- a/System/Strengthening/StrengthenModel.cs
+++ b/System/Strengthening/StrengthenModel.cs
@@ -612,11 +612,11 @@
return false;
}
ItemModel itemModel = playerPack.GetItemByIndex(PackType.Equip, (int)RoleEquipType.Wing);
- if (itemModel.GetUseDataModel((int)ItemUseDataKey.wingProgressValue) != null)
+ if (itemModel.GetUseData((int)ItemUseDataKey.wingProgressValue) != null)
{
int currentRefining = 0;
int currentReAll = 0;
- currentRefining = itemModel.GetUseDataModel((int)ItemUseDataKey.wingProgressValue)[0];//褰撳墠绮剧偧搴�
+ currentRefining = itemModel.GetUseData((int)ItemUseDataKey.wingProgressValue)[0];//褰撳墠绮剧偧搴�
if (tegWing.Count <= 0)
{
tegWing = WingRefineAttrConfig.GetValues();
diff --git a/System/Strengthening/WingsBouncedWin.cs b/System/Strengthening/WingsBouncedWin.cs
index 1a43753..9a00cc3 100644
--- a/System/Strengthening/WingsBouncedWin.cs
+++ b/System/Strengthening/WingsBouncedWin.cs
@@ -90,8 +90,8 @@
_WingButton.Icon.SetSprite(tagItem.IconKey);
_WingButton.WingsText.text = UIHelper.AppendColor((TextColType)color, tagItem.ItemName, true);
int _currentRefining = 0;//褰撳墠绮剧偧搴�
- if (WingDic[Index].GetUseDataModel(42) != null)
- _currentRefining = WingDic[Index].GetUseDataModel(42)[0];
+ if (WingDic[Index].GetUseData(42) != null)
+ _currentRefining = WingDic[Index].GetUseData(42)[0];
foreach (var config in refineAttrConfigs)
{
diff --git a/System/Strengthening/WingsRedDotModel.cs b/System/Strengthening/WingsRedDotModel.cs
index f66aa7d..ef79933 100644
--- a/System/Strengthening/WingsRedDotModel.cs
+++ b/System/Strengthening/WingsRedDotModel.cs
@@ -96,7 +96,7 @@
SinglePack singlePackModel = packModel.GetSinglePack(PackType.Item);
Dictionary<int, ItemModel> backpack_dic = singlePackModel.GetAllItems();
- List<int> wingsRefinelist = itemModel.GetUseDataModel((int)ItemUseDataKey.wingProgressValue);
+ List<int> wingsRefinelist = itemModel.GetUseData((int)ItemUseDataKey.wingProgressValue);
if (wingsRefinelist != null)
{
var config = WingRefineExpConfig.Get((int)itemModel.itemId);
diff --git a/System/Strengthening/WingsRefined.cs b/System/Strengthening/WingsRefined.cs
index 1197a62..b5fed5e 100644
--- a/System/Strengthening/WingsRefined.cs
+++ b/System/Strengthening/WingsRefined.cs
@@ -300,7 +300,7 @@
foreach (var key in _DevourDIc.Keys)
{
var wingConfig = WingRefineExpConfig.Get(_wingItemDic[key]);
- if (WingDic[key].GetUseDataModel((int)ItemUseDataKey.wingProgressValue) != null || WingDic[key].GetUseDataModel((int)ItemUseDataKey.wingMaterialItemID) != null)
+ if (WingDic[key].GetUseData((int)ItemUseDataKey.wingProgressValue) != null || WingDic[key].GetUseData((int)ItemUseDataKey.wingMaterialItemID) != null)
{
Min += wingConfig.EXPlower + GetWingRefiningValue(WingDic[key]); ;
@@ -374,17 +374,17 @@
{
dicWingUseDateValue.Clear();
int GetUseDateValue = 0;
- if (ItemModel.GetUseDataModel((int)ItemUseDataKey.wingMaterialItemID) != null
- || ItemModel.GetUseDataModel((int)ItemUseDataKey.wingMaterialItemCount) != null)
+ if (ItemModel.GetUseData((int)ItemUseDataKey.wingMaterialItemID) != null
+ || ItemModel.GetUseData((int)ItemUseDataKey.wingMaterialItemCount) != null)
{
- for (int i = 0; i < ItemModel.GetUseDataModel((int)ItemUseDataKey.wingMaterialItemID).Count; i++)
+ for (int i = 0; i < ItemModel.GetUseData((int)ItemUseDataKey.wingMaterialItemID).Count; i++)
{
- dicWingUseDateValue.Add(ItemModel.GetUseDataModel((int)ItemUseDataKey.wingMaterialItemID)[i], ItemModel.GetUseDataModel((int)ItemUseDataKey.wingMaterialItemCount)[i]);
+ dicWingUseDateValue.Add(ItemModel.GetUseData((int)ItemUseDataKey.wingMaterialItemID)[i], ItemModel.GetUseData((int)ItemUseDataKey.wingMaterialItemCount)[i]);
}
}
- if (ItemModel.GetUseDataModel((int)ItemUseDataKey.wingProgressValue) != null)
+ if (ItemModel.GetUseData((int)ItemUseDataKey.wingProgressValue) != null)
{
- GetUseDateValue += ItemModel.GetUseDataModel((int)ItemUseDataKey.wingProgressValue)[0];
+ GetUseDateValue += ItemModel.GetUseData((int)ItemUseDataKey.wingProgressValue)[0];
}
int WingLv1 = ItemModel.config.LV;
foreach (var key in dicWingUseDateValue.Keys)
@@ -634,9 +634,9 @@
ItemModel itemModel = playerPack.GetItemByIndex(PackType.Equip, (int)RoleEquipType.Wing);
- if (itemModel.GetUseDataModel((int)ItemUseDataKey.wingProgressValue) != null)
+ if (itemModel.GetUseData((int)ItemUseDataKey.wingProgressValue) != null)
{
- _currentRefining = itemModel.GetUseDataModel((int)ItemUseDataKey.wingProgressValue)[0];//褰撳墠绮剧偧搴�
+ _currentRefining = itemModel.GetUseData((int)ItemUseDataKey.wingProgressValue)[0];//褰撳墠绮剧偧搴�
}
else
{
@@ -896,7 +896,7 @@
return 0;
}
var wingConfig = WingRefineExpConfig.Get(_wingItemDic[Index]);
- if (WingDic[Index].GetUseDataModel((int)ItemUseDataKey.wingProgressValue) != null || WingDic[Index].GetUseDataModel((int)ItemUseDataKey.wingMaterialItemID) != null)
+ if (WingDic[Index].GetUseData((int)ItemUseDataKey.wingProgressValue) != null || WingDic[Index].GetUseData((int)ItemUseDataKey.wingMaterialItemID) != null)
{
Max = wingConfig.EXPupper + GetWingRefiningValue(WingDic[Index]);
}
diff --git a/System/Team/TeamDungeonTicketLackWin.cs b/System/Team/TeamDungeonTicketLackWin.cs
index e9ca6af..6c539cf 100644
--- a/System/Team/TeamDungeonTicketLackWin.cs
+++ b/System/Team/TeamDungeonTicketLackWin.cs
@@ -172,8 +172,7 @@
if (own < lackItem.count)
{
var moneyNeed = GetUnitPrice(lackType) * (lackItem.count - own);
- if (PlayerDatas.Instance.baseData.diamond < moneyNeed
- && PlayerDatas.Instance.baseData.bindDiamond < moneyNeed)
+ if (PlayerDatas.Instance.baseData.diamond < moneyNeed)
{
if (VersionConfig.Get().isBanShu)
{
@@ -184,8 +183,7 @@
}
else
{
- var moneyType = PlayerDatas.Instance.baseData.bindDiamond < moneyNeed ? 1 : 2;
- ConfirmTodo(lackType, moneyType);
+ ConfirmTodo(lackType, 1);
}
}
}
diff --git a/System/Tip/IconConfirmWin.cs b/System/Tip/IconConfirmWin.cs
index 061f090..088cb0a 100644
--- a/System/Tip/IconConfirmWin.cs
+++ b/System/Tip/IconConfirmWin.cs
@@ -98,8 +98,8 @@
itemBaisc.countText.text = ConfirmCancel.iconHaveCnt.ToString();
}
- itemBaisc.cellBtn.RemoveAllListeners();
- itemBaisc.cellBtn.AddListener(() =>
+ itemBaisc.button.RemoveAllListeners();
+ itemBaisc.button.AddListener(() =>
{
ItemAttrData attrData = new ItemAttrData(ConfirmCancel.iconItemId);
tipsModel.SetItemTipsModel(attrData);
diff --git a/System/Treasure/TreasureSoulPattern3.cs b/System/Treasure/TreasureSoulPattern3.cs
index e154b92..cf98665 100644
--- a/System/Treasure/TreasureSoulPattern3.cs
+++ b/System/Treasure/TreasureSoulPattern3.cs
@@ -42,13 +42,13 @@
for (int i = 0; i < m_Items.Length; i++)
{
m_Items[i].gameObject.SetActive(special.items != null && i < special.items.Count);
- m_Items[i].cellBtn.RemoveAllListeners();
+ m_Items[i].button.RemoveAllListeners();
if (special.items != null && i < special.items.Count)
{
var award = special.items[i];
ItemCellModel cellModel = new ItemCellModel(award.id, true, (ulong)award.count);
m_Items[i].Init(cellModel);
- m_Items[i].cellBtn.AddListener(() =>
+ m_Items[i].button.AddListener(() =>
{
ItemAttrData attrData = new ItemAttrData(award.id, true, (ulong)award.count);
ModelCenter.Instance.GetModel<ItemTipsModel>().SetItemTipsModel(attrData);
diff --git a/System/Treasure/TreasureSoulPattern4.cs b/System/Treasure/TreasureSoulPattern4.cs
index 4795cdd..c71b196 100644
--- a/System/Treasure/TreasureSoulPattern4.cs
+++ b/System/Treasure/TreasureSoulPattern4.cs
@@ -69,9 +69,9 @@
float value = 0;
if (ContainsProperty(itemConfig, 6, out value))
{
- if (itemModel.GetUseDataModel(42) != null)
+ if (itemModel.GetUseData(42) != null)
{
- value += strengthengmodel.BackpackWings(itemModel.itemId, itemModel.GetUseDataModel(42)[0])[1];
+ value += strengthengmodel.BackpackWings(itemModel.itemId, itemModel.GetUseData(42)[0])[1];
}
}
properties[0].gameObject.SetActive(true);
diff --git a/System/Treasure/TreasureSoulWin.cs b/System/Treasure/TreasureSoulWin.cs
index 827ad43..28be891 100644
--- a/System/Treasure/TreasureSoulWin.cs
+++ b/System/Treasure/TreasureSoulWin.cs
@@ -344,9 +344,9 @@
float value = 0;
if (ContainsProperty(itemConfig, 6, out value))
{
- if (itemModel.GetUseDataModel(42) != null)
+ if (itemModel.GetUseData(42) != null)
{
- value += strengthengmodel.BackpackWings(itemModel.itemId, itemModel.GetUseDataModel(42)[0])[1];
+ value += strengthengmodel.BackpackWings(itemModel.itemId, itemModel.GetUseData(42)[0])[1];
}
}
m_PreviewPropretys[0].gameObject.SetActive(true);
diff --git a/System/Vip/FairyJadeInvestmentWin.cs b/System/Vip/FairyJadeInvestmentWin.cs
index 359cced..7a46f51 100644
--- a/System/Vip/FairyJadeInvestmentWin.cs
+++ b/System/Vip/FairyJadeInvestmentWin.cs
@@ -351,9 +351,7 @@
private void GetMoney()
{
m_FairyJadeText.text = UIHelper.GetMoneyCnt(1).ToString();
- m_TieTheJadeText.text = UIHelper.GetMoneyCnt(2).ToString();
}
-
private void SelectButton()
{
diff --git a/System/Vip/FirstChargeTrialWin.cs b/System/Vip/FirstChargeTrialWin.cs
index 4e2fd7c..1f491c9 100644
--- a/System/Vip/FirstChargeTrialWin.cs
+++ b/System/Vip/FirstChargeTrialWin.cs
@@ -73,8 +73,8 @@
UI3DModelExhibition.Instance.ShowEquipment(config.ChangeOrd, _angle, _rawImage);
ItemCellModel ItemModel = new ItemCellModel(_weaponId,true,0);
m_ItemCell.Init(ItemModel);
- m_ItemCell.cellBtn.RemoveAllListeners();
- m_ItemCell.cellBtn.AddListener(()=>
+ m_ItemCell.button.RemoveAllListeners();
+ m_ItemCell.button.AddListener(()=>
{
ItemAttrData attrData = new ItemAttrData(_weaponId,false,1);
itemTipsModel.SetItemTipsModel(attrData);
diff --git a/System/Vip/FirstRechargeWin.cs b/System/Vip/FirstRechargeWin.cs
index 0069a3e..c67af04 100644
--- a/System/Vip/FirstRechargeWin.cs
+++ b/System/Vip/FirstRechargeWin.cs
@@ -67,7 +67,7 @@
for (int i = 0; i < m_Items.Length; i++)
{
var _index = i;
- m_Items[i].cellBtn.onClick.AddListener(() =>
+ m_Items[i].button.onClick.AddListener(() =>
{
OnItemClick(_index);
});
diff --git a/System/Vip/LimitedTimePackageWin.cs b/System/Vip/LimitedTimePackageWin.cs
index 4d6e8ac..4de1c93 100644
--- a/System/Vip/LimitedTimePackageWin.cs
+++ b/System/Vip/LimitedTimePackageWin.cs
@@ -169,8 +169,8 @@
var Item = ItemConfig.Get(items[type].itemId);
ItemCellModel cellModel = new ItemCellModel(items[type].itemId, true, (ulong)items[type].itemCount);
ItemCell.Init(cellModel);
- ItemCell.cellBtn.RemoveAllListeners();
- ItemCell.cellBtn.AddListener(() =>
+ ItemCell.button.RemoveAllListeners();
+ ItemCell.button.AddListener(() =>
{
ItemAttrData attrData = new ItemAttrData(items[type].itemId, false, (ulong)items[type].itemCount);
itemTipsModel.SetItemTipsModel(attrData);
diff --git a/System/Vip/NeedForWhiteInvestment.cs b/System/Vip/NeedForWhiteInvestment.cs
index e37d285..40b451d 100644
--- a/System/Vip/NeedForWhiteInvestment.cs
+++ b/System/Vip/NeedForWhiteInvestment.cs
@@ -81,8 +81,8 @@
case 0:
m_ItemCell_One.gameObject.SetActive(true);
m_ItemCell_One.Init(cellModel);
- m_ItemCell_One.cellBtn.RemoveAllListeners();
- m_ItemCell_One.cellBtn.AddListener(() =>
+ m_ItemCell_One.button.RemoveAllListeners();
+ m_ItemCell_One.button.AddListener(() =>
{
ItemAttrData attrData = new ItemAttrData(item.id, false, (ulong)item.count);
itemTipsModel.SetItemTipsModel(attrData);
@@ -91,8 +91,8 @@
case 1:
m_ItemCell_Two.gameObject.SetActive(true);
m_ItemCell_Two.Init(cellModel);
- m_ItemCell_Two.cellBtn.RemoveAllListeners();
- m_ItemCell_Two.cellBtn.AddListener(() =>
+ m_ItemCell_Two.button.RemoveAllListeners();
+ m_ItemCell_Two.button.AddListener(() =>
{
ItemAttrData attrData = new ItemAttrData(item.id, false, (ulong)item.count);
itemTipsModel.SetItemTipsModel(attrData);
@@ -101,8 +101,8 @@
case 2:
m_ItemCell_Three.gameObject.SetActive(true);
m_ItemCell_Three.Init(cellModel);
- m_ItemCell_Three.cellBtn.RemoveAllListeners();
- m_ItemCell_Three.cellBtn.AddListener(() =>
+ m_ItemCell_Three.button.RemoveAllListeners();
+ m_ItemCell_Three.button.AddListener(() =>
{
ItemAttrData attrData = new ItemAttrData(item.id, false, (ulong)item.count);
itemTipsModel.SetItemTipsModel(attrData);
diff --git a/System/Vip/RechargeBoxWin.cs b/System/Vip/RechargeBoxWin.cs
index 44d37b6..46b2fec 100644
--- a/System/Vip/RechargeBoxWin.cs
+++ b/System/Vip/RechargeBoxWin.cs
@@ -39,7 +39,7 @@
for (int i = 0; i < m_Items.Length; i++)
{
var _index = i;
- m_Items[i].cellBtn.onClick.AddListener(() =>
+ m_Items[i].button.onClick.AddListener(() =>
{
OnItemClick(_index);
});
diff --git a/System/Vip/RechargeWin.cs b/System/Vip/RechargeWin.cs
index ff33a7c..a7489d6 100644
--- a/System/Vip/RechargeWin.cs
+++ b/System/Vip/RechargeWin.cs
@@ -11,7 +11,6 @@
{
[SerializeField] RechargeBehaviour[] m_Recharges;
[SerializeField] Text m_GoldValue;
- [SerializeField] Text m_GoldPaperValue;
[SerializeField] Button m_SpecialRechargeBtn;
VipModel m_Model;
@@ -111,7 +110,6 @@
void UpdateGoldValue()
{
m_GoldValue.text = UIHelper.ReplaceLargeNum(PlayerDatas.Instance.baseData.diamond);
- m_GoldPaperValue.text = UIHelper.ReplaceLargeNum(PlayerDatas.Instance.baseData.bindDiamond);
}
private void RechargeCountEvent(int _id)
diff --git a/System/Vip/VipInvest/RotatePointer.cs b/System/Vip/VipInvest/RotatePointer.cs
index 2f56778..229b6ff 100644
--- a/System/Vip/VipInvest/RotatePointer.cs
+++ b/System/Vip/VipInvest/RotatePointer.cs
@@ -50,7 +50,7 @@
}
private void OnEnable()
{
- FairyJade = (int)UIHelper.GetMoneyCnt(2);
+ FairyJade = (int)UIHelper.GetMoneyCnt(1);
}
private void OnDisable()
{
@@ -68,14 +68,14 @@
sequence.Kill();
transform.localRotation = Quaternion.Euler(0, 0, -Angle);
m_CheckDisplay.ShowSelected(wheelOfFortuneModel.Lattice);
- int money = ((int)UIHelper.GetMoneyCnt(2) - FairyJade);
+ int money = ((int)UIHelper.GetMoneyCnt(1) - FairyJade);
string str=UIHelper.ServerStringTrim(PlayerDatas.Instance.baseData.PlayerName);
if (money>=BindJadeWheelNotice)
{
SysNotifyMgr.Instance.ShowTip("BindJadeNotice", str, money);
}
- FairyJade = (int)UIHelper.GetMoneyCnt(2);
+ FairyJade = (int)UIHelper.GetMoneyCnt(1);
if (IsButtonShow != null)
{
IsButtonShow(true);
@@ -128,13 +128,13 @@
IsButtonShow(true);
}
m_CheckDisplay.ShowSelected(wheelOfFortuneModel.Lattice);
- int money = ((int)UIHelper.GetMoneyCnt(2) - FairyJade);
+ int money = ((int)UIHelper.GetMoneyCnt(1) - FairyJade);
string str = UIHelper.ServerStringTrim(PlayerDatas.Instance.baseData.PlayerName);
if (money >= BindJadeWheelNotice)
{
SysNotifyMgr.Instance.ShowTip("BindJadeNotice", str, money);
}
- FairyJade = (int)UIHelper.GetMoneyCnt(2);
+ FairyJade = (int)UIHelper.GetMoneyCnt(1);
});
IsRotateBool = false;
}
diff --git a/System/Vip/VipInvest/VipInvestWin.cs b/System/Vip/VipInvest/VipInvestWin.cs
index 8fabf2f..fed62fb 100644
--- a/System/Vip/VipInvest/VipInvestWin.cs
+++ b/System/Vip/VipInvest/VipInvestWin.cs
@@ -15,7 +15,6 @@
[SerializeField] Text m_RemainingDays;//鍓╀綑澶╂暟
[SerializeField] Button m_GoToVipBoss;
[SerializeField] Text m_FairyJadeText;//浠欑帀
- [SerializeField] Text m_TieTheJadeText;//缁戠帀
VipInvestModel _investModel;
VipInvestModel investModel { get { return _investModel ?? (_investModel = ModelCenter.Instance.GetModel<VipInvestModel>()); } }
ItemTipsModel _tipsModel;
@@ -188,8 +187,8 @@
InvestReward reward = rewardlist[i];
ItemCellModel cellModel = new ItemCellModel(reward.id, false, reward.count);
itemBaisc.Init(cellModel);
- itemBaisc.cellBtn.RemoveAllListeners();
- itemBaisc.cellBtn.AddListener(() =>
+ itemBaisc.button.RemoveAllListeners();
+ itemBaisc.button.AddListener(() =>
{
ItemAttrData attrData = new ItemAttrData(reward.id, false, reward.count);
tipsModel.SetItemTipsModel(attrData);
@@ -308,7 +307,6 @@
private void GetFairyJade()
{
m_FairyJadeText.text = UIHelper.GetMoneyCnt(1).ToString();
- m_TieTheJadeText.text = UIHelper.GetMoneyCnt(2).ToString();
}
}
}
diff --git a/System/Vip/VipInvest/WheelOfFortuneWin.cs b/System/Vip/VipInvest/WheelOfFortuneWin.cs
index cc2fe0e..902ea7f 100644
--- a/System/Vip/VipInvest/WheelOfFortuneWin.cs
+++ b/System/Vip/VipInvest/WheelOfFortuneWin.cs
@@ -37,7 +37,7 @@
VipModel vipmodel { get { return m_Vipmodel ?? (m_Vipmodel = ModelCenter.Instance.GetModel<VipModel>()); } }
WheelOfFortuneModel wheelOfFortuneModel { get { return ModelCenter.Instance.GetModel<WheelOfFortuneModel>(); } }
private int remainingTimes = 0;//鍓╀綑娆℃暟
- private int FairyJade = 0;//鑾峰彇褰撳墠缁戠帀
+ private int FairyJade = 0;
bool IsSend = true;
public float Second = 1f;
private float timeType = 0f;
@@ -56,9 +56,8 @@
protected override void OnPreOpen()
{
IsSend = true;
- FairyJade = (int)UIHelper.GetMoneyCnt(2);
+ FairyJade = (int)UIHelper.GetMoneyCnt(1);
Money1_Text.text = FairyJade.ToString();
- Money2_Text.text = UIHelper.GetMoneyCnt(1).ToString();
m_NeedMoney_Text.text = wheelOfFortuneModel.NeedJade.ToString();
m_RotatePointer.Init();
m_LotteryBtn.interactable = true;
@@ -167,7 +166,7 @@
if (IsSend)
{
m_CheckDisplay.CloseAll();
- FairyJade = (int)UIHelper.GetMoneyCnt(2);
+ FairyJade = (int)UIHelper.GetMoneyCnt(1);
Money1_Text.text = FairyJade.ToString();
wheelOfFortuneModel.StartTheDraw();//寮�濮嬫娊濂�
IsSend = false;
@@ -213,14 +212,14 @@
{
var temp = Math.Floor(value);
Money1_Text.text = temp + "";
- }, FairyJade, (int)UIHelper.GetMoneyCnt(2), RollingTime));
+ }, FairyJade, (int)UIHelper.GetMoneyCnt(1), RollingTime));
mScoreSequence.AppendCallback(() =>
{
Money1_Text.transform.localRotation = Quaternion.Euler(0, 0, 0);
m_RotationTween.enabled = false;
});
- FairyJade = (int)UIHelper.GetMoneyCnt(2);
+ FairyJade = (int)UIHelper.GetMoneyCnt(1);
}
private void LackOfVIP()//VIP 涓嶈冻
diff --git a/System/Vip/VipWin.cs b/System/Vip/VipWin.cs
index bc5acd6..fa1ff05 100644
--- a/System/Vip/VipWin.cs
+++ b/System/Vip/VipWin.cs
@@ -377,8 +377,8 @@
{
ItemCellModel cellModel = new ItemCellModel(award.id, false, (ulong)award.count);
m_Items[index].Init(cellModel);
- m_Items[index].cellBtn.RemoveAllListeners();
- m_Items[index].cellBtn.AddListener(() =>
+ m_Items[index].button.RemoveAllListeners();
+ m_Items[index].button.AddListener(() =>
{
TreasureEffectModel effectModel = ModelCenter.Instance.GetModel<TreasureEffectModel>();
ItemConfig itemConfig = ItemConfig.Get(award.id);
diff --git a/System/Welfare/ConsumeRebateCell.cs b/System/Welfare/ConsumeRebateCell.cs
index 3d7105f..c6258a5 100644
--- a/System/Welfare/ConsumeRebateCell.cs
+++ b/System/Welfare/ConsumeRebateCell.cs
@@ -43,8 +43,8 @@
m_RebateItems[i].gameObject.SetActive(true);
ItemCellModel itemCell = new ItemCellModel(itemDate.itemId, true, (ulong)itemDate.count);
m_RebateItems[i].Init(itemCell);
- m_RebateItems[i].cellBtn.RemoveAllListeners();
- m_RebateItems[i].cellBtn.AddListener(() =>
+ m_RebateItems[i].button.RemoveAllListeners();
+ m_RebateItems[i].button.AddListener(() =>
{
ItemAttrData itemAttrData = new ItemAttrData(itemDate.itemId, true, (ulong)itemDate.count);
ModelCenter.Instance.GetModel<ItemTipsModel>().SetItemTipsModel(itemAttrData);
diff --git a/System/Welfare/ExchangeGetItemWin.cs b/System/Welfare/ExchangeGetItemWin.cs
index 33fe32f..372dc2c 100644
--- a/System/Welfare/ExchangeGetItemWin.cs
+++ b/System/Welfare/ExchangeGetItemWin.cs
@@ -51,8 +51,8 @@
ItemCellModel cellModel = new ItemCellModel((int)itemModel.ItemID,false ,(ulong)itemModel.Count, "",PackType.Deleted,
false,ConfigParse.Analysis(itemModel.UserData));
itemBaiscs[i].Init(cellModel);
- itemBaiscs[i].cellBtn.RemoveAllListeners();
- itemBaiscs[i].cellBtn.AddListener(()=>
+ itemBaiscs[i].button.RemoveAllListeners();
+ itemBaiscs[i].button.AddListener(()=>
{
ItemAttrData attrData = new ItemAttrData((int)itemModel.ItemID, false
, (ulong)itemModel.Count,-1,false, PackType.Deleted,
diff --git a/System/Welfare/LevelGiftWin.cs b/System/Welfare/LevelGiftWin.cs
index 67d806f..990853a 100644
--- a/System/Welfare/LevelGiftWin.cs
+++ b/System/Welfare/LevelGiftWin.cs
@@ -86,8 +86,8 @@
var _item = _items[i];
ItemCellModel _ItemData = new ItemCellModel(_item.id, false, (ulong)_item.count);
_cell.items[i].Init(_ItemData);
- _cell.items[i].cellBtn.RemoveAllListeners();
- _cell.items[i].cellBtn.AddListener(() =>
+ _cell.items[i].button.RemoveAllListeners();
+ _cell.items[i].button.AddListener(() =>
{
ItemAttrData _itemPropertyData = new ItemAttrData(_item.id, false, (ulong)_item.count);
ModelCenter.Instance.GetModel<ItemTipsModel>().SetItemTipsModel(_itemPropertyData);
@@ -102,8 +102,8 @@
var _vipAward = model.m_VipItemDict[_cell.index];
ItemCellModel _vipDate = new ItemCellModel(_vipAward.item.id, false, (ulong)_vipAward.item.count);
_cell.vipItem.Init(_vipDate);
- _cell.vipItem.cellBtn.RemoveAllListeners();
- _cell.vipItem.cellBtn.AddListener(() =>
+ _cell.vipItem.button.RemoveAllListeners();
+ _cell.vipItem.button.AddListener(() =>
{
ItemAttrData _itemPropertyData = new ItemAttrData(_vipAward.item.id, false, (ulong)_vipAward.item.count);
ModelCenter.Instance.GetModel<ItemTipsModel>().SetItemTipsModel(_itemPropertyData);
diff --git a/Utility/CalculateSkillGetAttrHurtUtility.cs b/Utility/CalculateSkillGetAttrHurtUtility.cs
index 39c8f71..66042b9 100644
--- a/Utility/CalculateSkillGetAttrHurtUtility.cs
+++ b/Utility/CalculateSkillGetAttrHurtUtility.cs
@@ -35,8 +35,8 @@
var dict = singlePack.GetAllItems();
foreach (var model in dict.Values)
{
- var legendIds = model.GetUseDataModel((int)ItemUseDataKey.legendAttrID);
- var legendValues = model.GetUseDataModel((int)ItemUseDataKey.legendAttrValue);
+ var legendIds = model.GetUseData((int)ItemUseDataKey.legendAttrID);
+ var legendValues = model.GetUseData((int)ItemUseDataKey.legendAttrValue);
if (legendIds != null && legendValues != null)
{
for(int i = 0; i < legendIds.Count; i++)
diff --git a/Utility/UIHelper.cs b/Utility/UIHelper.cs
index 972ff84..fb72e0f 100644
--- a/Utility/UIHelper.cs
+++ b/Utility/UIHelper.cs
@@ -843,10 +843,6 @@
{
return PlayerDatas.Instance.baseData.diamond;
}
- case 2:
- {
- return PlayerDatas.Instance.baseData.bindDiamond;
- }
case 3:
{
return PlayerDatas.Instance.baseData.allCopper;
--
Gitblit v1.8.0