mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-13 09:07:19 +00:00
server_crash_fix: OnPlayerGiveXP (#1929)
[fef0ed4072c8_worldserver.exe_.18-12_23-30-44.txt](https://github.com/user-attachments/files/24258638/fef0ed4072c8_worldserver.exe_.18-12_23-30-44.txt) - Just added common logic and defense coding - Optimized isRandombot while at it Just for clarification i am aware the trigger of bug lies with the progression mod. Regardless it should not happen.
This commit is contained in:
@@ -2594,17 +2594,14 @@ void RandomPlayerbotMgr::Refresh(Player* bot)
|
||||
|
||||
bool RandomPlayerbotMgr::IsRandomBot(Player* bot)
|
||||
{
|
||||
if (bot && GET_PLAYERBOT_AI(bot))
|
||||
{
|
||||
if (GET_PLAYERBOT_AI(bot)->IsRealPlayer())
|
||||
return false;
|
||||
}
|
||||
if (bot)
|
||||
{
|
||||
return IsRandomBot(bot->GetGUID().GetCounter());
|
||||
}
|
||||
if (!bot)
|
||||
return false;
|
||||
|
||||
return false;
|
||||
PlayerbotAI* botAI = GET_PLAYERBOT_AI(bot);
|
||||
if (!botAI || botAI->IsRealPlayer())
|
||||
return false;
|
||||
|
||||
return IsRandomBot(bot->GetGUID().GetCounter());
|
||||
}
|
||||
|
||||
bool RandomPlayerbotMgr::IsRandomBot(ObjectGuid::LowType bot)
|
||||
|
||||
Reference in New Issue
Block a user