[Tasks] Use CashReward for Tasks (#2332)

Also removes the sound which does not occur
This commit is contained in:
hg 2022-07-30 14:33:05 -04:00 committed by GitHub
parent 5e50c4181f
commit 2ccf692167
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1340,7 +1340,6 @@ void ClientTaskState::RewardTask(Client *client, TaskInformation *task_informati
int platinum, gold, silver, copper; int platinum, gold, silver, copper;
copper = task_information->cash_reward; copper = task_information->cash_reward;
client->AddMoneyToPP(copper, true);
platinum = copper / 1000; platinum = copper / 1000;
copper = copper - (platinum * 1000); copper = copper - (platinum * 1000);
@ -1349,23 +1348,7 @@ void ClientTaskState::RewardTask(Client *client, TaskInformation *task_informati
silver = copper / 10; silver = copper / 10;
copper = copper - (silver * 10); copper = copper - (silver * 10);
if ( client->CashReward(copper, silver, gold, platinum);
copper ||
silver ||
gold ||
platinum
) {
client->MessageString(
Chat::Yellow,
YOU_RECEIVE,
Strings::Money(
platinum,
gold,
silver,
copper
).c_str()
);
}
} }
int32 experience_reward = task_information->experience_reward; int32 experience_reward = task_information->experience_reward;
if (experience_reward > 0) { if (experience_reward > 0) {
@ -1392,8 +1375,6 @@ void ClientTaskState::RewardTask(Client *client, TaskInformation *task_informati
client->AddCrystals(0, task_information->reward_points); client->AddCrystals(0, task_information->reward_points);
} }
} }
client->SendSound();
} }
bool ClientTaskState::IsTaskActive(int task_id) bool ClientTaskState::IsTaskActive(int task_id)