Coins as items update 2

This commit is contained in:
kinther 2025-12-24 11:06:57 -08:00
parent 972d290126
commit d4bda3ad4a
37 changed files with 736 additions and 779 deletions

View file

@ -43,8 +43,8 @@ struct char_point_data_plrtoascii {
sh_int max_move; /* Max move for PC/NPC */
sh_int armor; /* Internal -100..100, external -10..10 AC */
int gold; /* Money carried */
int bank_gold; /* Gold the char has in a bank account */
int coins; /* Money carried */
int bank_coins; /* Coins the char has in a bank account */
int exp; /* The experience of the player */
};
@ -291,10 +291,10 @@ void convert(char *filename)
fprintf(outfile, "Move: %d/%d\n", cpd->move, cpd->max_move);
if (cpd->armor != PFDEF_AC)
fprintf(outfile, "Ac : %d\n", cpd->armor);
if (cpd->gold != PFDEF_GOLD)
fprintf(outfile, "Gold: %d\n", cpd->gold);
if (cpd->bank_gold != PFDEF_BANK)
fprintf(outfile, "Bank: %d\n", cpd->bank_gold);
if (cpd->coins != PFDEF_COINS)
fprintf(outfile, "Coin: %d\n", cpd->coins);
if (cpd->bank_coins != PFDEF_BANK_COINS)
fprintf(outfile, "BankCoins: %d\n", cpd->bank_coins);
if (cpd->exp != PFDEF_EXP)
fprintf(outfile, "Exp : %d\n", cpd->exp);

View file

@ -38,8 +38,8 @@ long atol(const char *str);
#define MINDEX_DELETED FLAG(0) /* Mail has been marked for deletion */
#define MINDEX_URGENT FLAG(1) /* Mail is flagged as urgent by sender */
#define MINDEX_HAS_OBJ FLAG(2) /* Mail has an attached object */
#define MINDEX_HAS_GOLD FLAG(3) /* Mail contains some gold coins */
#define MINDEX_IS_COD FLAG(4) /* Mail requires some gold coins */
#define MINDEX_HAS_COINS FLAG(3) /* Mail contains some coins */
#define MINDEX_IS_COD FLAG(4) /* Mail requires some coins */
#define MINDEX_FROM_MOB FLAG(5) /* Mail has been sent by using scripts */
#define MINDEX_READ FLAG(6) /* Mail has been viewed but not received */
#define MINDEX_DRAFT FLAG(7) /* Mail is an unsent draft copy */
@ -159,8 +159,8 @@ int parse_mail_flags(FILE *plr_file) {
if (IS_SET_AR(fl, MAIL_DRAFT)) SET_BIT(ret, MINDEX_DRAFT);
}
}
if ((txt = findLine(plr_file, "Gold:")) != NULL) {
if (atol(txt) > 0) SET_BIT(ret, MINDEX_HAS_GOLD);
if ((txt = findLine(plr_file, "Coin:")) != NULL) {
if (atol(txt) > 0) SET_BIT(ret, MINDEX_HAS_COINS);
}
if ((txt = findLine(plr_file, "Objs:")) != NULL) {
SET_BIT(ret, MINDEX_HAS_OBJ);