YAPOG
0.0.1
Yet Another Pokemon Online Game
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
DestroyObjectMapEventAction.cpp
Go to the documentation of this file.
1
#include "
YAPOG/Game/World/Map/DestroyObjectMapEventAction.hpp
"
2
#include "
YAPOG/Game/World/Map/IPlayer.hpp
"
3
#include "
YAPOG/Game/World/Map/MapEventArgs.hpp
"
4
5
namespace
yap
6
{
7
DestroyObjectMapEventAction::DestroyObjectMapEventAction
()
8
:
BaseMapEventAction
()
9
, targetWorldID_ ()
10
{
11
}
12
13
DestroyObjectMapEventAction::~DestroyObjectMapEventAction
()
14
{
15
}
16
17
DestroyObjectMapEventAction::DestroyObjectMapEventAction
(
18
const
DestroyObjectMapEventAction
& copy)
19
:
BaseMapEventAction
(copy)
20
, targetWorldID_ (copy.targetWorldID_)
21
{
22
}
23
24
DestroyObjectMapEventAction
*
DestroyObjectMapEventAction::Clone
()
const
25
{
26
return
new
DestroyObjectMapEventAction
(*
this
);
27
}
28
29
void
DestroyObjectMapEventAction::SetTargetWorldID
(
const
ID
& targetWorldID)
30
{
31
targetWorldID_
= targetWorldID;
32
}
33
34
void
DestroyObjectMapEventAction::VisitPlayer
(
IPlayer
& visitable)
35
{
36
BaseMapEventAction::VisitPlayer
(visitable);
37
38
switch
(
GetContextType
())
39
{
40
case
MapEventActionType::In
:
41
43
if
(visitable.
HasInput
(
GameInputType::MapAction
))
44
{
45
visitable.
DestroyObject
(
targetWorldID_
);
46
GetArgs
().
AbortEvents
(
true
);
47
}
48
49
break
;
50
51
default
:
break
;
52
}
53
}
54
}
// namespace yap
YAPOG
src
YAPOG
Game
World
Map
DestroyObjectMapEventAction.cpp
Generated on Mon Sep 17 2012 22:24:25 for YAPOG by
1.8.1.1