
Originally Posted by
๖̶̶̶ۣۜYyZz
SpecItem is the same file as Propitem.txt, just with another name.
You won't need to change the name of the file in order to edit it. Just do as you normally would.
And that's where you're wrong. Spec_Item has alot more fields (or columns if you like) than propItem. Pls do some research before bs all over the place, giving people false info. Cheers.
i found this one i only change Spec_Item to PropItem then i can work with PropItem?
Again, it depends what exactly you want to do with this; If you want to work with new Spec_Item.txt but only rename it to something else, then you only need to change this:
Code:
#ifdef __NEW_PROP_PARAMETER
else if( scanner.Token == "propItem" )
{
scanner.GetToken();
LoadPropItem( "Spec_Item.txt", &m_aPropItem );
OnAfterLoadPropItem();
}
#else // __NEW_PROP_PARAMETER
else if( scanner.Token == "propItem" )
{
scanner.GetToken();
LoadPropItem( "propItem.txt", &m_aPropItem );
OnAfterLoadPropItem();
}
#endif // __NEW_PROP_PARAMETER
To this:
Code:
#ifdef __NEW_PROP_PARAMETER
else if( scanner.Token == "propItem" )
{
scanner.GetToken();
LoadPropItem( "propItem.txt", &m_aPropItem );
OnAfterLoadPropItem();
}
#else // __NEW_PROP_PARAMETER
else if( scanner.Token == "propItem" )
{
scanner.GetToken();
LoadPropItem( "propItem.txt", &m_aPropItem );
OnAfterLoadPropItem();
}
#endif // __NEW_PROP_PARAMETER
It looks like you've got some source that can support either of them (old OR new).
If you want to work with the OLD propItem.txt (no extra fields included), just go to every VersionCommon.h in which it was defined (probably all of them: AccountServer, CACHESERVER, CORESERVER, databaseserver, LOGINSERVER, Neuz and WORLDSERVER) and change this:
Code:
#define __NEW_PROP_PARAMETER
to this:
Code:
//#define __NEW_PROP_PARAMETER
Because if you look at the code you posted, if __NEW_PROP_PARAMETER is defined, it will support the new Spec_Item.txt, but if it is NOT defined, it will support the old propItem.txt.
Like this:
Code:
#ifdef __NEW_PROP_PARAMETER
else if( scanner.Token == "propItem" )
{
scanner.GetToken();
LoadPropItem( "Spec_Item.txt", &m_aPropItem );
OnAfterLoadPropItem();
}
#else // __NEW_PROP_PARAMETER
else if( scanner.Token == "propItem" )
{
scanner.GetToken();
LoadPropItem( "propItem.txt", &m_aPropItem );
OnAfterLoadPropItem();
}
#endif // __NEW_PROP_PARAMETER
If __NEW_PROP_PARAMETER in VersionCommon.h is defined ("#define __NEW_PROP_PARAMETER"), the bit in green will be compiled, however if __NEW_PROP_PARAMETER is NOT defined or is commented out ("//#define __NEW_PROP_PARAMETER") , the bit in blue will be compiled instead. Obviously __NEW_PROP_PARAMETER stretches all over the place, among different files, but this is just an example how it works. Bottom line, if you use propItem.txt, you will work with less features.
Note that when you comment it out in VersionCommon, you will not only rename it, but it will read the old propItem, so you can't just rename Spec_Item.txt file to propItem.txt or you will get errors.
Do you understand it now?