fix(Core/Player): Quest failure sound when inventory full (#20970)
* Add quest failure sound when inventory is full or quest failed * Fix sound being played for all players & move call to correct function
This commit is contained in:
@@ -279,6 +279,7 @@ bool Player::CanAddQuest(Quest const* quest, bool msg)
|
|||||||
else if (msg2 != EQUIP_ERR_OK)
|
else if (msg2 != EQUIP_ERR_OK)
|
||||||
{
|
{
|
||||||
SendEquipError(msg2, nullptr, nullptr, srcitem);
|
SendEquipError(msg2, nullptr, nullptr, srcitem);
|
||||||
|
PlayDirectSound(QUEST_SOUND_FAILURE, this); // Play failure sound
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4059,7 +4059,6 @@ void Player::SendEquipError(InventoryResult msg, Item* pItem, Item* pItem2, uint
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
GetSession()->SendPacket(&data);
|
GetSession()->SendPacket(&data);
|
||||||
PlayDirectSound(QUEST_SOUND_FAILURE); // Play failure sound
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Player::SendBuyError(BuyResult msg, Creature* creature, uint32 item, uint32 param)
|
void Player::SendBuyError(BuyResult msg, Creature* creature, uint32 item, uint32 param)
|
||||||
|
|||||||
Reference in New Issue
Block a user