Fixed the problem with the hp overwrite

This commit is contained in:
ION606
2022-05-30 20:37:15 +03:00
parent 65f4de28ed
commit 5edae8d097
3 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -45,7 +45,7 @@ function attack(client, user_dbo, other_dbo, bot, thread, command, mongouri, ite
if (new_hp <= 0) {
winGame(client, bot, client.db(user_dbo.s.namespace.db), user_dbo, xp_collection, interaction.message);
} else {
other_dbo.updateOne({'equipped': {$exists: true}}, { $set: { hp :new_hp }}); //THIS DOES NOT WORK (OVERWRITES HPMP MAP WITH ONE VALUE)
other_dbo.updateOne({'equipped': {$exists: true}}, { $set: { 'hpmp.hp' :new_hp }}); //THIS DOES NOT WORK (OVERWRITES HPMP MAP WITH ONE VALUE)
}
});