后台:跑马灯
This commit is contained in:
@@ -168,7 +168,18 @@ export class GmHandler {
|
||||
const { code } = msg;
|
||||
let systimerServers = this.app.getServersByType('systimer');
|
||||
for(let { id } of systimerServers) {
|
||||
await this.app.rpc.systimer.systimerRemote.setMarquee.toServer(id, code);
|
||||
let result = await this.app.rpc.systimer.systimerRemote.setMarquee.toServer(id, code);
|
||||
if(!result) return resResult(STATUS.GM_MARQUEE_ERR);
|
||||
}
|
||||
return resResult(STATUS.SUCCESS);
|
||||
}
|
||||
|
||||
async cancelMarquee(msg: { code: string }, session: BackendSession) {
|
||||
const { code } = msg;
|
||||
let systimerServers = this.app.getServersByType('systimer');
|
||||
for(let { id } of systimerServers) {
|
||||
let result = await this.app.rpc.systimer.systimerRemote.cancelMarquee.toServer(id, code);
|
||||
if(!result) return resResult(STATUS.GM_MARQUEE_CANCEL_ERR);
|
||||
}
|
||||
return resResult(STATUS.SUCCESS);
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ import { resetPvpSeasonTime, setPvpDefResult, guildActivityStart, gateActivityEn
|
||||
import PvpDefenseType from '../../../db/PvpDefense';
|
||||
import { DicGuildActivity } from '../../../pubUtils/dictionary/DicGuildActivity';
|
||||
import { reloadResources } from '../../../pubUtils/data';
|
||||
import { setMarquee } from '../../../services/marqueeService';
|
||||
import { setMarquee, cancelMarquee } from '../../../services/marqueeService';
|
||||
|
||||
export default function (app: Application) {
|
||||
return new SystimerRemote(app);
|
||||
@@ -53,6 +53,10 @@ export class SystimerRemote {
|
||||
* @param code 跑马灯唯一code
|
||||
*/
|
||||
public async setMarquee(code: string) {
|
||||
await setMarquee(code);
|
||||
return await setMarquee(code);
|
||||
}
|
||||
|
||||
public async cancelMarquee(code: string) {
|
||||
return await cancelMarquee(code);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user