Added support for 64bit ticks (#3768)

Fixes #3017

Thanks to Hercules for the idea and their implementation of it.

This deprecates Windows XP support. If you want to use it to run your server on it, you have to forcefully enable it now.
Since 64bit ticks do not exist on XP, you might encounter some issues that are already fixed on other OS.
This commit is contained in:
Lemongrass3110
2018-12-21 00:02:19 +01:00
committed by GitHub
parent 0d816975f7
commit 01f61cfa4f
46 changed files with 495 additions and 424 deletions

View File

@@ -901,7 +901,7 @@ int pet_equipitem(struct map_session_data *sd,int index)
clif_pet_equip_area(pd);
if (battle_config.pet_equip_required) { // Skotlex: start support timers if need
unsigned int tick = gettick();
t_tick tick = gettick();
if (pd->s_skill && pd->s_skill->timer == INVALID_TIMER) {
if (pd->s_skill->id)
@@ -1038,7 +1038,7 @@ static int pet_food(struct map_session_data *sd, struct pet_data *pd)
* @param tick : last walk time
* @return 1:success, 0:failure
*/
static int pet_randomwalk(struct pet_data *pd,unsigned int tick)
static int pet_randomwalk(struct pet_data *pd,t_tick tick)
{
nullpo_ret(pd);
@@ -1097,7 +1097,7 @@ static int pet_randomwalk(struct pet_data *pd,unsigned int tick)
* @param tick : last support time
* @return 0
*/
static int pet_ai_sub_hard(struct pet_data *pd, struct map_session_data *sd, unsigned int tick)
static int pet_ai_sub_hard(struct pet_data *pd, struct map_session_data *sd, t_tick tick)
{
struct block_list *target = NULL;
@@ -1229,7 +1229,7 @@ static int pet_ai_sub_hard(struct pet_data *pd, struct map_session_data *sd, uns
*/
static int pet_ai_sub_foreachclient(struct map_session_data *sd,va_list ap)
{
unsigned int tick = va_arg(ap,unsigned int);
t_tick tick = va_arg(ap,t_tick);
if(sd->status.pet_id && sd->pd)
pet_ai_sub_hard(sd->pd,sd,tick);