This commit is contained in:
aozhiwei 2019-06-19 16:57:28 +08:00
parent 94317b5a79
commit 695d9fccf5
2 changed files with 5 additions and 1 deletions

View File

@ -688,7 +688,12 @@ void Player::HumanInteraction(Human* hum)
void Player::ProcPrepareItems(const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& prepare_items)
{
std::set<int> handled_items;
for (int equip_id : prepare_items) {
if (handled_items.find(equip_id) != handled_items.end()) {
continue;
}
handled_items.insert(equip_id);
MetaData::Equip* item_meta = MetaMgr::Instance()->GetEquip(equip_id);
if (item_meta) {
switch (item_meta->i->equip_type()) {

View File

@ -60,7 +60,6 @@ Player* PlayerMgr::CreatePlayerByCMJoin(long ip_saddr, int socket, const cs::CMJ
}
}
hum->SetSkinInfo(msg.baseskin());
hum->ProcPrepareItems(msg.prepare_items());
socket_hash_[socket] = hum;
return hum;
}