设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 3259|回复: 4
打印 上一主题 下一主题

[有事请教] 关于道具栏的问题

[复制链接]

Lv3.寻梦者

梦石
0
星屑
965
在线时间
81 小时
注册时间
2017-10-20
帖子
57
跳转到指定楼层
1
发表于 2017-11-7 19:49:02 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x
假如我有装备A,装备B,那么能不能做到在道具栏中查看的时候隐藏道具B,只显示道具A
平穷使我明抢

Lv3.寻梦者

梦石
0
星屑
3053
在线时间
318 小时
注册时间
2015-4-30
帖子
92
2
发表于 2017-11-9 03:33:03 | 只看该作者






















JAVASCRIPT 代码复制
  1. Window_ItemList.prototype.hasTraits = function(item) {  // <<< 新建
  2.                 var aa = false;
  3.                 if(item){
  4.                         aa = item.traits.filter(function(t){
  5.                                 return t.code == 14 && t.dataId == 13;        // <<< 13:状态ID
  6.                         }).shift();
  7.                 };
  8.                 return !!aa;
  9. };
  10.  
  11. Window_ItemList.prototype.includes = function(item) {       
  12.     switch (this._category) {
  13.     case 'item':
  14.         return DataManager.isItem(item) && item.itypeId === 1;
  15.     case 'weapon':
  16.                 if(this.hasTraits(item)) return false;        // <<< 添加
  17.         return DataManager.isWeapon(item);
  18.     case 'armor':
  19.                 if(this.hasTraits(item)) return false;        // <<< 添加
  20.         return DataManager.isArmor(item);
  21.     case 'keyItem':
  22.         return DataManager.isItem(item) && item.itypeId === 2;
  23.     default:
  24.         return false;
  25.     }
  26. };



回复 支持 反对

使用道具 举报

Lv5.捕梦者

梦石
0
星屑
32046
在线时间
5082 小时
注册时间
2012-11-19
帖子
4877

开拓者

3
发表于 2017-11-9 08:13:01 | 只看该作者
或者直接在 物品/武器/防具 里备注  <NotShow>

  1. var Xr_OldPtt_Window_ItemList_includes = Window_ItemList.prototype.includes;
  2. Window_ItemList.prototype.includes = function(item) {
  3.     if (item.note.match(/<NotShow>/)) return false;
  4.     return Xr_OldPtt_Window_ItemList_includes.call(this,item);
  5. };
复制代码

点评

↓然  发表于 2017-11-9 17:18
这是脚本插件吗?  发表于 2017-11-9 15:21
xp vx va mv  va mz 各类型脚本/插件定制
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-5-12 10:42

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表