1
0
forked from metin2/server

Database now runs on linux

This commit is contained in:
2022-03-05 19:59:39 +02:00
parent f4f90b2533
commit 90ef09c331
131 changed files with 467 additions and 446 deletions

View File

@@ -312,8 +312,8 @@ bool CClientManager::InitializeMobTable()
TMobTable *tempTable = it_map_mobTable->second;
mob_table->dwVnum = tempTable->dwVnum;
strlcpy(mob_table->szName, tempTable->szName, sizeof(tempTable->szName));
strlcpy(mob_table->szLocaleName, tempTable->szLocaleName, sizeof(tempTable->szName));
strncpy(mob_table->szName, tempTable->szName, sizeof(tempTable->szName));
strncpy(mob_table->szLocaleName, tempTable->szLocaleName, sizeof(tempTable->szName));
mob_table->bRank = tempTable->bRank;
mob_table->bType = tempTable->bType;
mob_table->bBattleType = tempTable->bBattleType;
@@ -323,7 +323,7 @@ bool CClientManager::InitializeMobTable()
mob_table->dwRaceFlag = tempTable->dwRaceFlag;
mob_table->dwImmuneFlag = tempTable->dwImmuneFlag;
mob_table->bEmpire = tempTable->bEmpire;
strlcpy(mob_table->szFolder, tempTable->szFolder, sizeof(tempTable->szName));
strncpy(mob_table->szFolder, tempTable->szFolder, sizeof(tempTable->szName));
mob_table->bOnClickType = tempTable->bOnClickType;
mob_table->bStr = tempTable->bStr;
mob_table->bDex = tempTable->bDex;
@@ -545,12 +545,12 @@ bool CClientManager::InitializeQuestItemTable()
str_to_number(tbl.dwVnum, row[col++]);
if (row[col])
strlcpy(tbl.szName, row[col], sizeof(tbl.szName));
strncpy(tbl.szName, row[col], sizeof(tbl.szName));
col++;
if (row[col])
strlcpy(tbl.szLocaleName, row[col], sizeof(tbl.szLocaleName));
strncpy(tbl.szLocaleName, row[col], sizeof(tbl.szLocaleName));
col++;
@@ -724,8 +724,8 @@ bool CClientManager::InitializeItemTable()
TItemTable *tempTable = it_map_itemTable->second;
item_table->dwVnum = tempTable->dwVnum;
strlcpy(item_table->szName, tempTable->szName, sizeof(item_table->szName));
strlcpy(item_table->szLocaleName, tempTable->szLocaleName, sizeof(item_table->szLocaleName));
strncpy(item_table->szName, tempTable->szName, sizeof(item_table->szName));
strncpy(item_table->szLocaleName, tempTable->szLocaleName, sizeof(item_table->szLocaleName));
item_table->bType = tempTable->bType;
item_table->bSubType = tempTable->bSubType;
item_table->bSize = tempTable->bSize;
@@ -888,33 +888,33 @@ bool CClientManager::InitializeSkillTable()
col = 0;
str_to_number(t.dwVnum, data[col++]);
strlcpy(t.szName, data[col++], sizeof(t.szName));
strncpy(t.szName, data[col++], sizeof(t.szName));
str_to_number(t.bType, data[col++]);
str_to_number(t.bMaxLevel, data[col++]);
str_to_number(t.dwSplashRange, data[col++]);
strlcpy(t.szPointOn, data[col++], sizeof(t.szPointOn));
strlcpy(t.szPointPoly, data[col++], sizeof(t.szPointPoly));
strlcpy(t.szSPCostPoly, data[col++], sizeof(t.szSPCostPoly));
strlcpy(t.szDurationPoly, data[col++], sizeof(t.szDurationPoly));
strlcpy(t.szDurationSPCostPoly, data[col++], sizeof(t.szDurationSPCostPoly));
strlcpy(t.szCooldownPoly, data[col++], sizeof(t.szCooldownPoly));
strlcpy(t.szMasterBonusPoly, data[col++], sizeof(t.szMasterBonusPoly));
strncpy(t.szPointOn, data[col++], sizeof(t.szPointOn));
strncpy(t.szPointPoly, data[col++], sizeof(t.szPointPoly));
strncpy(t.szSPCostPoly, data[col++], sizeof(t.szSPCostPoly));
strncpy(t.szDurationPoly, data[col++], sizeof(t.szDurationPoly));
strncpy(t.szDurationSPCostPoly, data[col++], sizeof(t.szDurationSPCostPoly));
strncpy(t.szCooldownPoly, data[col++], sizeof(t.szCooldownPoly));
strncpy(t.szMasterBonusPoly, data[col++], sizeof(t.szMasterBonusPoly));
str_to_number(t.dwFlag, data[col++]);
str_to_number(t.dwAffectFlag, data[col++]);
strlcpy(t.szPointOn2, data[col++], sizeof(t.szPointOn2));
strlcpy(t.szPointPoly2, data[col++], sizeof(t.szPointPoly2));
strlcpy(t.szDurationPoly2, data[col++], sizeof(t.szDurationPoly2));
strncpy(t.szPointOn2, data[col++], sizeof(t.szPointOn2));
strncpy(t.szPointPoly2, data[col++], sizeof(t.szPointPoly2));
strncpy(t.szDurationPoly2, data[col++], sizeof(t.szDurationPoly2));
str_to_number(t.dwAffectFlag2, data[col++]);
// ADD_GRANDMASTER_SKILL
strlcpy(t.szPointOn3, data[col++], sizeof(t.szPointOn3));
strlcpy(t.szPointPoly3, data[col++], sizeof(t.szPointPoly3));
strlcpy(t.szDurationPoly3, data[col++], sizeof(t.szDurationPoly3));
strncpy(t.szPointOn3, data[col++], sizeof(t.szPointOn3));
strncpy(t.szPointPoly3, data[col++], sizeof(t.szPointPoly3));
strncpy(t.szDurationPoly3, data[col++], sizeof(t.szDurationPoly3));
strlcpy(t.szGrandMasterAddSPCostPoly, data[col++], sizeof(t.szGrandMasterAddSPCostPoly));
strncpy(t.szGrandMasterAddSPCostPoly, data[col++], sizeof(t.szGrandMasterAddSPCostPoly));
// END_OF_ADD_GRANDMASTER_SKILL
str_to_number(t.bLevelStep, data[col++]);
@@ -924,7 +924,7 @@ bool CClientManager::InitializeSkillTable()
str_to_number(t.lMaxHit, data[col++]);
strlcpy(t.szSplashAroundDamageAdjustPoly, data[col++], sizeof(t.szSplashAroundDamageAdjustPoly));
strncpy(t.szSplashAroundDamageAdjustPoly, data[col++], sizeof(t.szSplashAroundDamageAdjustPoly));
str_to_number(t.bSkillAttrType, data[col++]);
str_to_number(t.dwTargetRange, data[col++]);
@@ -956,7 +956,7 @@ bool CClientManager::InitializeBanwordTable()
if (data[0])
{
strlcpy(t.szWord, data[0], sizeof(t.szWord));
strncpy(t.szWord, data[0], sizeof(t.szWord));
m_vec_banwordTable.push_back(t);
}
}
@@ -999,7 +999,7 @@ bool CClientManager::InitializeItemAttrTable()
int col = 0;
strlcpy(t.szApply, data[col++], sizeof(t.szApply));
strncpy(t.szApply, data[col++], sizeof(t.szApply));
str_to_number(t.dwApplyIndex, data[col++]);
str_to_number(t.dwProb, data[col++]);
str_to_number(t.lValues[0], data[col++]);
@@ -1073,7 +1073,7 @@ bool CClientManager::InitializeItemRareTable()
int col = 0;
strlcpy(t.szApply, data[col++], sizeof(t.szApply));
strncpy(t.szApply, data[col++], sizeof(t.szApply));
str_to_number(t.dwApplyIndex, data[col++]);
str_to_number(t.dwProb, data[col++]);
str_to_number(t.lValues[0], data[col++]);
@@ -1178,7 +1178,7 @@ void parse_pair_number_string(const char * c_pszString, std::vector<std::pair<in
{
if (isnhdigit(*t))
{
strlcpy(szNum, t, MIN(sizeof(szNum), (p-t)+1));
strncpy(szNum, t, MIN(sizeof(szNum), (p-t)+1));
comma = strchr(szNum, ',');
@@ -1200,7 +1200,7 @@ void parse_pair_number_string(const char * c_pszString, std::vector<std::pair<in
if (isnhdigit(*t))
{
strlcpy(szNum, t, sizeof(szNum));
strncpy(szNum, t, sizeof(szNum));
comma = strchr(const_cast<char*>(t), ',');