Skip to content

Commit

Permalink
- 同一名称ブレスレットが正常に装備できない問題の修正
Browse files Browse the repository at this point in the history
- 装備名クリック時の動作修正
  • Loading branch information
weizlogy committed Jul 2, 2018
1 parent cd0ebfe commit c8a9ac9
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 7 deletions.
2 changes: 1 addition & 1 deletion addons.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"name" : "Costume Play",
"file" : "costumeplay",
"extension" : "ipf",
"fileVersion" : "v1.1.0",
"fileVersion" : "v1.1.1",
"releaseTag" : "costumeplay",
"unicode" : "📖",
"description" : "GUI操作で装備/ヘアカラー/称号を保存/復元します。",
Expand Down
10 changes: 10 additions & 0 deletions costumeplay/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,14 @@
代わりに、インベントリアイコン右クリックメニューに[Open]が追加され、そこから開けます。
アドオンフレームが表示されるとインベントリが追従して開きます。

### v1.1.1

#### 同一名称ブレスレットが正常に装備できない問題の修正

#### 装備名クリック時の動作修正

旧:一時的に復元状態を変更

新:永続的に復元状態を変更

see [http://www.weizlogy.gq/tos/addon/costumeplay/](http://www.weizlogy.gq/tos/addon/costumeplay/)
15 changes: 9 additions & 6 deletions costumeplay/costumeplay.lua
Original file line number Diff line number Diff line change
Expand Up @@ -145,13 +145,13 @@ function g.new(self)
return
end
-- 装備の場合
-- インベントリにあるものだけ
local invItem = session.GetInvItemByName(className)
if (invItem == nil) then
return
end
local tempFuncName = 'COSTUMEPLAY_ON_EQUIP'..spotkey..invItem.invIndex
local tempFuncName = 'COSTUMEPLAY_ON_EQUIP'..spotkey
_G[tempFuncName] = function()
-- インベントリにあるものだけ
local invItem = session.GetInvItemByName(className)
if (invItem == nil) then
return
end
self:Log('Equip '..__EQUIP_SPOT_DATA:Convert(spotkey)..' -> '..itemCls.Name)
item.Equip(spotkey, invItem.invIndex)
_G[tempFuncName] = nil
Expand Down Expand Up @@ -208,6 +208,7 @@ function g.new(self)
end

-- コスチュームの使用可否を個別に切り替える
-- 保存もする
members.ToggleCostumeUse = function(self, ctrl, title, index)
self:Dbg('ToggleCostumeUse called.'..'('..title..' - '..index)
local equip = _costumes[title][index]
Expand All @@ -217,6 +218,8 @@ function g.new(self)
end
equip.use = equip.use == 0 and 1 or 0
self:__DecorateEquipUI(ctrl, title, equip, index)
-- 保存
self:__Serialize()
end

-- インベントリ系関数をフックして任意のコードを実行させる
Expand Down

0 comments on commit c8a9ac9

Please sign in to comment.