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

ctrl + click npc causes dc #34

Open
de702 opened this issue Oct 31, 2022 · 12 comments · Fixed by #37
Open

ctrl + click npc causes dc #34

de702 opened this issue Oct 31, 2022 · 12 comments · Fixed by #37

Comments

@de702
Copy link

de702 commented Oct 31, 2022

when clicking on npc while holding left ctrl key causes dc but when click without ctrl no dc

right ctrl key doesnt cause dc

@Supacek
Copy link

Supacek commented Oct 31, 2022

ye same issue its probly client side problem
:/

@de702
Copy link
Author

de702 commented Nov 1, 2022

ye same issue its probly client side problem :/

i figured anything that causes dc is serversided if caused client to crash that would be client issue but maybe im wrong

@Supacek
Copy link

Supacek commented Nov 15, 2022

100% client Issue ! i tested it but when i add new keys imput still didnt work so ill will still try to figure it out it supose to work like other keys, like if u click like PageUp or Home and click and it will just open the NPC and no crash.

@Supacek
Copy link

Supacek commented Nov 23, 2022

in my keyboard layout its using Double keys in one keydown
image
thats the problem for party invite with my Czech Republick Keyboard layout Versus the English one
image

image

@Supacek
Copy link

Supacek commented Nov 23, 2022

Alt Gr is simply Alt + Ctrl and can't be detected via KeyDown as a single key.

@tiancaiamao tiancaiamao transferred this issue from opendarkeden/server Nov 25, 2022
@tiancaiamao
Copy link
Contributor

@de702 @Supacek I move the issue from server repo to here (client)
I have a new finding that the client doesn't crash when compiled in debug mode
So this may be something related to the compile flag

@tiancaiamao
Copy link
Contributor

@de702 @Supacek I move the issue from server repo to here (client) I have a new finding that the client doesn't crash when compiled in debug mode So this may be something related to the compile flag

I compared the difference, in the release build mode, client send a SGGuildMemberLogOnOK message.
While in the debug build mode, the client just send GCNPCAsk

Receive:CGNPCTalk(ObjectID : 10100)
Send:292[10,15] GCNPCAsk(ObjectID:10100,ScriptID: 3401)
Receive:CGNPCAskAnswer(ObjectID : 10100,3401,0,)
Receive:CGNPCTalk(ObjectID : 10100)
Send:292[10,16] GCNPCAsk(ObjectID:10100,ScriptID: 3401)
Receive:CGNPCAskAnswer(ObjectID : 10100,3401,0,)
Send:434[14,30] GSGuildMemberLogOn (GuildID:13101Name:111slot3LogOn:falseServerID:47707 )   <<=====  here!
Receive:SGGuildMemberLogOnOK(GuildID:13101Name:111slot3LogOn:falseServerID:47707)
LGIncomingConnectionHandler Send Packet to ServerIP : 192.168.0.16
LGIncomingConnectionHandler Send Packet to ServerPort : 9996
Receive:CGConnectSetKey
Receive:CGConnect(KEY:4291070720,PCType:PC_VAMPIRE,PCName:111slot3)
Send:434[14,31] GSGuildMemberLogOn (GuildID:13101Name:111slot3LogOn:trueServerID:0 )
Receive:SGGuildMemberLogOnOK(GuildID:13101Name:111slot3LogOn:trueServerID:0)
 ����� �dz���2
 ����� �dz���3
 ����� �dz���4
 ����� �dz���5
 ������ �ε� �κ� �� �κ��� �ȵǸ� �̺κ��� ������.
 ����� �dz���7
