Fix Aswid devour failing during attack animation
This commit is contained in:
parent
3104e5fabf
commit
9c64ed0072
1 changed files with 4 additions and 3 deletions
|
|
@ -1072,15 +1072,16 @@ namespace RacesOfValheim
|
||||||
// UseItem natively plays animation and consumes it.
|
// UseItem natively plays animation and consumes it.
|
||||||
// If stomach is full, EatFood fails, UseItem does not consume the item, and virtualInv is destroyed (disintegrated)
|
// If stomach is full, EatFood fails, UseItem does not consume the item, and virtualInv is destroyed (disintegrated)
|
||||||
AswidRace.BypassAswidFoodCheck = true;
|
AswidRace.BypassAswidFoodCheck = true;
|
||||||
Player.m_localPlayer.UseItem(virtualInv, addedItem, true);
|
bool successfullyEaten = Player.m_localPlayer.EatFood(addedItem);
|
||||||
AswidRace.BypassAswidFoodCheck = false;
|
AswidRace.BypassAswidFoodCheck = false;
|
||||||
|
|
||||||
if (addedItem.m_stack <= 0 || virtualInv.GetItem(addedItem.m_shared.m_name) == null)
|
if (successfullyEaten)
|
||||||
{
|
{
|
||||||
Jotunn.Logger.LogInfo($"[AswidDebug] Item was successfully eaten from virtual inventory!");
|
Jotunn.Logger.LogInfo($"[AswidDebug] Item was successfully eaten from virtual inventory via EatFood!");
|
||||||
|
|
||||||
// Show the Vae Victis message in the center of the screen
|
// Show the Vae Victis message in the center of the screen
|
||||||
Player.m_localPlayer.Message(MessageHud.MessageType.Center, "Vae Victis");
|
Player.m_localPlayer.Message(MessageHud.MessageType.Center, "Vae Victis");
|
||||||
|
Player.m_localPlayer.Message(MessageHud.MessageType.TopLeft, "$msg_ate " + addedItem.m_shared.m_name);
|
||||||
|
|
||||||
// Vae Victis XP logic - similar to Dead Raiser
|
// Vae Victis XP logic - similar to Dead Raiser
|
||||||
Player.m_localPlayer.RaiseSkill(Skills.SkillType.BloodMagic, 1f);
|
Player.m_localPlayer.RaiseSkill(Skills.SkillType.BloodMagic, 1f);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue