Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: icon id imbuement backpack and remove server log message empty #1006

Merged
merged 1 commit into from
Apr 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions data/XML/imbuements.xml
Original file line number Diff line number Diff line change
Expand Up @@ -409,18 +409,18 @@
<attribute key="item" value="10309" count="15" />
</imbuement>
<!-- Capacity Imbuement -->
<imbuement name="Featherweight" base="1" category="17" iconid="64" premium="0" storage="0">
<imbuement name="Featherweight" base="1" category="17" iconid="76" premium="0" storage="0">
<attribute key="description" value="Raises capacity by 3." />
<attribute key="effect" type="capacity" value="3" />
<attribute key="item" value="25694" count="20" />
</imbuement>
<imbuement name="Featherweight" base="2" category="17" iconid="64" premium="1" storage="0">
<imbuement name="Featherweight" base="2" category="17" iconid="77" premium="1" storage="0">
<attribute key="description" value="Raises capacity by 8." />
<attribute key="effect" type="capacity" value="8" />
<attribute key="item" value="25694" count="20" />
<attribute key="item" value="25702" count="10" />
</imbuement>
<imbuement name="Featherweight" base="3" category="17" iconid="64" premium="1" storage="0">
<imbuement name="Featherweight" base="3" category="17" iconid="75" premium="1" storage="0">
<attribute key="description" value="Raises capacity by 15." />
<attribute key="effect" type="capacity" value="15" />
<attribute key="item" value="25694" count="20" />
Expand Down
6 changes: 3 additions & 3 deletions src/creatures/players/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1251,8 +1251,9 @@ void Player::onApplyImbuement(Imbuement* imbuement, Item* item, uint8_t slot, bo
return;
}

std::stringstream withdrawItemMessage;
for (auto &[key, value] : items) {
std::stringstream withdrawItemMessage;

uint32_t inventoryItemCount = getItemTypeCount(key);
if (inventoryItemCount >= value) {
removeItemOfType(key, value, -1, true);
Expand All @@ -1268,10 +1269,9 @@ void Player::onApplyImbuement(Imbuement* imbuement, Item* item, uint8_t slot, bo

withdrawItemMessage << "Using " << mathItemCount << "x " << itemType.name << " from your supply stash. ";
withdrawItem(itemType.id, mathItemCount);
sendTextMessage(MESSAGE_STATUS, withdrawItemMessage.str());
}

sendTextMessage(MESSAGE_STATUS, withdrawItemMessage.str());

if (!protectionCharm && uniform_random(1, 100) > baseImbuement->percent) {
openImbuementWindow(item);
sendImbuementResult("Oh no!\n\nThe imbuement has failed. You have lost the astral sources and gold you needed for the imbuement.\n\nNext time use a protection charm to better your chances.");
Expand Down