Quantcast

ps.1

Alex Shubert [04-18-12 - 20:52]
ps.1
Filename
AutoTurnIn.lua
AutoTurnIn.toc
RewardOptions.lua
rewards.lua
diff --git a/AutoTurnIn.lua b/AutoTurnIn.lua
index 9cf11bc..da859c8 100644
--- a/AutoTurnIn.lua
+++ b/AutoTurnIn.lua
@@ -40,7 +40,7 @@ function AutoTurnIn:OnEnable()
 	if (not AutoTurnInDB) or (not AutoTurnInDB.version or (AutoTurnInDB.version < vers)) then
 		AutoTurnInCharacterDB = nil
 		_G.AutoTurnInDB = {version = vers}
-		self:Print(L["reset"])
+		self:Print(INSTANCE_RESET_SUCCESS:format(GAMEOPTIONS_MENU))
 	end

 	if not AutoTurnInCharacterDB then
@@ -259,7 +259,8 @@ function AutoTurnIn:TurnInQuest(rewardIndex)
 	if (AutoTurnInCharacterDB.showrewardtext) then
 		self:Print((UnitName("target") and  UnitName("target") or '')..'\n', GetRewardText())
 	end
-	GetQuestReward(rewardIndex)
+	print(rewardIndex)
+	--GetQuestReward(rewardIndex)
 end

 function AutoTurnIn:Greed()
@@ -317,7 +318,8 @@ function AutoTurnIn:Need()
 			wipe(self.stattable)
 			GetItemStats(link, self.stattable)
 			for stat, value in pairs(self.stattable) do
-				if ( AutoTurnInCharacterDB.stat[C.STATS[stat]] ) then
+				print(stat, AutoTurnInCharacterDB.stat[stat])
+				if ( AutoTurnInCharacterDB.stat[stat] ) then
 					OkByStat = true
 				end
 			end
diff --git a/AutoTurnIn.toc b/AutoTurnIn.toc
index 4394c54..a0947e4 100644
--- a/AutoTurnIn.toc
+++ b/AutoTurnIn.toc
@@ -1,6 +1,6 @@
 ## Interface: 40300
 ## Title: AutoTurnIn
-## Version: 2.1
+## Version: 3.0
 ## Author: Lur
 ## Notes: Auto accept and complete daily or any quests
 ## Notes-ruRU: Автоматически принимает и сдает ежедневные либо все задания
diff --git a/RewardOptions.lua b/RewardOptions.lua
index 892a46c..b86277e 100644
--- a/RewardOptions.lua
+++ b/RewardOptions.lua
@@ -100,10 +100,10 @@ CreateCheckbox('INVTYPE_CLOAK', ArmorPanel, 402, -40, INVTYPE_CLOAK)

 -- ATTRIBUTES
 local StatPanel = CreatePanel("StatPanel", STAT_CATEGORY_ATTRIBUTES, 590, 40)
-CreateCheckbox("Strength", StatPanel, 10, -8, SPELL_STAT1_NAME)
-CreateCheckbox("Agility", StatPanel, 152, -8, SPELL_STAT2_NAME)
-CreateCheckbox("Intellect", StatPanel, 292, -8, SPELL_STAT4_NAME)
-CreateCheckbox("Spirit", StatPanel, 436, -8, SPELL_STAT5_NAME)
+CreateCheckbox('ITEM_MOD_STRENGTH_SHORT', StatPanel, 10, -8, SPELL_STAT1_NAME)
+CreateCheckbox('ITEM_MOD_AGILITY_SHORT', StatPanel, 152, -8, SPELL_STAT2_NAME)
+CreateCheckbox('ITEM_MOD_INTELLECT_SHORT', StatPanel, 292, -8, SPELL_STAT4_NAME)
+CreateCheckbox('ITEM_MOD_SPIRIT_SHORT', StatPanel, 436, -8, SPELL_STAT5_NAME)

 -- 'Enable' CheckBox
 local GreedAfterNeed = CreateFrame("CheckButton", O.."Enable", RewardPanel, "OptionsCheckButtonTemplate")
diff --git a/rewards.lua b/rewards.lua
index 242c2e8..ff740cd 100644
--- a/rewards.lua
+++ b/rewards.lua
@@ -8,12 +8,6 @@ local armor = {GetAuctionItemSubClasses(2)}
 -- C.STOPTOKENS = {['INVTYPE_RELIC']='', ['INVTYPE_TRINKET']='', ['INVTYPE_HOLDABL']=''}
 C.WEAPONLABEL, C.ARMORLABEL = GetAuctionItemClasses()
 C.JEWELRY = {['INVTYPE_FINGER']='', ['INVTYPE_NECK']=''}
-C.STATS = {
-	['ITEM_MOD_STRENGTH_SHORT'] = "Strength",
-	['ITEM_MOD_AGILITY_SHORT'] = "Agility",
-	['ITEM_MOD_INTELLECT_SHORT'] = "Intellect",
-	['ITEM_MOD_SPIRIT_SHORT'] = "Spirit"
-}

 -- Most of the constants are never used but it's convinient to have them here as a reminder and shortcut
 C.ITEMS = {