mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
Defense check on the player itself
This commit is contained in:
@@ -209,8 +209,8 @@ public:
|
||||
|
||||
void OnPlayerGiveXP(Player* player, uint32& amount, Unit* /*victim*/, uint8 /*xpSource*/) override
|
||||
{
|
||||
// when default no XP scaling.
|
||||
if (sPlayerbotAIConfig->randomBotXPRate == 1.0)
|
||||
// early return
|
||||
if (sPlayerbotAIConfig->randomBotXPRate == 1.0 || !player)
|
||||
return;
|
||||
|
||||
// when player is no bot.
|
||||
|
||||
Reference in New Issue
Block a user