polserver/testsuite/pol/scripts/include/sysevent.inc
Kevin Eady e5209a51ff
Add support for boat piloting via mouse movement (#558)
* Initial work on boat piloting changes
- Changed: Boat script is now registered as the boat's control script
- Added: Boat piloting via mouse movement
- Added: boatRef.pilot member
- Added: boatRef.pilot([charRef]) method

* add first test

* Fix boat control script attach on scripted create

* move boat move packet warnings to suspicious acts

* set pilot now errors when mutli has no process

* Add test, testclient support for boat move packet

* Touchup pilot members and methods
- Change `pilot` method to `setpilot`. This standarizes it a bit with
the same naming convention of `npc.setmaster`.
- Fix return values in `pilot` member, returning `0` if no pilot.

* Refactor to put functionality inside UBoat

* Address Discord comments
- Remove SuspecisionActs for no boat process.
- Add `relative_direction` to boat move sysevent.

* destroy boatmount on chr death; more error checks

* Fix compilation after master merge

* Fix relative_direction calculation

* wip tests

* Fix boat tests

* Address review comments
- Initialize UBoat::mountpiece

* Add HSA check to boat.setpilot

* Reject movement if boat mountpiece equipped

* docs; test cleanup

* add test for blocked movement

* Address Discord review comments
- Add suspicious acts notice for client movement while piloting
- Return error on attempting to script move a char that is piloting a boat

* Fix compiler warning
2024-01-06 18:01:31 +07:00

56 lines
2 KiB
C++

//
// event IDs to be returned in 'type' member of wait_for_event
// result.
//
// See documentation for details.
//
// DO NOT MODIFY THIS FILE! These are system events. New core distributions
// will include new versions of this file. User events should be placed in
// eventid.inc, and must have more than one bit set (ie not be any of the
// values found in this file)
//
//
const SYSEVENT_SPEECH := 0x00000001;
const SYSEVENT_ENGAGED := 0x00000002;
const SYSEVENT_DISENGAGED := 0x00000004;
const SYSEVENT_DAMAGED := 0x00000008;
const SYSEVENT_ENTEREDAREA := 0x00000010;
const SYSEVENT_LEFTAREA := 0x00000020;
const SYSEVENT_OPPONENT_MOVED := 0x00000040;
const SYSEVENT_HOSTILE_MOVED := 0x00000080; // not implemented
const SYSEVENT_MERCHANT_BOUGHT := 0x00000100;
const SYSEVENT_MERCHANT_SOLD := 0x00000200;
const SYSEVENT_ITEM_GIVEN := 0x00000400;
const SYSEVENT_DOUBLECLICKED := 0x00000800;
const SYSEVENT_GHOST_SPEECH := 0x00001000;
const SYSEVENT_GONE_CRIMINAL := 0x00002000;
const SYSEVENT_TOKEN_SPEECH := 0x00004000;
const SYSEVENT_TOKEN_GHOST_SPEECH := 0x00008000;
const SYSEVENT_BOAT_MOVEMENT := 0x00010000;
const SYSEVENT_RESERVED_00020000 := 0x00020000;
const SYSEVENT_RESERVED_00040000 := 0x00040000;
const SYSEVENT_RESERVED_00080000 := 0x00080000;
const SYSEVENT_RESERVED_00100000 := 0x00100000;
const SYSEVENT_RESERVED_00200000 := 0x00200000;
const SYSEVENT_RESERVED_00400000 := 0x00400000;
const SYSEVENT_RESERVED_00800000 := 0x00800000;
const SYSEVENT_RESERVED_01000000 := 0x01000000;
const SYSEVENT_RESERVED_02000000 := 0x02000000;
const SYSEVENT_RESERVED_04000000 := 0x04000000;
const SYSEVENT_RESERVED_08000000 := 0x08000000;
const SYSEVENT_RESERVED_10000000 := 0x10000000;
const SYSEVENT_RESERVED_20000000 := 0x20000000;
const SYSEVENT_RESERVED_40000000 := 0x40000000;
const SYSEVENT_RESERVED_80000000 := 0x80000000;