From ad1f1814541fc38f7c06e88c7925fbb5bd0dceeb Mon Sep 17 00:00:00 2001 From: fusion32 Date: Mon, 26 May 2025 17:53:28 -0300 Subject: impl Cron and most `map.cc` functions --- src/map.hh | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) (limited to 'src/map.hh') diff --git a/src/map.hh b/src/map.hh index ac58b98..38aface 100644 --- a/src/map.hh +++ b/src/map.hh @@ -99,6 +99,13 @@ struct TCronEntry { int Next; }; +// NOTE(fusion): Cron management functions. Most for internal use. +Object CronCheck(void); +void CronExpire(Object Obj, int Delay); +void CronChange(Object Obj, int NewDelay); +uint32 CronInfo(Object Obj, bool Delete); +uint32 CronStop(Object Obj); + // NOTE(fusion): Map management functions. Most for internal use. void SwapObject(TWriteBinaryFile *File, Object Obj, uint32 FileNumber); void SwapSector(void); @@ -140,21 +147,21 @@ Object GetContainerObject(Object Con, int Index); Object GetMapContainer(int x, int y, int z); Object GetMapContainer(Object Obj); Object GetFirstObject(int x, int y, int z); -//GetFirstSpecObject +Object GetFirstSpecObject(int x, int y, int z, ObjectType Type); uint8 GetMapContainerFlags(Object Obj); -//CoordinateFlag void GetObjectCoordinates(Object Obj, int *x, int *y, int *z); -//IsOnMap -//IsPremiumArea -//IsProtectionZone -//IsNoLogoutField -//IsHouse -//GetHouseID -//SetHouseID -//GetDepotNumber -//GetDepotName -//GetDepotSize -//GetStartPosition -//GetMarkPosition +bool CoordinateFlag(int x, int y, int z, FLAG Flag); +bool IsOnMap(int x, int y, int z); +bool IsPremiumArea(int x, int y, int z); +bool IsNoLogoutField(int x, int y, int z); +bool IsProtectionZone(int x, int y, int z); +bool IsHouse(int x, int y, int z); +uint16 GetHouseID(int x, int y, int z); +void SetHouseID(int x, int y, int z, uint16 ID); +int GetDepotNumber(const char *Town); +const char *GetDepotName(int DepotNumber); +int GetDepotSize(int DepotNumber, bool PremiumAccount); +bool GetMarkPosition(const char *Name, int *x, int *y, int *z); +void GetStartPosition(int *x, int *y, int *z, bool Newbie); #endif //TIBIA_MAP_HH_ -- cgit v1.2.3