1 |
|
|
/* |
2 |
|
|
* The ManaPlus Client |
3 |
|
|
* Copyright (C) 2004-2009 The Mana World Development Team |
4 |
|
|
* Copyright (C) 2009-2010 The Mana Developers |
5 |
|
|
* Copyright (C) 2011-2019 The ManaPlus Developers |
6 |
|
|
* |
7 |
|
|
* This file is part of The ManaPlus Client. |
8 |
|
|
* |
9 |
|
|
* This program is free software; you can redistribute it and/or modify |
10 |
|
|
* it under the terms of the GNU General Public License as published by |
11 |
|
|
* the Free Software Foundation; either version 2 of the License, or |
12 |
|
|
* any later version. |
13 |
|
|
* |
14 |
|
|
* This program is distributed in the hope that it will be useful, |
15 |
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
16 |
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
17 |
|
|
* GNU General Public License for more details. |
18 |
|
|
* |
19 |
|
|
* You should have received a copy of the GNU General Public License |
20 |
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
21 |
|
|
*/ |
22 |
|
|
|
23 |
|
|
#ifndef RESOURCES_ATTACK_H |
24 |
|
|
#define RESOURCES_ATTACK_H |
25 |
|
|
|
26 |
|
|
#include "resources/missileinfo.h" |
27 |
|
|
|
28 |
|
5 |
struct Attack final |
29 |
|
|
{ |
30 |
|
|
std::string mAction; |
31 |
|
|
std::string mSkyAction; |
32 |
|
|
std::string mWaterAction; |
33 |
|
|
std::string mRideAction; |
34 |
|
|
int mEffectId; |
35 |
|
|
int mHitEffectId; |
36 |
|
|
int mCriticalHitEffectId; |
37 |
|
|
int mMissEffectId; |
38 |
|
|
MissileInfo mMissile; |
39 |
|
|
|
40 |
|
1 |
Attack(const std::string &action, |
41 |
|
|
const std::string &skyAction, |
42 |
|
|
const std::string &waterAction, |
43 |
|
|
const std::string &rideAction, |
44 |
|
|
const int effectId, |
45 |
|
|
const int hitEffectId, |
46 |
|
|
const int criticalHitEffectId, |
47 |
|
|
const int missEffectId, |
48 |
|
|
const std::string &missileParticle, |
49 |
|
|
const float missileZ, |
50 |
|
|
const float missileSpeed, |
51 |
|
|
const float missileDieDistance, |
52 |
|
1 |
const int missileLifeTime) : |
53 |
|
|
mAction(action), |
54 |
|
|
mSkyAction(skyAction), |
55 |
|
|
mWaterAction(waterAction), |
56 |
|
|
mRideAction(rideAction), |
57 |
|
|
mEffectId(effectId), |
58 |
|
|
mHitEffectId(hitEffectId), |
59 |
|
|
mCriticalHitEffectId(criticalHitEffectId), |
60 |
|
|
mMissEffectId(missEffectId), |
61 |
|
6 |
mMissile() |
62 |
|
|
{ |
63 |
|
2 |
mMissile.particle = missileParticle; |
64 |
|
1 |
mMissile.z = missileZ; |
65 |
|
1 |
mMissile.speed = missileSpeed; |
66 |
|
1 |
mMissile.dieDistance = missileDieDistance; |
67 |
|
1 |
mMissile.lifeTime = missileLifeTime; |
68 |
|
1 |
} |
69 |
|
|
|
70 |
|
|
A_DELETE_COPY(Attack) |
71 |
|
|
}; |
72 |
|
|
|
73 |
|
|
#endif // RESOURCES_ATTACK_H |