Added condition for picking up items: If the player has a pet out, don't pick up items manually

This commit is contained in:
Knaapchen 2022-11-15 01:04:00 +01:00
parent 440a89ffae
commit 0899e2ed3a
2 changed files with 28 additions and 24 deletions

View File

@ -178,6 +178,8 @@ namespace flyff {
DEFINE_MEMBER(3424, Vector<Skill>, skills); DEFINE_MEMBER(3424, Vector<Skill>, skills);
DEFINE_MEMBER(3548, int, pickup_pet_inventory_index);
const MinimumSize<4096> size; const MinimumSize<4096> size;
}; };

View File

@ -747,6 +747,8 @@ void attacker_script() {
return; return;
} }
} }
// Only pickup if player has no pickup pet spawned.
if(client.player->pickup_pet_inventory_index == -1) {
// No item target and no attack target // No item target and no attack target
current_pickup_item = find_next_item(); current_pickup_item = find_next_item();
item = neuz.get_mover(current_pickup_item); item = neuz.get_mover(current_pickup_item);
@ -762,9 +764,10 @@ void attacker_script() {
neuz.show_message(str); neuz.show_message(str);
return; return;
} else { }
current_target = find_closest_target(); }
current_target = find_closest_target();
monster = neuz.get_mover(current_target); monster = neuz.get_mover(current_target);
if (monster) { if (monster) {
std::string str = "Attacking "; std::string str = "Attacking ";
@ -778,7 +781,6 @@ void attacker_script() {
} }
} }
} }
}
} }