Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
MDPro3
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
SK
MDPro3
Commits
292bc8e4
Commit
292bc8e4
authored
Jul 23, 2024
by
SherryChaos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
online deck bug fix
parent
27764d1e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
14 deletions
+14
-14
Assets/Addressables/Text/UpdateContent.txt
Assets/Addressables/Text/UpdateContent.txt
+1
-1
Assets/Scripts/MDPro3/Net/OnlineDeck.cs
Assets/Scripts/MDPro3/Net/OnlineDeck.cs
+13
-13
No files found.
Assets/Addressables/Text/UpdateContent.txt
View file @
292bc8e4
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
MDPro3 v1.1.6.2更新:
MDPro3 v1.1.6.2更新:
1.修复场地设置不为[随机]的情况下,其他选项设为[与场地一致]时无法进入决斗的错误 。
1.修复场地设置不为[随机]的情况下,其他选项设为[与场地一致]时无法进入决斗的错误 。
2.修复本地主机不能被外网连接的错误。
MDPro3 v1.1.6.1更新:
MDPro3 v1.1.6.1更新:
1.修复部分卡片效果特效[灰流丽等]不播放的错误;
1.修复部分卡片效果特效[灰流丽等]不播放的错误;
...
...
Assets/Scripts/MDPro3/Net/OnlineDeck.cs
View file @
292bc8e4
...
@@ -41,7 +41,7 @@ namespace MDPro3
...
@@ -41,7 +41,7 @@ namespace MDPro3
public
static
async
void
FetchDeckList
(
int
page
=
1
,
int
pageSize
=
20
,
string
keyWord
=
""
,
string
contributor
=
""
)
public
static
async
void
FetchDeckList
(
int
page
=
1
,
int
pageSize
=
20
,
string
keyWord
=
""
,
string
contributor
=
""
)
{
{
string
apiUrl
=
url
+
listAPI
+
$"?page=
{
page
}
&size=
{
pageSize
}
&keyWord=
{
keyWord
}
&contributor=
{
contributor
}
"
;
string
apiUrl
=
url
+
listAPI
+
$"?page=
{
page
}
&size=
{
pageSize
}
&keyWord=
{
keyWord
}
&contributor=
{
contributor
}
"
;
UnityWebRequest
request
=
UnityWebRequest
.
Get
(
apiUrl
);
using
UnityWebRequest
request
=
UnityWebRequest
.
Get
(
apiUrl
);
request
.
SetRequestHeader
(
reqHeader
,
reqValue
);
request
.
SetRequestHeader
(
reqHeader
,
reqValue
);
AsyncOperation
sendRequestOperation
=
request
.
SendWebRequest
();
AsyncOperation
sendRequestOperation
=
request
.
SendWebRequest
();
...
@@ -62,7 +62,7 @@ namespace MDPro3
...
@@ -62,7 +62,7 @@ namespace MDPro3
public
static
async
Task
<
OnlineDeckData
[
]>
FetchSimpleDeckList
(
int
size
,
string
keyWord
=
""
,
string
contributor
=
""
,
bool
sortLike
=
true
)
public
static
async
Task
<
OnlineDeckData
[
]>
FetchSimpleDeckList
(
int
size
,
string
keyWord
=
""
,
string
contributor
=
""
,
bool
sortLike
=
true
)
{
{
string
apiUrl
=
url
+
liteAPI
+
$"?size=
{
size
}
&keyWord=
{
keyWord
}
&contributor=
{
contributor
}
&sortLike=
{
sortLike
}
"
;
string
apiUrl
=
url
+
liteAPI
+
$"?size=
{
size
}
&keyWord=
{
keyWord
}
&contributor=
{
contributor
}
&sortLike=
{
sortLike
}
"
;
UnityWebRequest
request
=
UnityWebRequest
.
Get
(
apiUrl
);
using
UnityWebRequest
request
=
UnityWebRequest
.
Get
(
apiUrl
);
request
.
SetRequestHeader
(
reqHeader
,
reqValue
);
request
.
SetRequestHeader
(
reqHeader
,
reqValue
);
try
try
...
@@ -99,7 +99,7 @@ namespace MDPro3
...
@@ -99,7 +99,7 @@ namespace MDPro3
string
apiUrl
=
url
+
uploadAPI
;
string
apiUrl
=
url
+
uploadAPI
;
string
jsonData
=
JsonUtility
.
ToJson
(
deck
);
string
jsonData
=
JsonUtility
.
ToJson
(
deck
);
UnityWebRequest
request
=
UnityWebRequest
.
Post
(
apiUrl
,
jsonData
,
jsonHeader
);
using
UnityWebRequest
request
=
UnityWebRequest
.
Post
(
apiUrl
,
jsonData
,
jsonHeader
);
request
.
SetRequestHeader
(
reqHeader
,
reqValue
);
request
.
SetRequestHeader
(
reqHeader
,
reqValue
);
request
.
SetRequestHeader
(
contentTypeHeader
,
jsonHeader
);
request
.
SetRequestHeader
(
contentTypeHeader
,
jsonHeader
);
...
@@ -133,7 +133,7 @@ namespace MDPro3
...
@@ -133,7 +133,7 @@ namespace MDPro3
string
jsonData
=
JsonUtility
.
ToJson
(
deck
);
string
jsonData
=
JsonUtility
.
ToJson
(
deck
);
byte
[]
dataRaw
=
Encoding
.
UTF8
.
GetBytes
(
jsonData
);
byte
[]
dataRaw
=
Encoding
.
UTF8
.
GetBytes
(
jsonData
);
UnityWebRequest
request
=
UnityWebRequest
.
Put
(
apiUrl
,
dataRaw
);
using
UnityWebRequest
request
=
UnityWebRequest
.
Put
(
apiUrl
,
dataRaw
);
request
.
SetRequestHeader
(
reqHeader
,
reqValue
);
request
.
SetRequestHeader
(
reqHeader
,
reqValue
);
request
.
SetRequestHeader
(
contentTypeHeader
,
jsonHeader
);
request
.
SetRequestHeader
(
contentTypeHeader
,
jsonHeader
);
...
@@ -164,7 +164,7 @@ namespace MDPro3
...
@@ -164,7 +164,7 @@ namespace MDPro3
public
static
async
Task
<
OnlineDeckData
>
GetDeck
(
string
deckID
)
public
static
async
Task
<
OnlineDeckData
>
GetDeck
(
string
deckID
)
{
{
string
apiUrl
=
url
+
getAPI
+
deckID
;
string
apiUrl
=
url
+
getAPI
+
deckID
;
UnityWebRequest
request
=
UnityWebRequest
.
Get
(
apiUrl
);
using
UnityWebRequest
request
=
UnityWebRequest
.
Get
(
apiUrl
);
request
.
SetRequestHeader
(
reqHeader
,
reqValue
);
request
.
SetRequestHeader
(
reqHeader
,
reqValue
);
try
try
...
@@ -200,7 +200,7 @@ namespace MDPro3
...
@@ -200,7 +200,7 @@ namespace MDPro3
{
{
string
apiUrl
=
url
+
likeAPI
+
deckId
;
string
apiUrl
=
url
+
likeAPI
+
deckId
;
UnityWebRequest
request
=
UnityWebRequest
.
PostWwwForm
(
apiUrl
,
jsonHeader
);
using
UnityWebRequest
request
=
UnityWebRequest
.
PostWwwForm
(
apiUrl
,
jsonHeader
);
request
.
SetRequestHeader
(
reqHeader
,
reqValue
);
request
.
SetRequestHeader
(
reqHeader
,
reqValue
);
request
.
SetRequestHeader
(
contentTypeHeader
,
jsonHeader
);
request
.
SetRequestHeader
(
contentTypeHeader
,
jsonHeader
);
...
@@ -231,7 +231,7 @@ namespace MDPro3
...
@@ -231,7 +231,7 @@ namespace MDPro3
string
apiUrl
=
url
+
getAllAPI
+
userId
;
string
apiUrl
=
url
+
getAllAPI
+
userId
;
UnityWebRequest
request
=
UnityWebRequest
.
Get
(
apiUrl
);
using
UnityWebRequest
request
=
UnityWebRequest
.
Get
(
apiUrl
);
request
.
SetRequestHeader
(
reqHeader
,
reqValue
);
request
.
SetRequestHeader
(
reqHeader
,
reqValue
);
request
.
SetRequestHeader
(
tokenHeader
,
token
);
request
.
SetRequestHeader
(
tokenHeader
,
token
);
...
@@ -315,7 +315,7 @@ namespace MDPro3
...
@@ -315,7 +315,7 @@ namespace MDPro3
public
static
async
Task
<
bool
>
SyncDecks
(
List
<
Deck
>
decks
,
List
<
string
>
deckNames
)
public
static
async
Task
<
bool
>
SyncDecks
(
List
<
Deck
>
decks
,
List
<
string
>
deckNames
)
{
{
string
apiUrl
=
url
+
getIdsAPI
+
decks
.
Count
;
string
apiUrl
=
url
+
getIdsAPI
+
decks
.
Count
;
var
getIDs
=
UnityWebRequest
.
Get
(
apiUrl
);
using
var
getIDs
=
UnityWebRequest
.
Get
(
apiUrl
);
getIDs
.
SetRequestHeader
(
reqHeader
,
reqValue
);
getIDs
.
SetRequestHeader
(
reqHeader
,
reqValue
);
await
getIDs
.
SendWebRequest
();
await
getIDs
.
SendWebRequest
();
...
@@ -358,7 +358,7 @@ namespace MDPro3
...
@@ -358,7 +358,7 @@ namespace MDPro3
}
}
var
json
=
JsonUtility
.
ToJson
(
body
);
var
json
=
JsonUtility
.
ToJson
(
body
);
UnityWebRequest
request
=
UnityWebRequest
.
Post
(
apiUrl
,
json
,
jsonHeader
);
using
UnityWebRequest
request
=
UnityWebRequest
.
Post
(
apiUrl
,
json
,
jsonHeader
);
request
.
SetRequestHeader
(
reqHeader
,
reqValue
);
request
.
SetRequestHeader
(
reqHeader
,
reqValue
);
request
.
SetRequestHeader
(
contentTypeHeader
,
jsonHeader
);
request
.
SetRequestHeader
(
contentTypeHeader
,
jsonHeader
);
...
@@ -384,7 +384,7 @@ namespace MDPro3
...
@@ -384,7 +384,7 @@ namespace MDPro3
if
(
deck
==
null
)
if
(
deck
==
null
)
{
{
string
api
=
url
+
getIdAPI
;
string
api
=
url
+
getIdAPI
;
var
re
=
UnityWebRequest
.
Get
(
api
);
using
var
re
=
UnityWebRequest
.
Get
(
api
);
re
.
SetRequestHeader
(
reqHeader
,
reqValue
);
re
.
SetRequestHeader
(
reqHeader
,
reqValue
);
await
re
.
SendWebRequest
();
await
re
.
SendWebRequest
();
if
(
re
.
result
==
UnityWebRequest
.
Result
.
Success
)
if
(
re
.
result
==
UnityWebRequest
.
Result
.
Success
)
...
@@ -418,7 +418,7 @@ namespace MDPro3
...
@@ -418,7 +418,7 @@ namespace MDPro3
body
.
deck
.
deckYdk
=
ydk
;
body
.
deck
.
deckYdk
=
ydk
;
var
json
=
JsonUtility
.
ToJson
(
body
);
var
json
=
JsonUtility
.
ToJson
(
body
);
var
request
=
UnityWebRequest
.
Post
(
apiUrl
,
json
,
jsonHeader
);
using
var
request
=
UnityWebRequest
.
Post
(
apiUrl
,
json
,
jsonHeader
);
request
.
SetRequestHeader
(
reqHeader
,
reqValue
);
request
.
SetRequestHeader
(
reqHeader
,
reqValue
);
request
.
SetRequestHeader
(
contentTypeHeader
,
jsonHeader
);
request
.
SetRequestHeader
(
contentTypeHeader
,
jsonHeader
);
request
.
SetRequestHeader
(
tokenHeader
,
MyCard
.
account
.
token
);
request
.
SetRequestHeader
(
tokenHeader
,
MyCard
.
account
.
token
);
...
@@ -447,7 +447,7 @@ namespace MDPro3
...
@@ -447,7 +447,7 @@ namespace MDPro3
body
.
userId
=
MyCard
.
account
.
user
.
id
;
body
.
userId
=
MyCard
.
account
.
user
.
id
;
var
json
=
JsonUtility
.
ToJson
(
body
);
var
json
=
JsonUtility
.
ToJson
(
body
);
var
request
=
UnityWebRequest
.
Post
(
apiUrl
,
json
,
jsonHeader
);
using
var
request
=
UnityWebRequest
.
Post
(
apiUrl
,
json
,
jsonHeader
);
request
.
SetRequestHeader
(
reqHeader
,
reqValue
);
request
.
SetRequestHeader
(
reqHeader
,
reqValue
);
request
.
SetRequestHeader
(
contentTypeHeader
,
jsonHeader
);
request
.
SetRequestHeader
(
contentTypeHeader
,
jsonHeader
);
request
.
SetRequestHeader
(
tokenHeader
,
MyCard
.
account
.
token
);
request
.
SetRequestHeader
(
tokenHeader
,
MyCard
.
account
.
token
);
...
@@ -486,7 +486,7 @@ namespace MDPro3
...
@@ -486,7 +486,7 @@ namespace MDPro3
}
}
var
json
=
JsonUtility
.
ToJson
(
body
);
var
json
=
JsonUtility
.
ToJson
(
body
);
UnityWebRequest
request
=
UnityWebRequest
.
Post
(
apiUrl
,
json
,
jsonHeader
);
using
UnityWebRequest
request
=
UnityWebRequest
.
Post
(
apiUrl
,
json
,
jsonHeader
);
request
.
SetRequestHeader
(
reqHeader
,
reqValue
);
request
.
SetRequestHeader
(
reqHeader
,
reqValue
);
request
.
SetRequestHeader
(
contentTypeHeader
,
jsonHeader
);
request
.
SetRequestHeader
(
contentTypeHeader
,
jsonHeader
);
...
...
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