This commit is contained in:
aozhiwei 2024-08-20 16:43:22 +08:00
parent 2dd2b5c805
commit 695e04fcfd
2 changed files with 4 additions and 1 deletions

View File

@ -17,6 +17,7 @@
#include "ability.h"
#include "trigger.h"
#include "boxdrop.h"
#include "netdata.h"
#include "cs_proto.pb.h"
@ -251,6 +252,8 @@ void Player::_CMExecCommand(f8::MsgHdr* hdr, const cs::CMExecCommand& msg)
room->grid_service->MoveCreature(hum);
return true;
});
} else if (cmd == "total_lucky") {
SendDebugMsg(a8::Format("total_lucky:%f", {GetNetData()->GetTotalLucky()}));
} else if (cmd == "randomobj" && cmds.size() >= 2) {
int weapon_id = a8::XValue(cmds[1]);
Human* target = nullptr;

View File

@ -497,7 +497,7 @@ void Obstacle::SetRotate(float rotate)
void Obstacle::DoTreasureBoxInteraction(Human* sender)
{
if (!IsDead(sender->room) && sender->GetHeroQuality() > 1) {
if (!IsDead(sender->room) && sender->GetNetData()->GetTotalLucky() > 0.1f) {
++sender->box_num;
sender->room->frame_event.AddPropChg
(