1
This commit is contained in:
parent
94317b5a79
commit
695d9fccf5
@ -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()) {
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user