⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 en_partyinfo.lua

📁 时间太紧了
💻 LUA
字号:
function EUF_PartyInfo_OnLoad()
	this:RegisterEvent("VARIABLES_LOADED");
	this:RegisterEvent("PARTY_MEMBERS_CHANGED");
	this:RegisterEvent("PLAYER_ENTERING_WORLD");
end;

function EUF_PartyInfo_OnEvent(event)
	if event == "VARIABLES_LOADED" or event == "PLAYER_ENTERING_WORLD" or event == "PARTY_MEMBERS_CHANGED" then
		--EN_Msg(event, arg1);
		EUF_FramePartyInfo_Update();
	end;
end;

function EUF_PartyInfo_Update(unit)
	if not unit then
		return;
	end;
	local unitExists, _,unitId = string.find(unit, "^party(%d)$");
	if not unitExists then
		return;
	end;
	
	-- Set class
	if EUF_CurrentOptions["PARTYCLASS"] == 1 then
		local class = UnitClass(unit);
		if class then
			if EUF_CurrentOptions["PARTYCLASSABRV"] == 1 then
				class = string.sub(class, 1, 4);
			end;
			getglobal("EUF_PartyInfo"..unitId.."Class"):SetText(class);
		end;
	else
		getglobal("EUF_PartyInfo"..unitId.."Class"):SetText("");
	end;
	

	-- Set level
	if EUF_CurrentOptions["PARTYLEVEL"] == 1 then
		local level= UnitLevel(unit);
		if level then
			if level < 1 then
				level = "??";
			end;
			getglobal("EUF_PartyInfo"..unitId.."Level"):SetText(level);
		end;
	else
		getglobal("EUF_PartyInfo"..unitId.."Level"):SetText("");
	end;

end

function EUF_FramePartyInfo_Update()
	local i;
	for i = 1, GetNumPartyMembers(), 1 do
		EUF_PartyInfo_Update("party"..i);
	end;
end;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -