Grabbed dndbeyond's source code
``` ~/go/bin/sourcemapper -output ddb -jsurl https://media.dndbeyond.com/character-app/static/js/main.90aa78c5.js ```
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
import { createSelector } from "reselect";
|
||||
|
||||
import {
|
||||
DecorationUtils,
|
||||
rulesEngineSelectors,
|
||||
} from "@dndbeyond/character-rules-engine/es";
|
||||
import { IRollContext } from "@dndbeyond/dice";
|
||||
|
||||
import { appEnvSelectors } from "./index";
|
||||
|
||||
export const getCharacterRollContext = createSelector(
|
||||
[
|
||||
appEnvSelectors.getCharacterId,
|
||||
rulesEngineSelectors.getName,
|
||||
rulesEngineSelectors.getDecorationInfo,
|
||||
],
|
||||
(characterId, name, decorationInfo): IRollContext => {
|
||||
return {
|
||||
entityId: characterId ? characterId.toString() : "",
|
||||
entityType: "character",
|
||||
name: name?.toString(),
|
||||
avatarUrl:
|
||||
DecorationUtils.getAvatarInfo(decorationInfo).avatarUrl?.toString(),
|
||||
};
|
||||
}
|
||||
);
|
||||
Reference in New Issue
Block a user