WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   General Authoring Discussion (https://www.wowinterface.com/forums/forumdisplay.php?f=20)
-   -   ChatTypeInfo["WHISPER"].id == 0 ? (https://www.wowinterface.com/forums/showthread.php?t=49367)

Lombra 06-05-14 05:20 PM

ChatTypeInfo["WHISPER"].id == 0 ?
 
Title is true for me I noticed, without any addons. This has the effect that the color of incoming whispers cannot be changed. At least not through the in game chat config UI. Is this true for everyone? Someone who works with chat addons perhaps stumbled into this? GetChatTypeIndex("WHISPER") still returns a proper value.

Billtopia 06-10-14 06:13 PM

did you check to see what ChatTypeInfo["WHISPER"].r or ChatTypeInfo["WHISPER"].g or ChatTypeInfo["WHISPER"].b
ChatTypeInfo["WHISPER"].id has a description of ?? on http://www.wowwiki.com/ChatTypeInfo and you don't need it anyways

I would also assign it to a local var like: local whisper = ChatTypeInfo["WHISPER"]

that way you don't have to keep looking up the global each change

Lombra 06-11-14 04:46 AM

Yeah, the rgb fields are fine. I don't need the .id since the function works, but the default UI needs it to change the color of the chat type in question, and it would be nice to be able to use it for all chat types as I'm already using the table for the rgb values anyway.

I'm mostly curious whether everyone has this issue and, if not, I have no idea how it could've happened to me. Should be possible to test simply by checking the variable directly, or changing your whisper color and see if incoming whispers change.

Billtopia 06-11-14 07:13 PM

I tried both with over 100 addons loaded and this is what I got.

ChatTypeInfo["WHISPER"].id = 0
GetChatTypeIndex("WHISPER") = 8

the question is 'id' supposed to equal 'index'

I did notice that the index is where it falls on the menu to change the color but that may be chance
I can also change the color from within the menu even with an id of 0

Billtopia 06-12-14 08:04 AM

so by running the scriptlette(well slightly different version as ran from within SlashMagic) I got the following after...
I also found by staring at blizzard code (FrameXML\ChatFrame.lua) that ID is assigned to equal the index and "WHISPER" is "REPLY"


I don't know if this helps you or not...


lua Code:
  1. local cti =  getmetatable(ChatTypeInfo).__index
  2. for k, v in pairs(cti) do
  3.      saved[k] = { id = ChatTypeInfo[k].id, index = GetChatTypeIndex(k)}
  4. end

Code:

        ["CHANNEL6"] = {
            ["id"] = 74,
            ["index"] = 74,
        },
        ["CHANNEL"] = {
            ["id"] = 18,
            ["index"] = 18,
        },
        ["PARTY"] = {
            ["id"] = 3,
            ["index"] = 3,
        },
        ["CHANNEL_LIST"] = {
            ["id"] = 21,
            ["index"] = 21,
        },
        ["BN_BROADCAST"] = {
            ["id"] = 0,
            ["index"] = 0,
        },
        ["SYSTEM"] = {
            ["id"] = 1,
            ["index"] = 1,
        },
        ["RAID_BOSS_EMOTE"] = {
            ["id"] = 42,
            ["index"] = 42,
        },
        ["BN_ALERT"] = {
            ["id"] = 0,
            ["index"] = 0,
        },
        ["CHANNEL7"] = {
            ["id"] = 75,
            ["index"] = 75,
        },
        ["SKILL"] = {
            ["id"] = 27,
            ["index"] = 27,
        },
        ["CHANNEL1"] = {
            ["id"] = 69,
            ["index"] = 69,
        },
        ["CHANNEL3"] = {
            ["id"] = 71,
            ["index"] = 71,
        },
        ["BN_CONVERSATION_LIST"] = {
            ["id"] = 56,
            ["index"] = 56,
        },
        ["PET_BATTLE_INFO"] = {
            ["id"] = 66,
            ["index"] = 66,
        },
        ["LOOT"] = {
            ["id"] = 28,
            ["index"] = 28,
        },
        ["IGNORED"] = {
            ["id"] = 26,
            ["index"] = 26,
        },
        ["BN_WHISPER_PLAYER_OFFLINE"] = {
            ["id"] = 61,
            ["index"] = 61,
        },
        ["OFFICER"] = {
            ["id"] = 6,
            ["index"] = 6,
        },
        ["YELL"] = {
            ["id"] = 7,
            ["index"] = 7,
        },
        ["BN_INLINE_TOAST_BROADCAST_INFORM"] = {
            ["id"] = 59,
            ["index"] = 59,
        },
        ["COMBAT_MISC_INFO"] = {
            ["id"] = 33,
            ["index"] = 33,
        },
        ["SAY"] = {
            ["id"] = 2,
            ["index"] = 2,
        },
        ["BN_CONVERSATION_NOTICE"] = {
            ["id"] = 55,
            ["index"] = 55,
        },
        ["DND"] = {
            ["id"] = 25,
            ["index"] = 25,
        },
        ["GUILD_ACHIEVEMENT"] = {
            ["id"] = 48,
            ["index"] = 48,
        },
        ["MONSTER_PARTY"] = {
            ["id"] = 14,
            ["index"] = 14,
        },
        ["BN_INLINE_TOAST_ALERT"] = {
            ["id"] = 57,
            ["index"] = 57,
        },
        ["CHANNEL4"] = {
            ["id"] = 72,
            ["index"] = 72,
        },
        ["BN_CONVERSATION"] = {
            ["id"] = 54,
            ["index"] = 54,
        },
        ["CHANNEL_NOTICE_USER"] = {
            ["id"] = 23,
            ["index"] = 23,
        },
        ["BG_SYSTEM_HORDE"] = {
            ["id"] = 39,
            ["index"] = 39,
        },
        ["MONSTER_WHISPER"] = {
            ["id"] = 16,
            ["index"] = 16,
        },
        ["CHANNEL_JOIN"] = {
            ["id"] = 19,
            ["index"] = 19,
        },
        ["WHISPER_INFORM"] = {
            ["id"] = 10,
            ["index"] = 10,
        },
        ["QUEST_BOSS_EMOTE"] = {
            ["id"] = 64,
            ["index"] = 64,
        },
        ["COMBAT_HONOR_GAIN"] = {
            ["id"] = 35,
            ["index"] = 35,
        },
        ["CHANNEL5"] = {
            ["id"] = 73,
            ["index"] = 73,
        },
        ["MONSTER_SAY"] = {
            ["id"] = 13,
            ["index"] = 13,
        },
        ["BG_SYSTEM_NEUTRAL"] = {
            ["id"] = 37,
            ["index"] = 37,
        },
        ["MONEY"] = {
            ["id"] = 29,
            ["index"] = 29,
        },
        ["TEXT_EMOTE"] = {
            ["id"] = 12,
            ["index"] = 12,
        },
        ["WHISPER"] = {
            ["id"] = 0,
            ["index"] = 8,
        },
        ["CHANNEL9"] = {
            ["id"] = 77,
            ["index"] = 77,
        },
        ["GUILD"] = {
            ["id"] = 5,
            ["index"] = 5,
        },
        ["OPENING"] = {
            ["id"] = 30,
            ["index"] = 30,
        },
        ["COMBAT_FACTION_CHANGE"] = {
            ["id"] = 36,
            ["index"] = 36,
        },
        ["MONSTER_EMOTE"] = {
            ["id"] = 17,
            ["index"] = 17,
        },
        ["CHANNEL_LEAVE"] = {
            ["id"] = 20,
            ["index"] = 20,
        },
        ["PET_INFO"] = {
            ["id"] = 32,
            ["index"] = 32,
        },
        ["CHANNEL10"] = {
            ["id"] = 78,
            ["index"] = 78,
        },
        ["ACHIEVEMENT"] = {
            ["id"] = 47,
            ["index"] = 47,
        },
        ["INSTANCE_CHAT"] = {
            ["id"] = 67,
            ["index"] = 67,
        },
        ["EMOTE"] = {
            ["id"] = 11,
            ["index"] = 11,
        },
        ["COMBAT_XP_GAIN"] = {
            ["id"] = 34,
            ["index"] = 34,
        },
        ["RAID_WARNING"] = {
            ["id"] = 41,
            ["index"] = 41,
        },
        ["CHANNEL2"] = {
            ["id"] = 70,
            ["index"] = 70,
        },
        ["COMBAT_GUILD_XP_GAIN"] = {
            ["id"] = 62,
            ["index"] = 62,
        },
        ["BG_SYSTEM_ALLIANCE"] = {
            ["id"] = 38,
            ["index"] = 38,
        },
        ["CHANNEL8"] = {
            ["id"] = 76,
            ["index"] = 76,
        },
        ["PARTY_LEADER"] = {
            ["id"] = 50,
            ["index"] = 50,
        },
        ["RESTRICTED"] = {
            ["id"] = 45,
            ["index"] = 45,
        },
        ["CHANNEL_NOTICE"] = {
            ["id"] = 22,
            ["index"] = 22,
        },
        ["RAID_BOSS_WHISPER"] = {
            ["id"] = 43,
            ["index"] = 43,
        },
        ["AFK"] = {
            ["id"] = 24,
            ["index"] = 24,
        },
        ["BN_BROADCAST_INFORM"] = {
            ["id"] = 0,
            ["index"] = 0,
        },
        ["TARGETICONS"] = {
            ["id"] = 51,
            ["index"] = 51,
        },
        ["BN_WHISPER_INFORM"] = {
            ["id"] = 53,
            ["index"] = 53,
        },
        ["BN_WHISPER"] = {
            ["id"] = 52,
            ["index"] = 52,
        },
        ["FILTERED"] = {
            ["id"] = 44,
            ["index"] = 44,
        },
        ["INSTANCE_CHAT_LEADER"] = {
            ["id"] = 68,
            ["index"] = 68,
        },
        ["SMART_WHISPER"] = {
            ["id"] = 0,
            ["index"] = 0,
        },
        ["BN_INLINE_TOAST_CONVERSATION"] = {
            ["id"] = 60,
            ["index"] = 60,
        },
        ["RAID_LEADER"] = {
            ["id"] = 40,
            ["index"] = 40,
        },
        ["BN_INLINE_TOAST_BROADCAST"] = {
            ["id"] = 58,
            ["index"] = 58,
        },
        ["RAID"] = {
            ["id"] = 4,
            ["index"] = 4,
        },
        ["REPLY"] = {
            ["id"] = 0,
            ["index"] = 0,
        },
        ["PET_BATTLE_COMBAT_LOG"] = {
            ["id"] = 65,
            ["index"] = 65,
        },
        ["MONSTER_YELL"] = {
            ["id"] = 15,
            ["index"] = 15,
        },
        ["CURRENCY"] = {
            ["id"] = 63,
            ["index"] = 63,
        },
        ["TRADESKILLS"] = {
            ["id"] = 31,
            ["index"] = 31,
        },



All times are GMT -6. The time now is 05:53 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI