26 #include "../../eve-common/EVE_Missions.h"
27 #include "../../eve-common/EVE_Standings.h"
41 m_strBoundObjectName =
"AgentBound";
76 _log(AGENT__DUMP,
"AgentBound::Handle_DoAction() - size= %u", call.
tuple->
size() );
77 call.
Dump(AGENT__DUMP);
81 if (!args.Decode(&call.
tuple)) {
82 _log(SERVICE__ERROR,
"%s: Failed to decode arguments.",
GetName());
106 std::string response =
"";
108 bool missionQuit =
false, missionCompleted =
false, missionDeclined =
false;
152 response =
"Why the fuck am I looking at you again, ";
296 agentSays->
SetItem(0,
new PyString(
"I can give you 24 hours to think about it."));
301 missionDeclined =
true;
358 _log(AGENT__ERROR,
"AgentBound::Handle_DoAction() - unhandled buttonID %u", actionID );
375 if (agentSays->
empty()) {
387 _log(AGENT__RSP_DUMP,
"AgentBound::Handle_DoAction RSP:" );
388 outer->
Dump(AGENT__RSP_DUMP,
" ");
397 _log(AGENT__MESSAGE,
"AgentBound::Handle_GetMissionBriefingInfo()");
452 _log(AGENT__RSP_DUMP,
"AgentBound::Handle_GetMissionBriefingInfo() RSP:" );
453 briefingInfo->
Dump(AGENT__RSP_DUMP,
" ");
462 _log(AGENT__DUMP,
"AgentBound::Handle_GetMissionKeywords() - size= %u", call.
tuple->
size() );
463 call.
Dump(AGENT__DUMP);
499 _log(AGENT__RSP_DUMP,
"AgentBound::Handle_GetMissionKeywords() RSP:" );
500 keywords->
Dump(AGENT__RSP_DUMP,
" ");
511 _log(AGENT__DUMP,
"AgentBound::Handle_GetMissionObjectiveInfo() - size= %u", call.
tuple->
size() );
512 call.
Dump(AGENT__DUMP);
538 _log(AGENT__DUMP,
"AgentBound::Handle_GetMyJournalDetails() - size= %u", call.
tuple->
size() );
539 call.
Dump(AGENT__DUMP);
567 tuple->
Dump(AGENT__RSP_DUMP,
" ");
574 _log(AGENT__DUMP,
"AgentBound::Handle_GetMissionJournalInfo() - size= %u", call.
tuple->
size() );
575 call.
Dump(AGENT__DUMP);
598 _log(AGENT__RSP_DUMP,
"AgentBound::Handle_GetMissionJournalInfo() RSP:" );
599 journalInfo->
Dump(AGENT__RSP_DUMP,
" ");
656 normalRewards->
SetItem(2, extra);
657 normList->
AddItem(normalRewards);
666 normalRewards->
SetItem(2, extra);
667 normList->
AddItem(normalRewards);
696 bonusRewards->
SetItem(3, extra);
697 bonusList->
AddItem(bonusRewards);
708 bonusRewards2->
SetItem(3, extra);
709 bonusList->
AddItem(bonusRewards2);
756 _log(AGENT__RSP_DUMP,
"AgentBound::Handle_GetMissionObjectiveInfo() RSP:" );
757 objectiveData->
Dump(AGENT__RSP_DUMP,
" ");
760 return objectiveData;
798 objData->
SetItem(1, pickupLocation);
800 objData->
SetItem(3, dropoffLocation);
805 objectives->
SetItem(0, objType);
816 objData->
SetItem(1, dropoffLocation);
821 objectives->
SetItem(0, objType);
891 _log(AGENT__DUMP,
"AgentBound::Handle_GetDungeonShipRestrictions() - size= %u", call.
tuple->
size() );
892 call.
Dump(AGENT__DUMP);
900 _log(AGENT__DUMP,
"AgentBound::Handle_RemoveOfferFromJournal() - size= %u", call.
tuple->
size() );
901 call.
Dump(AGENT__DUMP);
908 _log(AGENT__DUMP,
"AgentBound::Handle_GetOfferJournalInfo() - size= %u", call.
tuple->
size() );
909 call.
Dump(AGENT__DUMP);
916 _log(AGENT__DUMP,
"AgentBound::Handle_GetEntryPoint() - size= %u", call.
tuple->
size() );
917 call.
Dump(AGENT__DUMP);
924 _log(AGENT__DUMP,
"AgentBound::Handle_GotoLocation() - size= %u", call.
tuple->
size() );
925 call.
Dump(AGENT__DUMP);
932 _log(AGENT__DUMP,
"AgentBound::Handle_WarpToLocation() - size= %u", call.
tuple->
size() );
933 call.
Dump(AGENT__DUMP);
static float GetStanding(uint32 fromID, uint32 toID)
Dispatcher *const m_dispatch
void SendErrorMsg(const char *fmt,...)
#define _log(type, fmt,...)
uint32 GetStandingsRsp(uint32 charID)
PyObject * GetInfoServiceDetails()
float EffectiveQuality(int8 AgentQuality, uint8 NegotiationSkillLevel, float AgentPersonalStanding)
uint32 GetDeclineRsp(uint32 charID)
PyRep * Clone() const
Clones object.
bool IsMissionComplete(MissionOffer &data)
Python floating point number.
int32 GetCharacterID() const
PyDict * GetMissionObjectiveInfo(Client *pClient, MissionOffer &offer)
static uint32 IntegerValueU32(PyRep *pRep)
CharacterRef GetChar() const
void MakeOffer(uint32 charID, MissionOffer &offer)
void Dump(FILE *into, const char *pfx) const
Dumps object to file.
bool ContainsTypeQty(uint16 typeID, uint32 qty) const
bool HasMission(uint32 charID)
void RemoveMissionItem(uint16 typeID, uint32 qty)
#define is_log_enabled(type)
uint32 destinationSystemID
void SetItem(size_t index, PyRep *object)
Stores Python object.
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)
void UpdateStandings(Client *pClient, uint8 eventID, bool important=false)
const char * GetName() const
#define PyCallable_REG_CALL(c, m)
bool CanUseAgent(Client *pClient)
uint32 GetCompleteRsp(uint32 charID)
uint32 GetLoyaltyPoints(uint32 corpID)
uint32 destinationOwnerID
void GetOffer(uint32 charID, MissionOffer &offer)
PyTuple * GetMissionObjectives(Client *pClient, MissionOffer &offer)
PyDict * GetLocationWrap()
float GetStandingBonus(float fromStanding, uint32 fromFactionID, uint8 ConnectionsSkillLevel, uint8 DiplomacySkillLevel, uint8 CriminalConnectionsSkillLevel)
void DeleteOffer(uint32 charID)
void Dump(LogType type) const
int8 GetSkillLevel(uint16 skillTypeID, bool zeroForNotInjected=true) const
float EffectiveStanding(float YourStanding, double standingBonus)
uint32 dungeonSolarSystemID
uint32 GetAcceptRsp(uint32 charID)
void SendMissionUpdate(Client *pClient, std::string action)
void UpdateOffer(uint32 charID, MissionOffer &offer)
void SetItemString(const char *key, PyRep *value)
SetItemString adds or sets a database entry.
const char * GetName() const