Initial Academy support

Support for the Academy's Nano system is complete, but they're not being
saved to the DB yet.
This commit is contained in:
2020-11-25 23:36:30 +01:00
committed by Gent S
parent 49158360ca
commit a99f95d15f
11 changed files with 4993 additions and 10 deletions

View File

@@ -458,15 +458,17 @@ void MissionManager::updateFusionMatter(CNSocket* sock, int fusion) {
if (plr->level >= 36)
return;
// don't give the Blossom nano mission until the player's in the Past
if (plr->level == 4 && plr->PCStyle2.iPayzoneFlag == 0)
return;
// TODO: lower the player's FM immediately on level up in the Academy
#ifndef ACADEMY
// check if it is enough for the nano mission
int fmNano = AvatarGrowth[plr->level]["m_iReqBlob_NanoCreate"];
if (plr->fusionmatter < fmNano)
return;
// don't give the Blossom nano mission until the player's in the Past
if (plr->level == 4 && plr->PCStyle2.iPayzoneFlag == 0)
return;
// check if the nano task is already started
for (int i = 0; i < ACTIVE_MISSION_COUNT; i++) {
TaskData& task = *Tasks[plr->tasks[i]];
@@ -480,6 +482,7 @@ void MissionManager::updateFusionMatter(CNSocket* sock, int fusion) {
INITSTRUCT(sP_FE2CL_REP_PC_TASK_START_SUCC, response);
response.iTaskNum = AvatarGrowth[plr->level]["m_iNanoQuestTaskID"];
sock->sendPacket((void*)&response, P_FE2CL_REP_PC_TASK_START_SUCC, sizeof(sP_FE2CL_REP_PC_TASK_START_SUCC));
#endif
// play the beam animation for other players
INITSTRUCT(sP_FE2CL_PC_EVENT, bcast);