long double g_OrgSpeedBySRCME[2][30][2][2][4];
//----- (0000000000821924) ----------------------------------------------------
long double __fastcall CPCParamDB::GetOrgSpeed(
CPCParamDB *this,
unsigned int sex,
unsigned int clstype,
unsigned int mt,
EnvType env,
RaceType race)
{
__int64 v6; // r11
__int64 v7; // rdx
RaceType v8; // r8d
v6 = (int)sex;
if ( sex > 1 || clstype > 0xC0 || mt > 1 || (unsigned int)env > ENV_HOVER )
{
CLog::Add(
&Log,
LOG_ERROR,
(wchar_t *)L"[%s][%d] Some parameter is invalid sex[%d] clstype[%d] movetype[%d] envtype[%d]",
L"pc_param.cpp",
1528,
sex,
clstype,
mt,
env);
return 0.0;
}
else
{
v7 = (int)clstype;
if ( (unsigned int)(*((_DWORD *)&stru_C69320 + (int)clstype + 1048580) - 4) <= 1 )
v8 = race;
else
v8 = *((_DWORD *)&stru_C69028 + (int)clstype + 1048578);
return g_OrgSpeedBySRCME[v6][v8][*((int *)&stru_C69618 + v7 + 1048582)][mt][env];
}
}
void __fastcall User::SetOrgSpeed(
User *this,
int *nOrgSpeed0,
int *nOrgSpeed1,
int *nOrgSpeed2,
int *nOrgSpeed3,
int *nOrgSpeed4,
int *nOrgSpeed5,
int *nOrgSpeed6,
int *nOrgSpeed7)
{
CNPC *m_pPolymorphNPC; // rdx
const PetDataSheet::Record *v14; // rax
*nOrgSpeed0 = (int)CPCParamDB::GetOrgSpeed(
&g_PCParamDB,
this->m_data->m_Sex,
this->m_data->m_nClass,
1u,
ENV_GROUND,
this->m_data->m_Race);
*nOrgSpeed1 = (int)CPCParamDB::GetOrgSpeed(
&g_PCParamDB,
this->m_data->m_Sex,
this->m_data->m_nClass,
0,
ENV_GROUND,
this->m_data->m_Race);
*nOrgSpeed2 = (int)CPCParamDB::GetOrgSpeed(
&g_PCParamDB,
this->m_data->m_Sex,
this->m_data->m_nClass,
1u,
ENV_UNDERWATER,
this->m_data->m_Race);
*nOrgSpeed3 = (int)CPCParamDB::GetOrgSpeed(
&g_PCParamDB,
this->m_data->m_Sex,
this->m_data->m_nClass,
0,
ENV_UNDERWATER,
this->m_data->m_Race);
*nOrgSpeed4 = (int)CPCParamDB::GetOrgSpeed(
&g_PCParamDB,
this->m_data->m_Sex,
this->m_data->m_nClass,
1u,
ENV_HOVER,
this->m_data->m_Race);
*nOrgSpeed5 = (int)CPCParamDB::GetOrgSpeed(
&g_PCParamDB,
this->m_data->m_Sex,
this->m_data->m_nClass,
0,
ENV_HOVER,
this->m_data->m_Race);
*nOrgSpeed6 = (int)CPCParamDB::GetOrgSpeed(
&g_PCParamDB,
this->m_data->m_Sex,
this->m_data->m_nClass,
1u,
ENV_AIR,
this->m_data->m_Race);
*nOrgSpeed7 = (int)CPCParamDB::GetOrgSpeed(
&g_PCParamDB,
this->m_data->m_Sex,
this->m_data->m_nClass,
0,
ENV_AIR,
this->m_data->m_Race);
m_pPolymorphNPC = this->m_pPolymorphNPC;
if ( m_pPolymorphNPC )
{
*nOrgSpeed0 = m_pPolymorphNPC->m_pClassConst->m_SpeedByME[1][0];
*nOrgSpeed1 = m_pPolymorphNPC->m_pClassConst->m_SpeedByME[0][0];
*nOrgSpeed2 = m_pPolymorphNPC->m_pClassConst->m_SpeedByME[1][1];
*nOrgSpeed3 = m_pPolymorphNPC->m_pClassConst->m_SpeedByME[0][1];
*nOrgSpeed4 = m_pPolymorphNPC->m_pClassConst->m_SpeedByME[1][3];
*nOrgSpeed5 = m_pPolymorphNPC->m_pClassConst->m_SpeedByME[0][3];
*nOrgSpeed6 = m_pPolymorphNPC->m_pClassConst->m_SpeedByME[1][2];
*nOrgSpeed7 = m_pPolymorphNPC->m_pClassConst->m_SpeedByME[0][2];
}
if ( this->IsRiding(this) )
{
v14 = CCommonRidingInfo::Record(&this->m_pStriderInfo->m_commonInfo);
*nOrgSpeed0 = v14->mSpeedOnRide[1][0];
*nOrgSpeed1 = v14->mSpeedOnRide[0][0];
*nOrgSpeed2 = v14->mSpeedOnRide[1][1];
*nOrgSpeed3 = v14->mSpeedOnRide[0][1];
*nOrgSpeed4 = v14->mSpeedOnRide[1][3];
*nOrgSpeed5 = v14->mSpeedOnRide[0][3];
*nOrgSpeed6 = v14->mSpeedOnRide[1][2];
*nOrgSpeed7 = v14->mSpeedOnRide[0][2];
}
if ( User::IsTransformedExceptModeChange(this) )
{
*nOrgSpeed0 = (int)this->m_transform->m_commonData->orgSpeed[1][0];
*nOrgSpeed1 = (int)this->m_transform->m_commonData->orgSpeed[0][0];
*nOrgSpeed2 = (int)this->m_transform->m_commonData->orgSpeed[1][1];
*nOrgSpeed3 = (int)this->m_transform->m_commonData->orgSpeed[0][1];
*nOrgSpeed4 = (int)this->m_transform->m_commonData->orgSpeed[1][3];
*nOrgSpeed5 = (int)this->m_transform->m_commonData->orgSpeed[0][3];
*nOrgSpeed6 = (int)this->m_transform->m_commonData->orgSpeed[1][2];
*nOrgSpeed7 = (int)this->m_transform->m_commonData->orgSpeed[0][2];
}
}