From c958cb619f667851b188b8c169d0fcb14500f6de Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 20 Sep 2014 17:37:05 +0300 Subject: Into skillinto add owner field. --- src/CMakeLists.txt | 1 + src/Makefile.am | 1 + src/gui/widgets/skillinfo.cpp | 1 + src/gui/widgets/skillinfo.h | 2 ++ src/resources/skillowner.h | 35 +++++++++++++++++++++++++++++++++++ 5 files changed, 40 insertions(+) create mode 100644 src/resources/skillowner.h diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 1ad004200..64df67770 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -660,6 +660,7 @@ SET(SRCS resources/sdlmusic.cpp resources/sdlmusic.h resources/skillconsts.h + resources/skillowner.h resources/skilltype.h resources/db/sounddb.cpp resources/db/sounddb.h diff --git a/src/Makefile.am b/src/Makefile.am index 7168f01cd..ab50ef03a 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -783,6 +783,7 @@ manaplus_SOURCES += gui/widgets/avatarlistbox.cpp \ resources/sdlmusic.cpp \ resources/sdlmusic.h \ resources/skillconsts.h \ + resources/skillowner.h \ resources/skilltype.h \ resources/db/sounddb.cpp \ resources/db/sounddb.h \ diff --git a/src/gui/widgets/skillinfo.cpp b/src/gui/widgets/skillinfo.cpp index 63849ac20..514555631 100644 --- a/src/gui/widgets/skillinfo.cpp +++ b/src/gui/widgets/skillinfo.cpp @@ -54,6 +54,7 @@ SkillInfo::SkillInfo() : durationTime(0), cooldown(0), type(SkillType::Unknown), + owner(SkillOwner::Player), modifiable(false), visible(false) { diff --git a/src/gui/widgets/skillinfo.h b/src/gui/widgets/skillinfo.h index 439608c17..d15d0fe97 100644 --- a/src/gui/widgets/skillinfo.h +++ b/src/gui/widgets/skillinfo.h @@ -25,6 +25,7 @@ #include "gui/color.h" +#include "resources/skillowner.h" #include "resources/skilltype.h" #include @@ -61,6 +62,7 @@ struct SkillInfo final int durationTime; int cooldown; SkillType::SkillType type; + SkillOwner::Type owner; bool modifiable; bool visible; diff --git a/src/resources/skillowner.h b/src/resources/skillowner.h new file mode 100644 index 000000000..f80291fdd --- /dev/null +++ b/src/resources/skillowner.h @@ -0,0 +1,35 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef RESOURCES_SKILLOWNER_H +#define RESOURCES_SKILLOWNER_H + +namespace SkillOwner +{ + enum Type + { + Player = 0, + Mercenary = 1, + Homunculus = 2 + }; + +}; + +#endif // RESOURCES_SKILLOWNER_H -- cgit v1.2.3-70-g09d2