Skip to content

Commit

Permalink
fix: quest & map
Browse files Browse the repository at this point in the history
  • Loading branch information
UeidaNuima committed Feb 6, 2022
1 parent b25cad1 commit a2550b9
Show file tree
Hide file tree
Showing 15 changed files with 33 additions and 28 deletions.
14 changes: 7 additions & 7 deletions docs/asset-manifest.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
{
"files": {
"main.css": "/static/css/main.bf5b162e.chunk.css",
"main.js": "/static/js/main.54d75268.chunk.js",
"main.js.map": "/static/js/main.54d75268.chunk.js.map",
"main.js": "/static/js/main.9b944e99.chunk.js",
"main.js.map": "/static/js/main.9b944e99.chunk.js.map",
"runtime-main.js": "/static/js/runtime-main.c42d8ef7.js",
"runtime-main.js.map": "/static/js/runtime-main.c42d8ef7.js.map",
"static/css/2.3012c0eb.chunk.css": "/static/css/2.3012c0eb.chunk.css",
"static/css/2.db4919ad.chunk.css": "/static/css/2.db4919ad.chunk.css",
"static/js/2.48beed53.chunk.js": "/static/js/2.48beed53.chunk.js",
"static/js/2.48beed53.chunk.js.map": "/static/js/2.48beed53.chunk.js.map",
"index.html": "/index.html",
"precache-manifest.3e0129bec66c998a42a04024fe001ddc.js": "/precache-manifest.3e0129bec66c998a42a04024fe001ddc.js",
"precache-manifest.1dd835a5351b2a2277f35f164d150712.js": "/precache-manifest.1dd835a5351b2a2277f35f164d150712.js",
"service-worker.js": "/service-worker.js",
"static/css/2.3012c0eb.chunk.css.map": "/static/css/2.3012c0eb.chunk.css.map",
"static/css/2.db4919ad.chunk.css.map": "/static/css/2.db4919ad.chunk.css.map",
"static/css/main.bf5b162e.chunk.css.map": "/static/css/main.bf5b162e.chunk.css.map",
"static/js/2.48beed53.chunk.js.LICENSE": "/static/js/2.48beed53.chunk.js.LICENSE",
"static/media/logo.png": "/static/media/logo.509ca4a9.png",
"static/media/pay.png": "/static/media/pay.f5dab129.png"
},
"entrypoints": [
"static/js/runtime-main.c42d8ef7.js",
"static/css/2.3012c0eb.chunk.css",
"static/css/2.db4919ad.chunk.css",
"static/js/2.48beed53.chunk.js",
"static/css/main.bf5b162e.chunk.css",
"static/js/main.54d75268.chunk.js"
"static/js/main.9b944e99.chunk.js"
]
}
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctype html><html lang="zh"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"/><meta name="theme-color" content="#000000"/><link rel="icon" type="image/png" href="/logo.png"/><link rel="manifest" href="/manifest.json"/><title>Naberius</title><link href="/static/css/2.3012c0eb.chunk.css" rel="stylesheet"><link href="/static/css/main.bf5b162e.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>!function(l){function e(e){for(var r,t,n=e[0],o=e[1],u=e[2],f=0,i=[];f<n.length;f++)t=n[f],Object.prototype.hasOwnProperty.call(p,t)&&p[t]&&i.push(p[t][0]),p[t]=0;for(r in o)Object.prototype.hasOwnProperty.call(o,r)&&(l[r]=o[r]);for(s&&s(e);i.length;)i.shift()();return c.push.apply(c,u||[]),a()}function a(){for(var e,r=0;r<c.length;r++){for(var t=c[r],n=!0,o=1;o<t.length;o++){var u=t[o];0!==p[u]&&(n=!1)}n&&(c.splice(r--,1),e=f(f.s=t[0]))}return e}var t={},p={1:0},c=[];function f(e){if(t[e])return t[e].exports;var r=t[e]={i:e,l:!1,exports:{}};return l[e].call(r.exports,r,r.exports,f),r.l=!0,r.exports}f.m=l,f.c=t,f.d=function(e,r,t){f.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},f.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},f.t=function(r,e){if(1&e&&(r=f(r)),8&e)return r;if(4&e&&"object"==typeof r&&r&&r.__esModule)return r;var t=Object.create(null);if(f.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:r}),2&e&&"string"!=typeof r)for(var n in r)f.d(t,n,function(e){return r[e]}.bind(null,n));return t},f.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return f.d(r,"a",r),r},f.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},f.p="/";var r=this["webpackJsonpnaberius-frontend"]=this["webpackJsonpnaberius-frontend"]||[],n=r.push.bind(r);r.push=e,r=r.slice();for(var o=0;o<r.length;o++)e(r[o]);var s=n;a()}([])</script><script src="/static/js/2.48beed53.chunk.js"></script><script src="/static/js/main.54d75268.chunk.js"></script></body></html>
<!doctype html><html lang="zh"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"/><meta name="theme-color" content="#000000"/><link rel="icon" type="image/png" href="/logo.png"/><link rel="manifest" href="/manifest.json"/><title>Naberius</title><link href="/static/css/2.db4919ad.chunk.css" rel="stylesheet"><link href="/static/css/main.bf5b162e.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>!function(l){function e(e){for(var r,t,n=e[0],o=e[1],u=e[2],f=0,i=[];f<n.length;f++)t=n[f],Object.prototype.hasOwnProperty.call(p,t)&&p[t]&&i.push(p[t][0]),p[t]=0;for(r in o)Object.prototype.hasOwnProperty.call(o,r)&&(l[r]=o[r]);for(s&&s(e);i.length;)i.shift()();return c.push.apply(c,u||[]),a()}function a(){for(var e,r=0;r<c.length;r++){for(var t=c[r],n=!0,o=1;o<t.length;o++){var u=t[o];0!==p[u]&&(n=!1)}n&&(c.splice(r--,1),e=f(f.s=t[0]))}return e}var t={},p={1:0},c=[];function f(e){if(t[e])return t[e].exports;var r=t[e]={i:e,l:!1,exports:{}};return l[e].call(r.exports,r,r.exports,f),r.l=!0,r.exports}f.m=l,f.c=t,f.d=function(e,r,t){f.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},f.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},f.t=function(r,e){if(1&e&&(r=f(r)),8&e)return r;if(4&e&&"object"==typeof r&&r&&r.__esModule)return r;var t=Object.create(null);if(f.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:r}),2&e&&"string"!=typeof r)for(var n in r)f.d(t,n,function(e){return r[e]}.bind(null,n));return t},f.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return f.d(r,"a",r),r},f.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},f.p="/";var r=this["webpackJsonpnaberius-frontend"]=this["webpackJsonpnaberius-frontend"]||[],n=r.push.bind(r);r.push=e,r=r.slice();for(var o=0;o<r.length;o++)e(r[o]);var s=n;a()}([])</script><script src="/static/js/2.48beed53.chunk.js"></script><script src="/static/js/main.9b944e99.chunk.js"></script></body></html>
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
self.__precacheManifest = (self.__precacheManifest || []).concat([
{
"revision": "756fa173f48dd3f4a88b795e5d60ad37",
"revision": "7d31c4b72435c26da996f529884e0bd0",
"url": "/index.html"
},
{
"revision": "1e6f1b2044de4b004fab",
"url": "/static/css/2.3012c0eb.chunk.css"
"revision": "edb3c9f2f776226c8a0a",
"url": "/static/css/2.db4919ad.chunk.css"
},
{
"revision": "8a64455c9b799aeedcf1",
"revision": "3436a22c8c3be288840d",
"url": "/static/css/main.bf5b162e.chunk.css"
},
{
"revision": "1e6f1b2044de4b004fab",
"revision": "edb3c9f2f776226c8a0a",
"url": "/static/js/2.48beed53.chunk.js"
},
{
"revision": "d6a7472a13919fb2e347fd9298bef2a8",
"url": "/static/js/2.48beed53.chunk.js.LICENSE"
},
{
"revision": "8a64455c9b799aeedcf1",
"url": "/static/js/main.54d75268.chunk.js"
"revision": "3436a22c8c3be288840d",
"url": "/static/js/main.9b944e99.chunk.js"
},
{
"revision": "8bd58515cb0081862933",
Expand Down
2 changes: 1 addition & 1 deletion docs/service-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
importScripts("https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js");

importScripts(
"/precache-manifest.3e0129bec66c998a42a04024fe001ddc.js"
"/precache-manifest.1dd835a5351b2a2277f35f164d150712.js"
);

self.addEventListener('message', (event) => {
Expand Down
1 change: 0 additions & 1 deletion docs/static/css/2.3012c0eb.chunk.css.map

This file was deleted.

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/static/css/2.db4919ad.chunk.css.map

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions docs/static/js/main.54d75268.chunk.js

This file was deleted.

1 change: 0 additions & 1 deletion docs/static/js/main.54d75268.chunk.js.map

This file was deleted.

2 changes: 2 additions & 0 deletions docs/static/js/main.9b944e99.chunk.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/static/js/main.9b944e99.chunk.js.map

Large diffs are not rendered by default.

14 changes: 8 additions & 6 deletions src/Components/Routes/Quest/MapTable.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
import React, { useRef, useEffect, useState } from 'react';
import { Quest } from 'interfaces';
import { STATIC_URL } from 'consts';
import { MAP_IMAGE_URL, STATIC_URL } from 'consts';
import { Stage, Layer, Image, Circle, Arrow } from 'react-konva';
import useImage from 'use-image';
import styles from './Quest.module.less';
import { InputNumber, Select } from 'antd';

const MapTable: React.FC<{ quest: Quest }> = ({ quest }) => {
const [mapImg] = useImage(
'http://assets.millennium-war.net' + quest.Map.Image,
quest.Map.Image
? 'http://assets.millennium-war.net' + quest.Map.Image
: `${MAP_IMAGE_URL}/${quest.Map.MapName}.png`,
);
const [heartImg] = useImage(STATIC_URL + '/heart.png');
const [nearImg] = useImage(STATIC_URL + '/near.png');
Expand Down Expand Up @@ -84,14 +86,14 @@ const MapTable: React.FC<{ quest: Quest }> = ({ quest }) => {
return (
<Image
onClick={() => {
setCircle(c => ({
setCircle((c) => ({
x: location.X,
y: location.Y,
range: c.range || 250,
}));
}}
onTap={() => {
setCircle(c => ({
setCircle((c) => ({
x: location.X,
y: location.Y,
range: c.range || 250,
Expand Down Expand Up @@ -163,10 +165,10 @@ const MapTable: React.FC<{ quest: Quest }> = ({ quest }) => {
min={0}
style={{ width: '100%' }}
value={circle.range}
onChange={value =>
onChange={(value) =>
value &&
value >= 0 &&
setCircle(c => ({ ...c, range: value && value }))
setCircle((c) => ({ ...c, range: value && value }))
}
placeholder="点一下上图里的配置位"
/>
Expand Down
3 changes: 2 additions & 1 deletion src/Components/Routes/Quest/Quest.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const Quest: React.FC = () => {
Data_Expression
Comment
}
query($id: Int!) {
query ($id: Int!) {
Quest(QuestID: $id) {
EventArcs {
_TalkerName
Expand Down Expand Up @@ -86,6 +86,7 @@ const Quest: React.FC = () => {
}
MapNo
Map {
MapName
Image
Entries {
EnemyID
Expand Down
1 change: 1 addition & 0 deletions src/consts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export const ICO_URL = STATIC_URL + '/ico';
export const BANNER_URL = STATIC_URL + '/banner';
export const PLAYER_STAND_CG_URL = STATIC_URL + '/standCG';
export const PLAYER_HARLEM_CG_URL = STATIC_URL + '/harlemCG';
export const MAP_IMAGE_URL = STATIC_URL + '/map';

export const ENEMY_CHANGE_COND: { [k: number]: string } = {
0: '条件切换',
Expand Down
1 change: 1 addition & 0 deletions src/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,7 @@ export interface MapRoute {

export interface Map {
Image: string;
MapName: string;
Entries: MapEntry[][];
Routes: MapRoute[][];
Locations: Array<
Expand Down

0 comments on commit a2550b9

Please sign in to comment.