[add] 斷線訊息
This commit is contained in:
parent
95af26c7c0
commit
f878c7429b
@ -1,6 +1,5 @@
|
||||
import { CoroutineV2 } from "@/Engine/CatanEngine/CoroutineV2/CoroutineV2";
|
||||
import { INetResponse } from "@/Engine/CatanEngine/NetManagerV2/Core/INetResponse";
|
||||
import CSSettingsSDV3 from "@/FormTable/CSSettingsV3";
|
||||
import { gameSync } from "@/utils/setRPCData";
|
||||
import MainControl from "../MainControl/MainControl";
|
||||
import CSMessage from "../Message/CSMessage";
|
||||
@ -57,6 +56,10 @@ export default class MainControlData {
|
||||
CoroutineV2.Single(gameSync()).Start();
|
||||
break;
|
||||
}
|
||||
case "system.disconnect": {
|
||||
this._disconnectErrorType = +resp.Data["c"];
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -75,13 +78,14 @@ export default class MainControlData {
|
||||
private _netDisconnected(): void {
|
||||
console.debug("Disconnected Error Type : " + this._disconnectErrorType);
|
||||
let str: string = null;
|
||||
if (this._disconnectErrorType < 10 && this._disconnectErrorType >= 0) {
|
||||
str = CSSettingsSDV3.prototype.CommonString(55 + this._disconnectErrorType);
|
||||
} else if (this._disconnectErrorType > 100 && this._disconnectErrorType < 110) {
|
||||
str = CSSettingsSDV3.prototype.CommonString(65 + this._disconnectErrorType - 101);
|
||||
} else {
|
||||
str = "Server Disconnected";
|
||||
}
|
||||
// if (this._disconnectErrorType < 10 && this._disconnectErrorType >= 0) {
|
||||
// str = CSSettingsV3.prototype.CommonString(55 + this._disconnectErrorType);
|
||||
// } else if (this._disconnectErrorType > 100 && this._disconnectErrorType < 110) {
|
||||
// str = CSSettingsV3.prototype.CommonString(65 + this._disconnectErrorType - 101);
|
||||
// } else {
|
||||
// str = "Server Disconnected";
|
||||
// }
|
||||
str = "Server Disconnected";
|
||||
CSMessage.CreateYesMsg(
|
||||
str,
|
||||
this._disconnectedReload
|
||||
|
@ -184,6 +184,8 @@ export class SlotBase {
|
||||
return this.FreeID;
|
||||
}
|
||||
|
||||
// private *slotAE() { }
|
||||
|
||||
//#endregion
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user