Alliance with his father-in-law, Władysław I the Elbow-high, King of Poland, became a permanent element of Charles' foreign policy in the 1320s. During the Polish–Teutonic War for the suzerainty over Pomerelia, Charles sent Hungarian auxiliary troops commanded by William Drugeth in the autumn of 1330 in order to support Władysław in his war against the Teutonic Order. Beyond his status of without a male heir, this was the other reason why William drafted his last will and testament in that year, in his late twenties. He also turned to Pope John XXII expressing his wish to be buried in the Saint Anne chapel in Szedikert (Záhradné) near Sáros Castle. Contemporary or near-contemporary Prussian (Teutonic) chroniclers – Peter of Dusburg and Wigand of Marburg – described William as a well-respected and influential figure of the events during the campaign. Peter of Dusburg stated that William's Hungarian contingent consisted of 8,000 men. The Polish and Hungarian troops pillaged the Kulmerland of Teutonic Prussia up to the Osa River near Grudziądz. These maneuvers were followed by series of counterattacks by the Teutonics. Through the mediation of the Bohemian king John and the Hungarian king Charles I, the Grand Master of the Teutonic Order Werner von Orseln signed a truce with Władysław I on 18 October 1330. According to Wigand of Marburg, "the pagan" William Drugeth escorted the Grand Master to the Polish royal camp. Following that the Hungarian troops returned to home in the following months, but over the next year, the fighting continued until the Battle of Płowce.