Changeset 328 for trunk/Database.pas
- Timestamp:
- Mar 25, 2021, 3:02:29 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Database.pas
r319 r328 49 49 GTestFlags: Integer; 50 50 Mode: TGameMode; 51 GWonder: array [0 .. 27] of TWonderInfo;51 GWonder: array [0 .. nWonder - 1] of TWonderInfo; 52 52 ServerVersion: array [0 .. nPl - 1] of integer; 53 53 ProcessClientData: array [0 .. nPl - 1] of boolean; … … 452 452 ResourceMask[p] := ResourceMask[p] or fModern; 453 453 454 for i := 0 to 27do { check whether wonders expired }454 for i := 0 to nWonder - 1 do { check whether wonders expired } 455 455 if (GWonder[i].EffectiveOwner <> GWonder[woEiffel].EffectiveOwner) and 456 456 (Imp[i].Expiration = ad) then … … 3149 3149 i, j, uix1, cix1, nearest: integer; 3150 3150 begin 3151 for i := 0 to 27do3151 for i := 0 to nWonder - 1 do 3152 3152 if RW[p].City[cix].Built[i] = 1 then 3153 3153 begin … … 3156 3156 FreeSlaves; 3157 3157 if i = woEiffel then // deactivate expired wonders 3158 for j := 0 to 27do3158 for j := 0 to nWonder - 1 do 3159 3159 if GWonder[j].EffectiveOwner = p then 3160 3160 CheckExpiration(j); 3161 3161 end; 3162 for i := 28to nImp - 1 do3162 for i := nWonder to nImp - 1 do 3163 3163 if (Imp[i].Kind <> ikCommon) and (RW[p].City[cix].Built[i] > 0) then 3164 3164 begin { destroy national projects } … … 3191 3191 begin 3192 3192 StealCity(p, cix, SaveUnits); 3193 with RW[p].City[cix] do 3194 begin 3195 for i := 0 to 27 do 3193 with RW[p].City[cix] do begin 3194 for i := 0 to nWonder - 1 do 3196 3195 if Built[i] > 0 then 3197 3196 GWonder[i].CityID := WonderDestroyed; … … 3243 3242 Built[imTownHall] := 0; 3244 3243 Built[imCourt] := 0; 3245 for i := 28to nImp - 1 do3244 for i := nWonder to nImp - 1 do 3246 3245 if Imp[i].Kind <> ikCommon then 3247 3246 Built[i] := 0; { destroy national projects } 3248 for i := 0 to 27do3247 for i := 0 to nWonder - 1 do 3249 3248 if Built[i] = 1 then 3250 3249 begin // new wonder owner! … … 3252 3251 if i = woEiffel then // reactivate expired wonders 3253 3252 begin 3254 for j := 0 to 27do3253 for j := 0 to nWonder - 1 do 3255 3254 if Imp[j].Expiration >= 0 then 3256 3255 for cix1 := 0 to (RW[pNew].nCity - 1) do 3257 3256 if RW[pNew].City[cix1].Built[j] = 1 then 3258 GWonder[j].EffectiveOwner := pNew 3257 GWonder[j].EffectiveOwner := pNew; 3259 3258 end 3260 3259 else
Note:
See TracChangeset
for help on using the changeset viewer.