Merge remote-tracking branch 'origin/ryzom/sheets' into atys

storyline/s2e1
Ulukyn 5 years ago
commit 58a731628b

@ -353,6 +353,27 @@ void CSBrickSheet::build (const NLGEORGES::UFormElm &root)
listSkill.clear();
splitString(skillReqStr," ",listSkill);
// build the req skill array
RequiredOneOfSkills.clear();
RequiredOneOfSkills.reserve(listSkill.size()/2);
for(i=0;i<listSkill.size()/2;i++)
{
CSkillValue sv;
sv.Skill= SKILLS::toSkill(listSkill[i*2]);
fromString(listSkill[i*2+1], sv.Value);
// keep only whats work
if(sv.Skill!=SKILLS::unknown)
{
RequiredOneOfSkills.push_back(sv);
}
}
// parse the sheet str
skillReqStr.clear();
TRANSLATE_VAL(skillReqStr, "Basics.LearnRequiresSkills");
while(strFindReplace(skillReqStr, ":", " "));
listSkill.clear();
splitString(skillReqStr," ",listSkill);
// build the req skill array
RequiredSkills.clear();
RequiredSkills.reserve(listSkill.size()/2);
for(i=0;i<listSkill.size()/2;i++)

@ -236,7 +236,10 @@ public:
// The Action Nature
ACTNATURE::TActionNature ActionNature;
// For Progression, the required skill
// For Progression, the required skills (at least one)
std::vector<CSkillValue> RequiredOneOfSkills;
// For Progression, the required skills (all of them)
std::vector<CSkillValue> RequiredSkills;
// For Progression, the required Bricks
@ -384,6 +387,8 @@ public:
s.serialEnum(ActionNature);
s.serialCont(RequiredOneOfSkills);
s.serialCont(RequiredSkills);
s.serialCont(RequiredBricks);

@ -3697,12 +3697,20 @@ void CSPhraseManager::computePhraseProgression()
CReqSkillFormula brickFormula;
// get all its required Skill
for(uint j=0;j<brick->RequiredOneOfSkills.size();j++)
{
CSkillValue sv;
sv.Skill= brick->RequiredOneOfSkills[j].Skill;
sv.Value= brick->RequiredOneOfSkills[j].Value;
brickFormula.orV(sv);
}
for(uint j=0;j<brick->RequiredSkills.size();j++)
{
CSkillValue sv;
sv.Skill= brick->RequiredSkills[j].Skill;
sv.Value= brick->RequiredSkills[j].Value;
brickFormula.orV(sv);
brickFormula.andV(sv);
}
// if not empty

@ -113,7 +113,7 @@ CTypeVersion TypeVersion [] =
CTypeVersion("world", 1),
CTypeVersion("weather_function_params", 2),
CTypeVersion("mission_icon", 0),
CTypeVersion("sbrick", 32),
CTypeVersion("sbrick", 33),
CTypeVersion("sphrase", 4),
CTypeVersion("skill_tree", 5),
CTypeVersion("titles", 1),

Loading…
Cancel
Save