I'm trying to increase the range of Arealoot.
At default it is at 3x3 cell radius. The src code is set to read the splash level from Greed, which is currently set to lv 4 (which is 11x11 cell radius). But this part is not working.
Here is the src code below:
/// Request to pick up an item.
/// 009f <id>.L (CZ_ITEM_PICKUP)
/// 0362 <id>.L (CZ_ITEM_PICKUP2)
/// There are various variants of this packet, some of them have padding between fields.
void clif_parse_TakeItem(int fd, struct map_session_data *sd)
{
struct flooritem_data *fitem;
int map_object_id,debug_i;
int skill_greed(struct block_list *bl, va_list ap);
map_object_id = RFIFOL(fd,packet_db[RFIFOW(fd,0)].pos[0]);
fitem = (struct flooritem_data*)map_id2bl(map_object_id);
do {
if (pc_isdead(sd)) {
clif_clearunit_area(&sd->bl, CLR_DEAD);
break;
}
if (fitem == NULL || fitem->bl.type != BL_ITEM || fitem->bl.m != sd->bl.m)
break;
if (pc_cant_act(sd))
break;
if (sd->state.arealoot == 1) {
//debug_i = map_foreachinrange(skill_greed,&sd->bl,3,BL_ITEM,&sd->bl);
debug_i = map_foreachinrange(skill_greed,&sd->bl,skill_get_splash(BS_GREED,1),BL_ITEM,&sd->bl);
//ShowDebug("debug_i=%d", debug_i);
if(debug_i == 0)
return;
} else if (!pc_takeitem(sd, fitem))
break;
return;
} while (0);
// Client REQUIRES a fail packet or you can no longer pick items.
clif_additem(sd,0,0,6);
}
And this is the part that is not working.
if (sd->state.arealoot == 1) {
//debug_i = map_foreachinrange(skill_greed,&sd->bl,3,BL_ITEM,&sd->bl);
debug_i = map_foreachinrange(skill_greed,&sd->bl,skill_get_splash(BS_GREED,1),BL_ITEM,&sd->bl);
Here is a preview of Greed & Arealoot in game. Greed (with splash lvl 4):
Arealoot: