diff --git a/server/gameserver/constant.h b/server/gameserver/constant.h index 12ccf7d..01278a3 100755 --- a/server/gameserver/constant.h +++ b/server/gameserver/constant.h @@ -68,7 +68,7 @@ const int DEF_HELMET_ID = 12404; const int DEF_CHEST_ID = 12401; const int DEF_WEAPON_ID = 12103; -const int GAS_INACTIVE_TIME = 1; +const int GAS_INACTIVE_TIME = 200; const int SERVER_FRAME_RATE = 20; const int SYNC_FRAME_RATE = 10; diff --git a/server/gameserver/player.cc b/server/gameserver/player.cc index ee9fe6f..e53357f 100644 --- a/server/gameserver/player.cc +++ b/server/gameserver/player.cc @@ -310,6 +310,15 @@ void Player::LootInteraction(Loot* entity) if (item_meta->i->_inventory_slot() >= 0 && item_meta->i->_inventory_slot() < MAX_INVENTORY_NUM) { inventory[item_meta->i->_inventory_slot()] += entity->count; + if (item_meta->i->_inventory_slot() == 5 || + item_meta->i->_inventory_slot() == 6) { + Weapon* weapon = &weapons[3 + (item_meta->i->_inventory_slot() - 5)]; + if (weapon->weapon_id == 0) { + weapon->weapon_id = entity->item_id; + weapon->weapon_lv = 1; + weapon->num = 0; + } + } if (item_meta->i->_inventory_slot() > 12) { if (item_meta->i->_inventory_slot() - 12 > curr_scope_idx) { curr_scope_idx = item_meta->i->_inventory_slot() - 12; diff --git a/server/gameserver/room.cc b/server/gameserver/room.cc index 819be1a..fdbe736 100644 --- a/server/gameserver/room.cc +++ b/server/gameserver/room.cc @@ -409,6 +409,13 @@ void Room::ProcAddedObjects() moveable_hash_[pair.second->entity_uniid] = pair.second; } break; + case ET_Smoke: + { + for (auto& pair : human_hash_) { + pair.second->new_objects.insert(pair.second); + } + } + break; default: abort(); break;