////////////////////////////////////////////////////////////////////////////// // This file is part of the Journey MMORPG client // // Copyright © 2015-2016 Daniel Allendorf // // // // This program is free software: you can redistribute it and/or modify // // it under the terms of the GNU Affero General Public License as // // published by the Free Software Foundation, either version 3 of the // // License, or (at your option) 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 Affero General Public License for more details. // // // // You should have received a copy of the GNU Affero General Public License // // along with this program. If not, see . // ////////////////////////////////////////////////////////////////////////////// #pragma once #include "ItemData.h" #include "../Graphics/Animation.h" namespace jrc { // Information about a bullet type item. class BulletData : public Cache { public: // Returns wether the bullet was loaded correctly. bool is_valid() const; // Returns wether the bullet was loaded correctly. explicit operator bool() const; // Returns the watk increase when using this bullet. int16_t get_watk() const; // Returns the bullet animation. const Animation& get_animation() const; // Returns the general item data. const ItemData& get_itemdata() const; private: // Allow the cache to use the constructor. friend Cache; // Load a bullet from the game files. BulletData(int32_t id); const ItemData& itemdata; Animation bullet; int16_t watk; }; }