]> jfr.im git - irc/gameservirc.git/blob - gameserv-2.0/libgameservgldl/include/GameServ/GameLayer/FightGL.h
Revisited GameServ 2.0 and got it compiling in VS 2010!
[irc/gameservirc.git] / gameserv-2.0 / libgameservgldl / include / GameServ / GameLayer / FightGL.h
1 #ifndef __GS__FIGHTGL_H__
2 #define __GS__FIGHTGL_H__
3
4 #include <GameServ/GameLayer/GameObjects/PlayerGO.h>
5 #include <GameServ/GameLayer/GameObjects/MonsterGO.h>
6 using GameServ::GameLayer::GameObjects::PlayerGO;
7 using GameServ::GameLayer::GameObjects::MonsterGO;
8
9 #include <GameServ/DataLayer/IPlayerDAO.h>
10 using GameServ::DataLayer::DataAccessObjects::IPlayerDAO;
11
12
13 #include <boost/smart_ptr/shared_ptr.hpp>
14
15 #include <string>
16 using std::string;
17
18 namespace GameServ { namespace GameLayer {
19
20 class FightGL
21 {
22 public:
23 FightGL();
24 ~FightGL();
25
26 unsigned int PlayerAttackMonster(boost::shared_ptr<PlayerGO> spPlayer, boost::shared_ptr<MonsterGO> spMonster);
27 unsigned int MonsterAttackPlayer(boost::shared_ptr<MonsterGO> spMonster, boost::shared_ptr<PlayerGO> spPlayer);
28
29 unsigned int PlayerAttackPlayer(boost::shared_ptr<PlayerGO> spPlayerAttacker, boost::shared_ptr<PlayerGO> spPlayerDefender);
30
31
32 private:
33
34 unsigned int CalculateAttack(unsigned int strength, unsigned int defense);
35 void Initialize();
36 boost::shared_ptr<IPlayerDAO> mspPlayerDAO;
37 };
38
39 }}
40
41 #endif