Skip to content

Commit

Permalink
新規作成
Browse files Browse the repository at this point in the history
  • Loading branch information
weizlogy committed Apr 26, 2018
1 parent 6b8513a commit 2a23bd6
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 0 deletions.
9 changes: 9 additions & 0 deletions removetipsfe/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
## Latest Release Note.

### v1.0.0

#### 新規作成

邪魔なtipsを非表示にしつつチャットウィンドウにシステムメッセージとして表示します。

see [http://www.weizlogy.gq/tos/addon/removetipsfe/](http://www.weizlogy.gq/tos/addon/removetipsfe/)
50 changes: 50 additions & 0 deletions removetipsfe/removetipsfe.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
-- 領域定義
local author = 'weizlogy'
local addonName = 'removetipsfe'
_G['ADDONS'] = _G['ADDONS'] or {}
_G['ADDONS'][author] = _G['ADDONS'][author] or {}
_G['ADDONS'][author][addonName] = _G['ADDONS'][author][addonName] or {}

-- 領域へのポインターを取得
local g = _G['ADDONS'][author][addonName]

-- コンストラクター
function g.new(self)
local members = {}

-- デストラクター
members.Destroy = function(self)
if (self.LEVEL_LINFORM_MESSAGE_CLIENT ~= nil) then
LEVEL_LINFORM_MESSAGE_CLIENT = self.LEVEL_LINFORM_MESSAGE_CLIENT
end
end
-- おまじない
return setmetatable(members, {__index = self})
end
-- .newなしでコンストラクターを呼ぶエイリアス登録
setmetatable(g, {__call = g.new});

-- 自フレーム初期化処理
function REMOVETIPSFE_ON_INIT(addon, frame)
-- 関数退避
if (g.instance.LEVEL_LINFORM_MESSAGE_CLIENT == nil) then
g.instance.LEVEL_LINFORM_MESSAGE_CLIENT = LEVEL_LINFORM_MESSAGE_CLIENT
end
-- フックして...
LEVEL_LINFORM_MESSAGE_CLIENT = function(idList)
-- pc_client.lua # LEVEL_LINFORM_MESSAGE_CLIENT からコピペ注意
local idList = SCR_STRING_CUT(idList)
local msg = '[TIPS] '
for i = 1, #idList do
local ies = GetClassByType('levelinformmessage', idList[i])
msg = msg..'{nl} {nl}'..i..'. '..string.gsub(ies.Message, '%{.-%}', '')
end
CHAT_SYSTEM(msg)
end
end

-- インスタンス作成
if (g.instance ~= nil) then
g.instance:Destroy()
end
g.instance = g()
10 changes: 10 additions & 0 deletions removetipsfe/removetipsfe.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<uiframe name="removetipsfe" x="0" y="0" width="130" height="70">
<frame title="Remove Tips Forever" snapclient="false" snapframe="false" layout_gravity="center center"/>
<option visible="false" alwaysVisible="false" closebutton="false" autoopen="false" hideable="true"/>
<input hittest="false" movable="false" moveintitlebar="false" hittestframe="false"/>
<layer layerlevel="0"/>
<draw blend="100" drawtitlebar="false" drawframe="false"/>
<controls>
</controls>
</uiframe>

0 comments on commit 2a23bd6

Please sign in to comment.