This commit is contained in:
aozhiwei 2023-06-16 20:45:12 +08:00
parent 150c578a60
commit 7278e08e87

View File

@ -518,6 +518,8 @@ void Room::ScatterDrop(const glm::vec3& center, int drop_id)
glm::vec3 dir = GlmHelper::UP; glm::vec3 dir = GlmHelper::UP;
GlmHelper::RotateY(dir, a8::RandAngle()); GlmHelper::RotateY(dir, a8::RandAngle());
const glm::vec3 pos = center; const glm::vec3 pos = center;
const mt::Equip* equip_meta = mt::Equip::GetById(std::get<0>(item));
if (equip_meta) {
DropItemEx(center + dir * (5.0f + rand() % 50), DropItemEx(center + dir * (5.0f + rand() % 50),
pos, pos,
std::get<0>(item), std::get<0>(item),
@ -526,6 +528,7 @@ void Room::ScatterDrop(const glm::vec3& center, int drop_id)
true); true);
} }
} }
}
} }
void Room::DropItem(const glm::vec3& pos, int item_id, int item_count, int item_lv) void Room::DropItem(const glm::vec3& pos, int item_id, int item_count, int item_lv)