YAPOG  0.0.1
Yet Another Pokemon Online Game
DestroyObjectMapEventAction.cpp
Go to the documentation of this file.
4 
5 namespace yap
6 {
9  , targetWorldID_ ()
10  {
11  }
12 
14  {
15  }
16 
18  const DestroyObjectMapEventAction& copy)
19  : BaseMapEventAction (copy)
20  , targetWorldID_ (copy.targetWorldID_)
21  {
22  }
23 
25  {
26  return new DestroyObjectMapEventAction (*this);
27  }
28 
30  {
31  targetWorldID_ = targetWorldID;
32  }
33 
35  {
37 
38  switch (GetContextType ())
39  {
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