From 8ea20d3e1f61bcfeccf6885e11cacddeb014fe0f Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 14 Aug 2016 19:25:00 +0300 Subject: Add skill cast type option in skills window. Can be changed, but for now unused. --- src/resources/skill/skillinfo.cpp | 11 ++++++----- src/resources/skill/skillinfo.h | 5 ++++- 2 files changed, 10 insertions(+), 6 deletions(-) (limited to 'src/resources') diff --git a/src/resources/skill/skillinfo.cpp b/src/resources/skill/skillinfo.cpp index 9c81219d5..45106ab95 100644 --- a/src/resources/skill/skillinfo.cpp +++ b/src/resources/skill/skillinfo.cpp @@ -46,7 +46,7 @@ SkillInfo::SkillInfo() : model(nullptr), data(nullptr), level(0), - selectedLevel(0), + customSelectedLevel(0), skillLevelWidth(0), id(0), range(0), @@ -56,6 +56,7 @@ SkillInfo::SkillInfo() : cooldown(0), type(SkillType::Unknown), owner(SkillOwner::Player), + customCastType(CastType::Default), modifiable(Modifiable_false), visible(Visible_false), alwaysVisible(Visible_false), @@ -95,7 +96,7 @@ void SkillInfo::update() } else { - if (!selectedLevel) + if (!customSelectedLevel) { // TRANSLATORS: skill level skillLevel = strprintf(_("Lvl: %d"), baseLevel); @@ -104,7 +105,7 @@ void SkillInfo::update() { // TRANSLATORS: skill level skillLevel = strprintf(_("Lvl: %d / %d"), - selectedLevel, + customSelectedLevel, baseLevel); } } @@ -153,8 +154,8 @@ void SkillInfo::update() } level = baseLevel; - if (selectedLevel > level) - selectedLevel = level; + if (customSelectedLevel > level) + customSelectedLevel = level; skillLevelWidth = -1; diff --git a/src/resources/skill/skillinfo.h b/src/resources/skill/skillinfo.h index a9554b1b9..b49d79e2c 100644 --- a/src/resources/skill/skillinfo.h +++ b/src/resources/skill/skillinfo.h @@ -29,6 +29,8 @@ #include "enums/resources/skillowner.h" #include "enums/resources/skilltype.h" +#include "enums/resources/skill/casttype.h" + #include #include #include @@ -57,7 +59,7 @@ struct SkillInfo final SkillModel *model; SkillData *data; int level; - int selectedLevel; + int customSelectedLevel; int skillLevelWidth; unsigned int id; int range; @@ -67,6 +69,7 @@ struct SkillInfo final int cooldown; SkillType::SkillType type; SkillOwner::Type owner; + CastTypeT customCastType; Modifiable modifiable; Visible visible; Visible alwaysVisible; -- cgit v1.2.3-70-g09d2