分类分类
关注+2016-08-18作者:佚名
关于隐藏你不想要的属性
下面这段代码,是目前游戏本身的属性显示设定.
如果你其中某一个不想显示.最简单的是复制这整个段代码,然后直接修改其中的内容。
注意的是 ,需要必须1~n不能间断
如果使用这些,关于移动速度的修改代码,必须放到这个修改后面或者说是PAPERDOLL_STATCATEGORIES[1].xxx=xxx 之类的代码 必须放到这段代码之后able.insert(xxx,xxx)之类的代码放到最后
第一个数字[1]和数字[2]就表示显示在属性,还是强化属性的位置
stat=xxx
就是你要显示的属性
这后面的代码表示一些功能
primary = LE_UNIT_STAT_STRENGTH
判断专精的主属性类别(力量专精才显示这一列)
roles = { "HEALER" ,"DAMAGER"}
roles表示职责,里面写的是Tank/HEALER/DAMAGER(职责为治疗或者输出,才显示这一列)
hideAt=0
表示如果这个属性值等于0,那么隐藏他
如果删掉后面的代码,就是常驻显示,
如果删掉这一列,就是不显示(序号必须1~n不能缺少.)
Codec:
PAPERDOLL_STATCATEGORIES= {
[1] = {
categoryFrame ="AttributesCategory",
stats = {
[1] = { stat ="STRENGTH", primary = LE_UNIT_STAT_STRENGTH },
[2] = { stat ="AGILITY", primary = LE_UNIT_STAT_AGILITY },
[3] = { stat ="INTELLECT", primary = LE_UNIT_STAT_INTELLECT },
[4] = { stat ="STAMINA"},
[5] = { stat ="ARMOR"},
[6] = { stat ="MANAREGEN",},
},
},
[2] = {
categoryFrame ="EnhancementsCategory",
stats = {
[1] = { stat ="CRITCHANCE", hideAt = 0 },
[2] = { stat ="HASTE", hideAt = 0 },
[3] = { stat ="MASTERY", hideAt = 0 },
[4] = { stat ="VERSATILITY", hideAt = 0 },
[5] = { stat ="LIFESTEAL", hideAt = 0 },
[6] = { stat ="AVOIDANCE", hideAt = 0 },
[7] = { stat ="DODGE", roles ={"TANK"} },
[8] = { stat ="PARRY", hideAt = 0, roles ={"TANK"} },
[9] = { stat ="BLOCK", hideAt = 0, roles ={"TANK"} },
},
},
};
下面是我修改的一个范例:
适用于物理dps的,显示了伤害攻速能量恢复和移动速度
Codec:
do
PAPERDOLL_STATCATEGORIES= {
[1] = {
categoryFrame ="AttributesCategory",
stats = {
[1] = { stat ="ATTACK_DAMAGE"},
[2] = { stat ="STRENGTH", primary = LE_UNIT_STAT_STRENGTH },
[3] = { stat ="AGILITY", primary = LE_UNIT_STAT_AGILITY },
[4] = { stat ="INTELLECT", primary = LE_UNIT_STAT_INTELLECT },
[5] = { stat ="STAMINA"},
[6] = { stat ="ARMOR"},
[7] = { stat ="ENERGY_REGEN", hideAt = 0 },
[8] = { stat ="RUNE_REGEN", hideAt = 0 },
[9] = { stat ="FOCUS_REGEN", hideAt = 0 },
[10] = { stat ="MANAREGEN", roles ={"HEALER"} },
},
},
[2] = {
categoryFrame ="EnhancementsCategory",
stats = {
[1] = { stat ="CRITCHANCE", hideAt = 0 },
[2] = { stat ="HASTE", hideAt = 0 },
[3] = { stat ="MASTERY", hideAt = 0 },
[4] = { stat ="VERSATILITY", hideAt = 0 },
[5] = { stat ="LIFESTEAL", hideAt = 0 },
[6] = { stat ="AVOIDANCE", hideAt = 0 },
[7] = { stat ="DODGE", roles ={"TANK"} },
[8] = { stat ="PARRY", hideAt = 0, roles ={"TANK"} },
[9] = { stat ="BLOCK", hideAt = 0, roles ={"TANK"} },
},
},
};
---修改,若能量值获取不到.就设置为0,就能套用hideAt了
PAPERDOLL_STATINFO["ENERGY_REGEN"].updateFunc = function(statFrame, unit) statFrame.numericValue=0; PaperDollFrame_SetEnergyRegen(statFrame, unit); end
PAPERDOLL_STATINFO["RUNE_REGEN"].updateFunc = function(statFrame, unit) statFrame.numericValue=0; PaperDollFrame_SetRuneRegen(statFrame, unit); end
PAPERDOLL_STATINFO["FOCUS_REGEN"].updateFunc = function(statFrame, unit) statFrame.numericValue=0; PaperDollFrame_SetFocusRegen(statFrame, unit); end
--增加移动速度的代码(被暴雪删掉了)
PAPERDOLL_STATINFO["MOVESPEED"].updateFunc =function(statFrame, unit) PaperDollFrame_SetMovementSpeed(statFrame, unit); end
--根据职业,做一些改动
local _,_,classid = UnitClass("player")
if(classid==1)then --战士
elseif (classid==2)then --圣骑
elseif (classid==3)then --猎人
elseif (classid==4)then --盗贼
elseif (classid==5)then --牧师
PAPERDOLL_STATCATEGORIES[1].stats[1].roles={} --隐藏伤害
elseif (classid==6)then --DK
elseif (classid==7)then --萨满
elseif (classid==8)then --法师,加上回蓝显示
PAPERDOLL_STATCATEGORIES[1].stats[1].roles={}
table.insert(PAPERDOLL_STATCATEGORIES[1].stats,{ stat ="MANAREGEN"})
elseif (classid==9)then --术士
PAPERDOLL_STATCATEGORIES[1].stats[1].roles={} --隐藏伤害
elseif (classid==10)then --武僧
elseif (classid==11)then --德鲁伊
elseif (classid==12)then --DH
end
--加上移动速度(加最后)
table.insert(PAPERDOLL_STATCATEGORIES[1].stats,{ stat ="MOVESPEED"})
--关于移动速度代码(不然会出现错乱)
local tempstatFrame
hooksecurefunc("PaperDollFrame_SetMovementSpeed",function(statFrame, unit)
if(tempstatFrame and tempstatFrame~=statFrame)then
tempstatFrame:SetScript("OnUpdate",nil);
end
statFrame:SetScript("OnUpdate", MovementSpeed_OnUpdate);
tempstatFrame = statFrame;
statFrame:Show();
end)
end
相关文章
更多+相同厂商
热门推荐
点击查看更多
点击查看更多
点击查看更多
说两句网友评论