Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BCC compatibility + some older problem fixes. #220

Closed
wants to merge 11 commits into from
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Prat 3.0

## [3.9.1-1-g6978fc8](https://github.com/sylvanaar/prat-3-0/tree/6978fc805bff74a62d91b9c0a793031a208f93c5) (2021-02-13)
[Full Changelog](https://github.com/sylvanaar/prat-3-0/compare/3.9.1...6978fc805bff74a62d91b9c0a793031a208f93c5)

- Toc Updates
13 changes: 2 additions & 11 deletions Prat-3.0.toc
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
#@retail@
## Interface: 90002
#@end-retail@
#@non-retail@
# ## Interface: 11304
#@end-non-retail@
## Interface: 30400

## X-Curse-Project-ID: 7473
## X-WoWI-ID: 10783
Expand All @@ -18,9 +13,8 @@
## Notes-deDE: Ein Grundaddon für Chatfenstermodule.
## Notes-koKR: 대화창에 대한 다양한 기능을 제공하는 애드온입니다.
## Notes-ruRU: Фреймворк для чата. Это БЕТА-версия, а значит возможны баги и глюки.
## Version: @project-version@
## Version: 3.9.3-14
## Author: Sylvanaar (Sylvaann - Proudmoore/US-Alliance)
## eMail: [email protected]

## X-Category: Chat/Communication
## X-Website: http://www.wowace.com/wiki/Prat
Expand All @@ -45,6 +39,3 @@ services\includes.xml
modules\includes.xml

modules\highcpu2.xml



41 changes: 41 additions & 0 deletions Prat-3.0_Wrath.toc
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
## Interface: 30400

## X-Curse-Project-ID: 7473
## X-WoWI-ID: 10783

## Title: Prat |cff8080ff3.0|r
## Notes: A framework for chat ehancement modules.
## Title-zhCN: Prat |cff8080ff3.0|r
## Notes-zhCN: 整合的聊天增强助手
## Notes-zhTW: 整合的聊天視窗模組。
## Notes-frFR: Framework pour des modules concernant les fen\195\170tres de discussion
## Notes-esES: Un entorno para modulos de chat.
## Notes-deDE: Ein Grundaddon für Chatfenstermodule.
## Notes-koKR: 대화창에 대한 다양한 기능을 제공하는 애드온입니다.
## Notes-ruRU: Фреймворк для чата. Это БЕТА-версия, а значит возможны баги и глюки.
## Version: 3.9.3-14
## Author: Sylvanaar (Sylvaann - Proudmoore/US-Alliance)

## X-Category: Chat/Communication
## X-Website: http://www.wowace.com/wiki/Prat

## X-Credits: Prat Dev Team (Sylvanaar, Fin, Curney, Krtek), Industrial, Ammo, Cirk, Yrys (ChatLink), Leuchtturm, AnduinLothar, Satrina, <CWDG>昏睡墨鱼&月色狼影, Zurazzi(Jubei’Thos), Cybeloras

## X-License: GPLv3

## OptionalDeps: Prat-3.0_Libraries, LibSink-2.0, LibSharedMedia-3.0, AceGUI-3.0-SharedMediaWidgets, LibDataBroker-1.1, LibDBIcon-1.0, LibAlts-1.0, LibChatAnims

## SavedVariables: Prat3DB
## SavedVariablesPerCharacter: Prat3CharDB, Prat3HighCPUPerCharDB

#libraries\includes.xml

fonts\includes.xml

addon\includes.xml

services\includes.xml

modules\includes.xml

modules\highcpu2.xml
34 changes: 17 additions & 17 deletions addon/addon.lua
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ setfenv(1, Prat)

--[[ END STANDARD HEADER ]] --

NEW_CHATFILTERS = select(4, _G.GetBuildInfo()) >= 30100
CHAT_PLAYER_GUIDS = select(4, _G.GetBuildInfo()) >= 30200
MOP = select(4, _G.GetBuildInfo()) >= 50000
--NEW_CHATFILTERS = select(4, _G.GetBuildInfo()) >= 30100
--CHAT_PLAYER_GUIDS = select(4, _G.GetBuildInfo()) >= 30200
--MOP = select(4, _G.GetBuildInfo()) >= 50000

BN_CHAT = true --(_G.GetBuildInfo() == "3.3.5") or (_G.GetBuildInfo() == "0.3.5")

Expand All @@ -67,15 +67,15 @@ BN_CHAT = true --(_G.GetBuildInfo() == "3.3.5") or (_G.GetBuildInfo() == "0.3.5"

--ChunkSizes = {}

--@debug@
--[==[@debug@
Version = "Prat |cff8080ff3.0|r (|cff8080ff" .. "DEBUG" .. "|r)"


--@end-debug@
--@end-debug@]==]

--[===[@non-debug@
Version = "Prat |cff8080ff3.0|r (|cff8080ff".."@project-version@".."|r)"
--@end-non-debug@]===]
--@non-debug@
Version = "Prat |cff8080ff3.0|r (|cff8080ff".."3.9.3-14-g71525c3".."|r)"
--@end-non-debug@


local am = {}
Expand All @@ -88,16 +88,16 @@ setmetatable(Prat, am)


Prat.Prat3 = true
Prat.IsClassic = (_G.WOW_PROJECT_ID == _G.WOW_PROJECT_CLASSIC)
Prat.IsRetail = (_G.WOW_PROJECT_ID == _G.WOW_PROJECT_MAINLINE)
Prat.IsClassic = (_G.WOW_PROJECT_ID ~= _G.WOW_PROJECT_MAINLINE)
Prat.IsRetail = not Prat.IsClassic


local function dbg(...) end

--@debug@
--[==[@debug@
function dbg(...) Prat:PrintLiteral(...) end

--@end-debug@
--@end-debug@]==]



Expand Down Expand Up @@ -428,9 +428,9 @@ function addon:FCF_CopyChatSettings(chatFrame)
end

function addon:PostEnable()
--@debug@
--[==[@debug@
Prat:Print(Version)
--@end-debug@
--@end-debug@]==]

AddPrintMethods()

Expand Down Expand Up @@ -465,7 +465,7 @@ function addon:PostEnable()
callbacks:Fire(Events.SECTIONS_UPDATED)
callbacks:Fire(Events.ENABLED)

--@debug@
--[==[@debug@

-- if ChunkSizes then
-- local last = 0
Expand Down Expand Up @@ -496,7 +496,7 @@ function addon:PostEnable()
_G.collectgarbage("collect")
Prat:Print("Memory Use: " .. MemoryUse())
end
--@end-debug@
--@end-debug@]==]

if EnableGlobalCompletions then
EnableGlobalCompletions(Prat, "Prat-Global-Autocomplete")
Expand Down Expand Up @@ -815,4 +815,4 @@ RegisterChatCommand("pratdebugmsg",

local cc = addon:GetModule("CopyChat", true)
if cc then cc:ScrapeFullChatFrame(printFrame or _G.DEFAULT_CHAT_FRAME, true) end
end)
end)
12 changes: 6 additions & 6 deletions addon/locales.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ local GetLocale = GetLocale
local SVC_NAMESPACE = select(2, ...)

-- Isolate the environment
setfenv(1, select(2, ...))
setfenv(1, SVC_NAMESPACE)

--[[ END STANDARD HEADER ]] --

Expand All @@ -23,7 +23,7 @@ MULTIBYTE_FIRST_CHAR = "^([%a\192-\255]?[\128-\191]*)"
function GetNamePattern(name)
local u = name:match(MULTIBYTE_FIRST_CHAR):upper()

if not u or u:len() == 0 then Prat:Print("GetNamePattern: name error", name) return end
if not u or u:len() == 0 then _G.Prat:Print("GetNamePattern: name error ", name) return end

local l = u:lower()
local namepat
Expand All @@ -46,12 +46,12 @@ AnyNamePattern = "%f[%a\128-\255]([%a\128-\255]+)%f[^%a\128-\255]"

function AddLocale(L, module, name, loc)
if GetLocale() == name or name == "enUS" then
--@debug@
--[==[@debug@
for k, v in pairs(loc) do
--@end-debug@
--[===[@non-debug@
--@end-debug@]==]
--@non-debug@
for k,v in pairs(loc[module] or loc) do
--@end-non-debug@]===]
--@end-non-debug@
if type(v) == "table" then
---
elseif v == true then
Expand Down
7 changes: 4 additions & 3 deletions addon/modules.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,12 @@ local tostring = tostring
local pairs, ipairs = pairs, ipairs
local type = type
local Prat = Prat
local SVC_NAMESPACE = select(2, ...)
local pcall = pcall
local setmetatable = setmetatable
local tinsert = tinsert
-- Isolate the environment
setfenv(1, select(2, ...))
setfenv(1, SVC_NAMESPACE)

--[[ END STANDARD HEADER ]] --

Expand Down Expand Up @@ -294,9 +295,9 @@ do
-- end

function Addon:OnModuleCreated(module) -- EXISTS -> INSTALLED
--@debug@
--[==[@debug@
_G[module.moduleName:lower()] = module
--@end-debug@
--@end-debug@]==]
Modules[module.name], Modules[module.moduleName] = "INSTALLED"
end
end
Expand Down
Loading