Fix css style order when using external css files
[ryzomcore.git] / ryzom / client / src / client_sheets / item_fx_sheet.h
blobf19edfa3f2890fdee93f573a1da530e2d343ea03
1 // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
2 // Copyright (C) 2010 Winch Gate Property Limited
3 //
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU Affero General Public License as
6 // published by the Free Software Foundation, either version 3 of the
7 // License, or (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU Affero General Public License for more details.
14 // You should have received a copy of the GNU Affero General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
19 #ifndef RY_ITEM_FX_SHEET_H
20 #define RY_ITEM_FX_SHEET_H
22 namespace NLGEORGES
24 class UFormElm;
27 /**
28 * FX linked to an item
29 * \author Nicolas Vizerie
30 * \author Nevrax France
31 * \date 2003
33 class CItemFXSheet
35 public:
36 float TrailMinSliceTime; // slice time for shortest trail
37 float TrailMaxSliceTime; // slice time for longest trail
38 NLMISC::CVector AttackFXOffset; // offset applied to the attack fx (some fxs are used for several kinds of guns, and need to be offseted differently)
39 NLMISC::CVector AttackFXRot; // rotation around y axe for attack fxs (in degrees)
40 float ImpactFXDelay;
41 // ctor
42 CItemFXSheet();
43 // build that an external script
44 void build(const NLGEORGES::UFormElm &item, const std::string &prefix);
45 void serial(NLMISC::IStream &f);
46 // access to string ids values
47 const char *getTrail() const;
48 const char *getAdvantageFX() const;
49 const char *getAttackFX() const;
50 // static fxs
51 uint getNumStaticFX() const { return (uint)_StaticFXs.size(); }
52 const char *getStaticFXName(uint index) const;
53 const char *getStaticFXBone(uint index) const;
54 const NLMISC::CVector &getStaticFXOffset(uint index) const;
55 private:
56 class CStaticFX
58 public:
59 NLMISC::TSStringId Name;
60 NLMISC::TSStringId Bone;
61 NLMISC::CVector Offset;
62 public:
63 CStaticFX() : Offset(NLMISC::CVector::Null)
66 void build(const NLGEORGES::UFormElm &item);
67 void serial(NLMISC::IStream &f);
69 NLMISC::TSStringId _Trail; // a trail that is displayed when the item is used to attack
70 NLMISC::TSStringId _AdvantageFX; // fx to played on some items when the player master it
71 NLMISC::TSStringId _AttackFX; // fx to trigger when the item is used to attack
72 std::vector<CStaticFX> _StaticFXs;
80 #endif