svg
This commit is contained in:
parent
15fe7fa703
commit
e853921fcd
|
@ -35,6 +35,18 @@ function onInit() {
|
|||
rpc.register("getConfig");
|
||||
rpc.register("upsertConfig");
|
||||
|
||||
rpc.register("getCard");
|
||||
rpc.register("upsertCard");
|
||||
|
||||
rpc.register("getTile");
|
||||
rpc.register("upsertTile");
|
||||
|
||||
rpc.register("getTiletype");
|
||||
rpc.register("upsertTiletype");
|
||||
|
||||
rpc.register("getTilelevel");
|
||||
rpc.register("upsertTilelevel");
|
||||
|
||||
rpc.register("getPartys");
|
||||
rpc.register("getPartyswait");
|
||||
rpc.register("getParty");
|
||||
|
@ -45,6 +57,12 @@ function onInit() {
|
|||
rpc.register("getPlayer");
|
||||
rpc.register("initPlayer");
|
||||
rpc.register("upsertPlayer");
|
||||
|
||||
rpc.register("getPlayerParty");
|
||||
rpc.register("upsertlayerParty");
|
||||
|
||||
rpc.register("getPlayerPartyTile");
|
||||
rpc.register("upsertlayerPartyTile");
|
||||
}
|
||||
|
||||
// Repository Auth
|
||||
|
@ -89,6 +107,27 @@ async function upsertConfig(ctx,config) {
|
|||
return obj;
|
||||
}
|
||||
|
||||
// Repository Card
|
||||
async function getCard(ctx,id) {
|
||||
var obj = await store.get(ctx, "Card",id);
|
||||
if(obj&&!obj.value) obj.value=obj.default;
|
||||
return obj;
|
||||
}
|
||||
async function upsertCard(ctx,card) {
|
||||
var obj = await store.upsert(ctx, "Card", config);
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
||||
rpc.register("getTile");
|
||||
rpc.register("upsertTile");
|
||||
|
||||
rpc.register("getTiletype");
|
||||
rpc.register("upsertTiletype");
|
||||
|
||||
rpc.register("getTilelevel");
|
||||
rpc.register("upsertTilelevel");
|
||||
|
||||
// Repository Party
|
||||
async function getPartys(ctx) {
|
||||
var obj = await store.query(ctx, "Party");
|
||||
|
@ -145,6 +184,41 @@ async function upsertPlayer(ctx,player) {
|
|||
return obj;
|
||||
}
|
||||
|
||||
// Repository PlayerParty
|
||||
async function getPlayerParty(ctx,playerid,partyid) {
|
||||
var obj = await store.query(ctx, "PlayerParty",
|
||||
{
|
||||
"and": [
|
||||
"eq":{ "playerid": playerid },
|
||||
"eq":{ "partyid": partyid }
|
||||
]
|
||||
}
|
||||
);
|
||||
return obj;
|
||||
}
|
||||
async function upsertPlayerParty(ctx,playerparty) {
|
||||
var obj = await store.upsert(ctx, "PlayerParty", playerparty);
|
||||
return obj;
|
||||
}
|
||||
|
||||
// Repository PlayerPartyCase
|
||||
async function getPlayerPartyTile(ctx,playerid,partyid,Tileid) {
|
||||
var obj = await store.query(ctx, "PlayerPartyTile",
|
||||
{
|
||||
"and": [
|
||||
"eq":{ "playerid": playerid },
|
||||
"eq":{ "partyid": partyid },
|
||||
"eq":{ "tileid": tileid },
|
||||
]
|
||||
}
|
||||
);
|
||||
return obj;
|
||||
}
|
||||
async function upsertPlayerPartyCase(ctx,playerpartycase) {
|
||||
var obj = await store.upsert(ctx, "PlayerPartyCase", playerpartycase);
|
||||
return obj;
|
||||
}
|
||||
|
||||
// La fonction "onClientMessage(ctx, message)" est automatiquement
|
||||
// exécutée quand le serveur de votre application reçoit un
|
||||
// message en provenance du client.
|
||||
|
|
Loading…
Reference in New Issue