If you dream of war, it means this is a warning type of dream. You maybe facing conflict in your waking life. War is made made. The origin of your trouble is from disagreement with your fellow human.
Dreaming of war can mean you’re at odds with yourself. You can’t come to a consensus about an issue. A part of your wants to stand on one side. Another part of you is undecided.
There are other factors which can trigger bad dreams. They are overeating near bedtime, watching violence/ horror near bedtime, or doing unpleasant activities, or suffering from trauma.