]>
Commit | Line | Data |
---|---|---|
fadef98f | 1 | #ifndef __GS__FIGHTGL_H__\r |
2 | #define __GS__FIGHTGL_H__\r | |
3 | \r | |
4 | #include <GameServ/GameLayer/GameObjects/PlayerGO.h>\r | |
5 | #include <GameServ/GameLayer/GameObjects/MonsterGO.h>\r | |
6 | using GameServ::GameLayer::GameObjects::PlayerGO;\r | |
7 | using GameServ::GameLayer::GameObjects::MonsterGO;\r | |
8 | \r | |
9 | #include <GameServ/DataLayer/IPlayerDAO.h>\r | |
10 | using GameServ::DataLayer::DataAccessObjects::IPlayerDAO;\r | |
11 | \r | |
12 | \r | |
13 | #include <boost/smart_ptr/shared_ptr.hpp>\r | |
14 | using boost::shared_ptr;\r | |
15 | \r | |
16 | #include <string>\r | |
17 | using std::string;\r | |
18 | \r | |
19 | namespace GameServ { namespace GameLayer {\r | |
20 | \r | |
21 | class FightGL\r | |
22 | {\r | |
23 | public:\r | |
24 | FightGL();\r | |
25 | ~FightGL();\r | |
26 | \r | |
27 | unsigned int PlayerAttackMonster(shared_ptr<PlayerGO> spPlayer, shared_ptr<MonsterGO> spMonster);\r | |
28 | unsigned int MonsterAttackPlayer(shared_ptr<MonsterGO> spMonster, shared_ptr<PlayerGO> spPlayer);\r | |
29 | \r | |
30 | unsigned int PlayerAttackPlayer(shared_ptr<PlayerGO> spPlayerAttacker, shared_ptr<PlayerGO> spPlayerDefender);\r | |
31 | \r | |
32 | \r | |
33 | private:\r | |
34 | \r | |
35 | unsigned int CalculateAttack(unsigned int strength, unsigned int defense);\r | |
36 | void Initialize();\r | |
37 | shared_ptr<IPlayerDAO> mspPlayerDAO;\r | |
38 | };\r | |
39 | \r | |
40 | }}\r | |
41 | \r | |
42 | #endif |