Send:410[292,0] GCUpdateInfo(PC:PCVampireInfo2(ObjectID:12692,Name:111slot3,Level:�,Sex:FEMALE,BatColor:0,SkinColor:420,MasterEffectColor:0,Alignment:7500,STR[CURRENT]:20,STR[MAX]:20,STR[BASIC]:20,DEX[CURRENT]:45,DEX[MAX]:45,DEX[BASIC]:45,INT[CURRENT]:20,INT[MAX]:20,INT[BASIC]:20,HP:516/516,Rank:50,RankExp:-1063254,Exp:125,Gold:20000000,Fame:1865,Sight:13,Bonus:9974,F5:0,F6:0,F7:0,F8:0,F9:0,F10:0,F11:0,F12:0,SilverDamage:0,Competence:1,GuildID:13101,GuildName:test,GuildMemberRank:2)EffectInfo:EffectInfo( ,ListNum: 2 ListSet(402,16950,109,57590,),ZoneID: 1003,ZoneX: Z,ZoneY: 9,GameTime:2459�� 9�� 25�� 17�� 19�� 36��,Weather:WEATHER_CLEAR,WeatherLevel:0,DarkLevel:0,LightLevel:9,nNPCs: 6,NPC[1]:61,NPC[2]:66,NPC[3]:65,NPC[4]:30,NPC[5]:38,NPC[6]:37,nMonsters:0,NPCInfos:NPCInfo(Name:ºê¸®ÄݶóÄ«½º,NPCID:92,X:91,Y:56)NPCInfo(Name:Ä«ÆÄƼ´Ï,NPCID:93,X:27,Y:73)NPCInfo(Name:¹ß·¹¸®,NPCID:94,X:69,Y:29)NPCInfo(Name:½ê¾²,NPCID:219,X:46,Y:98)NPCInfo(Name:Ä«ÄÜ,NPCID:220,X:71,Y:92)NPCInfo(Name:·¹º£Ä«,NPCID:255,X:44,Y:50), ServerStat : 0, Premium : 17, SMSCharge : 0, GuildUnionID: 0, GuildUnionUserType: 2, PowerPoint: 0)
Send:308[5,1] GCPetInfo(ObjectID:12692PetInfo:NULLIsSummonInfo:)
Receive:CGReady
Send:341[3,2] GCSetPosition(X:90,Y:57,Dir:2)
Send:318[4,3] GCRealWearingInfo(Info:0)
Send:361[4,4] GCSkillInfo(VampireSkillInfo( ListNum:0 ListSet( ),)
Send:317[1,5] GCRankBonusInfo()
Send:275[17,6] ModifyInfo[ShortCount:5,ShortListSet(DEFENSE:52,PROTECTION:50,TOHIT:105,MIN_DAMAGE:33,MAX_DAMAGE:35,),LongCount:0,LongListSet()]
Send:189[40,7] GCAddNPC(ObjectID:10100,Name:ºê¸®ÄݶóÄ«½º,SpriteType:37,MainColor:1,SubColor:1,X:91,Y:56,Dir: 1)
Send:290[6,8] GCNoticeEvent(Code : 31Parameter : 100)
Send:288[21,9] GCNicknameList()
Send:249[1,10] GCGQuestStatusInfo()
Send:248[1,11] GCGQuestInventory()
Send:287[24,12] GCMyStoreInfo()
Receive:CGNPCTalk(ObjectID : 10100)
Send:292[10,13] GCNPCAsk(ObjectID:10100,ScriptID: 3401)
Receive:CGNPCAskAnswer(ObjectID : 10100,3401,0,)
Receive:CGNPCTalk(ObjectID : 10100)
Send:292[10,14] GCNPCAsk(ObjectID:10100,ScriptID: 3401)
Receive:CGNPCAskAnswer(ObjectID : 10100,3401,0,)
Receive:CGNPCTalk(ObjectID : 10100)
Send:292[10,15] GCNPCAsk(ObjectID:10100,ScriptID: 3401)
Receive:CGNPCAskAnswer(ObjectID : 10100,3401,0,)
Receive:CGNPCTalk(ObjectID : 10100)
Send:292[10,16] GCNPCAsk(ObjectID:10100,ScriptID: 3401)
Receive:CGNPCAskAnswer(ObjectID : 10100,3401,0,)
Receive:CGNPCTalk(ObjectID : 10100)
Send:292[10,17] GCNPCAsk(ObjectID:10100,ScriptID: 3401)
Receive:CGNPCAskAnswer(ObjectID : 10100,3401,0,)
Receive:CGNPCTalk(ObjectID : 10100)
Send:292[10,18] GCNPCAsk(ObjectID:10100,ScriptID: 3401)
Receive:CGNPCAskAnswer(ObjectID : 10100,3401,0,)
Receive:CGNPCTalk(ObjectID : 10100)
Send:292[10,19] GCNPCAsk(ObjectID:10100,ScriptID: 3401)
Receive:CGNPCAskAnswer(ObjectID : 10100,3401,0,)
Receive:CGNPCTalk(ObjectID : 10100)
Send:292[10,20] GCNPCAsk(ObjectID:10100,ScriptID: 3401)
Receive:CGNPCAskAnswer(ObjectID : 10100,3401,0,)

@tiancaiamao
Copy link
Contributor

Caused by the __FRIEND_SYSTEM_VIVA__ macro, which changes the LControl behaviour

client/Client/CGameUpdate.cpp

Lines 3332 to 3335 in f826eb6

if ((g_pDXInput->KeyDown(DIK_LMENU) || g_pDXInput->KeyDown(DIK_RMENU) || g_pDXInput->KeyDown(DIK_RCONTROL)
#ifdef __FRIEND_SYSTEM_VIVA__ // add by viva g_pDXInput->KeyDown(DIK_LCONTROL
|| g_pDXInput->KeyDown(DIK_LCONTROL)
#endif

@Supacek
Copy link

Supacek commented Dec 19, 2022

Koreans still have same issue is it possible ?

@tiancaiamao
Copy link
Contributor

Koreans still have same issue is it possible ?

Nope, it's fixed after disabling __FRIEND_SYSTEM_VIVA__, on both Korean and others. @Supacek
B.T.W, you can change the Data/Info/Language.inf file to control the language now after #38

@Supacek
Copy link

Supacek commented Dec 20, 2022

the Teen Version in Settings Option Cause this Problem..Crashing while using Ctrl Alt keys also

@tiancaiamao tiancaiamao reopened this Dec 22, 2022
@tiancaiamao
Copy link
Contributor

the Teen Version in Settings Option Cause this Problem..Crashing while using Ctrl Alt keys also

I'll check it later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants