ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   Bug Reports (https://www.esoui.com/forums/forumdisplay.php?f=187)
-   -   [open] IsIgnored(charOrDisplayName) doesn't properly pickup Character Names (https://www.esoui.com/forums/showthread.php?t=8954)

ArtOfShred 02/09/20 08:50 AM

[open] IsIgnored(charOrDisplayName) doesn't properly pickup Character Names
 
Code:

IsIgnored(string charOrDisplayName)
    Returns: boolean isIgnored

Will only return true when a displayName is entered, not a character name.

This leads to a few issues with some other functions in the base UI, a prime example being the function used when the player sends a guild invite by name to a player through the Guild Roster.

The function used is ZO_TryGuildInvite(guildId, displayName) in esoui/ingame/guild/zo_guildutils.common, which has the following line starting at 148 on the current PTS build:
Code:

        if IsIgnored(displayName) then
            ZO_Alert(UI_ALERT_CATEGORY_ALERT, nil, SI_GROUP_ALERT_INVITE_PLAYER_BLOCKED)
            return
        end

This returns an error that "you have blocked that player" you are ignoring IF you enter their display name, however if you enter their character name it bypasses this restriction.

As a sidenote, AddIgnore(charOrDisplayName) DOES properly parse a DisplayName or CharacterName. RemoveIgnore(displayName) does not. Perhaps the functionality of removing an ignored player by character name could be added here as well.

ZOS_DanBatson 02/17/20 02:27 PM

That function should really just say displayName. The client doesn't actually know the character names associated with the accounts that are currently blocked.

ArtOfShred 02/17/20 02:43 PM

Is there any chance of expanding the functionality?

Outside of being useful for what I'm doing I can see some potential issues with character names of blocked accounts not being recognized.

Example: A guild member says "hey invite my friend", gives you the char name. You invite that char name, ends up their account name is someone you put on ignore thats been harassing you etc - but since the functions that check for ignore can't recognize the char names it gets through.

ZOS_DanBatson 02/17/20 02:50 PM

I can pass the loophole bug along to our QA team, and I can pass the request for the client knowing the character names on to our backend team, but there's no guarantee we'll be able to add that extra functionality, unfortunately.

Of note, just because that Lua check doesn't give the alert doesn't mean the invite actually goes through. Have you confirmed that the player actually receives the invite? The backend should be preventing it even for a character name.

ArtOfShred 02/17/20 02:54 PM

That would be great, thanks!

EDIT: Yeah I did check actually, with two of my own accounts. For guild invites, the invite does go through properly as long as I invite an ignored account by character name and not account name.

I'm fairly certain group invites don't work by the character name however. Not sure about trade/duel.

EDIT: I can probably check when I get off work and get the whole table of how the social interactions work with like the ignored account being the inviter vs invitee, and then also see how that behaves if both accounts are ignoring each other.

ArtOfShred 02/18/20 07:33 AM

Okay did some testing:

In the case of character name:

I try to initiate a social interaction with someone that is IGNORING ME:
If I try to duel, trade, group invite, or guild invite them - the invite either doesn't go through or I get an error result from the related event. So this is properly protected on the backend.

I try to initiate a social interaction with someone that I AM IGNORING:
If I try to duel, trade, group invite, or guild invite them - it CAN go through. If I do it by account name - it also CAN go through with account name unless a function somewhere in the way checks for IsIgnored(displayName) - so unless the PlayerToPlayer menu or Slash Command function checks - then you can still invite regardless.
By default, the player to player menu does gray out for any social interaction when a player is ignored. However, the /invite function still goes through (with characterName or displayName) & in the case of inviting someone from the guild menu it will only block you from sending an invite when you enter displayName, you can still invite ignored players by characterName.


All times are GMT -6. The time now is 12:35 PM.

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