EvEmu  0.8.4
11 September 2021
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
WormholeSvc.cpp
Go to the documentation of this file.
1 /*
2  ------------------------------------------------------------------------------------
3  LICENSE:
4  ------------------------------------------------------------------------------------
5  This file is part of EVEmu: EVE Online Server Emulator
6  Copyright 2006 - 2021 The EVEmu Team
7  For the latest information visit https://evemu.dev
8  ------------------------------------------------------------------------------------
9  This program is free software; you can redistribute it and/or modify it under
10  the terms of the GNU Lesser General Public License as published by the Free Software
11  Foundation; either version 2 of the License, or (at your option) any later
12  version.
13 
14  This program is distributed in the hope that it will be useful, but WITHOUT
15  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16  FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
17 
18  You should have received a copy of the GNU Lesser General Public License along with
19  this program; if not, write to the Free Software Foundation, Inc., 59 Temple
20  Place - Suite 330, Boston, MA 02111-1307, USA, or go to
21  http://www.gnu.org/copyleft/lesser.txt.
22  ------------------------------------------------------------------------------------
23  Author: Allan
24 */
25 
26 
27 #include "eve-server.h"
28 
29 #include "PyServiceCD.h"
30 #include "system/WormholeSvc.h"
31 
32 
34 
36 : PyService(mgr, "wormholeMgr"),
37  m_dispatch(new Dispatcher(this))
38 {
39  _SetCallDispatcher(m_dispatch);
40 
41  PyCallable_REG_CALL(WormHoleSvc, WormholeJump);
42 }
43 
45  delete m_dispatch;
46 }
47 
48 /*{'messageKey': 'CantEnterWormholeGlobalCriminalFlag', 'dataID': 17877563, 'suppressable': False, 'bodyID': 257299, 'messageType': 'info', 'urlAudio': '', 'urlIcon': '', 'titleID': 257298, 'messageID': 2844}
49  * {'messageKey': 'CantEnterWormholeWhileCloaked', 'dataID': 17877181, 'suppressable': False, 'bodyID': 257153, 'messageType': 'notify', 'urlAudio': '', 'urlIcon': '', 'titleID': None, 'messageID': 2783}
50  * {'messageKey': 'CantEnterWormholeWhileModuleActive', 'dataID': 17877772, 'suppressable': False, 'bodyID': 257379, 'messageType': 'notify', 'urlAudio': '', 'urlIcon': '', 'titleID': None, 'messageID': 2784}
51  * {'messageKey': 'CantOnlineSovInWormhole', 'dataID': 17877461, 'suppressable': False, 'bodyID': 257260, 'messageType': 'notify', 'urlAudio': '', 'urlIcon': '', 'titleID': None, 'messageID': 2935}
52  * {'messageKey': 'CantTargetWhileEnteringWormhole', 'dataID': 17877231, 'suppressable': False, 'bodyID': 257172, 'messageType': 'notify', 'urlAudio': '', 'urlIcon': '', 'titleID': None, 'messageID': 2798}
53  *
54  *
55  *
56  */
57 PyResult WormHoleSvc::Handle_WormholeJump( PyCallArgs& call ) {
61  sLog.White("WormHoleSvc", "Handle_WormholeJump() size=%u", call.tuple->size() );
62  call.Dump(SERVICE__CALL_DUMP);
63 
64  /*
65  * char ci[25];
66  * snprintf(ci, sizeof(ci), "Jumping:%u", toGate);
67  * GetShip()->SetCustomInfo(ci);
68  */
69 
70  /* return error msg from this call, if applicable, else nodeid and timestamp */
71  return new PyLong(Win32TimeNow());
72 }
73 
74 // ---------- wormhole data sent thru "AddBalls2" packet
75 /*
76  [PyString "AddBalls2"]
77  [PyTuple 1 items]
78  [PyTuple 3 items]
79  [Destiny Header]
80  [PacketType: 1]
81  [Stamp: 956]
82  [Ball]
83  [Name: ]
84  [FormationId: 255]
85  [Header]
86  [ItemId: 9000000000000023045]
87  [Mode: Stop (2)]
88  [Flags: 0 (0)]
89  [Radius: 3000]
90  [Location: (344357570320, -691652812800, 102847488000)]
91  [ExtraHeader]
92  [AllianceId: -1]
93  [CorporationId: -1]
94  [CloakMode: 0]
95  [Harmonic: NaN]
96  [Mass: 10000000000]
97 
98  [PyList 2 items]
99  [PyDict 9 kvp]
100  [PyString "itemID"]
101  [PyIntegerVar 9000000000000023045]
102  [PyString "typeID"]
103  [PyInt 30584]
104  [PyString "otherSolarSystemClass"]
105  [PyInt 3]
106  [PyString "wormholeSize"]
107  [PyFloat 1]
108  [PyString "wormholeAge"]
109  [PyInt 1]
110  [PyString "count"]
111  [PyInt 1]
112  [PyString "dunSpawnID"]
113  [PyInt 92]
114  [PyString "ownerID"]
115  [PyInt 500021]
116  [PyString "nebulaType"]
117  [PyInt 253]
118  [PyDict 4 kvp]
119  [PyString "itemID"]
120  [PyIntegerVar 9000000000000016526]
121  [PyString "typeID"]
122  [PyInt 19728]
123  [PyString "dungeonDataID"]
124  [PyInt 2990651]
125  [PyString "ownerID"]
126  [PyInt 500021]
127 
128  --------- destiny update
129  [PyTuple 2 items]
130  [PyList 3 items]
131  [PyTuple 2 items]
132  [PyInt 1019]
133  [PyTuple 2 items]
134  [PyString "Stop"]
135  [PyTuple 1 items]
136  [PyIntegerVar 1002332228246]
137  [PyTuple 2 items]
138  [PyInt 1019]
139  [PyTuple 2 items]
140  [PyString "OnSpecialFX"]
141  [PyTuple 10 items]
142  [PyIntegerVar 1002332228246]
143  [PyNone]
144  [PyNone]
145  [PyIntegerVar 9000000000000023045]
146  [PyInt 3]
147  [PyList 0 items]
148  [PyString "effects.JumpOutWormhole"]
149  [PyInt 0]
150  [PyInt 1]
151  [PyInt 0]
152  [PyTuple 2 items]
153  [PyInt 1019]
154  [PyTuple 2 items]
155  [PyString "OnSlimItemChange"]
156  [PyTuple 2 items]
157  [PyIntegerVar 9000000000000023045]
158  [PyObjectData Name: foo.SlimItem]
159  [PyDict 9 kvp]
160  [PyString "itemID"]
161  [PyIntegerVar 9000000000000023045]
162  [PyString "typeID"]
163  [PyInt 30584]
164  [PyString "otherSolarSystemClass"]
165  [PyInt 3]
166  [PyString "wormholeSize"]
167  [PyFloat 1]
168  [PyString "wormholeAge"]
169  [PyInt 1]
170  [PyString "count"]
171  [PyInt 2]
172  [PyString "dunSpawnID"]
173  [PyInt 92]
174  [PyString "ownerID"]
175  [PyInt 500021]
176  [PyString "nebulaType"]
177  [PyInt 253]
178  [PyBool False]
179  */
180 
181 
182 /* location is both region and system.
183  * mapLocationWormholeClasses
184  * Column Type Null Default Comments
185  * locationID int(11) No
186  * wormholeClassID tinyint(3) Yes NULL
187  */
Dispatcher *const m_dispatch
size_t size() const
Definition: PyRep.h:591
PyCallable_Make_InnerDispatcher(WormHoleSvc) WormHoleSvc
Definition: WormholeSvc.cpp:33
#define sLog
Evaluates to a NewLog instance.
Definition: LogNew.h:250
virtual ~WormHoleSvc()
Definition: WormholeSvc.cpp:44
int64 Win32TimeNow()
Definition: utils_time.cpp:70
#define PyCallable_REG_CALL(c, m)
Definition: PyServiceCD.h:78
void Dump(LogType type) const
Definition: PyCallable.cpp:81
Dispatcher *const m_dispatch
Definition: WormholeSvc.h:40
Python long integer.
Definition: PyRep.h:261
PyTuple * tuple
Definition: PyCallable.h:50