Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate friend list #8311

Open
mrpond opened this issue May 6, 2024 · 2 comments
Open

Duplicate friend list #8311

mrpond opened this issue May 6, 2024 · 2 comments
Labels
status:need user input Issue that needs more information from the issue creator type:bug Issue that is a bug within rAthena

Comments

@mrpond
Copy link

mrpond commented May 6, 2024

rAthena Hash

a44d954

Client Date

20131120

Server Mode

Pre-Renewal, Renewal

Result

character server will print error when try to insert duplicate friend id into table

Relevant Log Output

N/A

Expected Result

fix
rAthena\src\char\char.cpp

int char_mmo_char_tosql(uint32 char_id, struct mmo_charstatus* p){
...
		StringBuf_Printf(&buf, "INSERT INTO `%s` (`char_id`, `friend_id`) VALUES ", schema_config.friend_db);
//===
		for (size_t index_friend = 0; index_friend < MAX_FRIENDS; ++index_friend) {
			if (p->friends[index_friend].char_id > 0) {
				for (size_t lookup = 0; lookup < MAX_FRIENDS; ++lookup) {
					if (index_friend != lookup) {
						if (p->friends[index_friend].char_id == p->friends[lookup].char_id) {
							p->friends[lookup].char_id = 0;
						}
					}
				}
			}
		}
//===
		for( i = 0, count = 0; i < MAX_FRIENDS; ++i )
...

How to Reproduce

N/A

Official Information

N/A

Modifications that may affect results

No response

@mrpond mrpond added the type:bug Issue that is a bug within rAthena label May 6, 2024
@Lemongrass3110
Copy link
Member

Originally reported in #5277. We did not get feedback to our questions there.

Since we do not know how to reproduce it, we are unable to fix this.

Do you know the necessary steps to reproduce this issue?

@Lemongrass3110 Lemongrass3110 added the status:need user input Issue that needs more information from the issue creator label May 6, 2024
@mrpond
Copy link
Author

mrpond commented May 6, 2024

Originally reported in #5277. We did not get feedback to our questions there.

Since we do not know how to reproduce it, we are unable to fix this.

Do you know the necessary steps to reproduce this issue?

no, I don't know how to reproduce it. error happen when character to save the data into table.
Server had around 1800 players. and it happen randomly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:need user input Issue that needs more information from the issue creator type:bug Issue that is a bug within rAthena
Projects
None yet
Development

No branches or pull requests

2 participants