Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Archipelago.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ std::map<std::pair<std::string,int64_t>, std::string> map_item_id_name;

// Callback function pointers
void (*resetItemValues)();
void (*getitemfunc)(int64_t,bool);
void (*getitemfunc)(int64_t,int,bool);
void (*checklocfunc)(int64_t);
void (*locinfofunc)(std::vector<AP_NetworkItem>) = nullptr;
void (*recvdeath)() = nullptr;
Expand Down Expand Up @@ -324,7 +324,7 @@ void AP_SetItemClearCallback(void (*f_itemclr)()) {
resetItemValues = f_itemclr;
}

void AP_SetItemRecvCallback(void (*f_itemrecv)(int64_t,bool)) {
void AP_SetItemRecvCallback(void (*f_itemrecv)(int64_t,int,bool)) {
getitemfunc = f_itemrecv;
}

Expand Down Expand Up @@ -739,10 +739,10 @@ bool parse_response(std::string msg, std::string &request) {
for (unsigned int j = 0; j < root[i]["items"].size(); j++) {
int64_t item_id = root[i]["items"][j]["item"].asInt64();
notify = (item_idx == 0 && last_item_idx <= j && multiworld) || item_idx != 0;
(*getitemfunc)(item_id, notify);
AP_NetworkPlayer sender = getPlayer(0, root[i]["items"][j]["player"].asInt());
(*getitemfunc)(item_id, sender.slot, notify);
if (queueitemrecvmsg && notify) {
AP_ItemRecvMessage* msg = new AP_ItemRecvMessage;
AP_NetworkPlayer sender = getPlayer(0, root[i]["items"][j]["player"].asInt());
msg->type = AP_MessageType::ItemRecv;
msg->item = getItemName(ap_game, item_id);
msg->sendPlayer = sender.alias;
Expand Down
4 changes: 2 additions & 2 deletions Archipelago.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ void AP_SetDeathLinkSupported(bool);

//Parameter Function must reset local state
void AP_SetItemClearCallback(void (*f_itemclr)());
//Parameter Function must collect item id given with parameter. Secound parameter indicates whether or not to notify player
void AP_SetItemRecvCallback(void (*f_itemrecv)(int64_t,bool));
//Parameter Function must collect item id given with parameter. Second parameter is the player id that sent that item. Third parameter indicates whether or not to notify player
void AP_SetItemRecvCallback(void (*f_itemrecv)(int64_t,int,bool));
//Parameter Function must mark given location id as checked
void AP_SetLocationCheckedCallback(void (*f_locrecv)(int64_t));

Expand Down