Mercurial > wow > wowdb-profiler
comparison Main.lua @ 418:df4820871122
Blacklisted bodyguard reputations and supported new Draenor perk, Trading Pact.
author | MMOSimca <MMOSimca@gmail.com> |
---|---|
date | Wed, 07 Jan 2015 02:52:31 -0500 |
parents | 929d2b27a087 |
children | bd7a7162cc0f |
comparison
equal
deleted
inserted
replaced
417:929d2b27a087 | 418:df4820871122 |
---|---|
1848 | 1848 |
1849 | 1849 |
1850 local DIPLOMACY_SPELL_ID = 20599 | 1850 local DIPLOMACY_SPELL_ID = 20599 |
1851 local MR_POP_RANK1_SPELL_ID = 78634 | 1851 local MR_POP_RANK1_SPELL_ID = 78634 |
1852 local MR_POP_RANK2_SPELL_ID = 78635 | 1852 local MR_POP_RANK2_SPELL_ID = 78635 |
1853 local FACTION_DATA = private.FACTION_DATA | 1853 local TRADING_PACT_SPELL_ID = 170200 |
1854 local REP_BUFFS = private.REP_BUFFS | |
1855 | 1854 |
1856 | 1855 |
1857 function WDP:COMBAT_TEXT_UPDATE(event_name, message_type, faction_name, amount) | 1856 function WDP:COMBAT_TEXT_UPDATE(event_name, message_type, faction_name, amount) |
1858 if message_type ~= "FACTION" or not killed_npc_id then | 1857 if message_type ~= "FACTION" or not killed_npc_id then |
1859 return | 1858 return |
1882 if _G.IsSpellKnown(MR_POP_RANK2_SPELL_ID) then | 1881 if _G.IsSpellKnown(MR_POP_RANK2_SPELL_ID) then |
1883 modifier = modifier + 0.1 | 1882 modifier = modifier + 0.1 |
1884 elseif _G.IsSpellKnown(MR_POP_RANK1_SPELL_ID) then | 1883 elseif _G.IsSpellKnown(MR_POP_RANK1_SPELL_ID) then |
1885 modifier = modifier + 0.05 | 1884 modifier = modifier + 0.05 |
1886 end | 1885 end |
1886 if _G.IsSpellKnown(TRADING_PACT_SPELL_ID) then | |
1887 modifier = modifier + 0.2 | |
1888 end | |
1887 | 1889 |
1888 -- Determine faction ID | 1890 -- Determine faction ID |
1889 local faction_ID | 1891 local faction_ID |
1890 for pseudo_faction_name, faction_data_table in pairs(FACTION_DATA) do | 1892 for pseudo_faction_name, faction_data_table in pairs(private.FACTION_DATA) do |
1891 if faction_name == faction_data_table[2] then | 1893 if faction_name == faction_data_table[3] then |
1894 -- Check ignore flag | |
1895 if faction_data_table[2] then | |
1896 return | |
1897 end | |
1892 faction_ID = faction_data_table[1] | 1898 faction_ID = faction_data_table[1] |
1899 break | |
1893 end | 1900 end |
1894 end | 1901 end |
1895 if faction_ID and faction_ID > 0 then | 1902 if faction_ID and faction_ID > 0 then |
1896 -- Check for modifiers from Commendations (applied directly to the faction, account-wide) | 1903 -- Check for modifiers from Commendations (applied directly to the faction, account-wide) |
1897 local _, _, _, _, _, _, _, _, _, _, _, _, _, _, has_bonus_rep_gain = GetFactionInfoByID(faction_ID) | 1904 local _, _, _, _, _, _, _, _, _, _, _, _, _, _, has_bonus_rep_gain = GetFactionInfoByID(faction_ID) |
1899 modifier = modifier + 1 | 1906 modifier = modifier + 1 |
1900 end | 1907 end |
1901 end | 1908 end |
1902 | 1909 |
1903 -- Check for modifiers from buffs | 1910 -- Check for modifiers from buffs |
1904 for buff_name, buff_data_table in pairs(REP_BUFFS) do | 1911 for buff_name, buff_data_table in pairs(private.REP_BUFFS) do |
1905 if _G.UnitBuff("player", buff_name) then | 1912 if _G.UnitBuff("player", buff_name) then |
1906 local modded_faction = buff_data_table.faction | 1913 local modded_faction = buff_data_table.faction |
1907 | 1914 |
1908 if not modded_faction or faction_name == modded_faction then | 1915 if not modded_faction or faction_name == modded_faction then |
1909 if buff_data_table.ignore then | 1916 if buff_data_table.ignore then |