Skip to content

Commit

Permalink
fix(Core/Player): Quest failure sound when inventory full (#20970)
Browse files Browse the repository at this point in the history
* Add quest failure sound when inventory is full or quest failed

* Fix sound being played for all players & move call to correct function
  • Loading branch information
Exitare authored Dec 19, 2024
1 parent a23b13d commit 4d1dba4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 1 addition & 0 deletions src/server/game/Entities/Player/PlayerQuest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ bool Player::CanAddQuest(Quest const* quest, bool msg)
else if (msg2 != EQUIP_ERR_OK)
{
SendEquipError(msg2, nullptr, nullptr, srcitem);
PlayDirectSound(QUEST_SOUND_FAILURE, this); // Play failure sound
return false;
}
}
Expand Down
1 change: 0 additions & 1 deletion src/server/game/Entities/Player/PlayerStorage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4059,7 +4059,6 @@ void Player::SendEquipError(InventoryResult msg, Item* pItem, Item* pItem2, uint
}
}
GetSession()->SendPacket(&data);
PlayDirectSound(QUEST_SOUND_FAILURE); // Play failure sound
}

void Player::SendBuyError(BuyResult msg, Creature* creature, uint32 item, uint32 param)
Expand Down

0 comments on commit 4d1dba4

Please sign in to comment.