Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug Fix] Cursor Coin Upon Death #3020

Merged
merged 2 commits into from
Mar 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions common/ruletypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ RULE_REAL(Character, FullGroupEXPModifier, 2.16, "Sets the group experience modi
RULE_BOOL(Character, IgnoreLevelBasedHasteCaps, false, "Ignores hard coded level based haste caps.")
RULE_BOOL(Character, EnableRaidEXPModifier, true, "Enable or disable the raid experience modifier, default is true")
RULE_BOOL(Character, EnableRaidMemberEXPModifier, true, "Enable or disable the raid experience modifier based on members in raid, default is true")
RULE_BOOL(Character, LeaveCursorMoneyOnCorpse, false, "Enable or disable leaving cursor money on player corpses")
RULE_CATEGORY_END()

RULE_CATEGORY(Mercs)
Expand Down
20 changes: 19 additions & 1 deletion zone/corpse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -395,11 +395,29 @@ Corpse::Corpse(Client* client, int32 in_rezexp) : Mob (
!RuleB(Character, RespawnFromHover) ||
client->ClientVersion() < EQ::versions::ClientVersion::SoF
) {
SetCash(pp->copper, pp->silver, pp->gold, pp->platinum);
auto corpse_copper = pp->copper;
auto corpse_silver = pp->silver;
auto corpse_gold = pp->gold;
auto corpse_platinum = pp->platinum;

pp->copper = 0;
pp->silver = 0;
pp->gold = 0;
pp->platinum = 0;

if (RuleB(Character, LeaveCursorMoneyOnCorpse)) {
corpse_copper += pp->copper_cursor;
corpse_silver += pp->silver_cursor;
corpse_gold += pp->gold_cursor;
corpse_platinum += pp->platinum_cursor;

pp->copper_cursor = 0;
pp->silver_cursor = 0;
pp->gold_cursor = 0;
pp->platinum_cursor = 0;
}

SetCash(corpse_copper, corpse_silver, corpse_gold, corpse_platinum);
}

// get their tints
Expand Down