Unmanned aerial vehicles (UAVs) serve as aerial base stations when the cellular network is unavailable in war and disaster environment. In the most papers considering UAV as aerial base station consider only outdoor users. However, the most traffic demand occurs from indoor users, thus, not only outdoor users but also indoor users should be considered. Moreover, it is necessary to find the optimal movement of the UAV to support both outdoor and indoor users. In this paper, we propose an optimal UAV path based on reinforcement learning that can support both indoor and outdoor users in disaster and war scenario where have dynamic changes. Simulation results show the reward composed with throughput and service many users in the presence of both indoor and outdoor users. In addition, the UAV support indoor users first with higher service priority due to an emergency.