AddOn/Script/Gathererの解析
の編集
http://www.fjmk.net/kamikaze/index.php?AddOn%2FScript%2FGatherer%A4%CE%B2%F2%C0%CF
[
トップ
] [
編集
|
差分
|
バックアップ
|
添付
|
リロード
] [
新規
|
一覧
|
単語検索
|
最終更新
|
ヘルプ
]
-- 雛形とするページ --
A Recipe For Death
AddOn
AddOn/API
AddOn/Request
AddOn/Script
AddOn/Script/Gatherer?¢ð?ªÂ???Ò?ª¢?ªÁ
AddOn/Script/Gathererの解析
Ambermill Investigations
Arachnophobia
Ashenvale Outrunners
Beren's Peril
Best Coursesmart Offers Information
Boyackey
BracketName
Centaur Bracers
Cocoone
Coursesmart Promotion Codes Techniques You Cannot Afford To Skip
Dog Coaching Golf Equipment Dayton
Egg Hunt
Elementary victoria secret codes 2013 Plans - Some Practical Guidelines Related Articles
Fishing
FrontPage
Further Instructions
Harpy Lieutenants
Hunter
InterWiki
InterWikiName
InterWikiSandBox
InterWikiテクニカル
Jin'Zil's Forest Magic
Location
Matsuya
MenuBar
New Guidelines For Picking Primary Factors For victoria s secret coupons in store news
Ojar
Owatanka
PHP
PukiWiki
PukiWiki/1.4/Manual/Plugin
PukiWiki/1.4/Manual/Plugin/A-D
PukiWiki/1.4/Manual/Plugin/E-G
PukiWiki/1.4/Manual/Plugin/H-K
PukiWiki/1.4/Manual/Plugin/L-N
PukiWiki/1.4/Manual/Plugin/O-R
PukiWiki/1.4/Manual/Plugin/S-U
PukiWiki/1.4/Manual/Plugin/V-Z
Quest/Dungeon
Quick Tactics In victorias secret - Further Analysis news
Real-World victorias secret Strategies - A Few Ideas Information
SandBox
Shredding Machines
Super Reaper 6000
The Elder Crone
The Most Effective Secrets for GSA Search Engine Ranker Promotion Codes
The Spirits of Stonetalon
The Weaver
The simplest way to find a very good car insurance corporation
Victorias Secret Fashion Show 2006 - Did You Miss It News
Why Dog Training Is Needed When Adopting A New Canine
WikiEngines
WikiName
WikiWikiWeb
Yosinoya
YukiWiki
Ziz Fizziks
a great discount here
advice relevant perfume-coupons.org - Homepage
advice similar Common-Sense Systems In victoria secret promo codes 2013 Information
advice similar visit perfume-coupons.org 2013
an excellent discount
apply the promo codes
ask for coupon codes
awesome coupons here
awesome discounts here
awesome promo codes here
backlink2104091
check out these coupons
discounts helped me
get discounts online
get promo codes online
i thought about coupon codes
i thought about coupons
knparadiseland29
look at Basic Guidance On Effortless Methods Of victoria secret coupons codes websites
look at Professional Guidelines For Choosing Major Criteria Of free shipping victoria secret web site
look at Selecting Reasonable Methods In victoria s secret show internet site
look at www.perfume-coupons.org - profile web page
my favorite coupon
my favorite discount
read about the discount
receive your coupon codes
sunhoabinh
test Reasonable victoria s secret hair Secrets Across The UK internet site
the discount is good
the discounts i found
they offer coupon code deals
tips related Speedy Methods Of Victoria Secret fashion show - A Useful A-Z
topblog
try the coupons below
using promo codes to save
visit Professional Answers For Identifying Issues In victorias secret 6
website has a coupon
website has a promo code
world of warcraft battle net
ハードウェア
ヘルプ
レシピ
価格表
使い方
神風大王
整形ルール
日本語
無料動画
略語
*Minimapを制御するために〜Gathererの解析〜 [#v44a205a] **Gatherer.xml [#nbcd819c] ***AddOn.xml用の定型文 [#a89d5975] <Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/ ..\FrameXML\UI.xsd"> ***Scriptファイルの指定 [#q0ce4c44] <Script file="localization.lua"/> <Script file="GatherIcons.lua"/> <Script file="Gatherer.lua"/> ***GathererUIの設定 [#k8947df6] <Frame name="Gatherer" parent="UIParent"> <!--name:UIの名前--> <!--parent:親UIの名前(UIParentは全てのUIの親)--> <Size> <!--UIのサイズ:0×0--> <AbsDimension x="0" y="0"/> </Size> <Scripts> <!--それぞれの割り込みタイミングで呼び出されるスクリプト--> <OnLoad> <!--ロードされたとき--> Gatherer_OnLoad(); </OnLoad> <OnEvent> <!--イベント(?)が発生したとき--> Gatherer_OnEvent(event); </OnEvent> <OnUpdate> <!--アップデート(?)が発生したとき--> Gatherer_TimeCheck(arg1); </OnUpdate> </Scripts> </Frame> ***GatherNoteTemplateの設定 [#v3615a86] 収集したものに関する情報を記述するGatherNoteのテンプレート <Button name="GatherNoteTemplate" hidden="true" virtual="true"> <!--ButtonタイプのUI--> <!--hidden:隠すかどうか--> <!--virtual:C++のvirtual修飾子と同じか?--> <Size> <!--UIのサイズ:12×12--> <AbsDimension x="12" y="12"/> </Size> <Anchors> <!--アンカーの設定…アンカーって?--> <Anchor point="CENTER" relativeTo="MinimapBackdrop" relativePoint="TOPLEFT"> <Offset> <AbsDimension x="-51" y="60"/> </Offset> </Anchor> </Anchors> <Scripts> <OnLoad> this:RegisterEvent("VARIABLES_LOADED"); this:SetFrameLevel(this:GetFrameLevel() + 1); </OnLoad> <OnEvent> Gatherer_OnEvent(event); </OnEvent> <OnEnter> <!--カーソルが入ったときの処理--> GameTooltip:SetOwner(this, "ANCHOR_BOTTOMLEFT"); local name, count, dist = Gatherer_MakeName(this:GetID()) GameTooltip:SetText(name, 1.0, 0.82, 0.0, 1,1); GameTooltip:AddLine("Count: "..count, 0.82, 1.0, 0.0); GameTooltip:AddLine(dist.." units ("..(dist*4).." secs)", 0.0, 0.82, 1.0); GameTooltip:Show(); </OnEnter> <OnLeave> <!--カーソルが離れたときの処理--> GameTooltip:Hide(); </OnLeave> <OnMouseUp> Gatherer_OnClick(); </OnMouseUp> </Scripts> <NormalTexture name="$parentTexture" file="Interface\AddOns\Gatherer\IconGatherTest"/> <!--NormalTextureの設定…デフォルトのテクスチャーのことだろうか?--> </Button> ***各種GatherNoteの設定 [#v9f160cd] GatherNoteTemplateを継承しGatherNoteを設定する <Button name="GatherNote1" inherits="GatherNoteTemplate" id="1" hidden="false" parent="Minimap" toplevel="true"> <!--Minimapを親UIとするButtonタイプのUI。表示場所=toplevelという意味か?--> <Scripts> <OnUpdate> Gatherer_OnUpdate(arg1); </OnUpdate> <OnLoad> this:RegisterEvent("MINIMAP_UPDATE_ZOOM"); this:RegisterEvent("VARIABLES_LOADED"); </OnLoad> </Scripts> </Button> <!--以下その他のGatherNoteの設定--> <Button name="GatherNote2" inherits="GatherNoteTemplate" id="2" hidden="false" parent="Minimap" toplevel="true"/> : : : <Button name="GatherNote25" inherits="GatherNoteTemplate" id="25" hidden="false" parent="Minimap" toplevel="true"/> ***GatherMainTemplateの設定 [#v89f2b7b] Mainmap上での収集物の場所を表示するためのGatherMainのテンプレート <Button name="GatherMainTemplate" hidden="true" virtual="true"> <Size> <AbsDimension x="12" y="12"/> </Size> <Anchors> <Anchor point="CENTER"/> </Anchors> <Scripts> <OnEnter> local x, y = this:GetCenter(); local parentX, parentY = this:GetParent():GetCenter(); if ( x > parentX ) then WorldMapTooltip:SetOwner(this, "ANCHOR_LEFT"); else WorldMapTooltip:SetOwner(this, "ANCHOR_RIGHT"); end WorldMapTooltip:SetText(this.toolTip); WorldMapTooltip:Show(); </OnEnter> <OnLeave> WorldMapTooltip:Hide(); </OnLeave> </Scripts> <NormalTexture name="$parentTexture" file="Interface\AddOns\Gatherer\IconGatherTest"/> </Button> ***各種GatherMainの設定 [#nfd16f90] GatherMainTemplateを継承しGatherMainを設定する <Button name="GatherMain1000" inherits="GatherMainTemplate" id="1000" parent="WorldMapDetailFrame" toplevel="true"/> <!--WorldMapDetailFrameを親UIとするButtonタイプのUI--> : : : <Button name="GatherMain1500" inherits="GatherMainTemplate" id="1500" parent="WorldMapDetailFrame" toplevel="true"/> </Ui> **Gatherer.lua [#v3e56938] ***イベントへの登録 [#nf6be9c1] function Gatherer_OnLoad() this:RegisterEvent("CHAT_MSG_SPELL_SELF_BUFF"); this:RegisterEvent("UNIT_NAME_UPDATE"); this:RegisterEvent("WORLD_MAP_UPDATE"); this:RegisterEvent("CLOSE_WORLD_MAP"); -- event added for impossible to gather item this:RegisterEvent("UI_ERROR_MESSAGE"); ***イベントの処理 [#vd335dda] Gatherer_OnEvent(event) 1.CHAT_MSGを含む→Gatherer_ReadBuffにイベントを送る 2.UI_ERROR_MESSAGEを含む→… 3.MINIMAP_UPDATE_ZOOM→GatherMap_InCityにisMinimapInCity()の値を代入 4.WORLD_MAP_UPDATE→ WorldMapFrameのVisibleがON→ mapMinderがTrue、Gatherer_MapOpenがFalse→ Gatherer_CloseMapがnilではなく、最後にMapを閉じてからminderTime以内→ startContinentとstartZoneをGatherer_CloseMapから取得 Gatherer_CloseMapがnil もしくは最後にMapを閉じてからminderTimeを経過→ startContinentとstartZoneをGatherer_GetCurrentZone()から取得 Gatherer_MapOpen = true; SetMapZoom(startContinent, startZone); Gatherer_MapOpen = true; 現在地をmapContinent, mapZoneに設定 Gatherer_CloseMapに状態を設定 = { continent = mapContinent, zone = mapZone, time = GetTime() }; GatherMain_Draw(); WorldMapFrameのVisibleがOFFだけどGatherer_MapOpenがTrue→ Gatherer_MapOpen = false; GatherMain_Draw(); Gatherer_ChangeMap(); 5.CLOSE_WORLD_MAP→ Gatherer_MapOpen = false; GatherMain_Draw(); Gatherer_ChangeMap() 6.VARIABLES_LOADED→ : : ***function Gatherer_PlayerPos(forced) [#nd4eca58] currentZoneNameにGetZoneText()で現在のZoneを設定 もしそれがGather_LastZoneと異なる→ forced = true; Gather_LastZoneにはcurrentZoneNameを設定 もしforcedならGatherer_ChangeMap()を処理 px, pyにGetPlayerMapPosition("player")で現在地を取得 px,pyどちらも0 で forcedではない時に… Gatherer_ChangeMap()がTrue(Mapが変わった?)→ px, pyをGetPlayerMapPosition("player")によって再取得 Gatherer_ChangeMap()がFalse(Mapが変わってない?)→ px, pyともに0 (forcedなら0,0だろうが気にせずに現在地として返す) px, py の値を返す ***function Gatherer_ChangeMap() [#v615af08] mapContinent, mapZoneに現在地を設定 まずminderCurZoneはfalseで Gatherer_CloseMapがnilでなく、Gatherer_CloseMapとGatherer_LastZoneで場所が変わってない→ minderCurZoneをtrueに playerの現在の大陸、ゾーンを取得 その位置をGatherer_LastZoneに設定 どっちかが0なら変化なしとしてreturn playerの現在地とmapの現在地が同じならtrueをreturn SetMapZoom(playerContinent, playerZone); lastTimeを0で初期化 Gatherer_CloseMapがnilではなく、Gatherer_CloseMap.timeもnilではない→ lastTime = Gatherer_CloseMap.time; minderCurZoneがtrue(Gatherer_CloseMapとGatherer_LastZoneで場所が変わってない)→ Gatherer_MapOpen = false; Gatherer_CloseMap = { continent = playerContinent, zone = playerZone, time = lastTime }; Gatherer_OnEvent("WORLD_MAP_UPDATE"); trueを返して終了
タイムスタンプを変更しない
*Minimapを制御するために〜Gathererの解析〜 [#v44a205a] **Gatherer.xml [#nbcd819c] ***AddOn.xml用の定型文 [#a89d5975] <Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/ ..\FrameXML\UI.xsd"> ***Scriptファイルの指定 [#q0ce4c44] <Script file="localization.lua"/> <Script file="GatherIcons.lua"/> <Script file="Gatherer.lua"/> ***GathererUIの設定 [#k8947df6] <Frame name="Gatherer" parent="UIParent"> <!--name:UIの名前--> <!--parent:親UIの名前(UIParentは全てのUIの親)--> <Size> <!--UIのサイズ:0×0--> <AbsDimension x="0" y="0"/> </Size> <Scripts> <!--それぞれの割り込みタイミングで呼び出されるスクリプト--> <OnLoad> <!--ロードされたとき--> Gatherer_OnLoad(); </OnLoad> <OnEvent> <!--イベント(?)が発生したとき--> Gatherer_OnEvent(event); </OnEvent> <OnUpdate> <!--アップデート(?)が発生したとき--> Gatherer_TimeCheck(arg1); </OnUpdate> </Scripts> </Frame> ***GatherNoteTemplateの設定 [#v3615a86] 収集したものに関する情報を記述するGatherNoteのテンプレート <Button name="GatherNoteTemplate" hidden="true" virtual="true"> <!--ButtonタイプのUI--> <!--hidden:隠すかどうか--> <!--virtual:C++のvirtual修飾子と同じか?--> <Size> <!--UIのサイズ:12×12--> <AbsDimension x="12" y="12"/> </Size> <Anchors> <!--アンカーの設定…アンカーって?--> <Anchor point="CENTER" relativeTo="MinimapBackdrop" relativePoint="TOPLEFT"> <Offset> <AbsDimension x="-51" y="60"/> </Offset> </Anchor> </Anchors> <Scripts> <OnLoad> this:RegisterEvent("VARIABLES_LOADED"); this:SetFrameLevel(this:GetFrameLevel() + 1); </OnLoad> <OnEvent> Gatherer_OnEvent(event); </OnEvent> <OnEnter> <!--カーソルが入ったときの処理--> GameTooltip:SetOwner(this, "ANCHOR_BOTTOMLEFT"); local name, count, dist = Gatherer_MakeName(this:GetID()) GameTooltip:SetText(name, 1.0, 0.82, 0.0, 1,1); GameTooltip:AddLine("Count: "..count, 0.82, 1.0, 0.0); GameTooltip:AddLine(dist.." units ("..(dist*4).." secs)", 0.0, 0.82, 1.0); GameTooltip:Show(); </OnEnter> <OnLeave> <!--カーソルが離れたときの処理--> GameTooltip:Hide(); </OnLeave> <OnMouseUp> Gatherer_OnClick(); </OnMouseUp> </Scripts> <NormalTexture name="$parentTexture" file="Interface\AddOns\Gatherer\IconGatherTest"/> <!--NormalTextureの設定…デフォルトのテクスチャーのことだろうか?--> </Button> ***各種GatherNoteの設定 [#v9f160cd] GatherNoteTemplateを継承しGatherNoteを設定する <Button name="GatherNote1" inherits="GatherNoteTemplate" id="1" hidden="false" parent="Minimap" toplevel="true"> <!--Minimapを親UIとするButtonタイプのUI。表示場所=toplevelという意味か?--> <Scripts> <OnUpdate> Gatherer_OnUpdate(arg1); </OnUpdate> <OnLoad> this:RegisterEvent("MINIMAP_UPDATE_ZOOM"); this:RegisterEvent("VARIABLES_LOADED"); </OnLoad> </Scripts> </Button> <!--以下その他のGatherNoteの設定--> <Button name="GatherNote2" inherits="GatherNoteTemplate" id="2" hidden="false" parent="Minimap" toplevel="true"/> : : : <Button name="GatherNote25" inherits="GatherNoteTemplate" id="25" hidden="false" parent="Minimap" toplevel="true"/> ***GatherMainTemplateの設定 [#v89f2b7b] Mainmap上での収集物の場所を表示するためのGatherMainのテンプレート <Button name="GatherMainTemplate" hidden="true" virtual="true"> <Size> <AbsDimension x="12" y="12"/> </Size> <Anchors> <Anchor point="CENTER"/> </Anchors> <Scripts> <OnEnter> local x, y = this:GetCenter(); local parentX, parentY = this:GetParent():GetCenter(); if ( x > parentX ) then WorldMapTooltip:SetOwner(this, "ANCHOR_LEFT"); else WorldMapTooltip:SetOwner(this, "ANCHOR_RIGHT"); end WorldMapTooltip:SetText(this.toolTip); WorldMapTooltip:Show(); </OnEnter> <OnLeave> WorldMapTooltip:Hide(); </OnLeave> </Scripts> <NormalTexture name="$parentTexture" file="Interface\AddOns\Gatherer\IconGatherTest"/> </Button> ***各種GatherMainの設定 [#nfd16f90] GatherMainTemplateを継承しGatherMainを設定する <Button name="GatherMain1000" inherits="GatherMainTemplate" id="1000" parent="WorldMapDetailFrame" toplevel="true"/> <!--WorldMapDetailFrameを親UIとするButtonタイプのUI--> : : : <Button name="GatherMain1500" inherits="GatherMainTemplate" id="1500" parent="WorldMapDetailFrame" toplevel="true"/> </Ui> **Gatherer.lua [#v3e56938] ***イベントへの登録 [#nf6be9c1] function Gatherer_OnLoad() this:RegisterEvent("CHAT_MSG_SPELL_SELF_BUFF"); this:RegisterEvent("UNIT_NAME_UPDATE"); this:RegisterEvent("WORLD_MAP_UPDATE"); this:RegisterEvent("CLOSE_WORLD_MAP"); -- event added for impossible to gather item this:RegisterEvent("UI_ERROR_MESSAGE"); ***イベントの処理 [#vd335dda] Gatherer_OnEvent(event) 1.CHAT_MSGを含む→Gatherer_ReadBuffにイベントを送る 2.UI_ERROR_MESSAGEを含む→… 3.MINIMAP_UPDATE_ZOOM→GatherMap_InCityにisMinimapInCity()の値を代入 4.WORLD_MAP_UPDATE→ WorldMapFrameのVisibleがON→ mapMinderがTrue、Gatherer_MapOpenがFalse→ Gatherer_CloseMapがnilではなく、最後にMapを閉じてからminderTime以内→ startContinentとstartZoneをGatherer_CloseMapから取得 Gatherer_CloseMapがnil もしくは最後にMapを閉じてからminderTimeを経過→ startContinentとstartZoneをGatherer_GetCurrentZone()から取得 Gatherer_MapOpen = true; SetMapZoom(startContinent, startZone); Gatherer_MapOpen = true; 現在地をmapContinent, mapZoneに設定 Gatherer_CloseMapに状態を設定 = { continent = mapContinent, zone = mapZone, time = GetTime() }; GatherMain_Draw(); WorldMapFrameのVisibleがOFFだけどGatherer_MapOpenがTrue→ Gatherer_MapOpen = false; GatherMain_Draw(); Gatherer_ChangeMap(); 5.CLOSE_WORLD_MAP→ Gatherer_MapOpen = false; GatherMain_Draw(); Gatherer_ChangeMap() 6.VARIABLES_LOADED→ : : ***function Gatherer_PlayerPos(forced) [#nd4eca58] currentZoneNameにGetZoneText()で現在のZoneを設定 もしそれがGather_LastZoneと異なる→ forced = true; Gather_LastZoneにはcurrentZoneNameを設定 もしforcedならGatherer_ChangeMap()を処理 px, pyにGetPlayerMapPosition("player")で現在地を取得 px,pyどちらも0 で forcedではない時に… Gatherer_ChangeMap()がTrue(Mapが変わった?)→ px, pyをGetPlayerMapPosition("player")によって再取得 Gatherer_ChangeMap()がFalse(Mapが変わってない?)→ px, pyともに0 (forcedなら0,0だろうが気にせずに現在地として返す) px, py の値を返す ***function Gatherer_ChangeMap() [#v615af08] mapContinent, mapZoneに現在地を設定 まずminderCurZoneはfalseで Gatherer_CloseMapがnilでなく、Gatherer_CloseMapとGatherer_LastZoneで場所が変わってない→ minderCurZoneをtrueに playerの現在の大陸、ゾーンを取得 その位置をGatherer_LastZoneに設定 どっちかが0なら変化なしとしてreturn playerの現在地とmapの現在地が同じならtrueをreturn SetMapZoom(playerContinent, playerZone); lastTimeを0で初期化 Gatherer_CloseMapがnilではなく、Gatherer_CloseMap.timeもnilではない→ lastTime = Gatherer_CloseMap.time; minderCurZoneがtrue(Gatherer_CloseMapとGatherer_LastZoneで場所が変わってない)→ Gatherer_MapOpen = false; Gatherer_CloseMap = { continent = playerContinent, zone = playerZone, time = lastTime }; Gatherer_OnEvent("WORLD_MAP_UPDATE"); trueを返して終了
テキスト整形のルールを表示する