implement BB rare monster determination
This commit is contained in:
+12
-1
@@ -2066,7 +2066,6 @@ void send_level_up(shared_ptr<Lobby> l, shared_ptr<Client> c) {
|
||||
send_command_t(l, 0x60, 0x00, cmd);
|
||||
}
|
||||
|
||||
// gives a player EXP
|
||||
void send_give_experience(shared_ptr<Lobby> l, shared_ptr<Client> c,
|
||||
uint32_t amount) {
|
||||
if (c->version() != GameVersion::BB) {
|
||||
@@ -2079,6 +2078,18 @@ void send_give_experience(shared_ptr<Lobby> l, shared_ptr<Client> c,
|
||||
send_command_t(l, 0x60, 0x00, cmd);
|
||||
}
|
||||
|
||||
void send_rare_enemy_index_list(shared_ptr<Client> c, const vector<size_t>& indexes) {
|
||||
S_RareMonsterList_BB_DE cmd;
|
||||
if (indexes.size() > cmd.enemy_ids.size()) {
|
||||
throw runtime_error("too many rare enemies");
|
||||
}
|
||||
for (size_t z = 0; z < indexes.size(); z++) {
|
||||
cmd.enemy_ids[z] = indexes[z];
|
||||
}
|
||||
cmd.enemy_ids.clear_after(indexes.size(), 0xFFFF);
|
||||
send_command_t(c, 0xDE, 0x00, cmd);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// ep3 only commands
|
||||
|
||||
|
||||
Reference in New Issue
Block a user