This commit is contained in:
aozhiwei 2020-03-17 13:23:56 +08:00
parent e0d7af86e8
commit 188aa06e5f

View File

@ -2132,6 +2132,22 @@ void Human::DeadDrop()
}
}
}
{
Skin* old_skin = GetSkinByIdx(kSkinSlot_HAT);
if (old_skin && old_skin->skin_id != 0) {
a8::Vec2 dir = a8::Vec2::UP;
dir.Rotate(a8::RandAngle());
room->CreateLoot(old_skin->skin_id, GetPos() + dir * (40 + rand() % 50), 1, 1);
}
}
{
Skin* old_skin = GetSkinByIdx(kSkinSlot_CLOTH);
if (old_skin && old_skin->skin_id != 0) {
a8::Vec2 dir = a8::Vec2::UP;
dir.Rotate(a8::RandAngle());
room->CreateLoot(old_skin->skin_id, GetPos() + dir * (40 + rand() % 50), 1, 1);
}
}
}
void Human::SendBattleReport()
@ -2268,9 +2284,11 @@ void Human::ProcLootSkin(Loot* entity, MetaData::Equip* item_meta)
//装饰
Skin* old_skin = GetSkinByIdx(kSkinSlot_HAT);
if (old_skin) {
if (old_skin->skin_id != 0) {
a8::Vec2 dir = a8::Vec2::UP;
dir.Rotate(a8::RandAngle());
room->CreateLoot(old_skin->skin_id, GetPos() + dir * (40 + rand() % 50), 1, 1);
}
*old_skin = Skin();
old_skin->skin_id = item_meta->i->id();
@ -2284,9 +2302,11 @@ void Human::ProcLootSkin(Loot* entity, MetaData::Equip* item_meta)
//衣服
Skin* old_skin = GetSkinByIdx(kSkinSlot_CLOTH);
if (old_skin) {
if (old_skin->skin_id != 0) {
a8::Vec2 dir = a8::Vec2::UP;
dir.Rotate(a8::RandAngle());
room->CreateLoot(old_skin->skin_id, GetPos() + dir * (40 + rand() % 50), 1, 1);
}
*old_skin = Skin();
old_skin->skin_id = item_meta->i->id();