Quantcast

Possible bug fix b/c of that Jeehoon ;)

Repooc [03-18-14 - 12:36]
Possible bug fix b/c of that Jeehoon ;)
Filename
ElvUI_SLE/modules/characterframe/characterframe.lua
ElvUI_SLE/modules/characterframe/communication.lua
ElvUI_SLE/modules/characterframe/core.lua
ElvUI_SLE/modules/characterframe/inspectframe.lua
diff --git a/ElvUI_SLE/modules/characterframe/characterframe.lua b/ElvUI_SLE/modules/characterframe/characterframe.lua
index c9cac6c..bc1c09c 100755
--- a/ElvUI_SLE/modules/characterframe/characterframe.lua
+++ b/ElvUI_SLE/modules/characterframe/characterframe.lua
@@ -224,8 +224,8 @@ function CFO:ArmoryFrame_DataSetting()

 	if Prof1 then Prof1, _, Prof1_Level = GetProfessionInfo(Prof1) end
 	if Prof2 then Prof2, _, Prof2_Level = GetProfessionInfo(Prof2) end
-	if Prof1 and C.ProfessionList[Prof1] then CFO.PlayerProfession[(C.ProfessionList[Prof1])] = Prof1_Level end
-	if Prof2 and C.ProfessionList[Prof2] then CFO.PlayerProfession[(C.ProfessionList[Prof2])] = Prof2_Level end
+	if Prof1 and C.ProfessionList[Prof1] then CFO.PlayerProfession[(C.ProfessionList[Prof1].Key)] = Prof1_Level end
+	if Prof2 and C.ProfessionList[Prof2] then CFO.PlayerProfession[(C.ProfessionList[Prof2].Key)] = Prof2_Level end

 	local ErrorDetected
 	local r, g, b
diff --git a/ElvUI_SLE/modules/characterframe/communication.lua b/ElvUI_SLE/modules/characterframe/communication.lua
index b6c3d8b..6246e36 100644
--- a/ElvUI_SLE/modules/characterframe/communication.lua
+++ b/ElvUI_SLE/modules/characterframe/communication.lua
@@ -39,12 +39,16 @@ if not AISM then

 	--<< Define Key Table >>--
 	AISM.ProfessionList = {
+		[GetSpellInfo(105206)] = 'AC', -- Alchemy
 		[GetSpellInfo(110396)] = 'BS', -- BlackSmithing
 		[GetSpellInfo(110400)] = 'EC', -- Enchanting
 		[GetSpellInfo(110403)] = 'EG', -- Engineering
+		[GetSpellInfo(110413)] = 'HB', -- Herbalism
 		[GetSpellInfo(110417)] = 'IS', -- Inscription
 		[GetSpellInfo(110420)] = 'JC', -- JewelCrafting
+		[GetSpellInfo(102161)] = 'MN', -- Mining
 		[GetSpellInfo(110423)] = 'LW', -- LeatherWorking
+		[GetSpellInfo(102216)] = 'SK', -- Skinning
 		[GetSpellInfo(110426)] = 'TL', -- Tailoring
 	}
 	AISM.GearList = {
@@ -589,6 +593,15 @@ if not AISM then
 										self.needSendDataGroup = false
 									end
 								elseif not UnitIsConnected(self.CurrentGroupMode..i) then
+									if self.needSendDataGroup == nil then
+										self.needSendDataGroup = 0
+									elseif type(self.needSendDataGroup) == 'number' then
+										self.needSendDataGroup = self.needSendDataGroup + 1
+
+										if self.needSendDataGroup > 30 then
+											self.needSendDataGroup = nil
+										end
+									end
 									self.GroupMemberData[TableIndex] = nil
 								elseif not self.GroupMemberData[TableIndex] then
 									self.needSendDataGroup = true
@@ -603,7 +616,7 @@ if not AISM then
 					end
 				end

-				if self.needSendDataGroup and self.Updater.SpecUpdated and self.Updater.GlyphUpdated and self.Updater.GearUpdated then
+				if self.needSendDataGroup == true and self.Updater.SpecUpdated and self.Updater.GlyphUpdated and self.Updater.GearUpdated then
 					self.SendDataGroupUpdated = self.SendDataGroupUpdated - elapsed

 					if self.SendDataGroupUpdated < 0 then
@@ -622,7 +635,6 @@ if not AISM then
 					self.SendDataGuildUpdated = self.SendMessageDelay

 					SendAddonMessage('AISM', 'AISM_GUILD_RegistME', 'GUILD')
-					--print('길드? AISM_GUILD_RegistME 전송')
 					self.needSendDataGuild = nil
 				end
 			end
@@ -657,7 +669,9 @@ if not AISM then
 		--print('|cffceff00['..Channel..']|r|cff2eb7e4['..Prefix..']|r '..Sender..' : ')
 		--print(Message)

-		if Message == 'AISM_GUILD_RegistME' then
+		if Message == 'AISM_UnregistME' then
+			self.GroupMemberData[Sender] = nil
+		elseif Message == 'AISM_GUILD_RegistME' then
 			self.GuildMemberData[Sender] = true
 			SendAddonMessage('AISM', 'AISM_GUILD_RegistResponse', SenderRealm == playerRealm and 'WHISPER' or 'GUILD', Sender)
 		elseif Message == 'AISM_GUILD_RegistResponse' then
@@ -676,9 +690,9 @@ if not AISM then
 					TableToSend[Index] = Data
 				end

-				self:SettingInspectData(DataToSend)
+				self:SettingInspectData(TableToSend)

-				self:SendData(DataToSend, Prefix, Channel, Sender)
+				self:SendData(TableToSend, Prefix, Channel, Sender)
 			end
 		else
 			local TableToSave, NeedResponse, Group, stringTable
@@ -785,7 +799,7 @@ if not AISM then
 							end
 						elseif self.DataTypeTable[DataType] == 'PlayerInfo' then
 							TableToSave.Name, TableToSave.Title = strsplit('_', stringTable[1])
-							TableToSave.Realm = stringTable[2] ~= '' and stringTable[2] ~= E.myrealm and stringTable[2] or nil
+							TableToSave.Realm = stringTable[2] ~= '' and stringTable[2] ~= playerRealm and stringTable[2] or nil
 							TableToSave.Level = stringTable[3]
 							TableToSave.Class = stringTable[4]
 							TableToSave.ClassID = stringTable[5]
@@ -856,7 +870,9 @@ if not AISM then
 			if IsInGuild() then
 				SendAddonMessage('AISM', 'AISM_GUILD_UnregistME', 'GUILD')
 			end
-
+			if self.CurrentGroupMode ~= 'NoGroup' then
+				SendAddonMessage('AISM', 'AISM_UnregistME', IsInGroup(LE_PARTY_CATEGORY_INSTANCE) and 'INSTANCE_CHAT' or string.upper(self.CurrentGroupMode))
+			end
 		elseif Event == 'GROUP_ROSTER_UPDATE' then
 			self:GetPlayerCurrentGroupMode()
 			self:Show()
diff --git a/ElvUI_SLE/modules/characterframe/core.lua b/ElvUI_SLE/modules/characterframe/core.lua
index 784c492..04c533f 100644
--- a/ElvUI_SLE/modules/characterframe/core.lua
+++ b/ElvUI_SLE/modules/characterframe/core.lua
@@ -64,15 +64,7 @@ SLArmoryConstants = {
 		['4894'] = true, -- ?? ??					Swordguard Embroidery
 	},

-	['ProfessionList'] = {
-		[GetSpellInfo(110396)] = 'BlackSmithing',
-		[GetSpellInfo(110400)] = 'Enchanting',
-		[GetSpellInfo(110403)] = 'Engineering',
-		[GetSpellInfo(110417)] = 'Inscription',
-		[GetSpellInfo(110420)] = 'JewelCrafting',
-		[GetSpellInfo(110423)] = 'LeatherWorking',
-		[GetSpellInfo(110426)] = 'Tailoring'
-	},
+	['ProfessionList'] = {},

 	['CommonScript'] = {
 		['OnEnter'] = function(self)
@@ -198,6 +190,31 @@ SLArmoryConstants = {
 	},
 }

+--Get Profession Information
+local ProfessionName, ProfessionTexture
+for ProfessionSkillID, Key in pairs({
+	[105206] = 'Alchemy',
+	[110396] = 'BlackSmithing',
+	[110400] = 'Enchanting',
+	[110403] = 'Engineering',
+	[110417] = 'Inscription',
+	[110420] = 'JewelCrafting',
+	[110423] = 'LeatherWorking',
+	[110426] = 'Tailoring',
+
+	[110413] = 'Herbalism',
+	[102161] = 'Mining',
+	[102216] = 'Skinning'
+})
+do
+	ProfessionName, _, ProfessionTexture = GetSpellInfo(ProfessionSkillID)
+
+	SLArmoryConstants.ProfessionList[ProfessionName] = {
+		['Key'] = Key,
+		['Texture'] = ProfessionTexture
+	}
+end
+
 --Colorize Class Name and localize specialization name
 local ClassName = {}
 FillLocalizedClassList(ClassName)
@@ -283,7 +300,7 @@ SLArmoryConstants['ClassRole'] = {
 			['Color'] = '|cffea5455',
 			['Role'] = 'Melee',
 		},
-		[L['Spec_Hunter_Survival']] = {		--생존
+		[L['Spec_Hunter_Survival']] = {		--?존
 			['Color'] = '|cffbaf71d',
 			['Role'] = 'Melee',
 		},
@@ -297,7 +314,7 @@ SLArmoryConstants['ClassRole'] = {
 			['Color'] = '|cffe60000',
 			['Role'] = 'Melee',
 		},
-		[L['Spec_Shaman_Restoration']] = {	--복원
+		[L['Spec_Shaman_Restoration']] = {	--복?
 			['Color'] = '|cff00ff0c',
 			['Role'] = 'Healer',
 		},
@@ -311,7 +328,7 @@ SLArmoryConstants['ClassRole'] = {
 			['Color'] = '|cffb6f1b7',
 			['Role'] = 'Healer',
 		},
-		[L['Spec_Monk_Windwalker']] = {		--풍운
+		[L['Spec_Monk_Windwalker']] = {		--?운
 			['Color'] = '|cffb2c6de',
 			['Role'] = 'Melee',
 		},
@@ -399,7 +416,7 @@ SLArmoryConstants['ClassRole'] = {
 			['Color'] = '|cff6bdaff',
 			['Role'] = 'Healer',
 		},
-		[L['Spec_Priest_Shadow']] = {		--암흑
+		[L['Spec_Priest_Shadow']] = {		--암?
 			['Color'] = '|cff7e52c1',
 			['Role'] = 'Caster',
 		},
diff --git a/ElvUI_SLE/modules/characterframe/inspectframe.lua b/ElvUI_SLE/modules/characterframe/inspectframe.lua
index 7db9f73..951c7eb 100644
--- a/ElvUI_SLE/modules/characterframe/inspectframe.lua
+++ b/ElvUI_SLE/modules/characterframe/inspectframe.lua
@@ -695,7 +695,6 @@ function KI:CreateInspectFrame()
 				self.Info.Profession['Prof'..i].Icon = self.Info.Profession['Prof'..i]:CreateTexture(nil, 'OVERLAY')
 				self.Info.Profession['Prof'..i].Icon:SetTexCoord(unpack(E.TexCoords))
 				self.Info.Profession['Prof'..i].Icon:SetInside()
-				self.Info.Profession['Prof'..i].Icon:SetTexture(GetSpellTexture(110396))

 				self.Info.Profession['Prof'..i].BarFrame = CreateFrame('Frame', nil, self.Info.Profession['Prof'..i])
 				self.Info.Profession['Prof'..i].BarFrame:Size(136, 5)
@@ -1656,9 +1655,17 @@ function KI:InspectFrame_DataSetting(DataTable)
 			for i = 1, 2 do
 				if DataTable.Profession[i].Name then
 					self.Info.Profession:Show()
-					self.Info.Profession['Prof'..i].Name:SetText(DataTable.Profession[i].Name)
-					self.Info.Profession['Prof'..i].Level:SetText(DataTable.Profession[i].Level)
 					self.Info.Profession['Prof'..i].Bar:SetValue(DataTable.Profession[i].Level)
+
+					if C.ProfessionList[DataTable.Profession[i].Name] then
+						self.Info.Profession['Prof'..i].Name:SetText('|cff77c0ff'..DataTable.Profession[i].Name)
+						self.Info.Profession['Prof'..i].Icon:SetTexture(C.ProfessionList[DataTable.Profession[i].Name].Texture)
+						self.Info.Profession['Prof'..i].Level:SetText(DataTable.Profession[i].Level)
+					else
+						self.Info.Profession['Prof'..i].Name:SetText('|cff808080'..DataTable.Profession[i].Name)
+						self.Info.Profession['Prof'..i].Icon:SetTexture('Interface\\ICONS\\INV_Misc_QuestionMark')
+						self.Info.Profession['Prof'..i].Level:SetText(nil)
+					end
 				else
 					self.Info.Profession:Hide()
 					break
@@ -1697,7 +1704,7 @@ function KI:InspectFrame_DataSetting(DataTable)
 			end
 		end

-		self.SpecIcon:SetTexture('Interface\\ICONS\\INV_Misc_QuestionMark.blp')
+		self.SpecIcon:SetTexture('Interface\\ICONS\\INV_Misc_QuestionMark')
 		for i = 1, MAX_TALENT_GROUPS do
 			Color = '|cff808080'