ULTIMA8: Fix offset to Crusader attack data

This commit is contained in:
Matthew Duggan 2020-12-24 20:48:05 +09:00
parent 2b3864e2ce
commit ba4e20b075

View File

@ -815,14 +815,14 @@ bool AttackProcess::checkTimer2PlusDelayElapsed(int now) {
void AttackProcess::setAttackData(uint16 off, uint16 val) {
if (off >= MAGIC_DATA_OFF && off < MAGIC_DATA_OFF + ARRAYSIZE(_dataArray) - 1)
_dataArray[off] = val;
_dataArray[off - MAGIC_DATA_OFF] = val;
warning("Invalid offset to setAttackDataArray %d %d", off, val);
}
uint16 AttackProcess::getAttackData(uint16 off) const {
if (off >= MAGIC_DATA_OFF && off < MAGIC_DATA_OFF + ARRAYSIZE(_dataArray) - 1)
return _dataArray[off];
return _dataArray[off - MAGIC_DATA_OFF];
warning("Invalid offset to getAttackDataArray: %d", off);
return 0;