Sphereserver / Source-X

Ultima Online server emulator
Apache License 2.0
57 stars 45 forks source link

[Request] Fields diff time removed #1169

Closed canerksk closed 1 month ago

canerksk commented 11 months ago

In the past, all of the fields created by field spells would disappear at different times, but now they are all deleted at the same time, so they all occur for the same duration. Was this done on purpose? Can this be added again with an extra magicflags? eg. MAGICF_ASYNCFIELDTIME

In old sources this line looks like this. I wonder if an addition like this can be made?

current;

pSpell->MoveToDecay( ptg, iDuration * MSECS_PER_TENTH, true);

offer;

int64 _iDuration = IsSetMagicFlags(MAGICF_ASYNCFIELDTIME) ? iDuration + Calc_GetRandVal(iDuration / 2) : iDuration;

pSpell->MoveToDecay(ptg, _iDuration * MSECS_PER_TENTH, true);
xwerswoodx commented 6 months ago

I checked every sphere version in the achieve and all of them has same code, walls removed same time in every sphere version. Also I remind that we add TIMER under Wall Script to make it random in older versions.

Anyway I checked again and seems like it was random in 55j and 56b, it seems like changed in 56c. Adding a flag is a better instead of setting magic flag globally. Because someone may want to make some field spells to be synced but not all of them.

cbnolok commented 1 month ago

Done