Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
YGOPRO-520DIY
ygopro
Commits
9e563791
Commit
9e563791
authored
Apr 07, 2012
by
Fluorohydride
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #50 from zh99998/master
system custom chat message
parents
2802614b
fb755bf9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
4 deletions
+21
-4
gframe/duelclient.cpp
gframe/duelclient.cpp
+8
-0
gframe/game.cpp
gframe/game.cpp
+13
-4
No files found.
gframe/duelclient.cpp
View file @
9e563791
...
...
@@ -477,6 +477,14 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
mainGame
->
gMutex
.
Lock
();
mainGame
->
AddChatMsg
(
msg
,
mainGame
->
LocalPlayer
(
pkt
->
player
));
mainGame
->
gMutex
.
Unlock
();
}
else
if
(
pkt
->
player
==
8
){
//system custom message.
if
(
mainGame
->
chkIgnore1
->
isChecked
())
break
;
BufferIO
::
CopyWStr
(
pkt
->
msg
,
msg
,
256
);
msg
[(
len
-
3
)
/
2
]
=
0
;
mainGame
->
gMutex
.
Lock
();
mainGame
->
AddChatMsg
(
msg
,
8
);
mainGame
->
gMutex
.
Unlock
();
}
else
{
if
(
mainGame
->
chkIgnore2
->
isChecked
())
break
;
...
...
gframe/game.cpp
View file @
9e563791
...
...
@@ -759,12 +759,21 @@ void Game::AddChatMsg(wchar_t* msg, int player) {
}
chatMsg
[
0
].
clear
();
chatTiming
[
0
]
=
600
;
if
(
player
==
0
)
switch
(
player
){
case
0
:
//from host
chatMsg
[
0
].
append
(
dInfo
.
hostname
);
else
if
(
player
==
1
)
chatMsg
[
0
].
append
(
L": "
);
break
;
case
1
:
//from client
chatMsg
[
0
].
append
(
dInfo
.
clientname
);
else
chatMsg
[
0
].
append
(
L"[***]"
);
chatMsg
[
0
].
append
(
L": "
);
chatMsg
[
0
].
append
(
L": "
);
break
;
case
8
:
//system custom message, no prefix.
break
;
default:
//from watcher or unknown
chatMsg
[
0
].
append
(
L"[***]: "
);
}
chatMsg
[
0
].
append
(
msg
);
}
void
Game
::
ClearTextures
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment