31 #include "packets/CorporationPkts.h"
47 assert(_data.
id == _id);
53 return ItemType::Load<StationType>(stationTypeID);
61 m_officePyData(nullptr),
63 m_stationID(stationID),
68 _log(ITEM__TRACE,
"Created Station for item %s (%u).",
name(),
itemID());
84 return InventoryItem::Load<StationItem>(stationID);
115 if (cur.second.corporationID = corpID)
131 std::map<uint32, bool>::const_iterator itr =
m_officeLoaded.find(officeID);
153 _log(CORP__TRACE,
"StationItem::LoadStationOffice() is loading corp office %u in stationID %u", officeID,
m_stationID);
155 if (oRef->GetMyInventory() ==
nullptr) {
156 _log(ITEM__ERROR,
"StationItem::LoadStationOffice() - GetMyInventory() for corp office %u in stationID %u is NULL.", officeID,
m_stationID);
159 oRef->SetLoaded(oRef->GetMyInventory()->LoadContents());
165 std::map<uint32, OfficeData>::iterator itr =
m_officeMap.find(officeID);
167 itr->second.lockDown =
true;
172 std::map<uint32, OfficeData>::iterator itr =
m_officeMap.find(officeID);
174 itr->second.lockDown =
false;
189 if (oRef.get() ==
nullptr)
193 OnOfficeRentalChanged oorc;
196 oorc.officeFolderID = odata.
folderID;
197 PyTuple* payload = oorc.Encode();
200 cur.second->SendNotification(
"OnOfficeRentalChanged",
"stationid", &payload,
false);
227 cVec.push_back(cur.second);
244 std::vector< InventoryItemRef >
items;
247 for (
auto cur : items)
328 slim->SetItemString(
"incapacitated",
new PyInt(0));
329 slim->SetItemString(
"online",
PyStatic.NewOne());
void GetInvForOwner(uint32 ownerID, std::vector< InventoryItemRef > &items)
void Append(const T &value)
Appends a single value to buffer.
CargoContainerRef GetContainerFromInventory(uint32 contID)
bool IsOfficeLoaded(uint32 officeID)
void AddGuest(Client *pClient)
#define _log(type, fmt,...)
std::map< uint32, bool > m_officeLoaded
void LoadStationOffice(uint32 corpID)
static StationItemRef Load(uint32 stationID)
StationSE(StationItemRef station, PyServiceMgr &services, SystemManager *system)
void GetRefineData(uint32 &stationCorpID, float &staEfficiency, float &tax)
int32 GetCharacterID() const
std::map< uint32, OfficeData > m_officeMap
static const int64 STATION_HANGAR_MAX_CAPACITY
void GetGuestList(std::vector< Client * > &cVec)
void SafeDelete(T *&p)
Deletes and nullifies a pointer.
const ItemType & type() const
bool HasShip(Client *pClient)
static StationType * Load(uint16 stationTypeID)
void RemoveLoadedOffice(uint32 officeID)
Generic class for buffers.
void ImpoundOffice(uint32 officeID)
float reprocessingStationsTake
std::map< uint32, Client * > m_guestList
virtual PyDict * MakeSlimItem()
void SetAttribute(uint16 attrID, int num, bool notify=true)
#define IsPlayerCorp(itemID)
const char * GetName() const
ShipItemRef GetShipFromInventory(uint32 shipID)
static RefPtr StaticCast(const RefPtr< Y > &oth)
Acts as static_cast from one RefPtr to another.
void RemoveGuest(Client *pClient)
static PyRep * GetOffices(uint32 stationID)
RefPtr< InventoryItem > InventoryItemRef
static uint32 CreateItemID(ItemData &data)
#define IsOfficeID(itemID)
virtual void EncodeDestiny(Buffer &into)
const std::string & itemName() const
int main(int argc, char *argv[])
#define STATION_OFFICE_OFFSET
static uint32 CreateItemID(ItemData &data)
EvilNumber GetAttribute(const uint16 attrID) const
#define IsFaction(itemID)
void AddLoadedOffice(uint32 officeID)
StationType(uint16 _id, const Inv::TypeData &_data)
#define IsAlliance(itemID)
void RentOffice(OfficeData &odata)
Inventory * GetMyInventory()
entityID heal the character with the entityID note giving you detailed ship status information gives a list of all dynamic entities and players and their destinyState in this bubble shows some current destiny variables save all items
float reprocessingEfficiency
InventoryItemRef GetByID(uint32 id) const
void RecoverOffice(uint32 officeID)
uint32 GetOfficeID(uint32 corpID)
StationItem(uint32 stationID, const StationType &type, const ItemData &data, const CelestialObjectData &cData)