mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-30 04:40:53 +00:00
Changed: #142 Replace atoi and sscanf by fromString when it's possible
This commit is contained in:
parent
24874b0356
commit
c1073c4dd1
2 changed files with 6 additions and 3 deletions
|
@ -4686,12 +4686,14 @@ NLMISC_COMMAND(regenTickRange, "Emulate regen tick range locally for a memory sl
|
|||
{
|
||||
if (args.size() != 1 && args.size() != 2) return false;
|
||||
CSPhraseManager *pPM = CSPhraseManager::getInstance();
|
||||
const CSPhraseCom &phrase = pPM->getPhrase(atoi(args[0].c_str()));
|
||||
uint32 phraseId;
|
||||
NLMISC::fromString(args[0], phraseId);
|
||||
const CSPhraseCom &phrase = pPM->getPhrase(phraseId);
|
||||
uint64 powerBitField = CSPhraseManager::getPhraseRequiredFlags(phrase);
|
||||
TGameCycle duration;
|
||||
if (args.size() >= 2)
|
||||
{
|
||||
duration = (TGameCycle) atoi(args[1].c_str());
|
||||
NLMISC::fromString(args[1], duration);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -486,7 +486,8 @@ NLMISC_COMMAND(queryMissionGiverData, "Query mission giver data for the specifie
|
|||
{
|
||||
if (args.size() == 0)
|
||||
return false;
|
||||
uint32 alias = atoi(args[0].c_str());
|
||||
uint32 alias;
|
||||
NLMISC::fromString(args[0], alias);
|
||||
|
||||
CNPCIconCache::getInstance().queryMissionGiverData(alias);
|
||||
//giver.setDescTransient();
|
||||
|
|
Loading…
Reference in a new issue