Fixed wrong replacements of CD_CURRENT_ECONOMY (#3764)

Follow up to 7045d58

Fixes #3763

Thanks to @nubspixel
This commit is contained in:
Lemongrass3110 2018-12-18 17:16:59 +01:00 committed by GitHub
parent e3dd6238b5
commit 732059ac03
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1250,8 +1250,8 @@ OnClock0001:
// Apply investment to Eco. and Def. Only happens if there were investments made.
// Permanent Development can only happen once per day.
if (GetCastleData(strnpcinfo(2),CD_INVESTED_ECONOMY)) {
set .@Economy,GetCastleData(strnpcinfo(2),CD_INVESTED_ECONOMY);
SetCastleData strnpcinfo(2),CD_INVESTED_ECONOMY,.@Economy + GetCastleData(strnpcinfo(2),CD_INVESTED_ECONOMY) + (rand(2) && getgdskilllv(.@GID,10014));
set .@Economy,GetCastleData(strnpcinfo(2),CD_CURRENT_ECONOMY);
SetCastleData strnpcinfo(2),CD_CURRENT_ECONOMY,.@Economy + GetCastleData(strnpcinfo(2),CD_INVESTED_ECONOMY) + (rand(2) && getgdskilllv(.@GID,10014));
if (GetCastleData(strnpcinfo(2),CD_CURRENT_ECONOMY) > 100) SetCastleData strnpcinfo(2),CD_CURRENT_ECONOMY,100;
}
if (GetCastleData(strnpcinfo(2),CD_INVESTED_DEFENSE)) {