mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-05-07 02:47:13 +00:00
nuke TelemetryManager
This commit is contained in:
parent
ed9701fc4d
commit
e8052fc495
|
|
@ -1,403 +0,0 @@
|
|||
#include "Minecraft.World/Header Files/stdafx.h"
|
||||
|
||||
#include "../../../net/minecraft/client/multiplayer/MultiPlayerLocalPlayer.h"
|
||||
|
||||
#include "Minecraft.World/net/minecraft/world/level/LevelSettings.h"
|
||||
#include "Minecraft.World/net/minecraft/world/level/storage/LevelData.h"
|
||||
#include "Minecraft.World/net/minecraft/world/level/Level.h"
|
||||
|
||||
#include "TelemetryManager.h"
|
||||
|
||||
CTelemetryManager* TelemetryManager = new CTelemetryManager();
|
||||
|
||||
int32_t CTelemetryManager::Init() { return 0; }
|
||||
|
||||
int32_t CTelemetryManager::Tick() { return 0; }
|
||||
|
||||
int32_t CTelemetryManager::Flush() { return 0; }
|
||||
|
||||
bool CTelemetryManager::RecordPlayerSessionStart(int iPad) { return true; }
|
||||
|
||||
bool CTelemetryManager::RecordPlayerSessionExit(int iPad, int exitStatus) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CTelemetryManager::RecordHeartBeat(int iPad) { return true; }
|
||||
|
||||
bool CTelemetryManager::RecordLevelStart(int iPad,
|
||||
ESen_FriendOrMatch friendsOrMatch,
|
||||
ESen_CompeteOrCoop competeOrCoop,
|
||||
int difficulty,
|
||||
int numberOfLocalPlayers,
|
||||
int numberOfOnlinePlayers) {
|
||||
if (iPad == ProfileManager.GetPrimaryPad()) m_bFirstFlush = true;
|
||||
|
||||
++m_levelInstanceID;
|
||||
m_fLevelStartTime[iPad] = app.getAppTime();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CTelemetryManager::RecordLevelExit(int iPad,
|
||||
ESen_LevelExitStatus levelExitStatus) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CTelemetryManager::RecordLevelSaveOrCheckpoint(int iPad,
|
||||
int saveOrCheckPointID,
|
||||
int saveSizeInBytes) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CTelemetryManager::RecordLevelResume(
|
||||
int iPad, ESen_FriendOrMatch friendsOrMatch,
|
||||
ESen_CompeteOrCoop competeOrCoop, int difficulty, int numberOfLocalPlayers,
|
||||
int numberOfOnlinePlayers, int saveOrCheckPointID) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CTelemetryManager::RecordPauseOrInactive(int iPad) { return true; }
|
||||
|
||||
bool CTelemetryManager::RecordUnpauseOrActive(int iPad) { return true; }
|
||||
|
||||
bool CTelemetryManager::RecordMenuShown(int iPad, EUIScene menuID,
|
||||
int optionalMenuSubID) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CTelemetryManager::RecordAchievementUnlocked(int iPad, int achievementID,
|
||||
int achievementGamerscore) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CTelemetryManager::RecordMediaShareUpload(
|
||||
int iPad, ESen_MediaDestination mediaDestination,
|
||||
ESen_MediaType mediaType) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CTelemetryManager::RecordUpsellPresented(int iPad, ESen_UpsellID upsellId,
|
||||
int marketplaceOfferID) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CTelemetryManager::RecordUpsellResponded(
|
||||
int iPad, ESen_UpsellID upsellId, int marketplaceOfferID,
|
||||
ESen_UpsellOutcome upsellOutcome) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CTelemetryManager::RecordPlayerDiedOrFailed(
|
||||
int iPad, int lowResMapX, int lowResMapY, int lowResMapZ, int mapID,
|
||||
int playerWeaponID, int enemyWeaponID, ETelemetryChallenges enemyTypeID) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CTelemetryManager::RecordEnemyKilledOrOvercome(
|
||||
int iPad, int lowResMapX, int lowResMapY, int lowResMapZ, int mapID,
|
||||
int playerWeaponID, int enemyWeaponID, ETelemetryChallenges enemyTypeID) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CTelemetryManager::RecordTexturePackLoaded(int iPad, int texturePackId,
|
||||
bool purchased) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CTelemetryManager::RecordSkinChanged(int iPad, int dwSkinId) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CTelemetryManager::RecordBanLevel(int iPad) { return true; }
|
||||
|
||||
bool CTelemetryManager::RecordUnBanLevel(int iPad) { return true; }
|
||||
|
||||
///////////////////////////////////////////////////////////////////
|
||||
// 4J-JEV: FOLLOWING LOGIC TAKEN FROM XBOX 'SentientManager.cpp' //
|
||||
///////////////////////////////////////////////////////////////////
|
||||
|
||||
/*
|
||||
Number of seconds elapsed since Sentient initialize.
|
||||
Title needs to track this and report it as a property.
|
||||
These times will be used to create timelines and understand durations.
|
||||
This should be tracked independently of saved games (restoring a save should not
|
||||
reset the seconds since initialize)
|
||||
*/
|
||||
int CTelemetryManager::GetSecondsSinceInitialize() {
|
||||
return static_cast<int>(app.getAppTime() - m_initialiseTime);
|
||||
}
|
||||
|
||||
/*
|
||||
An in-game setting that significantly differentiates the play style of the game.
|
||||
(This should be captured as an integer and correspond to mode specific to the
|
||||
game.) Teams will have to provide the game mappings that correspond to the
|
||||
integers. The intent is to allow teams to capture data on the highest level
|
||||
categories of gameplay in their game. For example, a game mode could be the name
|
||||
of the specific mini game (eg: golf vs darts) or a specific multiplayer mode
|
||||
(eg: hoard vs beast.) ModeID = 0 means undefined or unknown. The intent is to
|
||||
answer the question "How are players playing your game?"
|
||||
*/
|
||||
int CTelemetryManager::GetMode(int userId) {
|
||||
int mode = static_cast<int>(eTelem_ModeId_Undefined);
|
||||
|
||||
Minecraft* pMinecraft = Minecraft::GetInstance();
|
||||
|
||||
if (pMinecraft->localplayers[userId] != nullptr &&
|
||||
pMinecraft->localplayers[userId]->level != nullptr &&
|
||||
pMinecraft->localplayers[userId]->level->getLevelData() != nullptr) {
|
||||
GameType* gameType = pMinecraft->localplayers[userId]
|
||||
->level->getLevelData()
|
||||
->getGameType();
|
||||
|
||||
if (gameType->isSurvival()) {
|
||||
mode = static_cast<int>(eTelem_ModeId_Survival);
|
||||
} else if (gameType->isCreative()) {
|
||||
mode = static_cast<int>(eTelem_ModeId_Creative);
|
||||
} else {
|
||||
mode = static_cast<int>(eTelem_ModeId_Undefined);
|
||||
}
|
||||
}
|
||||
return mode;
|
||||
}
|
||||
|
||||
/*
|
||||
Used when a title has more heirarchy required.
|
||||
OptionalSubMode ID = 0 means undefined or unknown.
|
||||
For titles that have sub-modes (Sports/Football).
|
||||
Mode is always an indicator of "How is the player choosing to play my game?" so
|
||||
these do not have to be consecutive. LevelIDs and SubLevelIDs can be reused as
|
||||
they will always be paired with a Mode/SubModeID, Mode should be unique -
|
||||
SubMode can be shared between modes.
|
||||
*/
|
||||
int CTelemetryManager::GetSubMode(int userId) {
|
||||
int subMode = static_cast<int>(eTelem_SubModeId_Undefined);
|
||||
|
||||
if (Minecraft::GetInstance()->isTutorial()) {
|
||||
subMode = static_cast<int>(eTelem_SubModeId_Tutorial);
|
||||
} else {
|
||||
subMode = static_cast<int>(eTelem_SubModeId_Normal);
|
||||
}
|
||||
|
||||
return subMode;
|
||||
}
|
||||
|
||||
/*
|
||||
This is a more granular view of mode, allowing teams to get a sense of the
|
||||
levels or maps players are playing and providing some insight into how players
|
||||
progress through a game. Teams will have to provide the game mappings that
|
||||
correspond to the integers. The intent is that a level is highest level at which
|
||||
modes can be dissected and provides an indication of player progression in a
|
||||
game. The intent is that level start and ends do not occur more than every 2
|
||||
minutes or so, otherwise the data reported will be difficult to understand.
|
||||
Levels are unique only within a given modeID - so you can have a ModeID =1,
|
||||
LevelID =1 and a different ModeID=2, LevelID = 1 indicate two completely
|
||||
different levels. LevelID = 0 means undefined or unknown.
|
||||
*/
|
||||
int CTelemetryManager::GetLevelId(int userId) {
|
||||
int levelId = static_cast<int>(eTelem_LevelId_Undefined);
|
||||
|
||||
levelId = static_cast<int>(eTelem_LevelId_PlayerGeneratedLevel);
|
||||
|
||||
return levelId;
|
||||
}
|
||||
|
||||
/*
|
||||
Used when a title has more heirarchy required. OptionalSubLevel ID = 0 means
|
||||
undefined or unknown. For titles that have sub-levels. Level is always an
|
||||
indicator of "How far has the player progressed." so when possible these should
|
||||
be consecutive or at least monotonically increasing. LevelIDs and SubLevelIDs
|
||||
can be reused as they will always be paired with a Mode/SubModeID
|
||||
*/
|
||||
int CTelemetryManager::GetSubLevelId(int userId) {
|
||||
int subLevelId = static_cast<int>(eTelem_SubLevelId_Undefined);
|
||||
|
||||
Minecraft* pMinecraft = Minecraft::GetInstance();
|
||||
|
||||
if (pMinecraft->localplayers[userId] != nullptr) {
|
||||
switch (pMinecraft->localplayers[userId]->dimension) {
|
||||
case 0:
|
||||
subLevelId = static_cast<int>(eTelem_SubLevelId_Overworld);
|
||||
break;
|
||||
case -1:
|
||||
subLevelId = static_cast<int>(eTelem_SubLevelId_Nether);
|
||||
break;
|
||||
case 1:
|
||||
subLevelId = static_cast<int>(eTelem_SubLevelId_End);
|
||||
break;
|
||||
};
|
||||
}
|
||||
|
||||
return subLevelId;
|
||||
}
|
||||
|
||||
/*
|
||||
Build version of the title, used to track changes in development as well as
|
||||
patches/title updates Allows developer to separate out stats from different
|
||||
builds
|
||||
*/
|
||||
int CTelemetryManager::GetTitleBuildId() {
|
||||
return static_cast<int>(VER_PRODUCTBUILD);
|
||||
}
|
||||
|
||||
/*
|
||||
Generated by the game every time LevelStart or LevelResume is called.
|
||||
This should be a unique ID (can be sequential) within a session.
|
||||
Helps differentiate level attempts when a play plays the same mode/level -
|
||||
especially with aggregated stats
|
||||
*/
|
||||
int CTelemetryManager::GetLevelInstanceID() { return m_levelInstanceID; }
|
||||
|
||||
/*
|
||||
MultiplayerinstanceID is a title-generated value that is the same for all
|
||||
players in the same multiplayer session. Link up players into a single
|
||||
multiplayer session ID.
|
||||
*/
|
||||
int CTelemetryManager::GetMultiplayerInstanceID() {
|
||||
return m_multiplayerInstanceID;
|
||||
}
|
||||
|
||||
int CTelemetryManager::GenerateMultiplayerInstanceId() { return 0; }
|
||||
|
||||
void CTelemetryManager::SetMultiplayerInstanceId(int value) {
|
||||
m_multiplayerInstanceID = value;
|
||||
}
|
||||
|
||||
/*
|
||||
Indicates whether the game is being played in single or multiplayer mode and
|
||||
whether multiplayer is being played locally or over live. How social is your
|
||||
game? How do people play it?
|
||||
*/
|
||||
int CTelemetryManager::GetSingleOrMultiplayer() {
|
||||
int singleOrMultiplayer =
|
||||
static_cast<int>(eSen_SingleOrMultiplayer_Undefined);
|
||||
|
||||
// Unused
|
||||
// eSen_SingleOrMultiplayer_Single_Player
|
||||
// eSen_SingleOrMultiplayer_Multiplayer_Live
|
||||
|
||||
if (app.GetLocalPlayerCount() == 1 &&
|
||||
g_NetworkManager.GetOnlinePlayerCount() == 0) {
|
||||
singleOrMultiplayer =
|
||||
static_cast<int>(eSen_SingleOrMultiplayer_Single_Player);
|
||||
} else if (app.GetLocalPlayerCount() > 1 &&
|
||||
g_NetworkManager.GetOnlinePlayerCount() == 0) {
|
||||
singleOrMultiplayer =
|
||||
static_cast<int>(eSen_SingleOrMultiplayer_Multiplayer_Local);
|
||||
} else if (app.GetLocalPlayerCount() == 1 &&
|
||||
g_NetworkManager.GetOnlinePlayerCount() > 0) {
|
||||
singleOrMultiplayer =
|
||||
static_cast<int>(eSen_SingleOrMultiplayer_Multiplayer_Live);
|
||||
} else if (app.GetLocalPlayerCount() > 1 &&
|
||||
g_NetworkManager.GetOnlinePlayerCount() > 0) {
|
||||
singleOrMultiplayer = static_cast<int>(
|
||||
eSen_SingleOrMultiplayer_Multiplayer_Both_Local_and_Live);
|
||||
}
|
||||
|
||||
return singleOrMultiplayer;
|
||||
}
|
||||
|
||||
/*
|
||||
An in-game setting that differentiates the challenge imposed on the user.
|
||||
Normalized to a standard 5-point scale. Are players changing the difficulty?
|
||||
*/
|
||||
int CTelemetryManager::GetDifficultyLevel(int diff) {
|
||||
int difficultyLevel = static_cast<int>(eSen_DifficultyLevel_Undefined);
|
||||
|
||||
switch (diff) {
|
||||
case 0:
|
||||
difficultyLevel = static_cast<int>(eSen_DifficultyLevel_Easiest);
|
||||
break;
|
||||
case 1:
|
||||
difficultyLevel = static_cast<int>(eSen_DifficultyLevel_Easier);
|
||||
break;
|
||||
case 2:
|
||||
difficultyLevel = static_cast<int>(eSen_DifficultyLevel_Normal);
|
||||
break;
|
||||
case 3:
|
||||
difficultyLevel = static_cast<int>(eSen_DifficultyLevel_Harder);
|
||||
break;
|
||||
}
|
||||
|
||||
// Unused
|
||||
// eSen_DifficultyLevel_Hardest = 5,
|
||||
|
||||
return difficultyLevel;
|
||||
}
|
||||
|
||||
/*
|
||||
Differentiates trial/demo from full purchased titles
|
||||
Is this a full title or demo?
|
||||
*/
|
||||
int CTelemetryManager::GetLicense() {
|
||||
int license = eSen_License_Undefined;
|
||||
|
||||
if (ProfileManager.IsFullVersion()) {
|
||||
license = static_cast<int>(eSen_License_Full_Purchased_Title);
|
||||
} else {
|
||||
license = static_cast<int>(eSen_License_Trial_or_Demo);
|
||||
}
|
||||
return license;
|
||||
}
|
||||
|
||||
/*
|
||||
This is intended to capture whether players played using default control scheme
|
||||
or customized the control scheme. Are players customizing your controls?
|
||||
*/
|
||||
int CTelemetryManager::GetDefaultGameControls() {
|
||||
int defaultGameControls = eSen_DefaultGameControls_Undefined;
|
||||
|
||||
// Unused
|
||||
// eSen_DefaultGameControls_Custom_controls
|
||||
|
||||
defaultGameControls = eSen_DefaultGameControls_Default_controls;
|
||||
|
||||
return defaultGameControls;
|
||||
}
|
||||
|
||||
/*
|
||||
Are players changing default audio settings?
|
||||
This is intended to capture whether players are playing with or without volume
|
||||
and whether they make changes from the default audio settings.
|
||||
*/
|
||||
int CTelemetryManager::GetAudioSettings(int userId) {
|
||||
int audioSettings = static_cast<int>(eSen_AudioSettings_Undefined);
|
||||
|
||||
if (userId == ProfileManager.GetPrimaryPad()) {
|
||||
unsigned char volume =
|
||||
app.GetGameSettings(userId, eGameSetting_SoundFXVolume);
|
||||
|
||||
if (volume == 0) {
|
||||
audioSettings = static_cast<int>(eSen_AudioSettings_Off);
|
||||
} else if (volume == DEFAULT_VOLUME_LEVEL) {
|
||||
audioSettings = static_cast<int>(eSen_AudioSettings_On_Default);
|
||||
} else {
|
||||
audioSettings =
|
||||
static_cast<int>(eSen_AudioSettings_On_CustomSetting);
|
||||
}
|
||||
}
|
||||
return audioSettings;
|
||||
}
|
||||
|
||||
/*
|
||||
Refers to the highest level performance metric for your game.
|
||||
For example, a performance metric could points earned, race time, total kills,
|
||||
etc. This is entirely up to you and will help us understand how well the player
|
||||
performed, or how far the player progressed in the level before exiting. How
|
||||
far did users progress before failing/exiting the level?
|
||||
*/
|
||||
int CTelemetryManager::GetLevelExitProgressStat1() {
|
||||
// 4J Stu - Unused
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
Refers to the highest level performance metric for your game.
|
||||
For example, a performance metric could points earned, race time, total kills,
|
||||
etc. This is entirely up to you and will help us understand how well the player
|
||||
performed, or how far the player progressed in the level before exiting. How
|
||||
far did users progress before failing/exiting the level?
|
||||
*/
|
||||
int CTelemetryManager::GetLevelExitProgressStat2() {
|
||||
// 4J Stu - Unused
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1,97 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
// On Linux, the Orbis TelemetryEnum.h is already pulled in via stdafx.h ->
|
||||
// SentientManager.h -> MinecraftTelemetry.h. Using the Windows64 path would
|
||||
// cause duplicate enum definitions.
|
||||
#if defined(__linux__)
|
||||
#include "../../../Linux/Sentient/TelemetryEnum.h"
|
||||
#else
|
||||
#include "../../../Windows64/Source Files/Sentient/TelemetryEnum.h"
|
||||
#endif
|
||||
#include "../UI/All Platforms/UIEnums.h"
|
||||
|
||||
class CTelemetryManager {
|
||||
public:
|
||||
virtual int32_t Init();
|
||||
virtual int32_t Tick();
|
||||
virtual int32_t Flush();
|
||||
|
||||
virtual bool RecordPlayerSessionStart(int iPad);
|
||||
virtual bool RecordPlayerSessionExit(int iPad, int exitStatus);
|
||||
virtual bool RecordHeartBeat(int iPad);
|
||||
virtual bool RecordLevelStart(int iPad, ESen_FriendOrMatch friendsOrMatch,
|
||||
ESen_CompeteOrCoop competeOrCoop,
|
||||
int difficulty, int numberOfLocalPlayers,
|
||||
int numberOfOnlinePlayers);
|
||||
virtual bool RecordLevelExit(int iPad,
|
||||
ESen_LevelExitStatus levelExitStatus);
|
||||
virtual bool RecordLevelSaveOrCheckpoint(int iPad, int saveOrCheckPointID,
|
||||
int saveSizeInBytes);
|
||||
virtual bool RecordLevelResume(int iPad, ESen_FriendOrMatch friendsOrMatch,
|
||||
ESen_CompeteOrCoop competeOrCoop,
|
||||
int difficulty, int numberOfLocalPlayers,
|
||||
int numberOfOnlinePlayers,
|
||||
int saveOrCheckPointID);
|
||||
virtual bool RecordPauseOrInactive(int iPad);
|
||||
virtual bool RecordUnpauseOrActive(int iPad);
|
||||
virtual bool RecordMenuShown(int iPad, EUIScene menuID,
|
||||
int optionalMenuSubID);
|
||||
virtual bool RecordAchievementUnlocked(int iPad, int achievementID,
|
||||
int achievementGamerscore);
|
||||
virtual bool RecordMediaShareUpload(int iPad,
|
||||
ESen_MediaDestination mediaDestination,
|
||||
ESen_MediaType mediaType);
|
||||
virtual bool RecordUpsellPresented(int iPad, ESen_UpsellID upsellId,
|
||||
int marketplaceOfferID);
|
||||
virtual bool RecordUpsellResponded(int iPad, ESen_UpsellID upsellId,
|
||||
int marketplaceOfferID,
|
||||
ESen_UpsellOutcome upsellOutcome);
|
||||
virtual bool RecordPlayerDiedOrFailed(int iPad, int lowResMapX,
|
||||
int lowResMapY, int lowResMapZ,
|
||||
int mapID, int playerWeaponID,
|
||||
int enemyWeaponID,
|
||||
ETelemetryChallenges enemyTypeID);
|
||||
virtual bool RecordEnemyKilledOrOvercome(int iPad, int lowResMapX,
|
||||
int lowResMapY, int lowResMapZ,
|
||||
int mapID, int playerWeaponID,
|
||||
int enemyWeaponID,
|
||||
ETelemetryChallenges enemyTypeID);
|
||||
virtual bool RecordTexturePackLoaded(int iPad, int texturePackId,
|
||||
bool purchased);
|
||||
|
||||
virtual bool RecordSkinChanged(int iPad, int dwSkinId);
|
||||
virtual bool RecordBanLevel(int iPad);
|
||||
virtual bool RecordUnBanLevel(int iPad);
|
||||
|
||||
virtual int GetMultiplayerInstanceID();
|
||||
virtual int GenerateMultiplayerInstanceId();
|
||||
virtual void SetMultiplayerInstanceId(int value);
|
||||
|
||||
protected:
|
||||
float m_initialiseTime;
|
||||
float m_lastHeartbeat;
|
||||
bool m_bFirstFlush;
|
||||
|
||||
float m_fLevelStartTime[XUSER_MAX_COUNT];
|
||||
|
||||
int m_multiplayerInstanceID;
|
||||
int m_levelInstanceID;
|
||||
|
||||
// Helper functions to get the various common settings
|
||||
int GetSecondsSinceInitialize();
|
||||
int GetMode(int userId);
|
||||
int GetSubMode(int userId);
|
||||
int GetLevelId(int userId);
|
||||
int GetSubLevelId(int userId);
|
||||
int GetTitleBuildId();
|
||||
int GetLevelInstanceID();
|
||||
int GetSingleOrMultiplayer();
|
||||
int GetDifficultyLevel(int diff);
|
||||
int GetLicense();
|
||||
int GetDefaultGameControls();
|
||||
int GetAudioSettings(int userId);
|
||||
int GetLevelExitProgressStat1();
|
||||
int GetLevelExitProgressStat2();
|
||||
};
|
||||
|
||||
extern CTelemetryManager* TelemetryManager;
|
||||
|
|
@ -35,16 +35,14 @@ FullTutorial::FullTutorial(int iPad, bool isTrial /*= false*/)
|
|||
new ChoiceTask(this, IDS_TUTORIAL_TASK_OVERVIEW,
|
||||
IDS_TUTORIAL_PROMPT_START_TUTORIAL, true,
|
||||
ACTION_MENU_A, ACTION_MENU_B,
|
||||
e_Tutorial_Completion_Jump_To_Last_Task,
|
||||
eTelemetryTutorial_TrialStart));
|
||||
e_Tutorial_Completion_Jump_To_Last_Task));
|
||||
} else {
|
||||
if (getCompleted(eTutorial_Telemetry_Halfway)) {
|
||||
addTask(e_Tutorial_State_Gameplay,
|
||||
new ChoiceTask(this, IDS_TUTORIAL_TASK_OVERVIEW,
|
||||
IDS_TUTORIAL_PROMPT_START_TUTORIAL, true,
|
||||
ACTION_MENU_A, ACTION_MENU_B,
|
||||
e_Tutorial_Completion_Jump_To_Last_Task,
|
||||
eTelemetryTutorial_TrialStart));
|
||||
e_Tutorial_Completion_Jump_To_Last_Task));
|
||||
} else {
|
||||
addTask(e_Tutorial_State_Gameplay,
|
||||
new InfoTask(this, IDS_TUTORIAL_TASK_OVERVIEW,
|
||||
|
|
@ -182,12 +180,11 @@ FullTutorial::FullTutorial(int iPad, bool isTrial /*= false*/)
|
|||
|
||||
// END OF BASIC TUTORIAL
|
||||
|
||||
addTask(
|
||||
e_Tutorial_State_Gameplay,
|
||||
new ChoiceTask(this, IDS_TUTORIAL_TASK_BASIC_COMPLETE,
|
||||
IDS_TUTORIAL_PROMPT_BASIC_COMPLETE, true, ACTION_MENU_A,
|
||||
ACTION_MENU_B, e_Tutorial_Completion_Jump_To_Last_Task,
|
||||
eTelemetryTutorial_Halfway));
|
||||
addTask(e_Tutorial_State_Gameplay,
|
||||
new ChoiceTask(this, IDS_TUTORIAL_TASK_BASIC_COMPLETE,
|
||||
IDS_TUTORIAL_PROMPT_BASIC_COMPLETE, true,
|
||||
ACTION_MENU_A, ACTION_MENU_B,
|
||||
e_Tutorial_Completion_Jump_To_Last_Task));
|
||||
|
||||
// START OF FULL TUTORIAL
|
||||
|
||||
|
|
@ -286,9 +283,9 @@ FullTutorial::FullTutorial(int iPad, bool isTrial /*= false*/)
|
|||
// of the earlier tasks will skip to the last task when complete, and this
|
||||
// is the one that we want the player to see.
|
||||
ProcedureCompoundTask* finalTask = new ProcedureCompoundTask(this);
|
||||
finalTask->AddTask(new InfoTask(
|
||||
this, IDS_TUTORIAL_COMPLETED, IDS_TUTORIAL_PROMPT_PRESS_A_TO_CONTINUE,
|
||||
true, ACTION_MENU_A, eTelemetryTutorial_Complete));
|
||||
finalTask->AddTask(new InfoTask(this, IDS_TUTORIAL_COMPLETED,
|
||||
IDS_TUTORIAL_PROMPT_PRESS_A_TO_CONTINUE,
|
||||
true, ACTION_MENU_A));
|
||||
// 4J Stu - Remove this string as it refers to things that don't exist in
|
||||
// the current tutorial world!
|
||||
// finalTask->AddTask( new InfoTask(this,
|
||||
|
|
@ -574,8 +571,7 @@ FullTutorial::FullTutorial(int iPad, bool isTrial /*= false*/)
|
|||
this, IDS_TUTORIAL_REDSTONE_OVERVIEW,
|
||||
IDS_TUTORIAL_PROMPT_REDSTONE_OVERVIEW, true, ACTION_MENU_A,
|
||||
ACTION_MENU_B,
|
||||
e_Tutorial_Completion_Complete_State_Gameplay_Constraints,
|
||||
eTelemetryTutorial_Redstone_And_Pistons));
|
||||
e_Tutorial_Completion_Complete_State_Gameplay_Constraints));
|
||||
addTask(e_Tutorial_State_Redstone_And_Piston,
|
||||
new InfoTask(this, IDS_TUTORIAL_TASK_REDSTONE_POWER_SOURCES,
|
||||
IDS_TUTORIAL_PROMPT_PRESS_A_TO_CONTINUE, true,
|
||||
|
|
@ -628,8 +624,7 @@ FullTutorial::FullTutorial(int iPad, bool isTrial /*= false*/)
|
|||
this, IDS_TUTORIAL_PORTAL_OVERVIEW,
|
||||
IDS_TUTORIAL_PROMPT_PORTAL_OVERVIEW, true, ACTION_MENU_A,
|
||||
ACTION_MENU_B,
|
||||
e_Tutorial_Completion_Complete_State_Gameplay_Constraints,
|
||||
eTelemetryTutorial_Portal));
|
||||
e_Tutorial_Completion_Complete_State_Gameplay_Constraints));
|
||||
addTask(e_Tutorial_State_Portal,
|
||||
new InfoTask(this, IDS_TUTORIAL_TASK_BUILD_PORTAL,
|
||||
IDS_TUTORIAL_PROMPT_PRESS_A_TO_CONTINUE, true,
|
||||
|
|
@ -673,8 +668,7 @@ FullTutorial::FullTutorial(int iPad, bool isTrial /*= false*/)
|
|||
new ChoiceTask(this, IDS_TUTORIAL_CREATIVE_OVERVIEW,
|
||||
IDS_TUTORIAL_PROMPT_CREATIVE_OVERVIEW, true,
|
||||
ACTION_MENU_A, ACTION_MENU_B,
|
||||
e_Tutorial_Completion_Jump_To_Last_Task,
|
||||
eTelemetryTutorial_CreativeMode));
|
||||
e_Tutorial_Completion_Jump_To_Last_Task));
|
||||
addTask(e_Tutorial_State_CreativeMode,
|
||||
new InfoTask(this, IDS_TUTORIAL_TASK_CREATIVE_MODE,
|
||||
IDS_TUTORIAL_PROMPT_PRESS_A_TO_CONTINUE, true,
|
||||
|
|
@ -751,8 +745,7 @@ FullTutorial::FullTutorial(int iPad, bool isTrial /*= false*/)
|
|||
this, IDS_TUTORIAL_TASK_BREWING_OVERVIEW,
|
||||
IDS_TUTORIAL_PROMPT_BREWING_OVERVIEW, true, ACTION_MENU_A,
|
||||
ACTION_MENU_B,
|
||||
e_Tutorial_Completion_Complete_State_Gameplay_Constraints,
|
||||
eTelemetryTutorial_Brewing));
|
||||
e_Tutorial_Completion_Complete_State_Gameplay_Constraints));
|
||||
|
||||
ProcedureCompoundTask* fillWaterBottleTask =
|
||||
new ProcedureCompoundTask(this);
|
||||
|
|
@ -815,8 +808,7 @@ FullTutorial::FullTutorial(int iPad, bool isTrial /*= false*/)
|
|||
this, IDS_TUTORIAL_TASK_ENCHANTING_OVERVIEW,
|
||||
IDS_TUTORIAL_PROMPT_ENCHANTING_OVERVIEW, true,
|
||||
ACTION_MENU_A, ACTION_MENU_B,
|
||||
e_Tutorial_Completion_Complete_State_Gameplay_Constraints,
|
||||
eTelemetryTutorial_Enchanting));
|
||||
e_Tutorial_Completion_Complete_State_Gameplay_Constraints));
|
||||
|
||||
addTask(e_Tutorial_State_Enchanting,
|
||||
new InfoTask(this, IDS_TUTORIAL_TASK_ENCHANTING_SUMMARY,
|
||||
|
|
@ -866,8 +858,7 @@ FullTutorial::FullTutorial(int iPad, bool isTrial /*= false*/)
|
|||
this, IDS_TUTORIAL_TASK_ANVIL_OVERVIEW,
|
||||
IDS_TUTORIAL_PROMPT_ANVIL_OVERVIEW, true, ACTION_MENU_A,
|
||||
ACTION_MENU_B,
|
||||
e_Tutorial_Completion_Complete_State_Gameplay_Constraints,
|
||||
eTelemetryTutorial_Anvil));
|
||||
e_Tutorial_Completion_Complete_State_Gameplay_Constraints));
|
||||
|
||||
addTask(e_Tutorial_State_Anvil,
|
||||
new InfoTask(this, IDS_TUTORIAL_TASK_ANVIL_SUMMARY,
|
||||
|
|
@ -916,8 +907,7 @@ FullTutorial::FullTutorial(int iPad, bool isTrial /*= false*/)
|
|||
this, IDS_TUTORIAL_TASK_TRADING_OVERVIEW,
|
||||
IDS_TUTORIAL_PROMPT_TRADING_OVERVIEW, true, ACTION_MENU_A,
|
||||
ACTION_MENU_B,
|
||||
e_Tutorial_Completion_Complete_State_Gameplay_Constraints,
|
||||
eTelemetryTutorial_Trading));
|
||||
e_Tutorial_Completion_Complete_State_Gameplay_Constraints));
|
||||
|
||||
addTask(e_Tutorial_State_Trading,
|
||||
new InfoTask(this, IDS_TUTORIAL_TASK_TRADING_SUMMARY,
|
||||
|
|
@ -965,8 +955,7 @@ FullTutorial::FullTutorial(int iPad, bool isTrial /*= false*/)
|
|||
this, IDS_TUTORIAL_TASK_FIREWORK_OVERVIEW,
|
||||
IDS_TUTORIAL_PROMPT_FIREWORK_OVERVIEW, true, ACTION_MENU_A,
|
||||
ACTION_MENU_B,
|
||||
e_Tutorial_Completion_Complete_State_Gameplay_Constraints,
|
||||
eTelemetryTutorial_Trading));
|
||||
e_Tutorial_Completion_Complete_State_Gameplay_Constraints));
|
||||
|
||||
addTask(e_Tutorial_State_Fireworks,
|
||||
new InfoTask(this, IDS_TUTORIAL_TASK_FIREWORK_PURPOSE,
|
||||
|
|
@ -1003,8 +992,7 @@ FullTutorial::FullTutorial(int iPad, bool isTrial /*= false*/)
|
|||
this, IDS_TUTORIAL_TASK_BEACON_OVERVIEW,
|
||||
IDS_TUTORIAL_PROMPT_BEACON_OVERVIEW, true, ACTION_MENU_A,
|
||||
ACTION_MENU_B,
|
||||
e_Tutorial_Completion_Complete_State_Gameplay_Constraints,
|
||||
eTelemetryTutorial_Beacon));
|
||||
e_Tutorial_Completion_Complete_State_Gameplay_Constraints));
|
||||
|
||||
addTask(e_Tutorial_State_Beacon,
|
||||
new InfoTask(this, IDS_TUTORIAL_TASK_BEACON_PURPOSE,
|
||||
|
|
@ -1041,8 +1029,7 @@ FullTutorial::FullTutorial(int iPad, bool isTrial /*= false*/)
|
|||
this, IDS_TUTORIAL_TASK_HOPPER_OVERVIEW,
|
||||
IDS_TUTORIAL_PROMPT_HOPPER_OVERVIEW, true, ACTION_MENU_A,
|
||||
ACTION_MENU_B,
|
||||
e_Tutorial_Completion_Complete_State_Gameplay_Constraints,
|
||||
eTelemetryTutorial_Hopper));
|
||||
e_Tutorial_Completion_Complete_State_Gameplay_Constraints));
|
||||
|
||||
addTask(e_Tutorial_State_Hopper,
|
||||
new InfoTask(this, IDS_TUTORIAL_TASK_HOPPER_PURPOSE,
|
||||
|
|
@ -1092,8 +1079,7 @@ FullTutorial::FullTutorial(int iPad, bool isTrial /*= false*/)
|
|||
this, IDS_TUTORIAL_TASK_ENDERCHEST_OVERVIEW,
|
||||
IDS_TUTORIAL_PROMPT_ENDERCHEST_OVERVIEW, true,
|
||||
ACTION_MENU_A, ACTION_MENU_B,
|
||||
e_Tutorial_Completion_Complete_State_Gameplay_Constraints,
|
||||
eTelemetryTutorial_Enderchest));
|
||||
e_Tutorial_Completion_Complete_State_Gameplay_Constraints));
|
||||
|
||||
addTask(e_Tutorial_State_Enderchests,
|
||||
new InfoTask(this, IDS_TUTORIAL_TASK_ENDERCHEST_SUMMARY,
|
||||
|
|
@ -1130,8 +1116,7 @@ FullTutorial::FullTutorial(int iPad, bool isTrial /*= false*/)
|
|||
this, IDS_TUTORIAL_FARMING_OVERVIEW,
|
||||
IDS_TUTORIAL_PROMPT_FARMING_OVERVIEW, true, ACTION_MENU_A,
|
||||
ACTION_MENU_B,
|
||||
e_Tutorial_Completion_Complete_State_Gameplay_Constraints,
|
||||
eTelemetryTutorial_Farming));
|
||||
e_Tutorial_Completion_Complete_State_Gameplay_Constraints));
|
||||
|
||||
addTask(e_Tutorial_State_Farming,
|
||||
new InfoTask(this, IDS_TUTORIAL_TASK_FARMING_SEEDS,
|
||||
|
|
@ -1199,8 +1184,7 @@ FullTutorial::FullTutorial(int iPad, bool isTrial /*= false*/)
|
|||
this, IDS_TUTORIAL_BREEDING_OVERVIEW,
|
||||
IDS_TUTORIAL_PROMPT_BREEDING_OVERVIEW, true, ACTION_MENU_A,
|
||||
ACTION_MENU_B,
|
||||
e_Tutorial_Completion_Complete_State_Gameplay_Constraints,
|
||||
eTelemetryTutorial_Breeding));
|
||||
e_Tutorial_Completion_Complete_State_Gameplay_Constraints));
|
||||
|
||||
addTask(e_Tutorial_State_Breeding,
|
||||
new InfoTask(this, IDS_TUTORIAL_TASK_BREEDING_FEED,
|
||||
|
|
@ -1261,8 +1245,7 @@ FullTutorial::FullTutorial(int iPad, bool isTrial /*= false*/)
|
|||
this, IDS_TUTORIAL_GOLEM_OVERVIEW,
|
||||
IDS_TUTORIAL_PROMPT_GOLEM_OVERVIEW, true, ACTION_MENU_A,
|
||||
ACTION_MENU_B,
|
||||
e_Tutorial_Completion_Complete_State_Gameplay_Constraints,
|
||||
eTelemetryTutorial_Golem));
|
||||
e_Tutorial_Completion_Complete_State_Gameplay_Constraints));
|
||||
|
||||
addTask(e_Tutorial_State_Golem,
|
||||
new InfoTask(this, IDS_TUTORIAL_TASK_GOLEM_PUMPKIN,
|
||||
|
|
|
|||
|
|
@ -12,8 +12,7 @@ ChoiceTask::ChoiceTask(
|
|||
Tutorial* tutorial, int descriptionId, int promptId /*= -1*/,
|
||||
bool requiresUserInput /*= false*/, int iConfirmMapping /*= 0*/,
|
||||
int iCancelMapping /*= 0*/,
|
||||
eTutorial_CompletionAction cancelAction /*= e_Tutorial_Completion_None*/,
|
||||
ETelemetryChallenges telemetryEvent /*= eTelemetryTutorial_NoEvent*/)
|
||||
eTutorial_CompletionAction cancelAction /*= e_Tutorial_Completion_None*/)
|
||||
: TutorialTask(tutorial, descriptionId, false, nullptr, true, false,
|
||||
false) {
|
||||
if (requiresUserInput == true) {
|
||||
|
|
@ -29,15 +28,12 @@ ChoiceTask::ChoiceTask(
|
|||
|
||||
m_promptId = promptId;
|
||||
tutorial->addMessage(m_promptId);
|
||||
|
||||
m_eTelemetryEvent = telemetryEvent;
|
||||
}
|
||||
|
||||
bool ChoiceTask::isCompleted() {
|
||||
Minecraft* pMinecraft = Minecraft::GetInstance();
|
||||
|
||||
if (m_bConfirmMappingComplete || m_bCancelMappingComplete) {
|
||||
sendTelemetry();
|
||||
enableConstraints(false, true);
|
||||
return true;
|
||||
}
|
||||
|
|
@ -65,7 +61,6 @@ bool ChoiceTask::isCompleted() {
|
|||
}
|
||||
|
||||
if (m_bConfirmMappingComplete || m_bCancelMappingComplete) {
|
||||
sendTelemetry();
|
||||
enableConstraints(false, true);
|
||||
}
|
||||
return m_bConfirmMappingComplete || m_bCancelMappingComplete;
|
||||
|
|
@ -100,26 +95,3 @@ void ChoiceTask::handleUIInput(int iAction) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ChoiceTask::sendTelemetry() {
|
||||
Minecraft* pMinecraft = Minecraft::GetInstance();
|
||||
|
||||
if (m_eTelemetryEvent != eTelemetryChallenges_Unknown) {
|
||||
bool firstPlay = true;
|
||||
// We only store first play for some of the events
|
||||
switch (m_eTelemetryEvent) {
|
||||
case eTelemetryTutorial_TrialStart:
|
||||
firstPlay =
|
||||
!tutorial->getCompleted(eTutorial_Telemetry_TrialStart);
|
||||
tutorial->setCompleted(eTutorial_Telemetry_TrialStart);
|
||||
break;
|
||||
case eTelemetryTutorial_Halfway:
|
||||
firstPlay =
|
||||
!tutorial->getCompleted(eTutorial_Telemetry_Halfway);
|
||||
tutorial->setCompleted(eTutorial_Telemetry_Halfway);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,8 +10,6 @@ private:
|
|||
bool m_bConfirmMappingComplete, m_bCancelMappingComplete;
|
||||
eTutorial_CompletionAction m_cancelAction;
|
||||
|
||||
ETelemetryChallenges m_eTelemetryEvent;
|
||||
|
||||
bool CompletionMaskIsValid();
|
||||
|
||||
public:
|
||||
|
|
@ -19,14 +17,10 @@ public:
|
|||
Tutorial* tutorial, int descriptionId, int promptId = -1,
|
||||
bool requiresUserInput = false, int iConfirmMapping = 0,
|
||||
int iCancelMapping = 0,
|
||||
eTutorial_CompletionAction cancelAction = e_Tutorial_Completion_None,
|
||||
ETelemetryChallenges telemetryEvent = eTelemetryChallenges_Unknown);
|
||||
eTutorial_CompletionAction cancelAction = e_Tutorial_Completion_None);
|
||||
virtual bool isCompleted();
|
||||
virtual eTutorial_CompletionAction getCompletionAction();
|
||||
virtual int getPromptId();
|
||||
virtual void setAsCurrentTask(bool active = true);
|
||||
virtual void handleUIInput(int iAction);
|
||||
|
||||
private:
|
||||
void sendTelemetry();
|
||||
};
|
||||
|
|
@ -13,11 +13,10 @@ HorseChoiceTask::HorseChoiceTask(Tutorial* tutorial, int iDescHorse,
|
|||
int iDescDonkey, int iDescMule, int iPromptId,
|
||||
bool requiresUserInput, int iConfirmMapping,
|
||||
int iCancelMapping,
|
||||
eTutorial_CompletionAction cancelAction,
|
||||
ETelemetryChallenges telemetryEvent)
|
||||
eTutorial_CompletionAction cancelAction)
|
||||
|
||||
: ChoiceTask(tutorial, -1, iPromptId, requiresUserInput, iConfirmMapping,
|
||||
iCancelMapping, cancelAction, telemetryEvent) {
|
||||
iCancelMapping, cancelAction) {
|
||||
m_eHorseType = -1;
|
||||
m_iDescMule = iDescMule;
|
||||
m_iDescDonkey = iDescDonkey;
|
||||
|
|
|
|||
|
|
@ -14,8 +14,7 @@ public:
|
|||
Tutorial* tutorial, int iDescHorse, int iDescDonkey, int iDescMule,
|
||||
int iPromptId = -1, bool requiresUserInput = false,
|
||||
int iConfirmMapping = 0, int iCancelMapping = 0,
|
||||
eTutorial_CompletionAction cancelAction = e_Tutorial_Completion_None,
|
||||
ETelemetryChallenges telemetryEvent = eTelemetryChallenges_Unknown);
|
||||
eTutorial_CompletionAction cancelAction = e_Tutorial_Completion_None);
|
||||
|
||||
virtual int getDescriptionId();
|
||||
|
||||
|
|
|
|||
|
|
@ -10,8 +10,7 @@
|
|||
|
||||
InfoTask::InfoTask(
|
||||
Tutorial* tutorial, int descriptionId, int promptId /*= -1*/,
|
||||
bool requiresUserInput /*= false*/, int iMapping /*= 0*/,
|
||||
ETelemetryChallenges telemetryEvent /*= eTelemetryTutorial_NoEvent*/)
|
||||
bool requiresUserInput /*= false*/, int iMapping /*= 0*/)
|
||||
: TutorialTask(tutorial, descriptionId, false, nullptr, true, false,
|
||||
false) {
|
||||
if (requiresUserInput == true) {
|
||||
|
|
@ -21,8 +20,6 @@ InfoTask::InfoTask(
|
|||
|
||||
m_promptId = promptId;
|
||||
tutorial->addMessage(m_promptId);
|
||||
|
||||
m_eTelemetryEvent = telemetryEvent;
|
||||
}
|
||||
|
||||
bool InfoTask::isCompleted() {
|
||||
|
|
@ -74,7 +71,6 @@ bool InfoTask::isCompleted() {
|
|||
}
|
||||
|
||||
if (bAllComplete == true) {
|
||||
sendTelemetry();
|
||||
enableConstraints(false, true);
|
||||
}
|
||||
bIsCompleted = bAllComplete;
|
||||
|
|
@ -103,21 +99,3 @@ void InfoTask::handleUIInput(int iAction) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
void InfoTask::sendTelemetry() {
|
||||
Minecraft* pMinecraft = Minecraft::GetInstance();
|
||||
|
||||
if (m_eTelemetryEvent != eTelemetryChallenges_Unknown) {
|
||||
bool firstPlay = true;
|
||||
// We only store first play for some of the events
|
||||
switch (m_eTelemetryEvent) {
|
||||
case eTelemetryTutorial_Complete:
|
||||
firstPlay =
|
||||
!tutorial->getCompleted(eTutorial_Telemetry_Complete);
|
||||
tutorial->setCompleted(eTutorial_Telemetry_Complete);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,20 +8,14 @@ class InfoTask : public TutorialTask {
|
|||
private:
|
||||
std::unordered_map<int, bool> completedMappings;
|
||||
|
||||
ETelemetryChallenges m_eTelemetryEvent;
|
||||
|
||||
bool CompletionMaskIsValid();
|
||||
|
||||
public:
|
||||
InfoTask(
|
||||
Tutorial* tutorial, int descriptionId, int promptId = -1,
|
||||
bool requiresUserInput = false, int iMapping = 0,
|
||||
ETelemetryChallenges telemetryEvent = eTelemetryChallenges_Unknown);
|
||||
bool requiresUserInput = false, int iMapping = 0);
|
||||
virtual bool isCompleted();
|
||||
virtual int getPromptId();
|
||||
virtual void setAsCurrentTask(bool active = true);
|
||||
virtual void handleUIInput(int iAction);
|
||||
|
||||
private:
|
||||
void sendTelemetry();
|
||||
};
|
||||
|
|
@ -1382,8 +1382,7 @@ Tutorial::Tutorial(int iPad, bool isFullTutorial /*= false*/) : m_iPad(iPad) {
|
|||
inventoryOverviewTask->AddTask(new ChoiceTask(
|
||||
this, IDS_TUTORIAL_TASK_INV_OVERVIEW,
|
||||
IDS_TUTORIAL_PROMPT_INV_OVERVIEW, true, ACTION_MENU_A,
|
||||
ACTION_MENU_B, e_Tutorial_Completion_Complete_State,
|
||||
eTelemetryTutorial_Inventory));
|
||||
ACTION_MENU_B, e_Tutorial_Completion_Complete_State));
|
||||
inventoryOverviewTask->AddTask(new InfoTask(
|
||||
this, IDS_TUTORIAL_TASK_INV_PICK_UP,
|
||||
IDS_TUTORIAL_PROMPT_PRESS_A_TO_CONTINUE, true, ACTION_MENU_A));
|
||||
|
|
@ -1412,8 +1411,7 @@ Tutorial::Tutorial(int iPad, bool isFullTutorial /*= false*/) : m_iPad(iPad) {
|
|||
creativeInventoryOverviewTask->AddTask(new ChoiceTask(
|
||||
this, IDS_TUTORIAL_TASK_CREATIVE_INV_OVERVIEW,
|
||||
IDS_TUTORIAL_PROMPT_CREATIVE_INV_OVERVIEW, true, ACTION_MENU_A,
|
||||
ACTION_MENU_B, e_Tutorial_Completion_Complete_State,
|
||||
eTelemetryTutorial_CreativeInventory));
|
||||
ACTION_MENU_B, e_Tutorial_Completion_Complete_State));
|
||||
creativeInventoryOverviewTask->AddTask(new InfoTask(
|
||||
this, IDS_TUTORIAL_TASK_CREATIVE_INV_PICK_UP,
|
||||
IDS_TUTORIAL_PROMPT_PRESS_A_TO_CONTINUE, true, ACTION_MENU_A));
|
||||
|
|
@ -1446,8 +1444,7 @@ Tutorial::Tutorial(int iPad, bool isFullTutorial /*= false*/) : m_iPad(iPad) {
|
|||
craftingOverviewTask->AddTask(new ChoiceTask(
|
||||
this, IDS_TUTORIAL_TASK_CRAFT_OVERVIEW,
|
||||
IDS_TUTORIAL_PROMPT_CRAFT_OVERVIEW, true, ACTION_MENU_A,
|
||||
ACTION_MENU_B, e_Tutorial_Completion_Complete_State,
|
||||
eTelemetryTutorial_Crafting));
|
||||
ACTION_MENU_B, e_Tutorial_Completion_Complete_State));
|
||||
craftingOverviewTask->AddTask(new InfoTask(
|
||||
this, IDS_TUTORIAL_TASK_CRAFT_NAV,
|
||||
IDS_TUTORIAL_PROMPT_PRESS_A_TO_CONTINUE, true, ACTION_MENU_A));
|
||||
|
|
@ -1495,8 +1492,7 @@ Tutorial::Tutorial(int iPad, bool isFullTutorial /*= false*/) : m_iPad(iPad) {
|
|||
furnaceOverviewTask->AddTask(new ChoiceTask(
|
||||
this, IDS_TUTORIAL_TASK_FURNACE_OVERVIEW,
|
||||
IDS_TUTORIAL_PROMPT_FURNACE_OVERVIEW, true, ACTION_MENU_A,
|
||||
ACTION_MENU_B, e_Tutorial_Completion_Complete_State,
|
||||
eTelemetryTutorial_Furnace));
|
||||
ACTION_MENU_B, e_Tutorial_Completion_Complete_State));
|
||||
furnaceOverviewTask->AddTask(new InfoTask(
|
||||
this, IDS_TUTORIAL_TASK_FURNACE_METHOD,
|
||||
IDS_TUTORIAL_PROMPT_PRESS_A_TO_CONTINUE, true, ACTION_MENU_A));
|
||||
|
|
@ -1522,8 +1518,7 @@ Tutorial::Tutorial(int iPad, bool isFullTutorial /*= false*/) : m_iPad(iPad) {
|
|||
brewingOverviewTask->AddTask(new ChoiceTask(
|
||||
this, IDS_TUTORIAL_TASK_BREWING_MENU_OVERVIEW,
|
||||
IDS_TUTORIAL_PROMPT_BREWING_MENU_OVERVIEW, true, ACTION_MENU_A,
|
||||
ACTION_MENU_B, e_Tutorial_Completion_Complete_State,
|
||||
eTelemetryTutorial_BrewingMenu));
|
||||
ACTION_MENU_B, e_Tutorial_Completion_Complete_State));
|
||||
brewingOverviewTask->AddTask(new InfoTask(
|
||||
this, IDS_TUTORIAL_TASK_BREWING_MENU_METHOD,
|
||||
IDS_TUTORIAL_PROMPT_PRESS_A_TO_CONTINUE, true, ACTION_MENU_A));
|
||||
|
|
@ -1552,8 +1547,7 @@ Tutorial::Tutorial(int iPad, bool isFullTutorial /*= false*/) : m_iPad(iPad) {
|
|||
enchantingOverviewTask->AddTask(new ChoiceTask(
|
||||
this, IDS_TUTORIAL_TASK_ENCHANTING_MENU_OVERVIEW,
|
||||
IDS_TUTORIAL_PROMPT_ENCHANTING_MENU_OVERVIEW, true, ACTION_MENU_A,
|
||||
ACTION_MENU_B, e_Tutorial_Completion_Complete_State,
|
||||
eTelemetryTutorial_EnchantingMenu));
|
||||
ACTION_MENU_B, e_Tutorial_Completion_Complete_State));
|
||||
enchantingOverviewTask->AddTask(new InfoTask(
|
||||
this, IDS_TUTORIAL_TASK_ENCHANTING_MENU_START,
|
||||
IDS_TUTORIAL_PROMPT_PRESS_A_TO_CONTINUE, true, ACTION_MENU_A));
|
||||
|
|
@ -1585,8 +1579,7 @@ Tutorial::Tutorial(int iPad, bool isFullTutorial /*= false*/) : m_iPad(iPad) {
|
|||
anvilOverviewTask->AddTask(new ChoiceTask(
|
||||
this, IDS_TUTORIAL_TASK_ANVIL_MENU_OVERVIEW,
|
||||
IDS_TUTORIAL_PROMPT_ANVIL_MENU_OVERVIEW, true, ACTION_MENU_A,
|
||||
ACTION_MENU_B, e_Tutorial_Completion_Complete_State,
|
||||
eTelemetryTutorial_AnvilMenu));
|
||||
ACTION_MENU_B, e_Tutorial_Completion_Complete_State));
|
||||
anvilOverviewTask->AddTask(new InfoTask(
|
||||
this, IDS_TUTORIAL_TASK_ANVIL_MENU_START,
|
||||
IDS_TUTORIAL_PROMPT_PRESS_A_TO_CONTINUE, true, ACTION_MENU_A));
|
||||
|
|
@ -1624,8 +1617,7 @@ Tutorial::Tutorial(int iPad, bool isFullTutorial /*= false*/) : m_iPad(iPad) {
|
|||
tradingOverviewTask->AddTask(new ChoiceTask(
|
||||
this, IDS_TUTORIAL_TASK_TRADING_MENU_OVERVIEW,
|
||||
IDS_TUTORIAL_PROMPT_TRADING_MENU_OVERVIEW, true, ACTION_MENU_A,
|
||||
ACTION_MENU_B, e_Tutorial_Completion_Complete_State,
|
||||
eTelemetryTutorial_TradingMenu));
|
||||
ACTION_MENU_B, e_Tutorial_Completion_Complete_State));
|
||||
tradingOverviewTask->AddTask(new InfoTask(
|
||||
this, IDS_TUTORIAL_TASK_TRADING_MENU_START,
|
||||
IDS_TUTORIAL_PROMPT_PRESS_A_TO_CONTINUE, true, ACTION_MENU_A));
|
||||
|
|
@ -1659,8 +1651,7 @@ Tutorial::Tutorial(int iPad, bool isFullTutorial /*= false*/) : m_iPad(iPad) {
|
|||
IDS_TUTORIAL_TASK_MULE_OVERVIEW,
|
||||
IDS_TUTORIAL_PROMPT_HORSE_OVERVIEW, true, ACTION_MENU_A,
|
||||
ACTION_MENU_B,
|
||||
e_Tutorial_Completion_Complete_State_Gameplay_Constraints,
|
||||
eTelemetryTutorial_Horse));
|
||||
e_Tutorial_Completion_Complete_State_Gameplay_Constraints));
|
||||
|
||||
addTask(e_Tutorial_State_Horse,
|
||||
new InfoTask(this, IDS_TUTORIAL_TASK_HORSE_INTRO,
|
||||
|
|
@ -1716,8 +1707,7 @@ Tutorial::Tutorial(int iPad, bool isFullTutorial /*= false*/) : m_iPad(iPad) {
|
|||
horseMenuTask->AddTask(new ChoiceTask(
|
||||
this, IDS_TUTORIAL_TASK_HORSE_MENU_OVERVIEW,
|
||||
IDS_TUTORIAL_PROMPT_HORSE_MENU_OVERVIEW, true, ACTION_MENU_A,
|
||||
ACTION_MENU_B, e_Tutorial_Completion_Complete_State,
|
||||
eTelemetryTutorial_HorseMenu));
|
||||
ACTION_MENU_B, e_Tutorial_Completion_Complete_State));
|
||||
horseMenuTask->AddTask(new InfoTask(
|
||||
this, IDS_TUTORIAL_TASK_HORSE_MENU_LAYOUT,
|
||||
IDS_TUTORIAL_PROMPT_PRESS_A_TO_CONTINUE, true, ACTION_MENU_A));
|
||||
|
|
@ -1742,8 +1732,7 @@ Tutorial::Tutorial(int iPad, bool isFullTutorial /*= false*/) : m_iPad(iPad) {
|
|||
fireworksMenuTask->AddTask(new ChoiceTask(
|
||||
this, IDS_TUTORIAL_TASK_FIREWORK_MENU_OVERVIEW,
|
||||
IDS_TUTORIAL_PROMPT_FIREWORK_MENU_OVERVIEW, true, ACTION_MENU_A,
|
||||
ACTION_MENU_B, e_Tutorial_Completion_Complete_State,
|
||||
eTelemetryTutorial_FireworksMenu));
|
||||
ACTION_MENU_B, e_Tutorial_Completion_Complete_State));
|
||||
fireworksMenuTask->AddTask(new InfoTask(
|
||||
this, IDS_TUTORIAL_TASK_FIREWORK_MENU_BASIC_START,
|
||||
IDS_TUTORIAL_PROMPT_PRESS_A_TO_CONTINUE, true, ACTION_MENU_A));
|
||||
|
|
@ -1785,8 +1774,7 @@ Tutorial::Tutorial(int iPad, bool isFullTutorial /*= false*/) : m_iPad(iPad) {
|
|||
beaconMenuTask->AddTask(new ChoiceTask(
|
||||
this, IDS_TUTORIAL_TASK_BEACON_MENU_OVERVIEW,
|
||||
IDS_TUTORIAL_PROMPT_BEACON_MENU_OVERVIEW, true, ACTION_MENU_A,
|
||||
ACTION_MENU_B, e_Tutorial_Completion_Complete_State,
|
||||
eTelemetryTutorial_BeaconMenu));
|
||||
ACTION_MENU_B, e_Tutorial_Completion_Complete_State));
|
||||
beaconMenuTask->AddTask(new InfoTask(
|
||||
this, IDS_TUTORIAL_TASK_BEACON_MENU_PRIMARY_POWERS,
|
||||
IDS_TUTORIAL_PROMPT_PRESS_A_TO_CONTINUE, true, ACTION_MENU_A));
|
||||
|
|
@ -1811,8 +1799,7 @@ Tutorial::Tutorial(int iPad, bool isFullTutorial /*= false*/) : m_iPad(iPad) {
|
|||
this, IDS_TUTORIAL_TASK_MINECART_OVERVIEW,
|
||||
IDS_TUTORIAL_PROMPT_MINECART_OVERVIEW, true, ACTION_MENU_A,
|
||||
ACTION_MENU_B,
|
||||
e_Tutorial_Completion_Complete_State_Gameplay_Constraints,
|
||||
eTelemetryTutorial_Minecart));
|
||||
e_Tutorial_Completion_Complete_State_Gameplay_Constraints));
|
||||
addTask(e_Tutorial_State_Riding_Minecart,
|
||||
new InfoTask(this, IDS_TUTORIAL_TASK_MINECART_RAILS,
|
||||
IDS_TUTORIAL_PROMPT_PRESS_A_TO_CONTINUE, true,
|
||||
|
|
@ -1839,8 +1826,7 @@ Tutorial::Tutorial(int iPad, bool isFullTutorial /*= false*/) : m_iPad(iPad) {
|
|||
this, IDS_TUTORIAL_TASK_BOAT_OVERVIEW,
|
||||
IDS_TUTORIAL_PROMPT_BOAT_OVERVIEW, true, ACTION_MENU_A,
|
||||
ACTION_MENU_B,
|
||||
e_Tutorial_Completion_Complete_State_Gameplay_Constraints,
|
||||
eTelemetryTutorial_Boat));
|
||||
e_Tutorial_Completion_Complete_State_Gameplay_Constraints));
|
||||
addTask(e_Tutorial_State_Riding_Boat,
|
||||
new InfoTask(this, IDS_TUTORIAL_TASK_BOAT_STEER,
|
||||
IDS_TUTORIAL_PROMPT_PRESS_A_TO_CONTINUE, true,
|
||||
|
|
@ -1859,8 +1845,7 @@ Tutorial::Tutorial(int iPad, bool isFullTutorial /*= false*/) : m_iPad(iPad) {
|
|||
this, IDS_TUTORIAL_TASK_FISHING_OVERVIEW,
|
||||
IDS_TUTORIAL_PROMPT_FISHING_OVERVIEW, true, ACTION_MENU_A,
|
||||
ACTION_MENU_B,
|
||||
e_Tutorial_Completion_Complete_State_Gameplay_Constraints,
|
||||
eTelemetryTutorial_Fishing));
|
||||
e_Tutorial_Completion_Complete_State_Gameplay_Constraints));
|
||||
addTask(e_Tutorial_State_Fishing,
|
||||
new InfoTask(this, IDS_TUTORIAL_TASK_FISHING_CAST,
|
||||
IDS_TUTORIAL_PROMPT_PRESS_A_TO_CONTINUE, true,
|
||||
|
|
@ -1887,8 +1872,7 @@ Tutorial::Tutorial(int iPad, bool isFullTutorial /*= false*/) : m_iPad(iPad) {
|
|||
this, IDS_TUTORIAL_TASK_BED_OVERVIEW,
|
||||
IDS_TUTORIAL_PROMPT_BED_OVERVIEW, true, ACTION_MENU_A,
|
||||
ACTION_MENU_B,
|
||||
e_Tutorial_Completion_Complete_State_Gameplay_Constraints,
|
||||
eTelemetryTutorial_Bed));
|
||||
e_Tutorial_Completion_Complete_State_Gameplay_Constraints));
|
||||
addTask(e_Tutorial_State_Bed,
|
||||
new InfoTask(this, IDS_TUTORIAL_TASK_BED_PLACEMENT,
|
||||
IDS_TUTORIAL_PROMPT_PRESS_A_TO_CONTINUE, true,
|
||||
|
|
@ -1911,8 +1895,7 @@ Tutorial::Tutorial(int iPad, bool isFullTutorial /*= false*/) : m_iPad(iPad) {
|
|||
this, IDS_TUTORIAL_TASK_FOOD_BAR_OVERVIEW,
|
||||
IDS_TUTORIAL_PROMPT_FOOD_BAR_OVERVIEW, true, ACTION_MENU_A,
|
||||
ACTION_MENU_B,
|
||||
e_Tutorial_Completion_Complete_State_Gameplay_Constraints,
|
||||
eTelemetryTutorial_FoodBar));
|
||||
e_Tutorial_Completion_Complete_State_Gameplay_Constraints));
|
||||
addTask(e_Tutorial_State_Food_Bar,
|
||||
new InfoTask(this, IDS_TUTORIAL_TASK_FOOD_BAR_DEPLETE,
|
||||
IDS_TUTORIAL_PROMPT_PRESS_A_TO_CONTINUE, true,
|
||||
|
|
|
|||
|
|
@ -416,8 +416,6 @@ void IUIScene_PauseMenu::_ExitWorld(void* lpParameter) {
|
|||
}
|
||||
pMinecraft->setLevel(nullptr, exitReasonStringId, nullptr, saveStats);
|
||||
|
||||
TelemetryManager->Flush();
|
||||
|
||||
app.m_gameRules.unloadCurrentGameRules();
|
||||
// app.m_Audio.unloadCurrentAudioDetails();
|
||||
|
||||
|
|
|
|||
|
|
@ -135,7 +135,6 @@ using namespace DirectX;
|
|||
#include "../Common/Source Files/DLC/DLCSkinFile.h"
|
||||
#include "../Common/Source Files/DLC/DLCManager.h"
|
||||
#include "../Common/Source Files/DLC/DLCPack.h"
|
||||
#include "../Common/Source Files/Telemetry/TelemetryManager.h"
|
||||
|
||||
#include "extraX64client.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -133,9 +133,6 @@ void ClientConnection::handleLogin(std::shared_ptr<LoginPacket> packet) {
|
|||
|
||||
if (m_userIndex == ProfileManager.GetPrimaryPad()) {
|
||||
iUserID = m_userIndex;
|
||||
|
||||
TelemetryManager->SetMultiplayerInstanceId(
|
||||
packet->m_multiplayerInstanceId);
|
||||
} else {
|
||||
if (!networkPlayer->IsGuest() && networkPlayer->IsLocal()) {
|
||||
// find the pad number of this local player
|
||||
|
|
|
|||
|
|
@ -277,7 +277,7 @@ void MultiplayerLocalPlayer::clientSideCloseContainer() {
|
|||
}
|
||||
|
||||
void MultiplayerLocalPlayer::hurtTo(float newHealth,
|
||||
ETelemetryChallenges damageSource) {
|
||||
uint8_t damageSource) {
|
||||
if (flashOnSetHealth) {
|
||||
LocalPlayer::hurtTo(newHealth, damageSource);
|
||||
} else {
|
||||
|
|
@ -335,25 +335,6 @@ void MultiplayerLocalPlayer::ride(std::shared_ptr<Entity> e) {
|
|||
input->sneaking = false;
|
||||
}
|
||||
|
||||
if (isRiding) {
|
||||
ETelemetryChallenges eventType = eTelemetryChallenges_Unknown;
|
||||
if (this->riding != nullptr) {
|
||||
switch (riding->GetType()) {
|
||||
case eTYPE_BOAT:
|
||||
eventType = eTelemetryInGame_Ride_Boat;
|
||||
break;
|
||||
case eTYPE_MINECART:
|
||||
eventType = eTelemetryInGame_Ride_Minecart;
|
||||
break;
|
||||
case eTYPE_PIG:
|
||||
eventType = eTelemetryInGame_Ride_Pig;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
updateRichPresence();
|
||||
|
||||
Minecraft* pMinecraft = Minecraft::GetInstance();
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ protected:
|
|||
public:
|
||||
virtual void closeContainer();
|
||||
void clientSideCloseContainer();
|
||||
virtual void hurtTo(float newHealth, ETelemetryChallenges damageSource);
|
||||
virtual void hurtTo(float newHealth, uint8_t damageSource);
|
||||
virtual void awardStat(Stat* stat, const std::vector<uint8_t>& param);
|
||||
void awardStatFromServer(Stat* stat, std::vector<uint8_t>& param);
|
||||
void onUpdateAbilities();
|
||||
|
|
|
|||
|
|
@ -753,7 +753,7 @@ void LocalPlayer::chat(const std::wstring& message) {}
|
|||
|
||||
bool LocalPlayer::isSneaking() { return input->sneaking && !m_isSleeping; }
|
||||
|
||||
void LocalPlayer::hurtTo(float newHealth, ETelemetryChallenges damageSource) {
|
||||
void LocalPlayer::hurtTo(float newHealth, uint8_t damageSource) {
|
||||
float dmg = getHealth() - newHealth;
|
||||
if (dmg <= 0) {
|
||||
setHealth(newHealth);
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ public:
|
|||
virtual void chat(const std::wstring& message);
|
||||
virtual bool isSneaking();
|
||||
// virtual bool isIdle();
|
||||
virtual void hurtTo(float newHealth, ETelemetryChallenges damageSource);
|
||||
virtual void hurtTo(float newHealth, uint8_t damageSource);
|
||||
virtual void respawn();
|
||||
virtual void animateRespawn();
|
||||
virtual void displayClientMessage(int messageId);
|
||||
|
|
|
|||
|
|
@ -48,7 +48,6 @@
|
|||
#include "commands/ServerCommandDispatcher.h"
|
||||
#include "Minecraft.World/net/minecraft/world/level/biome/BiomeSource.h"
|
||||
#include "level/PlayerChunkMap.h"
|
||||
#include "../../../Common/Source Files/Telemetry/TelemetryManager.h"
|
||||
|
||||
#define DEBUG_SERVER_DONT_SPAWN_MOBS 0
|
||||
|
||||
|
|
|
|||
|
|
@ -221,8 +221,9 @@ void PlayerList::placeNewPlayer(Connection* connection,
|
|||
level->getSeed(), player->gameMode->getGameModeForPlayer()->getId(),
|
||||
(uint8_t)level->dimension->id, (uint8_t)level->getMaxBuildHeight(),
|
||||
(uint8_t)getMaxPlayers(), level->difficulty,
|
||||
TelemetryManager->GetMultiplayerInstanceID(), (uint8_t)playerIndex,
|
||||
level->useNewSeaLevel(), player->getAllPlayerGamePrivileges(),
|
||||
0 /*TelemetryManager->GetMultiplayerInstanceID()*/,
|
||||
(uint8_t)playerIndex, level->useNewSeaLevel(),
|
||||
player->getAllPlayerGamePrivileges(),
|
||||
level->getLevelData()->getXZSize(),
|
||||
level->getLevelData()->getHellScale())));
|
||||
playerConnection->send(std::shared_ptr<SetSpawnPositionPacket>(
|
||||
|
|
|
|||
|
|
@ -657,101 +657,8 @@ bool ServerPlayer::hurt(DamageSource* dmgSource, float dmg) {
|
|||
}
|
||||
}
|
||||
}
|
||||
bool returnVal = Player::hurt(dmgSource, dmg);
|
||||
|
||||
if (returnVal) {
|
||||
// 4J Stu - Work out the source of this damage for telemetry
|
||||
m_lastDamageSource = eTelemetryChallenges_Unknown;
|
||||
|
||||
if (dmgSource == DamageSource::fall)
|
||||
m_lastDamageSource = eTelemetryPlayerDeathSource_Fall;
|
||||
else if (dmgSource == DamageSource::onFire ||
|
||||
dmgSource == DamageSource::inFire)
|
||||
m_lastDamageSource = eTelemetryPlayerDeathSource_Fire;
|
||||
else if (dmgSource == DamageSource::lava)
|
||||
m_lastDamageSource = eTelemetryPlayerDeathSource_Lava;
|
||||
else if (dmgSource == DamageSource::drown)
|
||||
m_lastDamageSource = eTelemetryPlayerDeathSource_Water;
|
||||
else if (dmgSource == DamageSource::inWall)
|
||||
m_lastDamageSource = eTelemetryPlayerDeathSource_Suffocate;
|
||||
else if (dmgSource == DamageSource::outOfWorld)
|
||||
m_lastDamageSource = eTelemetryPlayerDeathSource_OutOfWorld;
|
||||
else if (dmgSource == DamageSource::cactus)
|
||||
m_lastDamageSource = eTelemetryPlayerDeathSource_Cactus;
|
||||
else {
|
||||
std::shared_ptr<Entity> source = dmgSource->getEntity();
|
||||
if (source != nullptr) {
|
||||
switch (source->GetType()) {
|
||||
case eTYPE_PLAYER:
|
||||
case eTYPE_SERVERPLAYER:
|
||||
m_lastDamageSource =
|
||||
eTelemetryPlayerDeathSource_Player_Weapon;
|
||||
break;
|
||||
case eTYPE_WOLF:
|
||||
m_lastDamageSource = eTelemetryPlayerDeathSource_Wolf;
|
||||
break;
|
||||
case eTYPE_CREEPER:
|
||||
m_lastDamageSource =
|
||||
eTelemetryPlayerDeathSource_Explosion_Creeper;
|
||||
break;
|
||||
case eTYPE_SKELETON:
|
||||
m_lastDamageSource =
|
||||
eTelemetryPlayerDeathSource_Skeleton;
|
||||
break;
|
||||
case eTYPE_SPIDER:
|
||||
m_lastDamageSource = eTelemetryPlayerDeathSource_Spider;
|
||||
break;
|
||||
case eTYPE_ZOMBIE:
|
||||
m_lastDamageSource = eTelemetryPlayerDeathSource_Zombie;
|
||||
break;
|
||||
case eTYPE_PIGZOMBIE:
|
||||
m_lastDamageSource =
|
||||
eTelemetryPlayerDeathSource_ZombiePigman;
|
||||
break;
|
||||
case eTYPE_GHAST:
|
||||
m_lastDamageSource = eTelemetryPlayerDeathSource_Ghast;
|
||||
break;
|
||||
case eTYPE_SLIME:
|
||||
m_lastDamageSource = eTelemetryPlayerDeathSource_Slime;
|
||||
break;
|
||||
case eTYPE_PRIMEDTNT:
|
||||
m_lastDamageSource =
|
||||
eTelemetryPlayerDeathSource_Explosion_Tnt;
|
||||
break;
|
||||
case eTYPE_ARROW:
|
||||
if ((std::dynamic_pointer_cast<Arrow>(source))->owner !=
|
||||
nullptr) {
|
||||
std::shared_ptr<Entity> attacker =
|
||||
(std::dynamic_pointer_cast<Arrow>(source))
|
||||
->owner;
|
||||
if (attacker != nullptr) {
|
||||
switch (attacker->GetType()) {
|
||||
case eTYPE_SKELETON:
|
||||
m_lastDamageSource =
|
||||
eTelemetryPlayerDeathSource_Skeleton;
|
||||
break;
|
||||
case eTYPE_PLAYER:
|
||||
case eTYPE_SERVERPLAYER:
|
||||
m_lastDamageSource =
|
||||
eTelemetryPlayerDeathSource_Player_Arrow;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case eTYPE_FIREBALL:
|
||||
m_lastDamageSource = eTelemetryPlayerDeathSource_Ghast;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
};
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
return returnVal;
|
||||
return Player::hurt(dmgSource, dmg);
|
||||
}
|
||||
|
||||
bool ServerPlayer::canHarmPlayer(std::shared_ptr<Player> target) {
|
||||
|
|
|
|||
|
|
@ -201,5 +201,6 @@ public:
|
|||
protected:
|
||||
// 4J Added to record telemetry of player deaths, this should store the last
|
||||
// source of damage
|
||||
ETelemetryChallenges m_lastDamageSource;
|
||||
// 4jcraft: fuck you 4J
|
||||
uint8_t m_lastDamageSource;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -111,5 +111,4 @@ void MemSect(int sect);
|
|||
#include "Minecraft.Client/Common/Potion_Macros.h"
|
||||
#include "Minecraft.Client/Common/Source Files/Console_Debug_enum.h"
|
||||
#include "Minecraft.Client/Common/Source Files/GameRules/ConsoleGameRulesConstants.h"
|
||||
#include "Minecraft.Client/Common/Source Files/GameRules/ConsoleGameRules.h"
|
||||
#include "Minecraft.Client/Common/Source Files/Telemetry/TelemetryManager.h"
|
||||
#include "Minecraft.Client/Common/Source Files/GameRules/ConsoleGameRules.h"
|
||||
|
|
@ -9,11 +9,11 @@ SetHealthPacket::SetHealthPacket() {
|
|||
this->food = 0;
|
||||
this->saturation = 0;
|
||||
|
||||
this->damageSource = eTelemetryChallenges_Unknown;
|
||||
this->damageSource = 0; // 4jcraft: previously eTelemetryChallenges_Unknown
|
||||
}
|
||||
|
||||
SetHealthPacket::SetHealthPacket(float health, int food, float saturation,
|
||||
ETelemetryChallenges damageSource) {
|
||||
uint8_t damageSource) {
|
||||
this->health = health;
|
||||
this->food = food;
|
||||
this->saturation = saturation;
|
||||
|
|
@ -27,9 +27,8 @@ void SetHealthPacket::read(DataInputStream* dis) // throws IOException
|
|||
health = dis->readFloat();
|
||||
food = dis->readShort();
|
||||
saturation = dis->readFloat();
|
||||
// exhaustion = dis.readFloat();
|
||||
|
||||
damageSource = (ETelemetryChallenges)dis->readByte();
|
||||
damageSource = (uint8_t)dis->readByte();
|
||||
}
|
||||
|
||||
void SetHealthPacket::write(DataOutputStream* dos) // throws IOException
|
||||
|
|
@ -37,7 +36,6 @@ void SetHealthPacket::write(DataOutputStream* dos) // throws IOException
|
|||
dos->writeFloat(health);
|
||||
dos->writeShort(food);
|
||||
dos->writeFloat(saturation);
|
||||
// dos.writeFloat(exhaustion);
|
||||
|
||||
dos->writeByte(damageSource);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
|
||||
#include "Packet.h"
|
||||
|
||||
class SetHealthPacket : public Packet,
|
||||
|
|
@ -9,11 +12,11 @@ public:
|
|||
int food;
|
||||
float saturation;
|
||||
|
||||
ETelemetryChallenges damageSource; // 4J Added
|
||||
uint8_t damageSource; // 4J Added
|
||||
|
||||
SetHealthPacket();
|
||||
SetHealthPacket(float health, int food, float saturation,
|
||||
ETelemetryChallenges damageSource);
|
||||
uint8_t damageSource);
|
||||
|
||||
virtual void read(DataInputStream* dis);
|
||||
virtual void write(DataOutputStream* dos);
|
||||
|
|
|
|||
Loading…
Reference in a new issue