首页 |魔兽新闻 | |玩家攻略 | |精彩视频 | |玩家杂谈 | |相关下载 | |常见问题 | |赚钱心得 |
按标题 按内容
WOWZLP.COM


当前位置:魔兽世界资料片中文网>常见问题>文章内容

银行背包整合提示显示不正确的解决方法

作者: 来源:
日期:2007-10-05

这个问题发生在使用大脚插件的用户~

问题描述:

更新2.2.0以后, 银行背包整合中, 默认银行的物品栏的鼠标提示总是显示银行里的第一个物品

修正方法如下:

打开\Interface\AddOns\MyBank\MyBank.lua

把第433行开始的代码:


         if this.bagIndex < 0 then
            local newIndex = BankFrameItem1:GetInventorySlot();
            hasCooldown, repairCost = GameTooltip:SetInventoryItem("player", newIndex);
         else
            hasCooldown, repairCost = GameTooltip:SetBagItem(this.bagIndex, this.itemIndex);
         end


修改为:

         if this.bagIndex == BANK_CONTAINER then
            local inventoryID = BankButtonIDToInvSlotID(this:GetID(), nil);
            hasCooldown, repairCost = GameTooltip:SetInventoryItem("player", inventoryID);
         else
            hasCooldown, repairCost = GameTooltip:SetBagItem(this.bagIndex, this.itemIndex);
         end


或者修改为:

         if this.bagIndex == BANK_CONTAINER then
            local sysBankItem = getglobal("BankFrameItem"..this:GetID());
            if (sysBankItem) then
               local newIndex = sysBankItem:GetInventorySlot();
               hasCooldown, repairCost = GameTooltip:SetInventoryItem("player", newIndex);
            end
         else
            hasCooldown, repairCost = GameTooltip:SetBagItem(this.bagIndex, this.itemIndex);
         end


两种方法均可, 如果你不会自己修改, 请下载下面的MyBank.rar, 解压后覆盖 X:\World of Warcraft\Interface\AddOns\MyBank\ 文件夹下面的同名文件(X代表你的魔兽世界所在的盘符), 如果都不会, 请等待大脚更新.


另外, 修正一个一直存在的BUG, 把MyBank.lua第409行修改为:


if cooldownInfo and cooldownInfo ~= 1 and cooldownInfo["e"] and cooldownInfo["e"] > 0 and cooldownInfo["d"] > 0 then



因为DEBUG跟踪发现, local cooldownInfo = item["d"]; 有时侯cooldownInfo会为1, 而导致第409句报错, 希望大脚作者修正, 不要每次我都自己改=.=

点击下载


本新闻及文章仅代表发表厂商及作者观点,不代表本站本身观点