YAPOG
0.0.1
Yet Another Pokemon Online Game
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
WarpMapEventAction.cpp
Go to the documentation of this file.
1
#include "
YAPOG/Game/World/Map/WarpMapEventAction.hpp
"
2
#include "
YAPOG/Game/World/Map/IPlayer.hpp
"
3
#include "
YAPOG/Game/World/Map/MapEventArgs.hpp
"
4
5
#include "
YAPOG/System/IO/Log/DebugLogger.hpp
"
6
namespace
yap
7
{
8
WarpMapEventAction::WarpMapEventAction
(
9
const
ID
& mapWorldID,
10
const
Vector2
& mapPoint)
11
:
BaseMapEventAction
()
12
, mapWorldID_ (mapWorldID)
13
, mapPoint_ (mapPoint)
14
{
15
}
16
17
WarpMapEventAction::~WarpMapEventAction
()
18
{
19
}
20
21
WarpMapEventAction::WarpMapEventAction
(
const
WarpMapEventAction
& copy)
22
:
BaseMapEventAction
(copy)
23
, mapWorldID_ (copy.mapWorldID_)
24
, mapPoint_ (copy.mapPoint_)
25
{
26
}
27
28
WarpMapEventAction
*
WarpMapEventAction::Clone
()
const
29
{
30
return
new
WarpMapEventAction
(*
this
);
31
}
32
33
void
WarpMapEventAction::VisitPlayer
(
IPlayer
& visitable)
34
{
35
switch
(
GetContextType
())
36
{
37
case
MapEventActionType::Enter
:
38
39
GetArgs
().
AbortEvents
(
true
);
40
visitable.
Warp
(
mapWorldID_
,
mapPoint_
);
41
42
break
;
43
44
default
:
break
;
45
}
46
}
47
}
// namespace yap
YAPOG
src
YAPOG
Game
World
Map
WarpMapEventAction.cpp
Generated on Mon Sep 17 2012 22:24:25 for YAPOG by
1.8.1.1