Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import { createAction } from 'redux-actions-helpers';
import manager from 'package/manager'
export const characterList = createAction('@@character-delete/UPDATE', ({ list, cities }) => ({
list,
cities
}));
export const characterDelete = payout => (dispatch, getState, transport) => {
return new Promise((resolve, reject) => {
const _package = manager.getPackage('_0x83');
// @TODO: params
transport.sendPacket(_package.create(''));
});
};
export default {
characterList,
import { createAction } from 'redux-actions-helpers'
import manager from 'package/manager'
export const auth = createAction('@@login/AUTH', ({ username, password }) => ({
username,
password
}));
export const error = createAction('@@login/ERROR', ({ error }) => ({
error
}));
export const confirm = createAction('@@login/CONFIRM');
export const complete = createAction('@@login/COMPLETE');
export const relogin = createAction('@@login/RELOGIN', ({ key }) => ({
key
}));
import { createAction } from 'redux-actions-helpers'
export const updateTiles = createAction('@@map/UPDATE_TILES', ({ blockX, blockY, tiles }) => ({
blockX,
blockY,
tiles
}));
export const updateMap = createAction('@@map/UPDATE_MAP', ({ id }) => ({
id
}));
export const updateCoordinates = createAction('@@map/UPDATE_COORDINATES', ({ x, y }) => ({
x,
y
}));
const hasFullBlock = ({blockX, blockY, getState}) => {
const state = getState().map;
const tiles = state.tiles || [];
for(let x = blockX; x < blockX + 8; x++) {
for(let y = blockY; y < blockY + 8; y++) {
if (!tiles[x] || !tiles[x][y]) {
return false;
import { createAction } from 'redux-actions-helpers';
import manager from 'package/manager'
export const list = createAction('@@character/LIST', ({ list, cities }) => ({
list,
cities
}));
export const update = createAction('@@character/LIST_UPDATE', ({ list }) => ({
list
}));
export const removeAction = createAction('@@character/REMOVE_ACTION', ({ index }) => ({
index
}));
export const removeError = createAction('@@character/REMOVE_ERROR', ({ code, message }) => ({
code,
message
}));
export const remove = ({ index, password }) => (dispatch, getState, transport) => {
dispatch(
removeAction({ index })
);
const _package = manager.getPackage(0x83);
transport.sendPacket(
import { createAction } from 'redux-actions-helpers'
export const update = createAction('@@status-info/UPDATE', (payload) => ({
...payload
}));
export default {
update
}
import { createAction } from 'redux-actions-helpers'
export const overall = createAction('@@light/OVERALL', (overall) => ({
overall
}));
export const personal = createAction('@@light/PERSONAL', ({ level, object }) => ({
level,
object
}));
export default {
overall,
personal
}
import { createAction } from 'redux-actions-helpers'
import manager from 'package/manager'
export const send = createAction('@@ping/SEND');
export const receive = createAction('@@ping/RECEIVE');
export const changeInterval = createAction('@@ping/CHANGE_INTERVAL', ({ index }) => ({
index
}));
export const sendMaster = () => (dispatch, getState, transport) => {
dispatch(send());
const _package = manager.getPackage(0x73);
transport.sendPacket(_package.create());
};
export default {
sendMaster,
receive,
import { createAction } from 'redux-actions-helpers';
import manager from 'package/manager'
export const list = createAction('@@character/LIST', ({ list, cities }) => ({
list,
cities
}));
export const update = createAction('@@character/LIST_UPDATE', ({ list }) => ({
list
}));
export const removeAction = createAction('@@character/REMOVE_ACTION', ({ index }) => ({
index
}));
export const removeError = createAction('@@character/REMOVE_ERROR', ({ code, message }) => ({
code,
message
}));
export const remove = ({ index, password }) => (dispatch, getState, transport) => {
dispatch(
removeAction({ index })
);
import { createAction } from 'redux-actions-helpers';
import manager from 'package/manager'
export const list = createAction('@@character/LIST', ({ list, cities }) => ({
list,
cities
}));
export const update = createAction('@@character/LIST_UPDATE', ({ list }) => ({
list
}));
export const removeAction = createAction('@@character/REMOVE_ACTION', ({ index }) => ({
index
}));
export const removeError = createAction('@@character/REMOVE_ERROR', ({ code, message }) => ({
code,
message
}));
import { createAction } from 'redux-actions-helpers';
import manager from 'package/manager'
export const login = createAction('@@post-login/LOGIN', ({ key }) => ({
key
}));
export const loginMaster = payload => (dispatch, getState, transport) => {
dispatch(login(payload));
const state = getState().login;
const packageSeed = manager.getPackage('seed');
transport.sendPacket(packageSeed.create(payload.key));
const packagePostLogin = manager.getPackage(0x91);
transport.sendPacket(packagePostLogin.create(state.username, state.password, payload.key));
};
export default {