how to i write this in rarityitem.inc?
i tryed with that but is not working , world server crash
Any help ? , thanks.
Code:
BOOL CProject::LoadRarityProp()
{
CScript s;
if (!s.Load("RarityItem.inc"))
return FALSE;
for (int i = 0; i < 4; i++)
{
s.GetToken();
int nMax = s.GetNumber();
s.GetToken(); // {
for (int y = 0; y < nMax; y++)
{
int nDestParam = s.GetNumber();
int nRarity = s.GetNumber();
//Error("[%d]: nDestParam: %d, nRarity: %d", i, nDestParam, nRarity);
switch (i)
{
case 0:
m_map_Rarity1.insert(MAP_RARITY1::value_type(nDestParam, nRarity)); break;
case 1:
m_map_Rarity2.insert(MAP_RARITY2::value_type(nDestParam, nRarity)); break;
case 2:
m_map_Rarity3.insert(MAP_RARITY3::value_type(nDestParam, nRarity)); break;
case 3:
m_map_Rarity4.insert(MAP_RARITY4::value_type(nDestParam, nRarity)); break;
}
}
s.GetToken();
}
return TRUE;
}
Code:
SNOX1 9
{
DST_STAT_ALLUP 16
DST_STR 16
DST_STA 16
DST_DEX 16
DST_INT 16
DST_CHR_CHANCECRITICAL 50
DST_CRITICAL_BONUS 50
DST_SPELL_RATE 5
DST_SPEED 5
}