Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
| | |
| | | // B5 12 拍卖行查询拍卖记录 #tagCGQueryAuctionRecord
|
| | |
|
| | | public class CB512_tagCGQueryAuctionRecord : GameNetPackBasic {
|
| | | public byte RecordType; //记录类型 0-我的拍品记录 1-仙盟拍品记录 2-我的竞拍记录
|
| | |
|
| | | public CB512_tagCGQueryAuctionRecord () {
|
| | | combineCmd = (ushort)0x1801;
|
| | |
| | | }
|
| | |
|
| | | public override void WriteToBytes () {
|
| | | WriteBytes (RecordType, NetDataType.BYTE);
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | [SerializeField] Button m_CloseButton;
|
| | | AuctionInquiryModel model { get { return ModelCenter.Instance.GetModel<AuctionInquiryModel>(); } }
|
| | | AuctionHelpModel auctionHelpModel { get { return ModelCenter.Instance.GetModel<AuctionHelpModel>(); } } |
| | | List<AuctionItemConfig> auctionItemList; |
| | | List<AuctionItemConfig> auctionItemList=new List<AuctionItemConfig>(); |
| | | int ItemType = 1; |
| | | #region Built-in |
| | | enum AttentionType
|
| | |
| | | DebugEx.LogError("物品表没有找到该物品,物品ID为" + auctionItem.ItemID);
|
| | | return;
|
| | | }
|
| | | ItemCellModel cellModel = new ItemCellModel(itemConfig.ID, true, (ulong)1, itemConfig.BindType);
|
| | | ItemCellModel cellModel = new ItemCellModel(itemConfig.ID, true, (ulong)1,0);
|
| | | itemCell.Init(cellModel);
|
| | | textName.text = itemConfig.ItemName;
|
| | | if (model.AttentionAuctionItemIDdic.ContainsKey(auctionItem.ItemID))
|
| | |
| | | get { return selectedGenreNow; }
|
| | | set { selectedGenreNow = value; }
|
| | | }
|
| | | private ItemAttrData attrData;//当前选择想要上架的物品
|
| | | public ItemAttrData AttrData
|
| | | private ItemModel itemModel;//当前选择想要上架的物品
|
| | | public ItemModel ItemModel
|
| | | {
|
| | | get { return attrData; }
|
| | | set { attrData = value; }
|
| | | get { return itemModel; }
|
| | | set { itemModel = value; }
|
| | | }
|
| | | private bool wait = true;
|
| | | public bool Wait
|
| | |
| | | GameNetSystem.Instance.SendInfo(cb511);
|
| | | } |
| | | |
| | | public void SendQueryAuctionRecord()//拍卖行查询拍卖记录
|
| | | public void SendQueryAuctionRecord(int recordType)//拍卖行查询拍卖记录(0-我的拍品记录 1-仙盟拍品记录 2-我的竞拍记录)
|
| | | {
|
| | | CB512_tagCGQueryAuctionRecord cb512 = new CB512_tagCGQueryAuctionRecord();
|
| | | cb512.RecordType = (byte)recordType;
|
| | | GameNetSystem.Instance.SendInfo(cb512);
|
| | | }
|
| | | |
| | |
| | | [SerializeField] Button m_CloseBtn; |
| | | [SerializeField] Button m_UseBtn;
|
| | | [SerializeField] Button m_Auction;
|
| | | AuctionHelpModel auctionHelpModel { get { return ModelCenter.Instance.GetModel<AuctionHelpModel>(); } } |
| | | AuctionHelpModel auctionHelpModel { get { return ModelCenter.Instance.GetModel<AuctionHelpModel>(); } }
|
| | | ItemTipsModel itemTipsModel { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } } |
| | | #region Built-in |
| | | protected override void BindController() |
| | | { |
| | |
| | | private void OnClickUseBtn()
|
| | | {
|
| | | CloseImmediately();
|
| | | itemTipsModel.SetItemTipsModel(PackType.Item, auctionHelpModel.ItemModel.guid, false, true);
|
| | | itemTipsModel.SetBagTipsBtn(itemTipsModel.curAttrData);
|
| | | itemTipsModel.ShowUICtrl();
|
| | | } |
| | | private void OnClickAuction()
|
| | | {
|
| | | CloseImmediately();
|
| | | AuctionInquiry.Instance.SendSellAuctionItem(auctionHelpModel.ItemModel.itemInfo.index);
|
| | | } |
| | | private void GetItemID( )
|
| | | {
|
| | | if (auctionHelpModel.AttrData == null) { return; } |
| | | var config = AuctionItemConfig.Get(auctionHelpModel.AttrData.itemId);
|
| | | var itemConfig = ItemConfig.Get(auctionHelpModel.AttrData.itemId);
|
| | | m_ItemName.text = itemConfig.ItemName;
|
| | | if (config == null || itemConfig == null) { return; }
|
| | | if (auctionHelpModel.ItemModel == null) { return; } |
| | | var config = AuctionItemConfig.Get(auctionHelpModel.ItemModel.itemId);
|
| | | ItemCellModel cellModel = new ItemCellModel(auctionHelpModel.ItemModel.itemId, true, (ulong)1,1);
|
| | | m_ItemCell.Init(cellModel);
|
| | | m_ItemName.text = auctionHelpModel.ItemModel.config.ItemName;
|
| | | if (config == null) { return; }
|
| | | m_BasePriceText.text = config.BasePrice.ToString();
|
| | | m_BuyoutPriceText.text = config.BuyoutPrice.ToString();
|
| | | } |
| | |
| | | needJade = familyAuctionItem.BidderPrice + auctionItem.BiddingAdd;
|
| | | }
|
| | | m_JadeNumber.text = (needJade).ToString();
|
| | | m_JadeNumber1.text = auctionItem.BuyoutPrice.ToString(); |
| | | m_JadeNumber1.text = auctionItem.BuyoutPrice.ToString();
|
| | | if (auctionItem.BuyoutPrice == 0)
|
| | | {
|
| | | m_PriceButton.gameObject.SetActive(false);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_PriceButton.gameObject.SetActive(true);
|
| | | }
|
| | | m_PriceButton.SetListener(() => //一口价
|
| | | {
|
| | | int jade = (int)PlayerDatas.Instance.baseData.diamond;
|
| | | string str = "是否花费" + auctionItem.BuyoutPrice + "立即拍下商品?";
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("L1003"), str, (bool isOk) => {
|
| | | if (jade >= auctionItem.BuyoutPrice)
|
| | | if (isOk)
|
| | | {
|
| | | AuctionInquiry.Instance.SendSellAuctionItem(GUIID, auctionItem.BuyoutPrice);
|
| | | if (jade >= auctionItem.BuyoutPrice)
|
| | | {
|
| | | AuctionInquiry.Instance.SendSellAuctionItem(GUIID, auctionItem.BuyoutPrice);
|
| | | }
|
| | | else
|
| | | {
|
| | | WindowCenter.Instance.Open<RechargeTipWin>();
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | WindowCenter.Instance.Open<RechargeTipWin>();
|
| | | }
|
| | | |
| | | });
|
| | | });
|
| | | m_JadeNumber2.text = (needJade).ToString();
|
| | |
| | | int jade = (int)PlayerDatas.Instance.baseData.diamond;
|
| | | string str = "是否花费" + needJade + "参与竞价?";
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("L1003"), str, (bool isOk) => {
|
| | | if (jade >= needJade)
|
| | | if (isOk)
|
| | | {
|
| | | AuctionInquiry.Instance.SendSellAuctionItem(GUIID, needJade);
|
| | | }
|
| | | else
|
| | | {
|
| | | WindowCenter.Instance.Open<RechargeTipWin>();
|
| | | }
|
| | | if (jade >= needJade)
|
| | | {
|
| | | AuctionInquiry.Instance.SendSellAuctionItem(GUIID, needJade);
|
| | | }
|
| | | else
|
| | | {
|
| | | WindowCenter.Instance.Open<RechargeTipWin>();
|
| | | }
|
| | | } |
| | | });
|
| | |
|
| | | });
|
| | |
| | | }
|
| | | m_JadeNumber.text = needJade.ToString();
|
| | | m_JadeNumber1.text = auctionItem.BuyoutPrice.ToString();
|
| | | if (auctionItem.BuyoutPrice == 0)
|
| | | {
|
| | | m_PriceButton.gameObject.SetActive(false);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_PriceButton.gameObject.SetActive(true);
|
| | | }
|
| | | m_PriceButton.SetListener(() => //一口价
|
| | | {
|
| | | int jade = (int)PlayerDatas.Instance.baseData.diamond;
|
| | | string str = "是否花费" + auctionItem.BuyoutPrice + "立即拍下商品?";
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("L1003"), str, (bool isOk) => {
|
| | | if (jade >= auctionItem.BuyoutPrice)
|
| | | if (isOk)
|
| | | {
|
| | | AuctionInquiry.Instance.SendSellAuctionItem(fullServiceAuction.ItemGUID, auctionItem.BuyoutPrice);
|
| | | if (jade >= auctionItem.BuyoutPrice)
|
| | | {
|
| | | AuctionInquiry.Instance.SendSellAuctionItem(fullServiceAuction.ItemGUID, auctionItem.BuyoutPrice);
|
| | | }
|
| | | else
|
| | | {
|
| | | WindowCenter.Instance.Open<RechargeTipWin>();
|
| | | }
|
| | |
|
| | | }
|
| | | else
|
| | | {
|
| | | WindowCenter.Instance.Open<RechargeTipWin>();
|
| | | }
|
| | | |
| | | });
|
| | | });
|
| | | m_JadeNumber2.text = needJade.ToString();
|
| | |
| | | int jade = (int)PlayerDatas.Instance.baseData.diamond;
|
| | | string str = "是否花费" + needJade + "参与竞价?";
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("L1003"), str, (bool isOk) => {
|
| | | if (jade >= needJade)
|
| | | if (isOk)
|
| | | {
|
| | | AuctionInquiry.Instance.SendSellAuctionItem(fullServiceAuction.ItemGUID, needJade);
|
| | | }
|
| | | else
|
| | | {
|
| | | WindowCenter.Instance.Open<RechargeTipWin>();
|
| | | }
|
| | | if (jade >= needJade)
|
| | | {
|
| | | AuctionInquiry.Instance.SendSellAuctionItem(fullServiceAuction.ItemGUID, needJade);
|
| | | }
|
| | | else
|
| | | {
|
| | | WindowCenter.Instance.Open<RechargeTipWin>();
|
| | | }
|
| | | } |
| | | });
|
| | | });
|
| | | }
|
| | |
| | | needJade = myAuction.BidderPrice + auctionItem.BiddingAdd;
|
| | | }
|
| | | m_JadeNumber.text = (needJade).ToString();
|
| | | if (auctionItem.BuyoutPrice == 0)
|
| | | {
|
| | | m_PriceButton.gameObject.SetActive(false);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_PriceButton.gameObject.SetActive(true);
|
| | | }
|
| | | m_JadeNumber1.text = auctionItem.BuyoutPrice.ToString();
|
| | | m_PriceButton.SetListener(() => //一口价
|
| | | {
|
| | | int jade = (int)PlayerDatas.Instance.baseData.diamond;
|
| | | string str = "是否花费" + auctionItem.BuyoutPrice + "立即拍下商品?";
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("L1003"), str, (bool isOk) => {
|
| | | if (jade >= auctionItem.BuyoutPrice)
|
| | | if (isOk)
|
| | | {
|
| | | AuctionInquiry.Instance.SendSellAuctionItem(GUIID, auctionItem.BuyoutPrice);
|
| | | }
|
| | | else
|
| | | {
|
| | | WindowCenter.Instance.Open<RechargeTipWin>();
|
| | | }
|
| | | if (jade >= auctionItem.BuyoutPrice)
|
| | | {
|
| | | AuctionInquiry.Instance.SendSellAuctionItem(GUIID, auctionItem.BuyoutPrice);
|
| | | }
|
| | | else
|
| | | {
|
| | | WindowCenter.Instance.Open<RechargeTipWin>();
|
| | | }
|
| | | } |
| | | });
|
| | | });
|
| | | m_JadeNumber2.text = (needJade).ToString();
|
| | |
| | | int jade = (int)PlayerDatas.Instance.baseData.diamond;
|
| | | string str = "是否花费" + needJade + "参与竞价?";
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("L1003"), str, (bool isOk) => {
|
| | | if (jade >= needJade)
|
| | | if (isOk)
|
| | | {
|
| | | AuctionInquiry.Instance.SendSellAuctionItem(GUIID, needJade);
|
| | | }
|
| | | else
|
| | | {
|
| | | WindowCenter.Instance.Open<RechargeTipWin>();
|
| | | }
|
| | | if (jade >= needJade)
|
| | | {
|
| | | AuctionInquiry.Instance.SendSellAuctionItem(GUIID, needJade);
|
| | | }
|
| | | else
|
| | | {
|
| | | WindowCenter.Instance.Open<RechargeTipWin>();
|
| | | }
|
| | | } |
| | | });
|
| | |
|
| | | });
|
| | |
| | | m_ScrollerController.OnRefreshCell += OnRefreshGridCell; |
| | | m_ScrollerControllerType.OnRefreshCell += OnRefreshGridCellType;
|
| | | m_ScrollerController.lockType = EnhanceLockType.KeepVertical; |
| | | AuctionInquiry.Instance.SendQueryAuctionRecord();//查询拍卖记录 |
| | | AuctionInquiry.Instance.SendQueryAuctionRecord(0);//查询拍卖记录 |
| | | } |
| | | |
| | | protected override void AddListeners() |
| | |
| | | if (idnex != AuctionType)
|
| | | {
|
| | | AuctionType = idnex;
|
| | | AuctionInquiry.Instance.SendQueryAuctionRecord(idnex);//查询拍卖记录
|
| | | m_TypeTip.SetActive(false);
|
| | | OnCreateGridCell(m_ScrollerController);
|
| | | m_TypeText.text = GetTextName(AuctionType);
|
| | |
| | | [SerializeField] RectTransform m_GetWayContainer; |
| | | [SerializeField] WayCell[] m_GetWayCells; |
| | | |
| | | EquipModel model { get { return ModelCenter.Instance.GetModel<EquipModel>(); } } |
| | | |
| | | int place = 0; |
| | | public void Display(int place, List<CandidateEquip> candidates) |
| | | { |
| | | this.place = place; |
| | | |
| | | if (place == 0) |
| | | { |
| | | m_Title.text = "全部"; |
| | |
| | | |
| | | private void DisplayGetWays() |
| | | { |
| | | var getWays = new List<int>(); |
| | | var getWays = model.GetGetWays(model.selectedLevel.value, place); |
| | | if (getWays == null) |
| | | { |
| | | return; |
| | | } |
| | | |
| | | for (var i = 0; i < m_GetWayCells.Length; i++) |
| | | { |
| | | var behaviour = m_GetWayCells[i]; |
| | |
| | | return equipSets[level].GetFightPoint(); |
| | | } |
| | | |
| | | public List<int> GetGetWays(int level, int place) |
| | | { |
| | | if (level == 0) |
| | | { |
| | | return null; |
| | | } |
| | | |
| | | if (place != 0) |
| | | { |
| | | var config = EquipControlConfig.Get(level, place); |
| | | return new List<int>(config.getWays); |
| | | } |
| | | else |
| | | { |
| | | var getWays = new List<int>(); |
| | | for (int i = 1; i <= 12; i++) |
| | | { |
| | | var config = EquipControlConfig.Get(level, i); |
| | | foreach (int getWay in config.getWays) |
| | | { |
| | | if (!getWays.Contains(getWay)) |
| | | { |
| | | getWays.Add(getWay); |
| | | } |
| | | } |
| | | } |
| | | |
| | | return getWays; |
| | | } |
| | | } |
| | | |
| | | public void PutOn(string equipGuid) |
| | | { |
| | | var item = packModel.GetItemByGuid(equipGuid); |
| | |
| | | public void AddBaseProperties(int itemId, List<int> reference) |
| | | { |
| | | var config = ItemConfig.Get(itemId); |
| | | if (config == null)
|
| | | {
|
| | | return;
|
| | | } |
| | | if (config.Effect1 != 0 && reference.Contains(config.Effect1)) |
| | | { |
| | | properties.Add(config.Effect1, config.EffectValueA1); |
| | |
| | | {
|
| | | gridCell.itemCellBtn.OnOneParaClick = (int info) =>
|
| | | {
|
| | | itemTipsModel.SetItemTipsModel(PackType.Item, itemModel.guid, false, true);
|
| | | itemTipsModel.SetBagTipsBtn(itemTipsModel.curAttrData);
|
| | | itemTipsModel.ShowUICtrl();
|
| | | if (itemModel.itemInfo.isBind!= 1)
|
| | | {
|
| | | AuctionHelpModel auctionHelpModel = ModelCenter.Instance.GetModel<AuctionHelpModel>();
|
| | | auctionHelpModel.ItemModel = itemModel;
|
| | | WindowCenter.Instance.Open<AuctionShelfWin>();
|
| | | }
|
| | | else
|
| | | {
|
| | | itemTipsModel.SetItemTipsModel(PackType.Item, itemModel.guid, false, true);
|
| | | itemTipsModel.SetBagTipsBtn(itemTipsModel.curAttrData);
|
| | | itemTipsModel.ShowUICtrl();
|
| | | }
|
| | | |
| | | };
|
| | | }
|
| | |
|
| | |
| | | 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.packType, isCompare, model.useDataDict, compareScore);
|
| | | InitUI(model.guid, model.itemId, (ulong)model.count, model.equipScore, model.isBind, model.packType, isCompare, model.useDataDict, compareScore);
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | |
| | | public virtual void Init(ItemCellModel model, int compareScore = 0)
|
| | | {
|
| | | itemConfig = model.itemConfig;
|
| | | InitUI(model.guid, model.itemId, model.count, model.score, model.packType, model.isCompare, model.useDataDic, compareScore);
|
| | | InitUI(model.guid, model.itemId, model.count, model.score, model.isBind, model.packType, model.isCompare, model.useDataDic, compareScore);
|
| | | }
|
| | |
|
| | | private void InitUI(string guid, int itemId, ulong count, int score, PackType type, bool isCompare, Dictionary<int, List<int>> useDataDic, int compareScore = 0)
|
| | | private void InitUI(string guid, int itemId, ulong count, int score, int isBind, PackType type, bool isCompare, Dictionary<int, List<int>> useDataDic, int compareScore = 0)
|
| | | {
|
| | | if (itemConfig == null) return;
|
| | |
|
| | |
| | | starIcon.gameObject.SetActive(false);
|
| | | }
|
| | |
|
| | | bindIcon.gameObject.SetActive(false);
|
| | | bindIcon.gameObject.SetActive(isBind == 1);
|
| | |
|
| | | countText.text = UIHelper.ReplaceLargeNum((double)count);
|
| | | if (count > 1)
|
| | |
| | | fileFormatVersion: 2 |
| | | guid: 35473b2a6cd5171499a434642f1712a8 |
| | | timeCreated: 1516008186 |
| | | timeCreated: 1552035262 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | public void Display(RoleEquipType equipType)
|
| | | {
|
| | | this.equipType = equipType;
|
| | | var item = packModel.GetItemByIndex(PackType.Equip, (int)equipType);
|
| | | var item = packModel.GetItemByIndex(PackType.Equip, EquipSet.ClientPlaceToServerPlace(0, (int)equipType));
|
| | | if (item == null)
|
| | | {
|
| | | m_ItemCell.gameObject.SetActive(false);
|
| | |
| | | private void AddEqup()
|
| | | {
|
| | | var item = packModel.GetItemByIndex(PackType.Equip, (int)equipType);
|
| | | if (item!=null)
|
| | | if (item != null)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
| | | { |
| | | int Type = GameDefineIndex(EquippedWith); |
| | | ItemPlusConfig _tagItemPlue = ItemPlusConfig.GetTypeAndGrade(Type, EquipmentLevel); |
| | | if (_tagItemPlue == null)
|
| | | {
|
| | | return;
|
| | | } |
| | | if (DicEquip.ContainsKey(EquippedWith)) |
| | | { |
| | | DicEquip[EquippedWith].CurrentLevel = EquipmentLevel; |
| | |
| | | }
|
| | | if (!WindowCenter.Instance.IsOpen<MessageWin>())
|
| | | {
|
| | | WindowCenter.Instance.Open<MessageWin>();
|
| | | WindowCenter.Instance.Open<MessageWin>(true);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | }
|
| | | if (!WindowCenter.Instance.IsOpen<MessageWin>())
|
| | | {
|
| | | WindowCenter.Instance.Open<MessageWin>();
|
| | | WindowCenter.Instance.Open<MessageWin>(true);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | requireOpenGM = true;
|
| | | if (!WindowCenter.Instance.IsOpen<MessageWin>())
|
| | | {
|
| | | WindowCenter.Instance.Open<MessageWin>();
|
| | | WindowCenter.Instance.Open<MessageWin>(true);
|
| | | }
|
| | | else
|
| | | {
|