DEADSOFTWARE

Mapdef: Fix trigger shot sound
[d2df-sdl.git] / src / shared / mapdef_impl.inc
index 25281132013dedf705dcb5e17e123749fd983254..14723af4508795d703c472711a0d8898993787db 100644 (file)
@@ -22,6 +22,7 @@ function TDynRecordHelper.trigTHeight (): Word; inline; begin result := Word(get
 function TDynRecordHelper.trigWait (): Word; inline; begin result := Word(getFieldWithType('wait', TDynField.TType.TUShort).ival); end;
 function TDynRecordHelper.trigPressCount (): Word; inline; begin result := Word(getFieldWithType('count', TDynField.TType.TUShort).ival); end;
 function TDynRecordHelper.trigExtRandom (): Boolean; inline; begin result := (getFieldWithType('ext_random', TDynField.TType.TBool).ival <> 0); end;
+function TDynRecordHelper.trigSound (): AnsiString; inline; begin result := utf2win(getFieldWithType('sound', TDynField.TType.TString).sval); end;
 
 // TRIGGER_SECRET
 
@@ -85,7 +86,7 @@ function TDynRecordHelper.trigHealMax (): Boolean; inline; begin result := (getF
 // TRIGGER_SHOT
 function TDynRecordHelper.trigShotType (): Byte; inline; begin result := Byte(getFieldWithType('type', TDynField.TType.TUByte).ival); end;
 function TDynRecordHelper.trigShotTarget (): Byte; inline; begin result := Byte(getFieldWithType('target', TDynField.TType.TUByte).ival); end;
-function TDynRecordHelper.trigQuiet (): Boolean; inline; begin result := (getFieldWithType('quiet', TDynField.TType.TBool).ival = 0); end;
+function TDynRecordHelper.trigShotSound (): Boolean; inline; begin result := (getFieldWithType('sound', TDynField.TType.TBool).ival = 0); end;
 function TDynRecordHelper.trigAim (): SmallInt; inline; begin result := ShortInt(getFieldWithType('aim', TDynField.TType.TByte).ival); end;
 function TDynRecordHelper.trigSight (): Word; inline; begin result := Word(getFieldWithType('sight', TDynField.TType.TUShort).ival); end;
 function TDynRecordHelper.trigAccuracy (): Word; inline; begin result := Word(getFieldWithType('accuracy', TDynField.TType.TUShort).ival); end;