Kungenn
Veteran OT User
Ok so I've run into a few problem with adding Shared Experience to OTHire.
I've got a talkaction that will start the shared experience but unless I remove the function that is checking if a player has been attacking something recently the shared exp never becomes active.
The message shown is just "
Shared Experience has been activated," \
" but some members of your party are inactive."
And it never becomes active, I tried it with two characters, both level 50 and it didn't work.
When I removed the code
The shared experience message changes to
"Shared Experience is now active."
But if a player or monster dies while having shared exp active ther server crashes.
I need someone to help me fix this.
If you got the skills don't hesitate to message me,
Thanks in advance
I've got a talkaction that will start the shared experience but unless I remove the function that is checking if a player has been attacking something recently the shared exp never becomes active.
The message shown is just "
Shared Experience has been activated," \
" but some members of your party are inactive."
And it never becomes active, I tried it with two characters, both level 50 and it didn't work.
When I removed the code
Code:
if(!player->hasFlag(PlayerFlag_NotGainInFight)){
//check if the player has healed/attacked anything recently
CountMap::const_iterator it = pointMap.find(player->getID());
if(it == pointMap.end()){
return false;
}
uint64_t timeDiff = OTSYS_TIME() - it->second.ticks;
if(timeDiff > (uint32_t)g_config.getNumber(ConfigManager::IN_FIGHT_DURATION)){
//player has not attacked or healed anyone for a period of infight ticks
return false;
}
}
The shared experience message changes to
"Shared Experience is now active."
But if a player or monster dies while having shared exp active ther server crashes.
I need someone to help me fix this.
If you got the skills don't hesitate to message me,
Thanks in advance