Commit 9b580840 authored by fgprodigal's avatar fgprodigal

Add FreeMountCD for Chinese players

parent bf0cdfd3
local RayUI, E, _, V, P, G = unpack(select(2, ...))
local FMC = RayUI:NewModule('RayUIFreeMountCD', 'AceHook-3.0', 'AceEvent-3.0', 'AceTimer-3.0')
if GetCVar("portal") ~= "CN" then return end
local faction = UnitFactionGroup("player")
local NOT_FOUND_MATCH = ERR_CHAT_PLAYER_NOT_FOUND_S:format('(.+)')
local QueueMessage
local SpecialQueueMessage
local KarazhanQueueMessage
local IllidanQueueMessage
local OrgrimmarQueueMessage
if faction == "Alliance" then
QueueMessage = {
["永夜绽放之薇-艾森娜"] = "9",
["LMCD-战歌"] = "组",
["林荫下的乞丐-安苏"] = "44296",
["波雅丶汉库克-埃雷达尔"] = "1",
["聖殤-通灵学院"] = "1",
["蚊飙-奥蕾莉亚"] = "1",
["氺手-国王之谷"] = "1",
["心一-破碎岭"] = "1",
["子瓜-诺兹多姆"] = "1",
["千山云影-雷霆号角"] = "1",
["蛋总的徒弟-刺骨利刃"] = "1",
["甜果冻-阿古斯"] = "1",
["古南泉-白银之手"] = "1",
}
SpecialQueueMessage = {
["永夜绽放之薇-艾森娜"] = "9",
["LMCD-战歌"] = "组",
["林荫下的乞丐-安苏"] = "44296",
["波雅丶汉库克-埃雷达尔"] = "1",
["聖殤-通灵学院"] = "1",
["蚊飙-奥蕾莉亚"] = "1",
["子瓜-诺兹多姆"] = "1",
}
KarazhanQueueMessage = {
["永夜绽放之薇-艾森娜"] = "9",
["LMCD-战歌"] = "组",
["波雅丶汉库克-埃雷达尔"] = "1",
["子瓜-诺兹多姆"] = "1",
["古南泉-白银之手"] = "1",
}
IllidanQueueMessage = QueueMessage
OrgrimmarQueueMessage = QueueMessage
else
QueueMessage = {
["郑矢娜-战歌"] = "9",
["BLCDX-战歌"] = "组",
["月色下的乞丐-辛达苟萨"] = "44296",
["阿焦大做饭-希尔瓦娜斯"] = "1",
["月娜-战歌"] = "1",
["大浪七号-格瑞姆巴托"] = "1",
["假中医-死亡之翼"] = "1",
["Lau-太阳之井"] = "1",
["红了眼眶-血色十字军"] = "1",
["罐子-冬寒"] = "1",
["噬魔者-图拉扬"] = "1",
["丿长空-凤凰之神"] = "1",
["九筱妖-布兰卡德"] = "1",
["演员壹号-影之哀伤"] = "1",
["想静静-贫瘠之地"] = "1",
["亻壬忄生-安苏"] = "1",
["王权富贵-海加尔"] = "1",
["颜老师-风暴之鳞"] = "1",
["溟炎-洛丹伦"] = "1",
["时丶光-地狱咆哮"] = "1",
["随心而遇-战歌"] = "1",
["谎言-加尔"] = "1",
}
SpecialQueueMessage = {
["郑矢娜-战歌"] = "9",
["BLCDX-战歌"] = "组",
["月色下的乞丐-辛达苟萨"] = "44296",
["月娜-战歌"] = "1",
["噬魔者-图拉扬"] = "1",
["亻壬忄生-安苏"] = "1",
["溟炎-洛丹伦"] = "1",
["时丶光-地狱咆哮"] = "1",
["随心而遇-战歌"] = "1",
["谎言-加尔"] = "1",
}
KarazhanQueueMessage = {
["郑矢娜-战歌"] = "9",
["BLCDX-战歌"] = "组",
["月色下的乞丐-辛达苟萨"] = "44296",
["假中医-死亡之翼"] = "1",
["Lau-太阳之井"] = "1",
["噬魔者-图拉扬"] = "1",
["想静静-贫瘠之地"] = "1",
["亻壬忄生-安苏"] = "1",
["时丶光-地狱咆哮"] = "1",
["随心而遇-战歌"] = "1",
["谎言-加尔"] = "1",
}
IllidanQueueMessage = QueueMessage
OrgrimmarQueueMessage = QueueMessage
end
local function ChatMsgFilter(self, event, msg, sender)
for player in pairs(QueueMessage) do
if msg:match(NOT_FOUND_MATCH) == player then
return true
end
end
end
function FMC:Queue_NormalCD()
SetRaidDifficultyID(14)
SetLegacyRaidDifficultyID(4)
for player, message in pairs(QueueMessage) do
SendChatMessage(message, "WHISPER", nil, player)
end
end
function FMC:StopQueue()
for player in pairs(QueueMessage) do
SendChatMessage("0", "WHISPER", nil, player)
end
end
function FMC:Queue_SpecialCD()
SetRaidDifficultyID(14)
SetLegacyRaidDifficultyID(4)
for player, message in pairs(SpecialQueueMessage) do
SendChatMessage(message, "WHISPER", nil, player)
end
end
function FMC:Queue_KarazhanCD()
SetRaidDifficultyID(14)
SetLegacyRaidDifficultyID(4)
for player, message in pairs(KarazhanQueueMessage) do
SendChatMessage(message, "WHISPER", nil, player)
end
end
function FMC:Queue_IllidanCD()
SetRaidDifficultyID(14)
SetLegacyRaidDifficultyID(4)
for player, message in pairs(IllidanQueueMessage) do
SendChatMessage(message, "WHISPER", nil, player)
end
end
function FMC:Queue_OrgrimmarCD()
SetRaidDifficultyID(14)
SetLegacyRaidDifficultyID(4)
for player, message in pairs(OrgrimmarQueueMessage) do
SendChatMessage(message, "WHISPER", nil, player)
end
end
function FMC:Switch_Heroic()
SetRaidDifficultyID(15)
SendChatMessage("YX10", "PARTY")
end
function FMC:Switch_Raid10()
SendChatMessage("10", "PARTY")
end
function FMC:OnEnter_NormalCD()
GameTooltip:SetOwner(FMC.MainPanel, "ANCHOR_NONE")
GameTooltip:ClearAllPoints()
GameTooltip:Point("TOPLEFT", FMC.MainPanel, "TOPRIGHT", 2, 0)
GameTooltip:AddLine("______________________【 CD清单 】______________________", 1, 2, 0)
GameTooltip:AddLine(" ")
GameTooltip:AddLine(" ▼—冰冠堡垒[无敌](必须25普通难度进本,再点 H 切英雄)", 0, 1,0)
GameTooltip:AddLine(" ▼—奥杜尔[飞机头](10人难度即可掉落,不要与守护者对话)", 0, 1,0)
GameTooltip:AddLine(" ▼—风神王座[南风幼龙](不能切H)", 0, 1,0)
GameTooltip:AddLine(" ▼—火焰之地[纯血火鹰](火乌鸦、鹿盔、大螺丝)(不能切h)", 0, 1,0)
GameTooltip:AddLine(" ▼—黑翼血环[能量洪流](不能切h)", 0, 1,0)
GameTooltip:AddLine(" ▼—决战奥格 [谜语人坐骑任务](傲之煞已死,进去拿书)", 0, 1,0)
GameTooltip:AddLine(" ▼—安其拉神殿[清醒的梦魇步骤] (克苏恩已死)", 0, 1,0)
GameTooltip:AddLine(" ▼—黑石铸造厂:[黑石之印](10号{黑手} 不能切m刷坐骑)", 0, 1,0)
GameTooltip:AddLine(" ▼—地狱火堡垒:[血环之印]( 5号{死眼} 不能切m刷坐骑)", 0, 1,0)
GameTooltip:AddLine(" ")
GameTooltip:AddLine(" ▼请注意:由于7.35有BUG,巨龙之魂、魔古山宝库、雷神王座、永春台 的CD不能染 ", 1, 0,0)
GameTooltip:Show()
end
function FMC:OnEnter_KarazhanCD()
GameTooltip:SetOwner(FMC.MainPanel, "ANCHOR_NONE")
GameTooltip:ClearAllPoints()
GameTooltip:Point("TOPLEFT", FMC.MainPanel, "TOPRIGHT", 2, 0)
GameTooltip:AddLine("__________________【 本CD为5人史诗难度 】__________________", 1, 2, 0)
GameTooltip:AddLine(" ")
GameTooltip:AddLine(" ▼—进入副本后穿过歌剧院,无视圣女和管家", 0, 1,0)
GameTooltip:AddLine(" ▼—直接击杀阿图门", 0, 1,0)
GameTooltip:AddLine(" ")
GameTooltip:AddLine(" ▼—本CD非24小时供应,如无CD君响应报名,请换时间染。", 0, 1,0)
GameTooltip:AddLine(" ▼—本CD不需要你进行任何操作,CD君的5人本难度已调整为史诗", 0, 1,0)
GameTooltip:Show()
end
function FMC:OnEnter_SpecialCD()
GameTooltip:SetOwner(FMC.MainPanel, "ANCHOR_NONE")
GameTooltip:ClearAllPoints()
GameTooltip:Point("TOPLEFT", FMC.MainPanel, "TOPRIGHT", 2, 0)
GameTooltip:AddLine("_____________________【 CD清单 】____________________", 1, 2, 0)
GameTooltip:AddLine(" ")
GameTooltip:AddLine(" ▼—翡翠梦魇[萨维斯]", 0, 1,0)
GameTooltip:AddLine(" ▼—暗夜要塞[时空畸体、艾利桑德]", 0, 1,0)
GameTooltip:AddLine(" ▼—萨格拉斯之墓[主母]", 0, 1,0)
GameTooltip:AddLine(" ▼—燃烧王座[恶犬]", 0, 1,0)
GameTooltip:AddLine(" ")
GameTooltip:AddLine(" 动态CD,系统强制切10人难度!", 1, 2, 0)
GameTooltip:AddLine(" ")
GameTooltip:AddLine("_____________________【!注意!】____________________", 1, 0,0)
GameTooltip:AddLine(" ")
GameTooltip:AddLine(" ★本按钮CD为双难度CD,普通难度可直接进本!", 0, 1,0)
GameTooltip:AddLine(" ★英雄难度,进组后点击后面的 切换英雄难度 按钮,再进本!", 0, 1,0)
GameTooltip:Show()
end
function FMC:OnEnter_IllidanCD()
GameTooltip:SetOwner(FMC.MainPanel, "ANCHOR_NONE")
GameTooltip:ClearAllPoints()
GameTooltip:Point("TOPLEFT", FMC.MainPanel, "TOPRIGHT", 2, 0)
GameTooltip:AddLine("__________【 本CD依靠时光BUG,不能保证永久有效 】__________", 1, 2, 0)
GameTooltip:AddLine(" ")
GameTooltip:AddLine(" ▼—进入副本后往里走一点,左手边有个破碎者NPC,对话传送", 0, 1,0)
GameTooltip:AddLine(" ▼—选择传送:命令大厅,一定不要自己往里跑,楼顶门打不开!", 0, 1,0)
GameTooltip:AddLine(" ▼—与阿卡玛对话,你会被卡在BOSS房间外,不用着急", 0, 1,0)
GameTooltip:AddLine(" ▼—在BOSS战围栏外耐心等脱战", 0, 1,0)
GameTooltip:AddLine(" ▼—脱战后再次与阿卡玛对话,就能正常打BOSS了!", 0, 1,0)
GameTooltip:AddLine(" ▼—如果蛋总跑出来了,直接打BOSS就行了!", 0, 1,0)
GameTooltip:Show()
end
function FMC:OnEnter_OrgrimmarCD()
GameTooltip:SetOwner(FMC.MainPanel, "ANCHOR_NONE")
GameTooltip:ClearAllPoints()
GameTooltip:Point("TOPLEFT", FMC.MainPanel, "TOPRIGHT", 2, 0)
GameTooltip:AddLine("_____________________【 CD清单 】____________________", 1, 2, 0)
GameTooltip:AddLine(" ")
GameTooltip:AddLine(" ▼—决战奥格[小吼](H难度)", 0, 1,0)
GameTooltip:AddLine(" ")
GameTooltip:AddLine(" 动态CD,系统强制切10人难度!", 1, 2, 0)
GameTooltip:Show()
end
function FMC:OnEnter_StopQueue()
GameTooltip:SetOwner(FMC.MainPanel, "ANCHOR_NONE")
GameTooltip:ClearAllPoints()
GameTooltip:Point("TOPLEFT", FMC.MainPanel, "TOPRIGHT", 2, 0)
GameTooltip:AddLine(" >>>>>>>★【点击清除 多余队列】★<<<<<<<", 0, 1,0)
GameTooltip:AddLine(" ")
GameTooltip:AddLine(" 请进本后一定要点击此按钮,清除多余的队列!", 1, 2,0)
GameTooltip:AddLine(" ")
GameTooltip:AddLine(" 可避免您进入云分流死循环!", 1, 1,0)
GameTooltip:AddLine(" ")
GameTooltip:AddLine(" 这个按钮不是让CD君退队用的,是清除其他CD君报名序列的", 1, 2,0)
GameTooltip:AddLine(" ")
GameTooltip:AddLine("★染免费CD,做素质玩家!为他人让路,等于为自己让路!★", 1, 0.4,0.8)
GameTooltip:Show()
end
function FMC:OnEnter_Heroic()
GameTooltip:SetOwner(FMC.MainPanel, "ANCHOR_NONE")
GameTooltip:ClearAllPoints()
GameTooltip:Point("TOPLEFT", FMC.MainPanel, "TOPRIGHT", 2, 0)
GameTooltip:AddLine(">>>>>>>>>>>>★【点击切换 英雄 模式】★<<<<<<<<<<<<",0, 1,0)
GameTooltip:AddLine(" ")
GameTooltip:AddLine(" 染 冰冠堡垒 请进本后点击此按钮,切换 H 难度", 1, 2,0)
GameTooltip:AddLine(" ")
GameTooltip:AddLine("染 决战奥格[H小吼],请进队后点此按钮,提示切换10H后进本", 1, 2,0)
GameTooltip:AddLine(" ")
GameTooltip:AddLine("_______________________【!注意!】______________________", 1, 0,0)
GameTooltip:AddLine(" ")
GameTooltip:AddLine(" 此按钮仅用于冰冠堡垒和决战奥格H小吼CD", 1, 0.4,0.8)
GameTooltip:AddLine(" ")
GameTooltip:AddLine(" 染其他进度严禁使用此按钮,避免损失进度!", 1, 0,0)
GameTooltip:Show()
end
function FMC:OnEnter_Raid10()
GameTooltip:SetOwner(FMC.MainPanel, "ANCHOR_NONE")
GameTooltip:ClearAllPoints()
GameTooltip:Point("TOPLEFT", FMC.MainPanel, "TOPRIGHT", 2, 0)
GameTooltip:AddLine(">>>>>>>>>>>>★【点击切换 10人 模式】★<<<<<<<<<<<<",0, 1,0)
GameTooltip:AddLine(" ")
GameTooltip:AddLine(" 小号想染10人难度,请进队后点此按钮,提示切换10人后进本", 1, 2,0)
GameTooltip:AddLine(" 坐骑和幻象都是特殊掉率,人数不会影响坐骑掉率", 1, 2,0)
GameTooltip:AddLine(" ")
GameTooltip:AddLine("_______________________【!注意!】______________________", 1, 0,0)
GameTooltip:AddLine(" ")
GameTooltip:AddLine(" 此按钮严禁用于冰冠堡垒!", 1, 0.4,0.8)
GameTooltip:AddLine(" ")
GameTooltip:AddLine(" 这个本的10人难度不给坐骑!", 1, 0.4,0.8)
GameTooltip:Show()
end
function FMC:ToggleMainPanel()
local point, relativeto, point2, xOfs, yOfs = FMC.MainPanel:GetPoint()
local width = FMC.MainPanel:GetWidth()
if FMC.MainPanel.toggled then
FMC.MainPanel.anim.out1:SetScript('OnFinished', function() FMC.MainPanel:SetPoint(point, relativeto, point2, xOfs - width, yOfs) end)
E:SlideOut(FMC.MainPanel)
FMC.MainPanel.toggled = false
self:SetText(">")
else
FMC.MainPanel:SetPoint(point, relativeto, point2, xOfs + width, yOfs)
E:SlideIn(FMC.MainPanel)
FMC.MainPanel.toggled = true
self:SetText("<")
end
end
function FMC:CreateButton(parent, width, height, point, relativeto, point2, xOfs, yOfs, text, onclick, onenter)
local width = width or (self.MainPanel:GetWidth() - 10)
local height = height or 25
local b = CreateFrame("Button", nil, parent)
b:Width(width)
b:Height(height)
b:Point(point, relativeto, point2, xOfs, yOfs)
if text then
local t = b:CreateFontString(nil, "OVERLAY", b)
t:FontTemplate()
t:Point("CENTER", b, 'CENTER', 0, -1)
t:SetJustifyH("CENTER")
t:SetText(text)
b:SetFontString(t)
end
b:SetScript("OnClick", onclick)
b:SetScript("OnEnter", onenter)
b:SetScript("OnLeave", GameTooltip_Hide)
E.Skins:HandleButton(b)
return b
end
function FMC:CreateMenu()
self.MainPanel = CreateFrame("Frame", nil, E.UIParent)
self.MainPanel:SetTemplate('Transparent')
self.MainPanel:Width(120)
self.MainPanel:Height(260)
self.MainPanel:Point('TOPLEFT', E.UIParent, 'TOPLEFT', -120, -200)
self.MainPanel:SetFrameLevel(3)
self.MainPanel.toggled = false
self.MainPanel:SetFrameStrata("HIGH")
self.MainPanel:Styling()
E:SetUpAnimGroup(self.MainPanel, "Slide", -120, 0, 0.5)
self.MainPanel.ToggleButton = self:CreateButton(self.MainPanel, 15, 40, "LEFT", self.MainPanel, "RIGHT", 0, 0, ">", FMC.ToggleMainPanel)
self.MainPanel.NormalCDButton = self:CreateButton(self.MainPanel, nil, nil, "TOP", self.MainPanel, "TOP", 0, -10, "常规CD排队", FMC.Queue_NormalCD, FMC.OnEnter_NormalCD)
self.MainPanel.KarazhanCDButton = self:CreateButton(self.MainPanel, nil, nil, "TOP", self.MainPanel.NormalCDButton, "BOTTOM", 0, -5, "重返卡拉赞CD", FMC.Queue_KarazhanCD, FMC.OnEnter_KarazhanCD)
self.MainPanel.SpecialCDButton = self:CreateButton(self.MainPanel, nil, nil, "TOP", self.MainPanel.KarazhanCDButton, "BOTTOM", 0, -5, "定向CD", FMC.Queue_SpecialCD, FMC.OnEnter_SpecialCD)
self.MainPanel.IllidanCDButton = self:CreateButton(self.MainPanel, nil, nil, "TOP", self.MainPanel.SpecialCDButton, "BOTTOM", 0, -5, "蛋刀CD", FMC.Queue_IllidanCD, FMC.OnEnter_IllidanCD)
self.MainPanel.OrgrimmarCDButton = self:CreateButton(self.MainPanel, nil, nil, "TOP", self.MainPanel.IllidanCDButton, "BOTTOM", 0, -5, "脑残吼CD", FMC.Queue_OrgrimmarCD, FMC.OnEnter_OrgrimmarCD)
self.MainPanel.HeroicButton = self:CreateButton(self.MainPanel, nil, nil, "TOP", self.MainPanel.OrgrimmarCDButton, "BOTTOM", 0, -5, "切换英雄难度", FMC.Switch_Heroic, FMC.OnEnter_Heroic)
self.MainPanel.Raid10Button = self:CreateButton(self.MainPanel, nil, nil, "TOP", self.MainPanel.HeroicButton, "BOTTOM", 0, -5, "切换10人模式", FMC.Switch_Raid10, FMC.OnEnter_Raid10)
self.MainPanel.StopQueueButton = self:CreateButton(self.MainPanel, nil, nil, "TOP", self.MainPanel.Raid10Button, "BOTTOM", 0, -5, "退出队列", FMC.StopQueue, FMC.OnEnter_StopQueue)
end
function FMC:Initialize()
ChatFrame_AddMessageEventFilter("CHAT_MSG_SYSTEM", ChatMsgFilter)
self:CreateMenu()
end
RayUI:RegisterModule(FMC:GetName())
\ No newline at end of file
<Ui xmlns="http://www.blizzard.com/wow/ui/">
<Script file='FreeMountCD.lua'/>
</Ui>
......@@ -6,4 +6,5 @@
<Include file="Skins\Load_Skins.xml"/>
<Include file="Chat\Load_Chat.xml"/>
<Include file="CombatText\Load_CombatText.xml"/>
<Include file="FreeMountCD\Load_FreeMountCD.xml"/>
</Ui>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment