snapshot migration subPhase 5.5
This commit is contained in:
@@ -447,56 +447,59 @@ async function steal(interaction) {
|
|||||||
* Thief stats.
|
* Thief stats.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
await trackProfileEvent(
|
await trackProfileEvent(
|
||||||
interaction,
|
interaction,
|
||||||
user.id,
|
user.id,
|
||||||
{
|
{
|
||||||
type:
|
type: "steal_success",
|
||||||
"steal_success",
|
source: "steal",
|
||||||
amount,
|
amount,
|
||||||
targetUserId:
|
targetUserId:
|
||||||
target.id
|
target.id
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
await trackProfileEvent(
|
await trackProfileEvent(
|
||||||
interaction,
|
interaction,
|
||||||
user.id,
|
user.id,
|
||||||
{
|
{
|
||||||
type:
|
type: "cookie_gain",
|
||||||
"cookie_gain",
|
source: "steal",
|
||||||
amount
|
amount,
|
||||||
|
targetUserId:
|
||||||
|
target.id
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Victim stats.
|
* Victim stats.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
await trackProfileEvent(
|
await trackProfileEvent(
|
||||||
interaction,
|
interaction,
|
||||||
target.id,
|
target.id,
|
||||||
{
|
{
|
||||||
type:
|
type: "stolen_from_me",
|
||||||
"stolen_from_me",
|
source: "steal",
|
||||||
amount,
|
amount,
|
||||||
thiefUserId:
|
thiefUserId:
|
||||||
user.id
|
user.id
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
await trackProfileEvent(
|
||||||
await trackProfileEvent(
|
|
||||||
interaction,
|
interaction,
|
||||||
target.id,
|
target.id,
|
||||||
{
|
{
|
||||||
type:
|
type: "cookie_loss",
|
||||||
"cookie_loss",
|
source: "steal",
|
||||||
amount
|
amount,
|
||||||
|
thiefUserId:
|
||||||
|
user.id
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
const [
|
const [
|
||||||
@@ -653,28 +656,32 @@ async function steal(interaction) {
|
|||||||
* Profile tracking.
|
* Profile tracking.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
await trackProfileEvent(
|
await trackProfileEvent(
|
||||||
interaction,
|
interaction,
|
||||||
user.id,
|
user.id,
|
||||||
{
|
{
|
||||||
type:
|
type: "cookie_loss",
|
||||||
"cookie_loss",
|
source: "steal_penalty",
|
||||||
amount:
|
amount:
|
||||||
penalty
|
penalty,
|
||||||
|
targetUserId:
|
||||||
|
target.id
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
await trackProfileEvent(
|
await trackProfileEvent(
|
||||||
interaction,
|
interaction,
|
||||||
target.id,
|
target.id,
|
||||||
{
|
{
|
||||||
type:
|
type: "cookie_gain",
|
||||||
"cookie_gain",
|
source: "steal_penalty",
|
||||||
amount:
|
amount:
|
||||||
penalty
|
penalty,
|
||||||
|
thiefUserId:
|
||||||
|
user.id
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
const [
|
const [
|
||||||
@@ -902,30 +909,34 @@ async function give(interaction) {
|
|||||||
* Sender lifetime giving.
|
* Sender lifetime giving.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
await trackProfileEvent(
|
await trackProfileEvent(
|
||||||
interaction,
|
interaction,
|
||||||
user.id,
|
user.id,
|
||||||
{
|
{
|
||||||
type:
|
type: "cookies_given",
|
||||||
"cookies_given",
|
source: "give",
|
||||||
amount
|
amount,
|
||||||
|
targetUserId:
|
||||||
|
target.id
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Recipient lifetime gain.
|
* Recipient lifetime gain.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
await trackProfileEvent(
|
await trackProfileEvent(
|
||||||
interaction,
|
interaction,
|
||||||
target.id,
|
target.id,
|
||||||
{
|
{
|
||||||
type:
|
type: "cookie_gain",
|
||||||
"cookie_gain",
|
source: "give",
|
||||||
amount
|
amount,
|
||||||
|
senderUserId:
|
||||||
|
user.id
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
const [
|
const [
|
||||||
|
|||||||
+5
-3
@@ -161,14 +161,16 @@ async function declareBankruptcy(interaction, userId = interaction.user.id) {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
await trackProfileEvent(
|
await trackProfileEvent(
|
||||||
interaction,
|
interaction,
|
||||||
userId,
|
userId,
|
||||||
{
|
{
|
||||||
type: "cookie_gain",
|
type: "cookie_gain",
|
||||||
amount: BANKRUPTCY_GRANT
|
source: "bankruptcy",
|
||||||
|
amount:
|
||||||
|
BANKRUPTCY_GRANT
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
ok: true,
|
ok: true,
|
||||||
|
|||||||
+10
-3
@@ -269,17 +269,24 @@ async function resolveCookieHeist(
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ============================================================
|
||||||
|
* HEIST
|
||||||
|
* ============================================================
|
||||||
|
*/
|
||||||
|
|
||||||
await trackProfileEvent(
|
await trackProfileEvent(
|
||||||
interaction,
|
interaction,
|
||||||
playerId,
|
playerId,
|
||||||
{
|
{
|
||||||
type:
|
type: "vault_steal",
|
||||||
"vault_steal",
|
source: "heist",
|
||||||
|
game: "heist",
|
||||||
|
result: "win",
|
||||||
amount
|
amount
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
const [
|
const [
|
||||||
playerAfter,
|
playerAfter,
|
||||||
vaultAfter
|
vaultAfter
|
||||||
|
|||||||
@@ -304,6 +304,7 @@ async function startBlackjack(
|
|||||||
game: "blackjack",
|
game: "blackjack",
|
||||||
source,
|
source,
|
||||||
bet,
|
bet,
|
||||||
|
wager: bet,
|
||||||
allIn,
|
allIn,
|
||||||
previousAllIn,
|
previousAllIn,
|
||||||
previousBet
|
previousBet
|
||||||
|
|||||||
@@ -87,14 +87,15 @@ async function collectCookies(
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
await trackProfileEvent(
|
await trackProfileEvent(
|
||||||
interaction,
|
interaction,
|
||||||
userId,
|
userId,
|
||||||
{
|
{
|
||||||
type: "cookie_gain",
|
type: "cookie_gain",
|
||||||
|
source: "collect",
|
||||||
amount
|
amount
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
const balance = await getCookieBalance(
|
const balance = await getCookieBalance(
|
||||||
|
|||||||
@@ -495,7 +495,7 @@ async function playRoulette(
|
|||||||
const allIn =
|
const allIn =
|
||||||
bet === playerBalance;
|
bet === playerBalance;
|
||||||
|
|
||||||
await trackProfileEvent(
|
await trackProfileEvent(
|
||||||
interaction,
|
interaction,
|
||||||
playerId,
|
playerId,
|
||||||
{
|
{
|
||||||
@@ -503,11 +503,12 @@ async function playRoulette(
|
|||||||
game: "roulette",
|
game: "roulette",
|
||||||
source,
|
source,
|
||||||
bet,
|
bet,
|
||||||
|
wager: bet,
|
||||||
allIn,
|
allIn,
|
||||||
previousAllIn,
|
previousAllIn,
|
||||||
previousBet
|
previousBet
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
await interaction.update({
|
await interaction.update({
|
||||||
embeds: [
|
embeds: [
|
||||||
|
|||||||
+8
-3
@@ -199,16 +199,21 @@ async function playSlots(
|
|||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
|
|
||||||
await trackProfileEvent(
|
await trackProfileEvent(
|
||||||
interaction,
|
interaction,
|
||||||
playerId,
|
playerId,
|
||||||
{
|
{
|
||||||
type: "game_start",
|
type: "game_start",
|
||||||
game: "slots",
|
game: "slots",
|
||||||
source,
|
source,
|
||||||
bet
|
bet,
|
||||||
|
wager: bet,
|
||||||
|
allIn:
|
||||||
|
bet === playerBalance,
|
||||||
|
previousAllIn,
|
||||||
|
previousBet
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
await interaction.update({
|
await interaction.update({
|
||||||
embeds: [
|
embeds: [
|
||||||
|
|||||||
Reference in New Issue
Block a user