This section of the novel occurs in Chapter 15, when Roac brings Thorin news of Smaug's death but also the armies of the men and elves that are coming to claim the treasure. Roac advises making peace with Bard and using some of the dragon hoard to do so. It is important to remember how Thorin's character has become obsessed with gold-greed since his arrival at the mountain. He has literally become taken over by thinking, dreaming and talking about the treasure. This explains his somewhat irrational response to Roac:
Then Thorin burst forth in anger: "Our thaniks, Roac Carc's son. You and your people shall not be forgotten. But none of our gold shall thieves take or the violent carry off while we are alive."
Thorin also asks Roac to take news of these events to his kin, in particular Dain, and to ask him to come swiftly with a dwarven army to help them protect the treasure. We thus see one of Thorin's heroic failings - his greed that here is determining his actions and making him lose common sense and perspective.