Togu
Advanced OT User
In items.cpp, on function Items:: parseItemNode, I've add:
Note: The item description works too if using abilities.specialSkills[SPECIALSKILL_CRITICALHITAMOUNT] = pugi::cast<int32_t>(valueAttribute.value());
In items.xml, I've add 2 new attributes for critical hits:
On the server, items are showing the right description:
23:13 You see a magic sword (Atk:48, Def:35 +3, critical hit chance +100%, critical extra damage +100%).
On the console there isn't any error.
But nothing happens when equiping (it didn't update the special skills values on the skill window) and when attacking monsters (the damage still the same, didn't see any critical attack effect).
I've take a look in the amazon armor that gives +3 distance. All configurations I did for critical is the same as the case for the skill distance increment, look (I used "find all references" from Visual Studio to check that):
One of the things I want to do is to make two-handed weapons with a permanently change for the critical chance and critical damage value.
What should I do?
C++:
case ITEM_PARSE_CRITICALHITCHANCE: {
it.abilities->specialSkills[SPECIALSKILL_CRITICALHITCHANCE] = pugi::cast<int32_t>(valueAttribute.value());
break;
}
case ITEM_PARSE_CRITICALHITAMOUNT: {
it.abilities->specialSkills[SPECIALSKILL_CRITICALHITAMOUNT] = pugi::cast<int32_t>(valueAttribute.value());
break;
}
In items.xml, I've add 2 new attributes for critical hits:
XML:
<item id="2400" article="a" name="magic sword">
<attribute key="description" value="It's the Sword of Valor." />
<attribute key="weight" value="4200" />
<attribute key="defense" value="35" />
<attribute key="attack" value="48" />
<attribute key="weaponType" value="sword" />
<attribute key="extradef" value="3" />
<attribute key="criticalhitchance" value="100" />
<attribute key="criticalhitamount" value="100" />
</item>
On the server, items are showing the right description:
23:13 You see a magic sword (Atk:48, Def:35 +3, critical hit chance +100%, critical extra damage +100%).
On the console there isn't any error.
But nothing happens when equiping (it didn't update the special skills values on the skill window) and when attacking monsters (the damage still the same, didn't see any critical attack effect).
I've take a look in the amazon armor that gives +3 distance. All configurations I did for critical is the same as the case for the skill distance increment, look (I used "find all references" from Visual Studio to check that):
Code:
{"skilldist", ITEM_PARSE_SKILLDIST},
{"skillfish", ITEM_PARSE_SKILLFISH},
{"skillshield", ITEM_PARSE_SKILLSHIELD},
{"skillfist", ITEM_PARSE_SKILLFIST},
{"maxhitpoints", ITEM_PARSE_MAXHITPOINTS},
{"maxhitpointspercent", ITEM_PARSE_MAXHITPOINTSPERCENT},
{"maxmanapoints", ITEM_PARSE_MAXMANAPOINTS},
{"maxmanapointspercent", ITEM_PARSE_MAXMANAPOINTSPERCENT},
{"magicpoints", ITEM_PARSE_MAGICPOINTS},
{"magiclevelpoints", ITEM_PARSE_MAGICPOINTS},
{"magicpointspercent", ITEM_PARSE_MAGICPOINTSPERCENT},
{"criticalhitchance", ITEM_PARSE_CRITICALHITCHANCE},
{"criticalhitamount", ITEM_PARSE_CRITICALHITAMOUNT}
Code:
ITEM_PARSE_SKILLDIST,
ITEM_PARSE_SKILLFISH,
ITEM_PARSE_SKILLSHIELD,
ITEM_PARSE_SKILLFIST,
ITEM_PARSE_MAXHITPOINTS,
ITEM_PARSE_MAXHITPOINTSPERCENT,
ITEM_PARSE_MAXMANAPOINTS,
ITEM_PARSE_MAXMANAPOINTSPERCENT,
ITEM_PARSE_MAGICPOINTS,
ITEM_PARSE_MAGICPOINTSPERCENT,
ITEM_PARSE_CRITICALHITCHANCE,
ITEM_PARSE_CRITICALHITAMOUNT,
One of the things I want to do is to make two-handed weapons with a permanently change for the critical chance and critical damage value.
What should I do?