Proper code with e
Example values and description:
Code:
if (version >= 1094) {
for (int i = 10; i < 16; i++) {
msg.add<uint16_t>(i); // this is value to display
msg.add<uint16_t>(15); // this is 'base' value,
// if lower then skill then text color is green
// if equal to skill then text color is gray [default for skills]
// if higher then skill then text color is red
}
}
There are 6 new skills, so enum should be:
Code:
enum skillsStats_t : uint8_t {
SKILL_CRITICAL_HIT_CHANCE = 0,
SKILL_CRITICAL_HIT_DAMAGE = 1,
SKILL_LIFE_LEECH_CHANCE = 2,
SKILL_LIFE_LEECH_AMOUNT = 3,
SKILL_MANA_LEECH_CHANCE = 4,
SKILL_MANA_LEECH_AMOUNT = 5,
SKILL_STATS_FIRST = SKILL_CRITICAL_HIT_CHANCE,
SKILL_STATS_LAST = SKILL_MANA_LEECH_AMOUNT
};
Of course you should use enum that is already in engine.. 'stats_t', so it will work fine with movements equip/deequip without many modifications.
EDIT
I wrote 'leech and crit' [mana/hp, messages, animations] for TFS 1.1... 120 lines of code, modified only 6 files. I wrote it for someone, so sorry.. I cannot share code.
EDIT 2
I fixed all bugs in my 'leech and crit' [proper messages, item description] for TFS 1.1... 310 lines of code, modified 16 files.