Commit 32864687 authored by aleos89's avatar aleos89

Follow up to 212ce7fd

* Corrected the way vectors are cleared.
parent 5690891c
......@@ -48,6 +48,7 @@
#include "mob.hpp"
#include "achievement.hpp"
#include "clan.hpp"
#include "tax.hpp"
#define ATCOMMAND_LENGTH 50
#define ACMD_FUNC(x) static int atcommand_ ## x (const int fd, struct map_session_data* sd, const char* command, const char* message)
......
......@@ -48,14 +48,12 @@ struct s_tax *tax_get(enum e_tax_type type) {
* @param sd: Player data
*/
void tax_vending_vat(struct map_session_data *sd) {
int i;
nullpo_retv(sd);
if (battle_config.display_tax_info)
clif_displaymessage(sd->fd, msg_txt(sd, 776)); // [ Tax Information ]
for (i = 0; i < ARRAYLENGTH(sd->vending); i++) {
for (int i = 0; i < ARRAYLENGTH(sd->vending); i++) {
char msg[CHAT_SIZE_MAX];
unsigned short tax;
s_tax *taxdata;
......@@ -77,14 +75,12 @@ void tax_vending_vat(struct map_session_data *sd) {
* @param sd: Player data
*/
void tax_buyingstore_vat(struct map_session_data *sd) {
int i;
nullpo_retv(sd);
if (battle_config.display_tax_info)
clif_displaymessage(sd->fd, msg_txt(sd, 776)); // [ Tax Information ]
for (i = 0; i < ARRAYLENGTH(sd->buyingstore.items); i++) {
for (int i = 0; i < ARRAYLENGTH(sd->buyingstore.items); i++) {
char msg[CHAT_SIZE_MAX];
unsigned short tax;
s_tax *taxdata;
......@@ -206,6 +202,8 @@ void do_init_tax(void) {
* Finalizes the tax database
*/
void do_final_tax(void) {
TaxDB[TAX_SELLING].clear();
TaxDB[TAX_BUYING].clear();
for (int i = 0; i < TAX_MAX; i++) {
TaxDB[i]->total.clear();
TaxDB[i]->each.clear();
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment