141 if (!bind_args->
IsInt()) {
186 Call_SetCloneTypeID arg;
187 if (!arg.Decode(&call.
tuple)){
188 codelog(SERVICE__ERROR,
"%s: Failed to decode arguments.",
GetName());
195 std::string reason =
"DESC: Updating Clone in ";
218 Call_SingleIntegerArg arg;
219 if (!arg.Decode(&call.
tuple)) {
220 codelog(SERVICE__ERROR,
"%s: Failed to decode arguments.",
GetName());
228 throw UserError (
"RentingYouHaveAnOfficeHere");
232 _log(CORP__WARNING,
"RentOffice() - Was quoted %i but station reports %u for office rental at %s", \
237 std::string reason =
"Office Rental at ";
255 odata.lockDown =
false;
256 odata.rentalFee = arg.arg;
260 if (!odata.officeID) {
261 codelog(CORP__ERROR,
"%s: Error at renting a new office", pClient->
GetName());
276 OfficeAttributeUpdate change;
277 change.oldOfficeFolderID =
PyStatic.NewNone();
278 change.oldOfficeID =
PyStatic.NewNone();
279 change.oldStationID =
PyStatic.NewNone();
280 change.oldTypeID =
PyStatic.NewNone();
281 change.newOfficeFolderID = odata.folderID;
282 change.newOfficeID = odata.officeID;
283 change.newStationID = odata.stationID;
284 change.newTypeID = odata.typeID;
285 OnObjectPublicAttributesUpdated update;
286 update.notificationParams =
new PyDict();
287 update.realRowCount = 1;
289 update.changePKIndexValue = odata.stationID;
290 update.changes = change.Encode();
291 PyTuple* payload = update.Encode();
292 std::vector<Client*> cVec;
295 for (
auto cur : cVec) {
297 cur->SendNotification(
"OnObjectPublicAttributesUpdated",
"stationid", &payload,
false);
302 return new PyInt(odata.officeID);
324 throw UserError (
"CorpHQIsAtThisStation");
332 std::vector<uint32> ids;
334 for (
auto cur : ids) {
336 if (pClient !=
nullptr)
352 std::vector<uint32> stVec;
373 for (
auto cur : stVec) {
384 PyResult CorpStationMgrIMBound::Handle_GetQuoteForGettingCorpJunkBack(
PyCallArgs &call)
386 _log(CORP__CALL,
"CorpStationMgrIMBound::Handle_GetQuoteForGettingCorpJunkBack()");
387 call.
Dump(CORP__CALL_DUMP);
394 PyResult CorpStationMgrIMBound::Handle_DoesPlayersCorpHaveJunkAtStation(
PyCallArgs &call)
396 _log(CORP__CALL,
"CorpStationMgrIMBound::Handle_DoesPlayersCorpHaveJunkAtStation()");
397 call.
Dump(CORP__CALL_DUMP);
410 Call_SingleIntegerArg arg;
411 if (!arg.Decode(&call.
tuple)) {
412 codelog(SERVICE__ERROR,
"%s: Failed to decode arguments.",
GetName());
426 PyResult CorpStationMgrIMBound::Handle_DoStandingCheckForStationService(
PyCallArgs &call) {
454 _log(CORP__CALL,
"CorpStationMgrIMBound::Handle_DoStandingCheckForStationService()");
455 call.
Dump(CORP__CALL_DUMP);
463 _log(CORP__CALL,
"CorpStationMgrIMBound::Handle_CancelRentOfOffice()");
464 call.
Dump(CORP__CALL_DUMP);
478 _log(CORP__CALL,
"CorpStationMgrIMBound::Handle_PayForReturnOfCorpJunk()");
479 call.
Dump(CORP__CALL_DUMP);
494 _log(CORP__CALL,
"CorpStationMgr::Handle_GetImprovementStaticData()");
495 call.
Dump(CORP__CALL_DUMP);
667 _log(CORP__CALL,
"CorpStationMgr::Handle_GetStationServiceStates()");
668 call.
Dump(CORP__CALL_DUMP);
Dispatcher *const m_dispatch
PyCallable_DECL_CALL(GetCorporateStationInfo)
static bool ChangeCloneLocation(uint32 charID, uint32 locationID)
#define _log(type, fmt,...)
PyObject * ListStationOwners(uint32 station_id)
int32 GetCharacterID() const
int32 GetCorporationID() const
void GetCorpStations(uint32 corpID, std::vector< uint32 > &stVec)
std::string m_strBoundObjectName
int8 GetAvalibleOfficeCount()
CharacterRef GetChar() const
const char * GetName() const
static void GetMemberIDs(uint32 corpID, std::vector< uint32 > &ids, bool online=true)
void GetGuestList(std::vector< Client * > &cVec)
void _SetCallDispatcher(CallDispatcher *d)
virtual ~CorpStationMgrIMBound()
static uint32 GetStartingStationByCareer(uint32 careerID)
PyCallable_Make_InnerDispatcher(CorpStationMgr) CorpStationMgr
Dispatcher *const m_dispatch
void SetBaseID(uint32 baseID)
#define codelog(type, fmt,...)
virtual ~CorpStationMgr()
std::string GetBindStr() const
static void TranserFunds(uint32 fromID, uint32 toID, double amount, std::string reason="", uint8 entryTypeID=Journal::EntryType::Undefined, uint32 referenceID=0, uint16 fromKey=Account::KeyType::Cash, uint16 toKey=Account::KeyType::Cash, Client *pClient=nullptr)
PyServiceMgr *const m_manager
virtual PyBoundObject * CreateBoundObject(Client *pClient, const PyRep *bind_args)
const char * GetName() const
Python object "ccp_exceptions.UserError".
#define PyCallable_REG_CALL(c, m)
static void UpdateCorpHQ(uint32 corpID, uint32 stationID)
std::string corpTicker() const
double GetCloneTypeCostByID(uint32 cloneTypeID)
static PyRep * GetOffices(uint32 stationID)
StationItem * pStationItem
std::string GetCharName()
Dispatcher *const m_dispatch
const std::string & itemName() const
PyObject * ListStationCorps(uint32 station_id)
void Dump(LogType type) const
int32 GetStationID() const
PyCallable_Make_Dispatcher(CorpStationMgrIMBound) CorpStationMgrIMBound(PyServiceMgr *mgr
void RentOffice(OfficeData &odata)
int32 GetOfficeRentalFee()
std::string GetSystemName() const
const char * TypeString() const
void SetCorpHQ(uint32 stationID)
CorporationDB uint32 station_id
void SetItemString(const char *key, PyRep *value)
SetItemString adds or sets a database entry.
bool ChangeCloneType(uint32 charID, uint32 typeID)
const char * GetName() const
uint32 GetOfficeID(uint32 corpID)