mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-26 02:41:28 +00:00
[Cleanup] Cleanup unnecessary condition in Client::SendAlternateCurrencyValue() (#3266)
# Notes - `value == 0` is unnecessary as it can only be 0 if we fail the `value > 0` check.
This commit is contained in:
parent
39ce0178f9
commit
8fc7f3a732
@ -6939,15 +6939,17 @@ void Client::SendAlternateCurrencyValues()
|
||||
|
||||
void Client::SendAlternateCurrencyValue(uint32 currency_id, bool send_if_null)
|
||||
{
|
||||
uint32 value = GetAlternateCurrencyValue(currency_id);
|
||||
if(value > 0 || (value == 0 && send_if_null)) {
|
||||
const auto value = GetAlternateCurrencyValue(currency_id);
|
||||
if (value > 0 || send_if_null) {
|
||||
auto outapp = new EQApplicationPacket(OP_AltCurrency, sizeof(AltCurrencyUpdate_Struct));
|
||||
AltCurrencyUpdate_Struct *update = (AltCurrencyUpdate_Struct*)outapp->pBuffer;
|
||||
update->opcode = 7;
|
||||
strcpy(update->name, GetName());
|
||||
auto update = (AltCurrencyUpdate_Struct *) outapp->pBuffer;
|
||||
update->opcode = 7;
|
||||
update->currency_number = currency_id;
|
||||
update->amount = value;
|
||||
update->unknown072 = 1;
|
||||
update->amount = value;
|
||||
update->unknown072 = 1;
|
||||
|
||||
strn0cpy(update->name, GetName(), sizeof(update->name));
|
||||
|
||||
FastQueuePacket(&outapp);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user