This commit is contained in:
aozhiwei 2024-07-30 11:32:09 +08:00
parent 30ec1bf9cb
commit 4d8ea40d07
3 changed files with 13 additions and 0 deletions

View File

@ -298,6 +298,11 @@ bool Obstacle::DoInteraction(Human* sender)
DoHideHouseInteraction(sender);
}
break;
case kObstacleTreasureBox:
{
DoTreasureBoxInteraction(sender);
}
break;
default:
{
if (!IsDead(sender->room) && IsOpenInteraction()) {
@ -486,3 +491,8 @@ void Obstacle::SetRotate(float rotate)
{
rotate_ = rotate;
}
void Obstacle::DoTreasureBoxInteraction(Human* sender)
{
}

View File

@ -50,6 +50,7 @@ class Obstacle : public Entity
protected:
Obstacle();
void DoHideHouseInteraction(Human* sender);
void DoTreasureBoxInteraction(Human* sender);
std::tuple<long long, glm::vec3>* GetInteractionData(Human* sender);
void AddObstacleBuff(Creature* c);
void ClearObstacleBuff(Creature* c);

View File

@ -704,6 +704,7 @@ void Human::FillMFObjectLess(Room* room, Human* hum, cs::MFPlayerFull* full_data
p->set_hero_level(GetHeroLevel());
p->set_hero_exp(GetHeroExp());
p->set_hero_max_exp(GetHeroMaxExp());
p->set_box_num(box_num);
GetCurrWeapon()->ToPB(this, p->mutable_weapon());
PBUtils::Ability_FillMFAttrAdditionList(GetAbility().get(), this, p);
if (GetCar()) {
@ -749,6 +750,7 @@ void Human::FillMFObjectFull(Room* room, Human* hum, cs::MFObjectFull* full_data
p->set_max_energy_shield(max_energy_shield);
p->set_armor_shield(armor_shield);
p->set_max_armor_shield(max_armor_shield);
p->set_box_num(box_num);
if (guild_id != 0) {
p->set_guild_id(guild_id);
}